Posts

Showing posts from March, 2011

ios - Swift - edit contraints on the last cell from UICollection View -

i edit contraint last cell uicollectionview. in cell have image contraints on center of cell want align left of cell. i trying it: let cell : mycellcollection = collectionview.dequeuereusablecellwithreuseidentifier("mycellcollection", forindexpath: indexpath) as! mycellcollection var oldrole : nslayoutconstraint = nslayoutconstraint(item: cell.imageview1, attribute: nslayoutattribute.centerx, relatedby: nslayoutrelation.equal, toitem: cell, attribute: nslayoutattribute.centerx, multiplier: 1, constant: 0) var newrole : nslayoutconstraint = nslayoutconstraint(item: cell.imageview1, attribute: nslayoutattribute.leading, relatedby: nslayoutrelation.equal, toitem: cell, attribute: nslayoutattribute.leading, multiplier: 1, constant: 8); cell.imageview1.removeconstraint(oldrole) cell.imageview1.addconstraint(newrole) when run got error: terminating app due uncaught exception 'nsgenericexception', reason: 'unable install constraint on view. constrain

user interface - How to connect my program to a certain website in JAVA -

good day guys, i'm student right , want learn how connect fresh program our school's website. though i'm still developing program, able continue progress of program know how connect said website. and want connect user , pass text field site http://i.stack.imgur.com/l2gek.png so if user enters user , pass program . want sync website above after image: http://i.stack.imgur.com/nip9k.png i want these information , put these informations program because i'm still developing gui's these info put them it. so please me should , or brief instruction. my goal create gwa calculator in beautiful environment i'm asking how connect website. i post code if needed please check pics because cant post images , needs 10 reputation essentially asking how capture information website no formal api. there several methods of capturing information of them implement concept of reverse proxy . these website scraping utilities meant capture informatio

ruby on rails - Restrict s3_direct_upload to specific filetypes -

i have quick question. i'm using s3_direct_upload gem facilitate uploads s3 bucket. i'd restrict uploads pdfs only. how can go this? thanks! see gem's documentation, jquery plugin options section . it looks add before_add callback function checks ensure filename ends in .pdf , , returns false if doesn't.

Build error from Installing Apache Zeppelin -

i @ wits end trying apache zeppelin running on linux vm. following tutorial: http://madhukaudantha.blogspot.ca/2015/03/building-apache-zeppelin.html i have done following: git clone machine now trying run 'mvn clean package' i following error summary, need running. [info] reactor summary: [info] [info] zeppelin .......................................... success [16.124s] [info] zeppelin: interpreter ............................. success [36.026s] [info] zeppelin: zengine ................................. success [27.440s] [info] zeppelin: spark ................................... success [53.438s] [info] zeppelin: markdown interpreter .................... success [6.041s] [info] zeppelin: angular interpreter ..................... success [7.397s] [info] zeppelin: shell interpreter ....................... success [4.140s] [info] zeppelin: hive interpreter ........................ success [1:09.114s] [info] zeppelin: tajo interpreter ........................ succ

How to manage and communicate with multiple IPython/Jupyter kernels from a Python script? -

i want mimic functionality of notebook server, , instead coordinate creation/management of different ipython/jupyter kernels central body of logic (i.e. own python script). for example, want to: define abstract command e.g. "add(x, y)" communicate abstract command multiple kernels e.g. ipython kernel , scala kernel have each kernel execute command wish return result each kernel central body of logic can point me in direction of how programmatically start/stop/communicate multiple ipython/jupyter kernels? a kernelmanager deals starting , stopping single kernel, , there's multikernelmanager co-ordinate more one. http://ipython.org/ipython-doc/3/api/generated/ipython.kernel.manager.html http://ipython.org/ipython-doc/3/api/generated/ipython.kernel.multikernelmanager.html then can use .client() method kernelclient instance handles communications kernel: http://ipython.org/ipython-doc/3/api/generated/ipython.kernel.client.html for details

php - HTML to PDF , Result columns are empty -

