Posts

java, jquery and jsp messaging -

i using jquery request pass array of strings java class jsp. something : $.ajax({url: '<%= java class %>'+'?s1='+ $("#networkbox1").val()+'&box1=box1&tick=add&val1='+ allvs+'&s2='+ $("#networkbox2").val()+'&box2=box2&val2='+ allvs, type: 'get', datatype: 'text', async: false, success: function(data) {processbox(newdata);}}); allvs --is array of strings. i converting these strings list in java class , updating java collections (hashmap) on basis of parameters s1 , s2 , getting response jquery , printing again processbox function shown above. parametrs s1 , s2 can same different users. question need have methods in java class thread safe (synchronized) ? web app used different users when login website.

shell - Top active users in linux -

i'm trying learn basic linux i'm doing bit of homework. need write shell script displays in real time top x users number of active processes delay of n seconds (where x , n command line parameters). i pretty know how this, except core part of it: how can find top users number of active processes? i fooled around top command, did not got me want be. expanding on william's post above, head -5 show top 5. sleep 10 sleep 10 sec between re-checks. i'll leave figure out how check 2 arguments , use $1 , $2 in right places. while [ 1 ] date ps ax -o user | sort | uniq -c | sort -rn | head -5 sleep 10 done

How to use Calendar Provider with Android emulator -

Image
i intend use emulator test new calendar provider . created virtual device google api image , added google account calendar. started calendar application , said no google account added or nothing synched. in account settings used sync now, unable sync. i checked this article , says no longer possible use google sync instead should use new protocol no further instructions provided. in 2010 suggested add google account exchange account , change server name. rejected, stuck. can tell me how test calendar provider emulator? the answer simple: it impossible .

html - Tizen - how to change button font-size - fixed -

how can change button font-size? when tried change css, changes didn't work , buttons lost data-style: round attribute. have html app , button open page, here it: <p><a href="two.html" data-role="button" data-style="round" id="btn" style="border: 5; background: #ffffff"> test</a></p> css: #btn { width: 250px; height: 40px; margin: 0 auto; /*data-style: round;*/ border: #000000; border-style: solid; border-width: 5px; font-family:"times new roman", times, serif; font-size: 8pt; } solution founded in answer below why don't try thisin css border-radius:8px ; -moz-border-radius:8x; -webtrik-border-radius:8px

c# can't get attributes out of xml -

i have problem im trying values attributes of xml file url. xml: http://thegamesdb.net/api/getgameslist.php?name=x-men code: public mainpage() { initializecomponent(); var webclient = new webclient(); webclient.downloadstringcompleted += requestcompleted; webclient.downloadstringasync(new uri("http://thegamesdb.net/api/getgameslist.php?name=x-men")); } private void requestcompleted(object sender, downloadstringcompletedeventargs e) { if (e.error == null) { var feedxml = xdocument.parse(e.result); var gamedata = feedxml.root.elements("game").select(x => new getgameslist { // error values null id = (int)x.attribute("id"), gametitle = (string)x.attribute("gametitle"), releasedate = (string)x.attribute("releasedate"), platform = (string)x.attribute(...

java - Fetch all towns/villages names using geonames api -

i new geonames api , need hierarchical results if select continent show countries , if select country need fetch states , on. continent --> country --> state --> districts/cities --> towns --> villages. i need build above hierarchy. using of geonames api able fetch till districts/cities unable fetch towns , villages particular district/city. is geonames api doesn't have database or there way follow getting towns , villages...??? or else there separate api achieve task. fetching records country "india". can 1 me on this. stuck on here. thanq in advance i suppose have answer in geonames discussion baord already, try 'p' option fclass.

c++ - class member function won't return -

i have following code: void module_books::show_item(int n, table<book> b) { cout<<"title: "<<b[n]->title<<"\n"; cout<<"author: "<<b[n]->author<<"\n"; cout<<"issue: "<<"no. "<<b[n]->issueno<<". "<<b[n]->city<<", "<<b[n]->publisher<<", "<<b[n]->year<<"\n"; cout<<"isbn: "<<b[n]->isbn<<"\n"; cout<<"pages count: "<<b[n]->pages<<"\n"; cout<<"information: loan count: "<<b[n]->outcount<<". "; if(b[n]->damaged) cout<<"damaged "; if(b[n]->out) cout<<"loaned"; cout<<"\n\n"; } int module_books::add_item(table<book> &b) { int _year, _is...