Posts

eclipse - Phonegap android emulator crashing -

i installed phonegap following of steps: http://docs.phonegap.com/en/2.5.0/guide_getting-started_android_index.md.html i installed latest versions of: eclipse android sdk adt plugin phonegap cordova i using: osx 10.8.5 everything runs smoothly when run cordova emulate android . emulator shows , loads minute says: "unfortunately, workshop has stopped" and app never loads. also, when run cordova serve android browser shows alert says: gap:["pluginmanager","startup","pluginmanager1650094558"] then app loads , browser show default cordova screen says "connecting device" app never reaches "device ready". have have tried tons of different approaches downgrading versions creating several avds test. far after 4 hours of testing haven't found answer.

java - Making cross domain jquery ajax calls to Restful webservice? -

i using jquery ajax calls access restful webservices below. webservice hosted on different domain. $.ajax({ type: "get", url: "some url hosted on differnt domain", crossdomain: true, contenttype: "application/json; charset=utf-8", datatype: "jsonp", success: function(responsejson) { alert("json"+responsejson); }, error: function(xhr, status, error) { var err = eval("(" + xhr.responsetext + ")"); alert(err.message); } }); am not sure whether not hitting webservice.it going error block no alert displayed. doing wrong here? thanks! you got change header @ server side http://www.w3.org/tr/cors/#access-control-allow-origin-response-header since cause forgery. more of cors understanding http://enable-cors.org/server.html

php - I want get one array from database records -

this question has answer here: how mix multiple array in 1 array in php 1 answer i fetching records database return records in multiple array. want 1 array database. my php code - $resultdata = array(); $re=mysql_query("select pro_ref_id,pro_qty,pro_item proforma_details pro_ref_id in($piid_str)"); while($re1=mysql_fetch_array($re)) { $rq=mysql_fetch_array(mysql_query("select sale_ref_id,proforma_invoice_no proforma_invoice pro_invoice_id='".$re1['pro_ref_id']."'")); $rq1=mysql_fetch_array(mysql_query("select sale_order_no sale_order sale_id='".$rq['sale_ref_id']."'")); array_push($resultdata,$re1); array_push($resultdata,$rq); array_push($resultdata,$rq1); } i getting array - array( [0] => array( [0] => 1 [pro_ref_id] => 1 ) [1] => array( ...

remove directory name from linux find result -

when using find command below find /asdf/asset -mtime -3 -printf "%f " > log.txt result below asset text.txt movie.ts asset not exist, it's directory. how hide directory name result.

php - JavaScript: How to set for setInterval function a custom behaviour -

i need set custom behaviour setinterval js function; this part of online game, , script used keep data updated; worlds[world_id].building traffic light, true grren , false red values, know; i used following function obtain array; this js function: function init() { $.ajax({ type: "post", url: '<?php echo yii::app()->baseurl; ?>/robots/default/loadworlds', data: {}, success: function(data) { if (data) { if (data.status === true) { if (data.worlds) { worlds = data.worlds; $.each(data.worlds, function(key, value) { addelement(key, value); count_world_ids++; }); } } } }, datatype: 'json', ...

java - Get currency applied to an Excel Cell using POI -

i have written java program read excel file cell-by-cell using poi api. setting of currency done explicitly using ms excel - "format cell" option. however, there way in can recognize currency has been applied cell using poi? so far, have tried using getcellstyle().getdataformat() , returns unique number. however, problem is based on cell style, , can change change in cell formatting(font, size, etc.). i tried this: if(cell.cell_type_numeric) { system.out.println("value in excel cell:: " + cell.getnumericcellvalue()); short styletype = cell.getcellstyle().getdataformat(); system.out.println("style (currency):: " + styletype); if(styletype == <some unique number>) //want unique number { system.out.println("currency applied cell:: " + <currency name>); } } so, either unique number identifies currency name or if currency name directly, best. you can identify built in format id looking @ org.apache...

c++ - How to deal with reference data-members in the assignment operator, and copy constructor? -

i have following class class tvdata { private: int id; monitor& monitor; string pname; } i need implement assignment operator , , copy-constructor usable class. how handle reference members, in case tvdata::monitor , in such scenario? you can't reassign reference, if need change in assignment operator should make pointer - assignment can done usual = , although it's still encouraged use initialiser list in copy constructor... tvdata(const tvdata& rhs) : id(rhs.id), p_monitor(rhs.p_monitor), pnmae(rhs.pname) { }