Image
i using following codes create pdf. first memberinfo.php page contains table name, address, city etc of member mysql database. file in www.example.com/admin folder second member_pdf.php it used create pdf. in www.example.com/admin/do-pdf/dompdf/ folder code in memberinfo.php : <? include("../include/function.php"); // connect database // create object class $bsq=new bsq(); //use class function connect database $bsq->connect_db(); //================================================================================= $reg_id=$_get["reg_id"]; $where="reg_id='".$_get["reg_id"]."'"; $web_datars=$bsq->webdreamselect('tablename',$where,'','','',''); $member_data=mysql_fetch_array($web_datars); ?> //this table shown when click on view details link on member's list page... <table> <tr> <td> name </td><td><?=$member_data['

javascript - Creating responsive circle borders in CSS and/or jQuery -

Image
i got psd our designers today following layout: they want include 3 circles, evenly spaced, have responsive. every solution i've tried far has failed. my code @ moment follows: css (compiled scss) .section2 .info-box { float: left; display: block; margin-right: 10.1484%; width: 26.56773%; } /* line 89, /users/chriswatson/.rvm/gems/ruby-2.1.5/gems/neat-1.7.2/app/assets/stylesheets/grid/_span-columns.scss */ .section2 .info-box:last-child { margin-right: 0; } @media screen , (max-width: 992px) { /* line 84, /users/chriswatson/sites/nuvi-website/source/stylesheets/index.css.scss */ .section2 .info-box { float: left; display: block; margin-right: 38.19821%; width: 100%; margin-bottom: 40px; background-color: rgba(250, 250, 250, 0.1); padding: 15px; } /* line 89, /users/chriswatson/.rvm/gems/ruby-2.1.5/gems/neat-1.7.2/app/assets/stylesheets/grid/_span-columns.scss

c++ - Variadic function calling a variadic macro -

