Posts

cordova - Pushwoosh and Android Phonegap App not communicating -

the problem okay have phonegap (2.3.0) android application pushwoosh manage push notifications. followed instructions, , got app few wording errors working. app seems run fine, doesn't seem pushwoosh pushing gcm (google cloud messanger), turn isn't pushing app. think wrong, first time using gcm , pushwoosh. on pushwoosh console page shows each "push" completed no errors, on gcm console doesn't show requests, nor notification pop on phone. i have gcm api key (server key) in xml , pushwoosh correct xxxxx-xxxxx key. here code better outline how code setup (and maybe can see i'm missing). the code here androidmanifest.xml <?xml version="1.0" encoding="utf-8"?> <supports-screens android:largescreens="true" android:normalscreens="true" android:smallscreens="true" android:resizeable="true" android:anydensity="true" /> <uses-sdk android:...

set a mysql user variable per row? -

the following sql statement sets user variable @id i'm using in trailing subquery. problem @id variable gets set first items.id in result set - not "per row" - result subquery same every row in main select. know if there's way reset @id variable each row?? select items.id ,items.title ,@id := items.id ,( select group_concat(x.y) ( select group_concat(ledger.stockcode) y ledger @id = ledger.itemid group ledger.stockcode having sum(ledger.stockqty) > 0 ) x ) extras items items.id = 196 try query select a.id ,a.title ,b.y extras items inner join (select group_co...

jquery - Full calendar not ordering the events in correct order -

i using full calendar plugin. want events ordering according start date/time ascending. can see below event # 2 , event # 3 & event # 4 in correct order event # 1 not in correct order. should in last. wrong order: [ {"id":"1","title":"aaa","start":"2013-04-01 00:00:00","end":"2013-04-01 23:59:59", "allday":false}, {"id":"2","title":"bbb","start":"2013-04-01 07:30:00","end":"2013-04-01 09:30:00", "allday":false}, {"id":"3","title":"ccc","start":"2013-04-01 08:00:00","end":"2013-04-01 10:30:00", "allday":false}, {"id":"4","title":"ddd","start":"2013-04-01 13:00:00","end":"2013-04-01 10:30:00", "allday":...

What are pure virtual methods in UML? -

i attempting understand how should use realization of interfaces , implementation of abstract classes in uml. came across post @ https://stackoverflow.com/a/13438187/700543 whereby poster states pure virtual methods interfaces whilst part pure virtual methods abstract classes. able give me real world scenario , not 1 based on code? an interface "class skeleton" library users extend, , said, methods cannot implemented. abstract class can have implemented methods. give real life example: imagine provide interface people implement sorting functions , provide class bench marking sorting functions. bench marking class needs know methods of interface needs call in order perform bench marking, not know how implemented. therefore, inside bench marking class might see sortinterfaceinstace.getnumberofswap() , whereas sortinterfaceinstance known of sortinterface type @ compile time, , not of specific user sort implementation. if need implemented methods, use abstract...

ms access - Value Violates the Validation Rule -

everything works fine on form,i following message when enter incorrect data in particular field: " the value violates validation rule field or record" i don't want user see message. unfortunately, not error message..im not sure why got error since have validation rule , text works fine the problem need make combo-box , text-box validation rule , validation text..the problem make 1 text box that's why value violates validation rule field or record error keeps pops up if done text box , combo-box validation text message box display without error..

java - How can I read html that loads after the rest of the other html? -

ok, sorry question crap. it's hard put question :p if put word thought dictionary.com or irregular verb pronunciation [thawt] loads after rest of html. if check code you'll see mean. instead of [thawt] loads [thingk].. package oepr; import java.awt.eventqueue; import java.awt.gridlayout; import java.awt.toolkit; import javax.swing.jframe; import javax.swing.jbutton; import java.awt.gridbaglayout; import java.awt.gridbagconstraints; import java.awt.datatransfer.clipboard; import java.awt.datatransfer.clipboardowner; import java.awt.datatransfer.stringselection; import java.awt.datatransfer.transferable; import java.awt.event.actionevent; import java.awt.event.actionlistener; import java.io.bufferedreader; import java.io.inputstreamreader; import java.net.url; import java.net.urlconnection; import java.util.regex.matcher; import java.util.regex.pattern; import javax.swing.grouplayout; import javax.swing.grouplayout.alignment; import javax.swing.layoutstyle.componentp...

php - Unknown column 'Process_Status' in 'where clause' -

$result = mysql_query('select * accounting acctstatustype = "start" , process_status null limit 10'); if($result === false) { die(mysql_error()); } the following code spits back unknown column 'process_status' in 'where clause' however, when copy , paste query select * accounting acctstatustype = "start" , process_status null limit 10 directly mysql, successful. i bit new php/mysql queries have worded differently when parsing them php? thanks, matt

excel vba - VBA code to reference my inbox in my archive - CLOSED -

i have code can used folder in primary inbox or inbox subfolder. does know how reference archive folders or sent items? archive folder saved "my personal folders" thank much sub listallitems() dim olf outlook.mapifolder, curruser string dim emailitemcount integer, integer, emailcount integer application.screenupdating = false cells(1, 1).formula = "subject" cells(1, 2).formula = "recieved" cells(1, 3).formula = "attachments" cells(1, 4).formula = "recipients" cells(1, 5).formula = "sendername" range("a1:f1").font .bold = true .size = 14 end application.calculation = xlcalculationmanual set olf = getobject("", _ "outlook.application").getnamespace("mapi").getdefaultfolder(olfolderinbox).folders("toastmasters") emailitemcount = olf.items.count = 0: emailcount = 0 ' read e-mail inform...

Curious about the new way YouTube is loading pages -

Image
i've noticed when i'm watching video , click on logo or related video red progress bar (above logo) dashes across screen. @ same time there slight overlay "grey" out content fades in new page. fyi, url changes new url before progress bar , transition happens. the div id of bar progress. looks kind of cool jquery ajax load changing pages. don't know. youtube using html5 history api add , remove page urls history stack. results in url changing in address bar, , back/forward buttons working, while still loading page via js (ajax). the easiest way implement api backwards compatibility @ point using history.js . backwards compatibility mean falling hash tag method older browsers not support html5 history api yet. check out history.js demo! i think twitter best known example of website using hashed urls. example twitter.com/#!/username has been common sight years. problem method hash tags client side, need js read them , serve proper content. no...

Eclipse Java Android compile error -

why error happening? http://img35.imageshack.us/img35/4883/whyerror.png i thought r automatically generated class not supposed touch? thanks //anything above had no errors public boolean oncreateoptionsmenu(menu menu) { getmenuinflater().inflate(r.menu.lovemenu, menu); //error here return true; } @override public boolean onoptionsitemselected(menuitem item) { switch(item.getitemid()) { default: break; } return true; } } make sure not including following import import android.r; and including reference own import com.example.r;

c - What's wrong in this allocation? -

this struct declared :- struct page_table_entry { struct addrspace* as; vaddr_t va; //page_state_t state; int timestamp; }; now want dynamically allocate memory array of this. implementation here :- struct page_table_entry **coremap = (struct page_table_entry**) kmalloc(npages*sizeof(struct page_table_entry*)); int i; for(i=0;i<npages;i++) { coremap[i] = (struct page_table_entry*)kmalloc(sizeof(struct page_table_entry)); coremap[i].va=(firstaddress+(i*page_size)); } its giving me error on last line accesing variable va. error is:- error: request member `va' in not structure or union you have array of pointers structs, not array of structs. in line coremap[i] = (struct page_table_entry*)kmalloc(sizeof(struct page_table_entry)); cast memory allocation page_table_entry* , coremap[i] pointer. you access actual struct via coremap[i]->va=(firstaddress+(i*page_size));

java - Regarding adding days to the current date -

i newbie world of java. learning , exploring java calendar class abstract class consisting of factory method instance (). trying increment or decrement date, e.g. adding 1 day current date tomorrow's date, subtracting 1 day yesterday's date, etc. since date in java maintained long millisecond value, programmers tend add 24 hours 1 day. wrong if day falls on daylight saving timezone, day either 23 or 25 hours long. when add or subtract days date, other components of date e.g. month , year must roll. my query shown below. in class trying add , subtract days. please advise, correct approach or there other better approach advise. //using calendar increment , decrement days date in java date today = new date(); system.out.println("today " + toddmmyy(today)); calendar cal = calendar.getinstance(); //adding 1 day current date cal.add(calendar.day_of_month, 1); date tommrrow = cal.gettime(); system.out.println("tomorrow " + toddm...

configuration of paths within gradle project -

i have gradle project formatted this container/ dist/ mod1/ build.gradle mod2/ build.gradle mod3/ build.gradle build.gradle basically grade project lot of submodules. trying when run assembly on container/build.gradle runs builds on sub projects. part easy enough. im trying accomplish centralizing configuration settings , parameters across everything. here snip container/build.gradle file subprojects { apply plugin: 'java' apply plugin: 'scala' jar { manifest.attributes provider: 'onuspride' } property { sourcecompatibility = 1.7 archivepath = file("dist") } ext { springversion = "3.2.1.release" springsecuritywebversion = "3.1.3.release" springsecurityoauth2version = "1.0.1.release" jacksoncoreversion = "2.1.2" } dependencies { testcompile 'junit:junit:4.8.2' } } i...

jsp - Dynamic Proxy in Java EL -

edit: narrowed down problem , posted related question here . please check out! i trying use dynamic proxies make html form processing easier. using pretty plain mvc setup (no fancy frameworks) using jsps on google app engine. keep getting following exception: javax.el.propertynotfoundexception: not find property testvalue in class com.sun.proxy.$proxy7 @ javax.el.beanelresolver.tobeanproperty(beanelresolver.java:430) @ javax.el.beanelresolver.getvalue(beanelresolver.java:290) @ javax.el.compositeelresolver.getvalue(compositeelresolver.java:231) @ org.apache.el.parser.astvalue.getvalue(astvalue.java:123) @ org.apache.el.valueexpressionimpl.getvalue(valueexpressionimpl.java:186) ... okay, here code. first, interface proxying: public interface myform { public string gettestvalue(); } next, code creates proxy: // imports omitted public final class forms { private forms() { } public static <t> t fromrequest( final cl...

html - How to login to reddit.com using the api? -

i'm not sure how format request url login reddit using api. i've tried page not found error https://ssl.reddit.com/api/login/?user=myusername&passwd=mypassword&api_type=json refer this question . user strelok has great answer public void sometest() throws ioexception { url u = new url( "https://ssl.reddit.com/api/login/myusername" ); login( u, "myusername", "mypassword" ); } public static void login( url url, string user, string pw ) throws ioexception { string data = "api_type=json&user=" + user + "&passwd=" + pw; httpurlconnection ycconnection = null; ycconnection = ( httpurlconnection ) url.openconnection(); ycconnection.setrequestmethod( "post" ); ycconnection.setdooutput( true ); ycconnection.setusecaches( false ); ycconnection.setrequestproperty( "content-type", "a...

2d character array to string (java) -

i need converting 2d character array string. figured out how convert 1d character array string, i'm unsure how go changing display 2d char array. public class chararraytostring { public static void main(string[] args) { char[] chararrays = new char[] {'0', '4', '2', 'b', 'p', 'r'}; string newstring1 = new string(chararrays); system.out.println("newstring1 : " + newstring1); string newstring2; newstring2 = string.valueof(chararrays); system.out.println("newstring2 : " + newstring2); } }

android - My App not supporting nexus 7 -

my manifest file (permissions & support-screens) follow : <uses-sdk android:maxsdkversion="17" android:minsdkversion="10" android:targetsdkversion="17" /> <permission android:name="com.ecw.healow.permission.c2d_message" android:protectionlevel="signature" /> <uses-permission android:name="my_app_package.permission.c2d_message" /> <!-- app receives gcm messages. --> <uses-permission android:name="com.google.android.c2dm.permission.receive" /> <!-- gcm requires google account. --> <uses-permission android:name="android.permission.get_accounts" /> <!-- keeps processor sleeping when message received. --> <uses-permission android:name="android.permission.wake_lock" /> <uses-permission android:name="android.permission.internet" /> <uses-perm...

c# - Replace part of a string with new value -

i've got scenario, wherein need replace string literal new text. for example, if string "01hw128120", first check if text contains "01hw" if yes, replace string "machineid-". so wanted "01hw128120" "machineid-128120". string "1001hw128120" - in case require replace "1001hw" "machineid-" tried below code snippet, not work expectation. string sampletext = "01hw128120"; if(sampletext.contains("01hw")) sampletext = sampletext.replace("01hw","machineid-"); any suggestion of great me. few possible search values if there few possible combinations, can multiple tests: string value = "01hw128120"; string replacement = "machineid-"; if( value.contains( "01hw" ) ) { value = value.replace( "01hw", replacement ); } else if( value.contains( "1001hw" ) ) { value = value.replace( "1001hw...

java - How do I save states to a file and keep the file safe? -

i'm trying create save states game, not game left simple score boards. format this: wins: 5 losses: 10 gamesplayed: 15 i need able access file, , depending on whether player won/lost append +1 value in file. what best way go this? i've heard of bunch of different ways save data, example xml, aren't overkill size of data? also, want keep file safe users being able go files , change data. have sort of encryption? and, if user removes file , replaces empty 1 can't technically reset values? you can use plain serialization/deserialization this. in order serialize/deserialize class, must implement serializable interface. here's example start with: public class score implements serializable { private int wins; private int loses; private int gamesplayed; //constructor, getter , setters... } public class scoredatahandler { private static final string filename = "score.dat"; public void savescore(score score) { ...

php - $_SERVER['PHP_SELF'] shows different after writing .htaccess -

this our site actual url http://www.globalmedicalaware.com/gma-new/home.php?city=chennai i rewrite url using .htaccess following code options +followsymlinks rewriteengine on rewriterule /city/(.*) home.php?city=$1 now url rewrite to http://www.globalmedicalaware.com/gma-new/home/city/chennai i written code in column-right.php , in other area footer,..etc,.. this if($_server['php_self']=='/gma-new/home.php') { ------------ designs , action display column right home.php ----------- } in localhost $_server['php_self'] shows /gma-new/home.php correctly.. but in live site $_server['php_self'] shows city/chennai ..so column right coding home.php not working.. please me this.. you may try instead in .htaccess file @ root directory: options +followsymlinks -multiviews rewriteengine on rewritebase / rewritecond %{request_uri} !home\.php [nc] rewriterule ^gma-new/home/city/([^/]+)/? /gma-new/home.php?city=$1 [l,nc]...