Posts

Showing posts from September, 2012

T-test for grouped data in R commander -

i've following data format entity measure1 measure2 a1 1.5 1.4 a1 1.9 1.7 a1 1.8 1.5 b1 2.7 2.5 b1 3.0 2.9 b1 3.1 2.7 b1 2.8 2.9 c1 1.7 1.5 c1 1.7 1.8 ... i wish pairwise t-test entity factor , @ measure1 , measure2 levels. can in r there way in r commander gui? in r commander paired t-test considers values of measure1 , measure2 columns , doesn't perform t-test groupwise. 'independent sample t-test' option grayed out too. if abandoned paired-t.test formalism regression: lm( measure2 ~ measure1 + entity, data=dfrm) this give estimate of mean increase in measure2 (from measure 1) group. thats eally paired t-tests doing, anyway.

Runing new Xcode 4.3.3 Cordova app in iOS simulator 5.0 error "Symbol not found: _NSURLIsExcludedFromBackupKey" -

although running ios 5.1 simulator ok. my system osx 10.7 lions. my cordova app not use remotely related nsurlisexcludedfrombackupkey. defined in 1 of header file foundation.framework/nsurl.h file. my research found 2 related posts no solutions: use nsurlisexcludedfrombackupkey without crashing on ios 5.0 and http://www.openradar.me/radar?id=1597401 the output running ios 5.0 simulator: dyld: symbol not found: _nsurlisexcludedfrombackupkey referenced from: /users/wug/library/application support/iphone simulator/5.0/applications/96c31219-6305-460d-a45e-cfa94ba64efd/sample.app/sample expected in: /applications/xcode.app/contents/developer/platforms/iphonesimulator.platform/developer/sdks/iphonesimulator5.0.sdk/system/library/frameworks/foundation.framework/foundation in /users/wug/library/application support/iphone simulator/5.0/applications/96c31219-6305-460d-a45e-cfa94ba64efd/sample.app/sample running on older simulators had same error. can expert shine light on issue? th...

html - Unable to vertically align text inside container -

i'm trying vertically align text in couple of containers using line-height , won't work. have never had problems before, reason won't line now. now, i'm blind coding, can't seem find problem lies... this how html looks like: <div class="formlabel"> <div class="labelnumber">d</div> <div class="labeltitle"> <h2>new password</h2> <p>check character , length restrictions</p> </div> </div> and how css looks like: .formlabel { position: relative; width: 400px; height: 40px; padding: 20px 0px 0px 10px; margin: 0; } .labelnumber { float: left; width: 30px; height: 30px; line-height: 30px; background: #191919; font: bold 18px arial; color: #555555; text-align: center; padding: 0; margin: 0; } it's character in .labelnumber container i'm trying vertically align. the line-height attribute part of shorthand font syntax, put line-height after or integrate font attribute...

tomcat - Failed to process JAR [jar:jndi:/localhost/ttsvr/WEB-INF/lib/activation.jar!/null] for TLD files -

i'm deploying tooltwist application production server using fip, , following error in catalina.out when start server. info: deploying web application directory ttsvr 06/07/2012 3:51:02 pm org.apache.catalina.startup.tldconfig tldscanjar warning: failed process jar [jar:jndi:/localhost/ttsvr/web-inf/lib/activation.jar!/null] tld files java.io.ioexception: no such file or directory @ java.io.unixfilesystem.createfileexclusively(native method) @ java.io.file.checkandcreate(file.java:1704) @ java.io.file.createtempfile(file.java:1792) @ java.io.file.createtempfile(file.java:1828) @ sun.net.www.protocol.jar.urljarfile$1.run(urljarfile.java:204) @ java.security.accesscontroller.doprivileged(native method) ... it's warning rather error, , application seems run fine, displays full stack trace on every jar file , puts 3,700 lines in log file. the jar files exists, , have correct file permissions. i've tried deleting jar files, checked server.xml , web.xml. applicatio...

2D rendering (matrices, specifically) in OpenGL ES 2.0 (Android) -

