Posts

Featured post

python - Can't run monkeyrunner script - java.lang.IllegalArgumentException: Bad level -

i tried shows me middle finger: ~/software/android-sdk-linux_x86-1.6_r1/tools$ sudo ./monkeyrunner -v help.py exception in thread "main" java.lang.illegalargumentexception: bad level "help.py" @ java.util.logging.level.parse(level.java:336) @ com.android.monkeyrunner.monkeyrunneroptions.processoptions(monkeyrunneroptions.java:130) @ com.android.monkeyrunner.monkeyrunnerstarter.main(monkeyrunnerstarter.java:192) it on freshly installed java, jdk, jre, eclipse, androidsdk, adt any ideas? why sudo ? shouldn't use it. other problem missing log level -v: usage: monkeyrunner [options] script_file -s monkeyserver ip address. -p monkeyserver tcp port. -v monkeyserver logging level (all, finest, finer, fine, config, info, warning, severe, off) also, sure have help.py in current working directory or specify path.

java - Upload image using POST, php and Android -

i getting following error message after trying upload image using multipartentity in android: error: problem [picture] (file upload error 4) i using following code upload image: string url = "http://www.uploadurl.com/api/files.php"; httpclient httpclient = new defaulthttpclient(); httpcontext localcontext = new basichttpcontext(); httppost httppost = new httppost(url); multipartentity multientity = new multipartentity(httpmultipartmode.browser_compatible); file file = new file(environment.getexternalstoragedirectory().getabsolutepath() + "/temp/" + image_filename); contentbody cbody = new filebody(file); stringbody sb1 = new stringbody(getnameformatted()); stringbody sb2 = new stringbody(getdeviceid()); multipartentity multipartcontent = new multipartentity(); multipartcontent.addpart("name", sb1); multipartcontent.addpart("uuid", sb2); multipartcontent.addpart("picture", cbody); httppost.setentity(multipartcontent); ...

how to receive response from ajax call with sencha touch from codeigniter / ExtJS -

i trying response codeigniter when send ajax request sencha touch/ ext with ext.ajax.request({// url: formbase.url, //something 'http://path.to/mobile/login/ajax_validatelogin', success: function(response, opts) { console.log('login success!'); console.log('data: ' + response.responsetext); }, failure: function(result){ console.log('login error! '); }, method: 'post', params: form.getvalues() }); form = new ext.form.formpanel(formbase); //... and in codeigniter like function ajax_validatelogin() { $username = $this->input->post('username'); $password = $this->input->post('password'); $data['username'] = 'arschkarte'; //$username; if($username == "f"){ $data["success"] = true; } else { $data[...

java multithreading problem -

below part of code. confused why "notify 1" can not wake function waiting. it seams have with: when 1 thread executing synchronized method object, other threads invoke synchronized methods same object block (suspend execution) until first thread done object. why result not: wait, notify1, wait finish, notify2, . . . instead is: wait, notify1, notify2, notify2, . . . notify2, notify 2, notify 3, wait finish, skip wait, skip wait, skip wait, . . . code { . . . multithreadcontent m; void dividetoparts(file testfile,fileinputstream fileinputstream, object hashmachine) throws ioexception, interruptedexception{ . . . //run here m = new multithreadcontent(fileinputstream,(int)temp23,(int) (testfile.length()%temp23), numberofparts, hashmachine); new thread(new read()).start(); m.upda...

java - Eclipse surround with quotes and other blocks -

i find myself wanting highlight string in eclipse , double or single quoting it. can't seem find shortcut it. in textmate example if highlight string , type either ' or " string surrounded them. same should work ) , } think well. i've added code template doing doesn't ever appear in menu , there doesn't seem way create shortcuts either. note should entirely keyboard driven , not involve secondary menus, that's goal anyway. go java > editor > templates , add new template, e.g. called quote , follows: "${word_selection}"${cursor} then, in editor, write text want quote, highlight it, press ctrl + space , type quote , hit return. highlighted text should quoted now. if don't template proposals when pressing ctrl + space , make sure have them checked in java > editor > content assist > advanced . just tried , works me!

qt - Compiling OpenCV SVN trunk in Windows - error in highgui/libVideoInput -

i know there several questions none has shown me can against error get. using this guide able compile current opencv release (2.2) using guide , cmake. release works fine , can write code using in qt. therefore need with_qt enabled , need build myself. but unfortunately found out 2.2 release doesn't support types of cameras (since camera stream 720p webcam). i've read fixed in latest svn trunk version. so checked newest svn trunk out , ran cmake again, created new folder, selected source files, mingw compile links g++.exe , qcc.exe, configured , enabled "with_qt" , generated necessary makefiles. i started windows powershell admin , tried compile "mingw32-make"... @ 56% crashes this: [ 56%] building cxx object modules/highgui/cmakefiles/opencv_highgui.dir/src/grfmt_sunras.obj [ 56%] building cxx object modules/highgui/cmakefiles/opencv_highgui.dir/src/grfmt_tiff.obj linking cxx shared library ..\..\bin\libopencv_highgui220d.dll creating library...

c++ - Why use QVector(Qt) instead of std::vector -

i'm new c++ , qt, i'm @ c#/java. the point cross-platform, i'm confuse qt. isn't std::vector cross-platform, doesn't qt provide equivalent non-crossplatform thing? also how file , qfile different? a link nice, :) this article loooks good. compares qt template library standard template library: qtl vs stl hope, you'll find interesting seeing differences listed there in article. edit: here find interesting: my opinion biggest advantage of qtl has same implementation (including binary compatibility) on oses supported qt . stl implementations might below par when comes performance or might missing functionality. platforms don’t have stl! on other hand, stl more customizable , available in entirety in header files… like said, there no clear winner . like said, no clear winner. still reading article makes lots of things clear. better know difference going one, without knowing other.