Posts

c# - How do I decide the `DigestValue`, `SignatureValue` and `RSAKeyValue` for digital signing of XML -

i working on project need verify xml digitally signed or not. getting hard me try , validate xml key values following <signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <signedinfo> <canonicalizationmethod algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /> <signaturemethod algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /> <reference uri=**some uri value**> <transforms> <transform algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /> <transform algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"> </transform> </transforms> <digestmethod algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> <digestvalue>**some digest value**</digestvalue> </reference> </signedinfo> <signaturevalue>**some signat...

java - XML Parser : How to avoid null pointer exception -

when given key not exist throws npe . string nodevalue = eelement.getelementsbytagname(key).item(0).gettextcontent(); if (nodevalue == null || nodevalue.isempty()) return null; return nodevalue;` try string nodevalue=null; if(eelement!=null && eelement.getelementsbytagname(key)!=null && eelement.getelementsbytagname(key).item(0)!=null ){ nodevalue = eelement.getelementsbytagname(key).item(0).gettextcontent(); } return nodevalue;

eclipse - Giving input to Java through a batch file -

i developing application in users give input in batch file , batch file input given input eclipse , oy run java program(logic) , give output either through batch file or excel. in eclipse can set arguments using run > run configurations > arguments running jar file directly works simple: java -jar somefile.jar port ip whatever else those arguments passed main() method string[] , if want numbers have convert them. public static void main(string[] args) { system.out.println(args[0]); // port system.out.println(args[1]); // ip system.out.println(args[2]); // whatever system.out.println(args[3]); // else }

c++ - OpenCV stitch images by warping both -

Image
i found lot questions , answers image stitching , warping opencv still not find answer question. i have 2 fisheye cameras calibrated distortion removed in both images. now want stitch rectified images together. pretty follow example mentioned in lot of other stitching questions: image stitching example so keypoint , descriptor detection. find matches , homography matrix can warp 1 of images gives me stretched image result. other image stays untouched. stretching want avoid. found nice solution here: stretch solution . on slide 7 can see both images warped. think reduce stretching of 1 image (in opinion stretching separated example 50:50). if wrong please tell me. the problem have don't know how warp 2 images fit. have calculate 2 homografies? have define reference plane rect() or something? how achieve warping result shown on slide 7? to make clear, not studying @ tu dresden found while doing research. warping 1 of 2 images in coordinate frame of other more...

dart - Autostart chrome app on wake up mainly on chromebook to update its data in background -

i new in dart , want create chrome app should work on chromebook. i need data updated @ particular interval if app in background or chromebook has booted/woke up. is there setting or need kind of programming? if want background page active it's more complicated... first have add in permissions "background" else window background page inactive ( declare permissions ) after need keep background page alive , should @ chrome.alarms api , when alarms fired can call server retrieve information

jsf - PrimeFaces custom text on Menubar -

i using <p:menubar> . i've seen can use 'facet' render custom content, shown in showcase. what want now, put text left first menuitem. <h:form> <p:menubar autodisplay="false"> <f:facet name="options"> <p:outputlabel value="my company"/> </f:facet> <p:menuitem value="home" outcome="index.xhtml" icon="ui-icon-pencil" style="float: right;"/> <p:menuitem value="register" outcome="register.xhtml" icon="ui-icon-pencil" style="float: right;"/> <f:facet name="options"> <p:commandbutton action="login.xhtml" value="login" icon="ui-icon-extlink"/> </f:facet> </p:menubar> </h:form> i hope it's clear mean. in case, outputlabel showing on right side of menubar. i...

oracle equivalent of mysql ifnull (no case, no if) -

i looking quick way do select ifnull(columna, columnb) mytable (i have dozens of columns , don't want write case each of them) you can use standard coalesce keyword, allows pass multiple parameters: select coalesce(columna, columnb, ..., columnz) mytable coalesce keyword documentation