i have inline variadic function inline int foo(...) i need foo() call macro (let's call macro ), variadic. need foo() pass input parameters macro . redefining foo() macro easy solution because of __va_args__ option, need foo() return value. note: trying interface 2 parts of written code , not allowed change them. foo(...) used in first part of code , macro defined in second part. thing supposed define foo() uses macro , can't because both variadic. make foo macro contains lambda returns value, , invokes lambda. #define foo(...) \ [&](auto&&...args){ \ /* args, or __va_args__ */ \ macro(__va_args__); \ return 7; \ }(__va_args__) now int x = foo(a, b, c); both call lambda inside foo , , inside lambda call macro on (a, b, c) , , can return value. i pity whomever maintains code next.

r - calibration of the posterior probabilities -

currently work on calibration of probability. use calibration approach, called rescaling algorithm - source http://lem.cnrs.fr/portals/2/actus/dp_201106.pdf (page 7). the algorithm wrote is: rescaling_fun = function(x, y, z) { p_korg = z # yhat_test_prob$bad p_k_c1 = sum(as.numeric(y) - 1)/length(y) # testset$bad p_kt_c1 = sum(as.numeric(x) - 1)/length(x) # trainset$bad p_k_c0 = sum(abs(as.numeric(y) - 2))/length(y) p_kt_c0 = sum(abs(as.numeric(x) - 2))/length(x) p_new <- ((p_k_c1/p_kt_c1) * p_korg)/((p_k_c0/p_k_c0) * (1 - p_korg) + (p_k_c0/p_k_c1) * (p_korg)) return(p_new) } the input values are: 1. x - train_set$bad (actuals of `train set`) 2. y - test_set$bad (actuals of `test set`) 3. z - yhat_test_prob$bad (prediction on `test set`) the problem - result values not within range of 0 , 1 . please solve problem? your formulas obtain probs ( p_k_c1 ...) need modified. example, according paper, y binary variable (0, 1) , fo

ios - Where should I put utility method to parse PLIST file? -

(relatively new ios developer) i building drill-down table , data read plist file. data dictionary @ root of plist needed order maintained. it's array, @ expense of needing additional formatting extract data. there 2 view controllers (master/detail) need access method. there 2 options i'm thinking unsure implement: create utility class class helper methods can go okay have class contains mixed bag of methods utility use? create category on viewcontroller. category used 2 view controllers , there 1 method in category. i learn if there better practices out there this? thank you! this may answering more general question asking but: if have not come across take @ model-view-controller (mvc) design pattern advocated apple.

r - Different regression output using dynlm and lm -

i ran regression first using lm , using dynlm (from package dynlm ). here did using lm : euribor3t <- ts(diff(euribor3)) ois3t <- ts(diff(ois3)) x <- ts(diff(eurepo3-ois3)) vstoxxt <- ts(diff(vstoxx)) cdst <- ts(diff(cds)) omo2 <- ts(diff(log(open.market.operations))) l1 <- (lag(euribor3t, k=-1)) axx <- ts.intersect(euribor3t, ois3t, x, vstoxxt, cdst, omo2, l1) reg1 <- lm(euribor3t~ois3t+cdst+x+vstoxxt+omo2+l1, data=axx) summary(reg1) and dynlm : zoox = zoo(test[, -1]) lmx <- dynlm(d(euribor3)~d(ois3)+d(cds)+d(eurepo3-ois3)+d(vstoxx)+d(log(open.market.operations))+d(l(euribor3, 1)), data=zoox) summary(lmx) these 2 approaches give me exact same output. if add subset both regressions 1 24 (all else equal): euribor3t <- ts(diff(euribor3)) ois3t <- ts(diff(ois3)) x <- ts(diff(eurepo3-ois3)) vstoxxt <- ts(diff(vstoxx)) cdst <- ts(diff(cds)) omo2 <- ts(diff(log(open.market.operations))) l1 <- (lag(euribor3t, k=-1)) axx <- t

google spreadsheet - Get data in row with dropdown list -

i created dropdown list range in sheet2 in google spreadsheets. the dropdown filled bunch of names. when select particular item want update cell next data on sheet2 column. for example sheet2 looks like: id,name,date 1,john,2015-04-29 2,adam,2015-03-01 i select john in dropdown list , want display "date" column of john in cell on sheet1. assuming john selected in c3 , name/date data in range named namedrange1 please try: =vlookup(c3,namedrange1,2,0)

xamarin - Listview adapter in a ViewPager in a fragment - How to get the Activity -

i'm trying build music browser/player of local files on devices using cursorloader. i'm using xamarin android, c#. i'm using viewpager within fragment (not fragmentactivity, since fragment part of navigation drawer). i'm having trouble listview.adapter used show songs since i'm not able activity. when using listview adapter directly in activity works fine (i'm able see list of songs), when trying use in viewpager located using pageradapter (all within fragment). i'm not able activity in listview.adapter = new songsadapter ( this ,cursor,songslist). please guide me in order able pass activity adapter or let me know if i'm doing wrong in general makes not possible? thank you. appreciated :) julien using system; using system.collections.generic; using system.linq; using system.text; using android.support.v4.app; using android.content; using android.os; using android.runtime; using android.util; using android.views; using android.widget; using a

javascript - Why is my Java script code not running? (Form Validation) -

this html: <html> <head> <title>article</title> <link rel="stylesheet" href="pop.css" type="text/css" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> </head> <body> <script type="text/javascript" src="validator.js"></script> <div id="comment_form"> <form method="post"> name: <input type="text" name="name" id="name1" onblur="checkname()"> <br/> email: <input type="text" name="email" id="email1" onblur="checkemail()"> <br/> <br/> comment: <br/> <textarea name="comment" id="comment1" cols="50" rows="2" onblur="

java - jPCT: Strange camera rotation -

Image
i have created rubik's cube jpct , need rotate whole cube. have tried achieve rotation matrixes , have rotated single cube elements not seem way.. so want rotate camera around cube instead of rotating cube. pretty easy problem jpct changes orientation of camera randomly or have done mistake , unable fix it. simplevector camerapos = new simplevector(-20, 0, 0); simplevector cubecenter = new simplevector(2, 2, 2); while (!org.lwjgl.opengl.display.iscloserequested()) { refreshscene(); // camera position repeatedly rotated camerapos.rotateaxis(new simplevector(0, 0, 1), (float) math.toradians(1)); // here set camera position world.getcamera().setposition(camerapos); // camera looks @ center of cube, unfortunately // not fixed orientation world.getcamera().lookat(cubecenter); try { thread.sleep(50); } catch (interruptedexception e) { } } above code performs strange rotation of cube: that cool need rotate cube this:

colors - Java Bouncing ball app with random colour -

i have been handed task of making ball bounce in program have created. trying focus on more advanced features, second ball (which have done successfully) , making ball change random colour each time bounces. i quite new java, , coding in general, have managed make both both change random colour first time hit wall. however, cannot seem make change different colour each time bounces. have suggestions how accomplish this? import java.awt.color; import java.awt.graphics; import java.util.random; public class mainclass extends javax.swing.jframe implements runnable { int width ; int height ; int ball; int ball2; int posx; int posy; int posx2; int posy2; int dx = 8; int dy = 8;//dx dy varuiables movement of ball int dx2 = -8; int dy2 = -8; random rand = new random(); float r = rand.nextfloat(); float g = rand.nextfloat(); float b = rand.nextfloat(); float r2 = rand.nextfloat(); float g2 = rand.nextfloat(); float b2 = rand.nextfloat(); color randomcolor = new color(r, g, b); color

java - How to determine the correct position of an Image inside of a CTabItem -

Image
i add ctabitem s image s ctabfolder : ctabfolder tabfolder = new ctabfolder(somesection, swt.border); imagedescriptor deleteimagedesc = sharedimages.getimagedescriptor(isharedimages.img_etool_delete); image deleteimage = deleteimagedesc.createimage(); ctabitem tabitem = new ctabitem(tabfolder, swt.none); tabitem.setimage(deleteimage); // add more tabs... then want create tooltip appears if user moves mouse on deleteimage . tooltip deletetooltip = new tooltip(getshell(), swt.baloon); deletetooltip.setmessage("delete"); tabfolder.addmousetracklistener(new mousetrackadapter() { @override public void mousehover(mouseevent e) { tooltip.setlocation(tabfolder.todisplay(e.x, e.y)); tooltip.setvisible(doesanyoftabimagescontainpoint(mouseposition)); } }); to implement method doesanyoftabimagescontainpoint need determine position of every deleteimage . since ctabitem isn't control cannot use method todisplay . try solve manually dete

How to Remove duplicates from a Lookup File using Python? -

i've seen multiple responses around type of question, don't believe i've seen type of list concerned with. not duplicating here. appreciated! i have comma separated file use data enrichment. starts headers - tpcode,corporation_name - list of values follows. there around 35k rows (if matters). i notice when data lookup file (csv) displayed there multiple entries same customer. rather going in , manually removing them, run python script remove duplicates in format of: value,value value,value value,value etc., optimal way remove duplicates using python? side note, each tpcode should different, corp name can have multiple tpcodes. please let me know if need additional information. thanks in advance! hard tell question if each line should unique. if do: for l in sorted(set(line line in open('ors_1202.log'))): print(l.rstrip()) otherwise need more info.

Method 'setProviders' is marked deprecated in Spring Security 3.2.7 -

i using spring security 3.2.7 , got warning in spring configuration multiple annotations found @ line: - method 'setproviders' marked deprecated security-config.xml: <security:http auto-config="true"> <security:intercept-url pattern="/**" /> <security:form-login login-page="/login**" default-target-url="/dashboard**" authentication-failure-url="/login.xhtml?failed=true"/> <security:logout logout-url="/logout" logout-success-url="/login.xhtml"/> </security:http> <bean id="userdao" class="com.tds.erp.dao.impl.userdaoimpl" autowire="default" /> <bean id="userdetailsservice" class="com.tds.erp.services.impl.userdetailserviceimpl"> <property name="userdao" ref="userdao&

html - Firefox and Chrome can't play HTML5 mp4 video -

Image
i have html page contains mp4 video: <html> <body> <video width="800" height="600" controls> <source src="/static/xyz.mp4" type="video/mp4"> <p>your browser not support video tag.</p> </video> </body> </html> when load page in firefox, doesn't show play control buttons shows error message "no video supported format , mime type found" (see screenshot below). so use this site test browser's ability play html5 mp4 video , can play test video on site. firefox version v36 on centos linux. tried using chrome , can't play either. tried on firefox/chrome on windows failed. use firefox debugger @ debug info , see following message: media resource http://localhost:5000/static/xyz.mp4 not decoded. candidate resources failed load. media load paused. i tried playing xyz.mp4 video on local machine using linux's movie player , plays fine , plays fine in window

windows 7 - Powershell equivalent of the "tail" command ALMOST works remotely -

i looking windows 7 equivalent of "tail" command , thought had found powershell equivalent - c:\>powershell -command "& {get-content file.txt | select-object -last 100}" if use in cmd prompt on own windows 7 pc, returns info fine. can input/append file. however, when log on remotely pc (via openssh), command works, never drops me command prompt - hangs after showing me last 100 lines of file. means won't work batch file i'm trying edit 300 remote windows 7 pcs. any ideas? after trying many different suggestions found on online, found 1 worked! and answer within batch file itself. batch file call powershell line this: powershell.exe -noprofile -executionpolicy bypass c:\log\tail.ps1 :end again, works great if you're using on pc want run/get information. not remotely. found need add " < nul " end of call powershell in batch file, this powershell.exe -noprofile -executionpolicy bypass c:\

vb.net - How to politely stop a TcpListener? -

i have tcp server works ok need stop , threads in safe way. far research abort method not ok i debugged and, when server started , have no connections, seems code halts on line server = new tcplistener(ipaddress.any, port) so when call stopserver error wsacancelblokingcall can't figured out how stops server. here's code complete except starttcpclient data received. #region "tcp receive variables" dim tcpopen boolean = false private server tcplistener = nothing private serverthread thread = nothing friend ackstring string = "" #end region #region "tcp" public sub stopserver() server.stop() serverthread.abort() tcpopen = false end sub public sub initserver(byval port integer) server = new tcplistener(ipaddress.any, port) serverthread = new thread(addressof connectionlistener) serverthread.isbackground = true serverthread.start() tcpopen = true

twentytwenty - Responsive image inside bootstrap modal - not showing until I resize the window -

i'm using twentytwenty jquery library allow me have 2 images before , after slider, , want display these inside bootstrap modal. however once click on thumbnail image open modal, image doesn't display in modal until resize browser (i can resize 1px , it'll display straight after). i've tried using window.dispatchevent(new event('resize')); browser calculate height required image, isn't working. there function in javascript (or jquery) force browser display image? the page here: http://turfectsolutions.chrisstclair.co.uk/gallery/ thanks! :)

What is the function of mobileassetd daemon process on iOS? -

i'm curious , guess it's background service loading/caching application assets images. "assets" internal ios mechanism download data on demand. it's not available third-party apps; it's used apple. mobileassetd daemon in charge of managing , downloading assets when other apps ask them. the main example of assets dictionaries (as in, user see word definitions). looking @ directory downloaded assets stored, seems there's fonts, timezone database, firmware accessories (like lightning hdmi adapter), voice recognition data hey siri feature, etc. ota updates of ios firmware assets. this has nothing "asset catalogs" feature see when developing third-party ios applications.

php - Variable works only with echo -

somebody answer why can value in echo $novotituloslug; . but, nothing in line $novalinhas .= "<link>http://localhost/votanalei/" . $novotituloslug . "</link>" . "\r\n"; , below. function obterids($string) { $res = preg_match('~class="artigo" id="([\w]+)"~i', $string, $ids); if ($res == 1){ return $ids[1]; } else { return ""; } } $linhas = explode("<ul", $documento); $novalinhas = ""; foreach ($linhas $novalinha){ $novotituloslug = obterids($novalinha); echo $novotituloslug . "<br>"; // apenas para teste. $novalinhas .= "<link>http://localhost/votanalei/" . $novotituloslug . "</link>" . "\r\n"; $novalinhas .= "<wp:post_name>" . $novotituloslug . "</wp:post_name>" . "\r\n"; } $file = fopen("test.txt",&qu

sql - how to get a percentage depending on a column value? -

update 05/18/15 having column customers names listed on it. how can percentage based in 1 customer per date? example customername date sam 04/29/15 joy 04/29/15 tom 04/29/15 sam 04/29/15 oly 04/29/15 joy 04/29/15 04/29/15 sam 04/29/15 04/29/15 sam 04/29/15 oly 04/29/15 sam 04/29/15 oly 04/30/15 joy 05/01/15 notice column has 12 records, 2 of them blanks, won't count on percentage, ones has name. know percentage represents sam total(in case 10 records, sam % 50). query should return date percentage 04/29/15 50 04/30/15 0 05/01/15 0 update i don't care other customers, lets treat them one. need know percentage sam total list. any appreciated. everyone seems

ios - Load the tableview in another viewcontroller's view -

Image
is there way load uitableview storyboard? such table view in image. what did is: self.view addsubview:vc.view not worked. i want load tableview in viewcontroller's view. in advance!

html file not call from other server , with jquery .load() -

i have code $(document).ready(function(){ $('.designer').load('http://www.barsamservice.com/1.txt'); }); but , text file not loaded . but if download text file , upload in server . text file loaded how use access-control-allow-origin this due same origin policy . can information if other server has running service reading text file , gives output on request.

jquery - jqGrid does not refresh with new data -

i getting json data server passing in page number n should nth 100 rows. after loading once, , pressing "next page" button, seems new data correctly (i output first object in new data when being refreshed) not populate data in grid. <div> <button id="refreshjobsbutton">refresh jobs</button> <button id="nextpagejobsbutton">next page</button> <table id="jobtable"><tr><td/></tr></table> <div id="jobpager" class="ui-widget"></div> </div> $(document).ready(function() { var page = 0; $('#nextpagejobsbutton').button({ icons: { primary: "ui-icon ui-icon-arrowrefresh-1-s" } }).click(function(){ page = page + 1; $("#jobtable").jqgrid('gridunload'); refreshjob(page); }); }; function refreshjob(page) { var $source

override - Error overloading procedure in Delphi -

for reason getting error '[dcc error] myfile.pas(52): e2137 method 'assign' not found in base class'. here snipit of assign procedures worked fine until added 1 more, last assign. procedure assign(myclass: tmyclass); overload; override; procedure assign(myclass: thisservice.myclass); overload; override; procedure assign(myclass: thatservice.myclass); overload; override; procedure assign(myclass: txmlmyclass); overload; override; procedure assign(myclass: pbstruct1messages.tmyrecord); overload; override; procedure assign(myclass: pbstruct2messages.tmyrecord); overload; override; when use override , you're saying you're overriding virtual method same signature inherited parent class. if parent class doesn't have virtual method signature, compiler rightly complain can't find it. check ancestor classes confirm method exists. if doesn't exist, don't mark 1 in descendant class override .

r - Lapply in a dataframe over different variables using filters -

i'm trying calculate several new variables in dataframe. take initial values example: say have: dataset <- data.frame(time=rep(c(1990:1992),2), geo=c(rep("at",3),rep("de",3)),var1=c(1:6), var2=c(7:12)) time geo var1 var2 1 1990 @ 1 7 2 1991 @ 2 8 3 1992 @ 3 9 4 1990 de 4 10 5 1991 de 5 11 6 1992 de 6 12 and want: time geo var1 var2 var1_1990 var1_1991 var2_1990 var2_1991 1 1990 @ 1 7 1 2 7 8 2 1991 @ 2 8 1 2 7 8 3 1992 @ 3 9 1 2 7 8 4 1990 de 4 10 4 5 10 11 5 1991 de 5 11 4 5 10 11 6 1992 de 6 12 4 5 10 11 so both time , variable changing new variables. here attempt:

mysql - How does Left Join / IS NULL eliminate records which are there in one table and not in the other? -

i having tough time understand why left join / is null eliminate records there in 1 table , not in other. here example select l.id, l.value t_left l left join t_right r on r.value = l.value r.value null why should r.value = null eliminate records ? not understanding . know missing basic @ present cant figure out basic one. appreciate if explains me in detail . i want basic explanation. this explained following mysql> select * table1 ; +------+------+ | id | val | +------+------+ | 1 | 10 | | 2 | 30 | | 3 | 40 | +------+------+ 3 rows in set (0.00 sec) mysql> select * table2 ; +------+------+ | id | t1id | +------+------+ | 1 | 1 | | 2 | 2 | +------+------+ 2 rows in set (0.00 sec) here table1.id <-> table2.t1id now when left join joining key , if left table table1 data table1 , in non-matching record on table2 set null mysql> select t1.* , t2.t1id table1 t1 left join table2 t2 on t2.t1id = t1.id

xcode - IOS 8 swift CoreLocation -

im learning xcode 6.3 , swift , following book apress beginning xcode swift, in chapter 4 when doing first tab location tracker shows nothing @ , i'm confused. code first tab this import uikit import corelocation class trackviewcontroller: uiviewcontroller, cllocationmanagerdelegate { var locationmanager: cllocationmanager! @iboutlet weak var locationtext: uitextview! @iboutlet weak var toggleswitch: uiswitch! override func viewdidload() { super.viewdidload() // additional setup after loading view, typically nib. } override func didreceivememorywarning() { super.didreceivememorywarning() // dispose of resources can recreated. } @ibaction func changetoggle(sender: uiswitch) { if toggleswitch.on { self.locationtext.text = " " if (cllocationmanager.locationservicesenabled() == false) { self.toggleswitch.on = false } if locat

three.js - Increase number of maximum assigned morph targets on a mesh -

i have mesh 17 morph targets plus morph normals. wand assign least 10 of them @ same time. realized three.js supports 8 morph targets @ time, morph normals 4. found this thread on github. interestingly it's not day old. far no related question appeared here, ask. i wonder if it's anyhow possible increase maximum number. maybe overriding underlying shaders. and why limited @ , not max number of morphed vertices, make more sense performance.

linux - Usage of asterisk at the end of command -

i know asterisk used in regular expressions, meaning of @ end of line? find . -type f | grep -sl 'word' * i know can similar results using find . -type f | xargs grep -sl 'while' the asterisk * @ end used check in list of files in directory in lexicographic order.

r - Add up values in list -

i'm working list contains following data: >resultslist $`1` [1] "x" "0" "1" "1" "1" "5" $`2` [1] "x /// y" "0" "1" "1" "2" "3" $`3` [1] "x" "0" "1" "3" "2" "4" $`4` [1] "x /// z" "0" "1" "2" "2" "2" $`5` [1] "x" "0" "1" "3" "3" "4" $`6` [1] "x" "0" "0" "0" "1" "2" $`7` [1] "x" "0" "2" &q

javascript - AngularJS directive: Reference local variables from external HTML file used in template -

i hope phrased question correctly, haven't been able find else on this. have angularjs directive, this: angular.module( 'example', [] ).directive( 'exampledirective', ['$compile', '$http', function($compile, $http) { return { restrict: 'a', link: function (scope, element, attrs) { var listofitems = attrs.listofitems; var foo = attrs.foo; var template = '<ul>' + '<li ng-repeat="item in ' + listofitems + '">'+ '<i ng-click="clicked(item)">'+ '{{item.' + foo + '}}'+ '</i>'+ '</li>'+ '</ul>';

java - Status variable returns nullPointerException (Android) -

i have been following tutorial ( http://www.androidhive.info/2012/08/android-working-with-google-places-and-maps-tutorial/ ) in order make listview display nearest restaurant location in radius of 5km. however keep getting error, in runnable says status variable null. don't understand why error pops up. can guys give me short explanation , find solution?? placeslist.java public class placeslist implements serializable { public string status; public list<place> results; } displaylocations.java public class displaylocations extends activity { boolean isinternetpresent = false; connectiondetector cd; googleplaces googleplaces; placeslist nearplaces; gpstracker gps; button shownonmap; progressdialog pdialog; listview lv; arraylist<hashmap<string, string>> placeslistitems = new arraylist<hashmap<string, string>>(); public static string key_reference = "reference"; public sta

java - Can a process write to both Error Stream and Input Stream? -

i'm creating class abstract process builder , makes bit more 'user-friendly' , wonder if there's chance process can write both input , error stream? if so, can give me example situation happens? i want determine whether return input buffer after checking error stream. or have return both of them - way if input stream contains useful information user able use it. yes process can write both streams. consider situation process needs manipulation on input values sequentially, , process prints ok input stream every correct input, while same prints error on error stream if there logical input validation failure. print ok on input till finds error , error on error stream. also standard messages sent input stream while warnings , errors go error stream.

mysql - PHP - Reducing an independent record stock value by 1 -

i'm doing school project , i'm using dreamweaver along backend database using phpmyadmin. now, need is, when click button, reduce stock column value in "products" table 1. however there different products in table. shown below: http://i.stack.imgur.com/vlzxq.png so lets say, user on game page "destiny" , clicks on buy button, how can make reduce stock level one, only destiny record , not fifa 15 column. destiny stock becomes 49, fifa stays 50. need make each button have different script or? currently, made button in page, links action script, im not sure sort of code using. thank you xneyte giving advice, comes across me - xrin - new programming database contents php or similar? so step steps: mysql databases should connected 1 of 2 types of connection - pdo , mysqli_ . mysql databases work using native mysql xneyte mentioned - deprecated , highly discouraged . so have pass information php page, list of games on index.php