so i'm trying render 2 moving quads, each @ different locations. shaders simple possible (vertices transformed modelview-projection matrix, there's 1 color). whenever try , render something, end slivers of color! i've done work 3d rendering in opengl before i'm having issues 2d stuff. here's basic rendering loop, simplified bit (i'm using matrix manipulation methods provided android.opengl.matrix , program custom class created calls gles20.gluniformmatrix4fv() ): matrix.orthom(projection, 0, 0, windowwidth, 0, windowheight, -1, 1); program.setuniformmatrix4f("projection", projection); at point, render quads (this repeated each quad): matrix.setidentitym(modelview, 0); matrix.translatem(modelview, 0, quadx, quady, 0); program.setuniformmatrix4f("modelview", modelview); quad.render(); // calls gldrawarrays and see sliver of color each quad is! i'm @ wits end here, i've tried can think of , i'm @ point i'm screaming @ co...

android - Create file JSON online and get URL -

from string json, want create url display string json. do know website supports this! you can use gist.github.com . select language javascript . have created sample here . can json in raw format too. the following post alternate gist: json-viewer: data in url

silverlight - Keep same layout when orientation changes -

Image
i have silverlight page have below appearance in portrait , landscape mode. essentially, there 3 images arranged in grid. big image spans 2 columns. when phone rotates, images rotate, overall layout not. small images remain close back/windows/search button , large image remains towards top of phone. i have tried number of methods achieve effect, have proved unsatisfactory in 1 way or another. i'm hoping can point out i'm missing or, @ least, prevent else having waste 4 or 5 days coming same conclusion did. questions in bold: the first thing tried applying rotatetransform layoutroot element , rotating -90 degrees whenever phone rotation changed landscape. had hard code height , width of layout root 800 , 400 instead of "auto" or gets drawn squished. solution worked, rotatetransform gets applied after page drawn. because drawn 400x800 image on 800x400 screen, top 200 , bottom 200 pixels aren't drawn. becomes obvious after it's rotated , (now)left , right po...

Android BitmapFactory.decodeStream(...) doesn't load HTTPS URL on emulator -

