Posts

gwt rpc - Encode request payload in GWT RPC call -

i using gwt create web-app. when making rpc call client side (browser), in inspect element request payload below : 7|0|8|https://xxxx.xxxx.in/testproject/in.testproject.main/|87545f2996a876761a0c13cd750ea654|in.testproject.client.customerclassservice|check_user_login|java.lang.string/2004016611|in.testproject.beans.customerbean/3980370781|userid|password|1|2|3|4|3|5|5|6|7|8|6|0|0|0|0|0|custid|0|0|0|0|0|0|0|0|0| in request details username, password & custid displayed in request payload. my question is, possible encode or hide details request payload? you looking @ wrong level of abstraction. what's point of encoding/"hidding" these values in payload? exchange between server , client can intercepted anyway... unless use https . ensures safe/encrypted communication between server , client. don't try "clever" , encrypt part of communication/payload, just use https . but concern client should not able seen method call making, param...

javascript - how to get properly formatted text value from a div -

i trying formatted text contenteditable='true' div send server. i used use textarea , when value of textarea preserves white space , line breaks, when using contenteditable div when using styles such following can not formatted text: white-space: pre-wrap; word-wrap: break-word; for example if type div: "a aa asdf" i out textcontent: "a aaasdf" is there way formatted text out of contenteditable div textarea? use .innerhtml linebreaks too. readup: .innerhtml | mdn working code snippet: document.getelementbyid('copy').addeventlistener('click', function(){ var text = document.getelementbyid('input').innerhtml; document.getelementbyid('output').innerhtml = text; }); div{ width: 200px; height: 200px; border: 1px solid black; display: inline-block; vertical-align: top; } <div contenteditable='true' id="input">enter funny<br>;)</div...

Height issue with Facebook Embed Post -

i using fb post embed. on initial load posts shown up. if add new post , call ajax postback, after postback posts not shown.i checked documentation mentioned call fb.xfbml.parse() method, called still didn't work. while looking the code saw height , width of span fb returns , iframe inside span set 0 , overflow hidden. fb:post code shown here: i able resolve issue. issue have kept inside container div tag using $("#container").prepend("");. container div tag getting emptied , refilled using $("#container").empty();, that's why height width getting 0. updated code keep fb-root outside of container using $("#container").parent().prepend("");

MarkLogic - How can you do a collection-delete using Java API? -

how can collection-delete using java api ? i'm using jsondocumentmanager crud operations. there way like: xdmp:collection-delete("mycollection") use querymanager.delete() passing querymanager.newdeletedefinition() , in deletequerydefinition set list of collections want have deleted.

Android listview simple_list_item_checked -

i have listview uses android.r.layout.simple_list_item_checked layout. i need app detect when user checks item in listview , passes state of checkbox variable. how done? remember im not using custom layout listview. im using android.r.layout.simple_list_item_checked. for need enable android:choicemode="multiplechoice" in layout xml listview created. then set onitemclicklistener on listview : @override public void onitemclick(adapterview<?> parent, view view, int position,long id) { sparsebooleanarray sparsebooleanarray = listview.getcheckeditempositions(); system.out.println("clicked position := "+position +" value: "+sparsebooleanarray.get(position)); }

Clean the data in an efficient way in Python -

i have data in following format : top (s (pp-loc (in in) (np (np (dt an) (nnp oct.) (cd 19) (nn review) ) (pp (in of) (np ( ) (np-ttl (dt the) (nn misanthrope) ) ('' '') (pp-loc (in at) (np (np (nnp chicago) (pos 's) ) (nnp goodman) (nnp theatre) )))) (prn (-lrb- -lrb-) ( ) (s-hln (np-sbj (vbn revitalized) (nns classics) ) (vp (vbp take) (np (dt the) (nn stage) ) (pp-loc (in in) (np (nnp windy) (nnp city) )))) (, ,) ('' '') (np-tmp (nn leisure) (cc &) (nns arts) ) (-rrb- -rrb-) ))) (, ,) (np-sbj-2 (np (np (dt the) (nn role) ) (pp (in of) (np (nnp celimene) ))) (, ,) (vp (vbn played) (np (-none- *) ) (pp (in by) (np-lgs (nnp kim) (nnp cattrall) ))) (, ,) ) (vp (vbd was) (vp (advp-mnr (rb mistakenly) ) (vbn attributed) (np (-none- *-2) ) (pp-clr (to to) (np (nnp christina) (nnp haag) )))) (. .) )) (top (s (np-sbj (nnp ms.) (nnp haag) ) (vp (vbz plays ) (np ( n...

android - IllegalStateException: Could not execute method of the activity -

can explain me why i'm getting java.lang.illegalstateexception: not execute method of activity when trying click button data database? my xml code has onclick this: <button android:layout_width="0dip" android:layout_height="wrap_content" android:text="delete" android:id="@+id/btndelete" android:layout_weight="1" android:onclick="onclick_deleteall"/> my mainactivity code: public void onclick_deleteall(view view){ dbtools dbtools = new dbtools(getapplicationcontext()) float total = dbtools.total(); } my database class(dbtools.java) code: public float total(){ float total = 0; sqlitedatabase db = getreadabledatabase(); cursor cursor = db.rawquery("select sum("+ price +") " + table_item_sell, null); if (cursor.movetofirst()){ total = float.parsefloat(cursor.getstring(0)); } return total; } don...