Posts

ibm mobilefirst - Rational Application developer 9.0 and worklight studio 6.0 run android application Errors occurred during the build -

i try using rational application developer 9.0 , worklight studio 6.0 run android application. have below errors occurred during build. errors running builder 'android package builder' on project 'hellotesthelloworldandroid'. sun/security/x509/x500name before see many answer jdk version not mathch. have download jdk 1.7 , install setting java_home. , method change eclipse.ini setting. rad eclipse.ini different eflipse juno version. try many method unitl error persists. i checked around on , here info got: the issue either have wrong jdk on system or have correct jdk wrong jdk first in classpath look-up. a) make sure have 1 jdk on system , 32-bit sun jdk - since android sdk depends on jdk b) find other jdks on system , uninstall them c) make sure have jdk sun , not jre.

java - Unable to Save Image on SDCard Android -

i using below code save images sdcard unable , here code try { root.mkdirs(); file sdimagemaindirectory = new file(root, myid + "__" + filename); outputfileuri = uri.fromfile(sdimagemaindirectory); fout = new fileoutputstream(sdimagemaindirectory); bm.compress(bitmap.compressformat.png, 100, fout); fout.flush(); fout.close(); toast.maketext(this, "image saved",toast.length_short).show(); } catch (exception e) { e.printstacktrace(); } here error 04-14 13:34:07.723: w/system.err(23073): java.io.filenotfoundexception: /mnt/sdcard/android/data/com.goldenedge.poetry/urdu/festive poetry/4__311159_248676158509124_848180994_n.jpg 04-14 13:34:07.724: w/system.err(23073): : open failed: einval (invalid argument) 04-14 13:34:07.725: w/system.err(23073): @ libcore.io.iobridg...

javascript - How to use e.preventDefault() on $(this) inside the $(window).resize()? -

how can use $(this).e.preventdefault() ? what want / need on window resize <a> should behave differently. in fiddle example if window width smaller 710 href should not triggered. there javascript function toggling subnav . if window wider 710px, want href work "normally". now setting example i've seen event firing multiple times. how can if fires once? also, there better way achieve want? please resize window in jsfiddle before clicking! fiddle here $( window ).resize(function() { var ww = $(window).width(); $('.windowwidth span').html(ww); if(ww < 710) { $('nav ul.nav > li > a').on('click',function(e){ e.preventdefault(); alert("here"); }); } else { $('nav ul.nav > li > a').on('click',function(e){ alert("there"); }); } }); you need check window width within click handler instead...

sql - Combine multiple inner joined rows into one row with multiple columns -

i have questions table , answers table has 4 8 answers connected 1 question. when want list of questions , answers, use following code: select q.questionid, q.question, a.answer question q inner join answer on q.questionid=a.questionid; this gives me 1 row each answer question being repeated on each row. however, want 1 row per question answers in separate columns. if possible, i'd limit 4 answers. if there more 4, rest should ignored. not important. the 4 answer columns named "correct", "wrong1", "wrong2" , "wrong3". first 1 in table (with lowest answerid) correct one. thank help! select q.questionid, q.question, case <some field> when <condition> a.answer end correct, case <some field2> when <condition2> a.answer end wrong1 ... question q inner join answer on q.questionid=a.questionid group q.questionid you can group question , define conditioned fields "correct...

java - Is order preserved in set when recovering sorted sets using jedis? -

i use java redis client "jedis". when getting sorted set using zrange example, client specifies returns set definition has no oredering guarantee. this old question mentions problem have found no reference whether resolved. can , know order preserved? set<string> results = jediscli.zrange(key, start, end); myobject[] requestedorderedobjects = new myobject[results.size]; int = 0; foreach(string result: results) { requestedorderedobjects[i++] = myobject.loadfromstring(result); } return requestedorderedobjects; thank help. order preserved, check type of set jedis returns: indeed sortedset , ordered. right: api doesn't give hint ordered, should not afraid: works fine, or apps have incredible bugs.

java - concurrentLinkedQueue offer/poll blocking -

does offer blocks poll or vice versa ? meaning , can producer offer , @ same time consumer trying poll ? or if producer offering , queue blocks till done ? object a while (true){ inputqueue.offer(newpartlist); } object b while (true){ inputqueue.poll(newpartlist); } no, not. use linkedblockingdeque instead. remember use methods blockingdequeue or blockingqueue interfaces values. these methods implemented blocking. update neither offer nor poll methods blocking. in linked interfaces put* , take* methods implemented blocking. put blocks long queue full, take blocks if queue empty. now see asking else. in linkedblockingdeque calling offer blocks poll , because implementation has inernal lock synchronizing access. in concurrentlinkedqueue's javadoc explicitly stated, that: this implementation employs efficient "wait-free" algorithm based on 1 described in simple, fast, , practical non-blocking , blocking concurrent q...

mobile - Disable Bootstrap tooltips on xs screens -

i trying disable tooltips in booststrap on xs screens code: function menutooltip() { if (window.matchmedia("(min-width: 768px)").matches) { $('.menu a').tooltip(); } } menutooltip(); $(window).resize(menutooltip); works fine except if resize window keeps showing tooltips on mobile devices. seems wrong $(window).resize(menutooltip); don't see anything. help? seems had add else { $('.menu a').tooltip('destroy') } make work...