app doesn't load image https url when run on emulator. sample code: url url = new url("https://someserver.com/photo.jpg"); mimageview.setimagebitmap(bitmapfactory.decodestream(url.openstream())); the image loads fine when run on actual device. emulator loads image if it's accessed via http instead of https. am doing wrong or known issue? use below code display image in imageview url. imageview mimageview = (imageview)findviewbyid(r.id.mimageview1); url url = new url(address); inputstream content = (inputstream)url.getcontent(); drawable d = drawable.createfromstream(content , "src"); mimageview.setimagedrawable(d); and use below code that. try { url url = new url(imageurl); httpget httprequest = null; httprequest = new httpget(url.touri()); httpclient httpclient = new defaulthttpclient(); httpresponse response = (httpresponse) httpclient.execute(httprequest); httpentity entity = response.getentity(); bufferedhttpentity b_entity = new bufferedhttp...

parse json array to normal array in android -

i have json data php -it's 1 dimensional array-: {pair:["-8.5745000,115.3735700","-8.5683300,115.3733700","-8.5683300,115.3733700","-8.5687800,115.3997700","-8.5687800,115.3997700","-8.5764900,115.4007400","-8.5764900,115.4007400","-8.5687800,115.3997700","-8.5687800,115.3997700","-8.5656400,115.4156400","-8.5656400,115.4156400","-8.5565200,115.4122800","-8.5565200,115.4122800","-8.5566200,115.4110500","-8.5566200,115.4110500","-8.5560700,115.4112200","-8.5560700,115.4112200","-8.5554200,115.4112800","-8.5554200,115.4112800","-8.5527200,115.4025400","-8.5527200,115.4025400","-8.5424000,115.4027000","-8.5424000,115.4027000","-8.5426600,115.4055800","-8.5426600,115.4055800","-8.5377000,115.4057200","-8.5377000,115.4057200...

calendar - how to package install version of dotnetnuke from source of it -

i changed source of dotnetnuke (a little!) , want package install version of new dotnetnuke. how can this? p.s: know it's not recommended change source have no option (telerik calendar not support date format , have replace calendar !) thanks in advance answer depends on have changed, simplest way deliver patch should installed after normal dnn installation. example, if have changed dll, can ask follow normal dnn setup instructions , relpace dll. if it's more on file, can review how dnn upgrade package built. follows same folder structure , places changed files. if have couple of dlls changed in bin, placed in bin folder, , if have changed ascx file should placed in same path creating same folder hierarchy. you can create package can installed deploy changes smaller set of files complecated. let me know if need more help.

How do you Upload Image to parse.com usint REST API + PHP? -

currently using this, file stored empty, supose no data going through. $post = array("file"=>'@'.$_files['uploadfile']['tmp_name']); $ch = curl_init(); curl_setopt($ch,curlopt_httpheader,array('x-parse-application-id : xxxxxxxxxxxxxx','x-parse-rest-api-key: xxxxxxxxx', 'content-type: image/jpeg')); curl_setopt($ch, curlopt_url, 'https://api.parse.com/1/files/'.$_files['uploadfile']['name']); curl_setopt($ch, curlopt_post,1); curl_setopt($ch, curlopt_binarytransfer, 1); curl_setopt($ch, curlopt_postfields, json_encode($post)); $result=curl_exec ($ch); curl_close ($ch); echo $result; got working. need send binary data post field. duh. before should create restrictions (file size, type etc) $post = file_get_contents($_files['uploadfile']['tmp_name']); $ch = curl_init(); curl_setopt($ch,curlopt_httpheader,array('x-parse-application-id : xxxxxxxx','x-parse-rest-api-key: xx...

Not Able to download .apk on Android handset from our site -

when start downloading .apk on mobile handset(google nexus) our site,following thing happens: 1.i redirection link in code 2.start downloading application after download gets complete ,i error download not completed(failed) 3. error page, saying page not available,where able access net here format of link down load:/game.do?x=&y=&z= earlier able download applications same code. . if have idea problem please let me know. thanks rakesh .apk size varies 500kb 5mb use below code download apk file server private void download(){ try { url url = new url("url apk file downloaded"); httpurlconnection urlconnection = (httpurlconnection) url.openconnection(); urlconnection.setrequestmethod("get"); urlconnection.setdooutput(true); urlconnection.connect(); file sdcard = environment.getexternalstoragedirectory(); file file = new file(sdcard, "filename.ext"); fileoutputstream fileoutput = new fileoutputstream(file); inputstream inputstream = urlconne...

c# - ArgumentNullException was unhandled What is wrong? -

i have written class load xml file error message: argumentnullexception unhandled method not accept null parameter. parameter name: texture i error message in batch.draw(): public void draw(spritebatch batch) { batch.draw( texture, position, null, color.white, rotation, vector2.zero, scale, spriteeffects.none, 0f); } what wrong in sprite class? uploaded project here: http://depositfiles.com/files/kj4an4ef7 the problem that, error says, variable texture in sprite drawing code null. the cause of problem is: call load() method load list of sprites xml file, won't reconstruct texture property of sprite class. thus, fix error, each sprite should call load() too. that means, in loadcontent() method of game1 class, after sprites = content.load<list<sprite>>("levelinf"); line, this: foreach(sprite sprite in sprites) { sprite.load(content); } now, each sprite have it's texture loaded. ps: more c# /xna problem rather xml 1 :)

asp.net mvc 3 - How can i create a menu dropdown in MVC using jquery? -

what want is.....i have menu this <div id="menucontainer"> <ul id="menu"> <li>@html.actionlink("home", "index", "home")</li> <li>@html.actionlink("about", "about", "home")</li> <li>@html.actionlink("newmovies","newmovies","home")</li> </ul> </div> "newmovies" menu should have movies list.. now want have drop down menu "newmovies" using jquery ...can 1 me please i recommend use different of default mvc3 menu brings you. pick whole new jquery menu here or here it simple: add new partial view html _layout can on pages. put <div> tag html of 1 of menus in partial view add related css add related js optional if information of menu comes database, can use controller , json call fill menu, bit more complicated hope helps, luck!

java - creating column family in cql? -

when create column family using cql gives me unexpected output. public static void createcolumnfamily() { try { class.forname("org.apache.cassandra.cql.jdbc.cassandradriver"); connection con = drivermanager.getconnection("jdbc:cassandra://192.168.1.32:9160/temp"); string qry = "create table users(user_name varchar," + "password varchar," + "gender varchar," + "session_token varchar," + "birth_year bigint," + "primary key (user_name)" + ")"; statement smt = con.createstatement(); smt.executeupdate(qry); system.out.println("table(column family) created"); con.close(); } catch(exception e) { system.out.println(" : " + e.getmessage()); } } here got : line 1:132 extraneous input ')' expecting eof you're using cql 2, not support style of primary key declaration. if want declare way, should using cql 3, can accomplish requesting version in connection url: driverman...

full text search - SQL Server: Seperate queries return in less than a second but combining those with INTERSECT takes 3 mins -

i'm not sure if sql server bug or mistake here situation: query 1 select pk pi_inform record_date>dateadd(hour,-48, getdate()) this takes less 0.5 secs , returns 20,000 records query 2 select pk dbo.getinformfulltextpks('"hello"') this takes less 1 secs , returns 500 records problem if join 2 queries intersect, takes more 3 minutes. execution plans shows performed using index seek. select * pi_inform (nolock) pk in ( select pk pi_inform record_date>dateadd(hour,-48, getdate()) intersect select pk pi_inform pk in (select pk dbo.getinformfulltextpks('"hello"')) ) the following query equivalent , should run faster select * pi_inform (nolock) pk in (select pk dbo.getinformfulltextpks('"hello"')) , record_date>dateadd(hour,-48, getdate())

php random comment generator -

this make seem little odd, there script kicking generates random comments, kind of chat room comments. random stuff "im bored", "hey people", "gonna log cya", "anyone seen film _ ". anyone ever come across this? $comments = array("im bored", "hey people", "gonna log cya", "anyone seen film"); $random_comment = array_rand($comments); echo $comments[$random_comment]; if have mysql table comments, can following: $result = mysql_query("select `comment` `comments` order rand() limit 0,1"); if($result) echo mysql_result($result, 0);

c# - Regex Counting Characters in a text field -

i trying count characters in text field. found how count characters. string st = textbox1.text; this.textbox2.text = regex.matches(st, ".|").count.tostring(); but need create 2 more separate counts, caps, numbers, - or # (not including) @ eg. la-fg4-detf-djjjthd-s@t-jhf-f1-f2 count 21 and other 1 need count @ (including) , caps, numbers, - or # end of text field. eg. la-fg4-detf-djjjthd-s@t-jhf-f1-f2 count 12 any appreciated. string input = "la-fg4-detf-djjjthd-s@t-jhf-f1-f2"; int atindex = input.indexof('@'); int count1 = regex.matches(input.substring(0, atindex), "[0-9a-z#-]").count; int count2 = regex.matches(input.substring(atindex, input.length - atindex), "[0-9a-z#@-]").count;

Android : merge two audio files into one file -

Image
i working in android. want merge 2 audio files , want create third audio file. suppose have , b audio file after merge want have file ab. i have googled many times, searched every not positive response. really need now. thank in advance. android : merge 2 audio files 1 file - stack overflow stack overflow questions developer jobs documentation beta tags users current community help chat stack overflow meta stack overflow communities sign up or log in customize list. more stack exchange communities company blog tour start here quick overview of site center detailed answers questions might have meta discuss workings , policies of site learn more stack overflow company business learn more hiring developers or posting ads log in sign up learn, share, build each month, on 50 million developers come stack overflow learn, share knowledge, , build careers. joi...