Posts

xml - Android: Possible Bug in Android -

Image
i have 2 views using arrange buttons on screen. screen size seeing result on moto g in landscape mode - 640dp * 360dp . problem - buttons arranging them according view id=center_parent instead of the 1 id=left_corner <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <view android:id="@+id/center_parent" android:layout_centerinparent="true" android:layout_width="0dp" android:layout_height="0dp"/> <view android:id="@+id/left_corner" android:layout_width="0dp" android:layout_height="0dp" android:layout_toleftof="@+id/center_parent" android:layout_marginright="165dp" android:layout_above="@+id/center_parent" ...

maven - Generate Java class based on XSD without block substitution? -

i getting below error while maven build using jaxb(maven-jaxb2-plugin) compiler a class/interface same name "org.somepackage.customer" in use. use class customization resolve conflict. @ com.sun.tools.xjc.util.codemodelclassfactory.createclass(codemodelclassfactory.java:121) @ com.sun.tools.xjc.util.codemodelclassfactory.createclass(codemodelclassfactory.java:82) @ com.sun.tools.xjc.generator.bean.implstructurestrategy$1.createclasses(implstructurestrategy.java:82) @ com.sun.tools.xjc.generator.bean.beangenerator.generateclassdef(beangenerator.java:437) @ com.sun.tools.xjc.generator.bean.beangenerator.getclazz(beangenerator.java:469) @ com.sun.tools.xjc.generator.bean.beangenerator.<init>(beangenerator.java:194) @ com.sun.tools.xjc.generator.bean.beangenerator.generate(beangenerator.java:166) @ com.sun.tools.xjc.model.model.generatecode(model.java:290) @ org.jvnet.mjiip.v_2_2.xjc22mojo.gen...

c# - Is there other way to hide the password in textbox (***) aside from textboxmode="password"? -

it seems if use textmode="password" it changes size of textbox , placeholder text style. doesn't match other textboxes made. although work me, curious if there way make happen avoid ruining design. thanks! <div class="form-group" style= "float:left"> <asp:textbox id="txtpw" runat="server" name="form-password-name" width="200px" placeholder="password..." class="form-password form-control" textmode="password"></asp:textbox> <asp:regularexpressionvalidator id="regularexpressionvalidator6" runat="server" errormessage="only letters , numbers allowed" display="dynamic" controltovalidate="txtpw" forecolor="red" validationexpression="^[a-za-z0-9]+$"> </asp:regularexpressionvalidator> <asp:requiredfieldvalidator id="requir...

c - Segmentation fault with ulimit set correctly -

i tried op on this question . i found out code 1 below causes segmentation fault randomly if stack set 2000 kbytes. int main () { int a[510000]; a[509999] = 1; printf("%d", a[509999]); return 0; } as can see array 510000 x 4 bytes = 2040000 bytes. the stack set 2000 kbytes (2048000 bytes) using ulimit command: ulimit -s 2000 ulimit -ss 2000 based on numbers application has room store array, randomly return segmentation fault. any ideas? there's few reasons why can't this. there things using parts of stack. main not first thing on stack. there functions called real entry point, dynamic linker, etc. before main , using of stack. additionally, there can things put on top of stack set execution. many systems know put strings in argv , environment variables on top of stack (which why main not entry point, there's code runs before main sets environment variables , argv main). and top off part of stack can deliberately w...

javascript - not able to run linkedin company profile script -

i copied code link( https://developer.linkedin.com/plugins/jymbii ) giving company name , clicking code button. generated code given below <script src="//platform.linkedin.com/in.js" type="text/javascript"></script> <script type="in/jymbii" data-companyid="5818" data-format="inline"></script> i pasted code in tag of html file , run html file in chrome, firefox , ie, browser gave blank page output. how should use in jsp/html file, generate job-posting feed. please me. just add 2 script tags in <body> tag. if have added them in <head> tag not work

Template deduction interesting case, c++ -

consider peace of code: template<class t> void f(const t& t) { static int x = 0; cout<<++x<<endl; } int main() { int j = 0; const int = 0; f(5); f(i); f(j); } i have called function 3 types. although 5 , j can same thing, int, const int different type. anyway output is: 1 2 3 so means compiler instantiates same function different types. correct? can explain why? from [temp.deduct.call]: template argument deduction done comparing each function template parameter type (call p) type of corresponding argument of call (call a) described below. p const t& , a int , int , , const int in 3 calls. we have: if p reference type, type referred p used type deduction. p reference type, use p' == const t deduction against a == int or a == const int . in both cases, deduce t == int p' == const int (and p == const int& ) , deduced a == const int . more cv -qualified original a first 2...

ios - Error when posting header data and x-www-form-urlencoded data -

Image
the data working in postman app not working in below code i.e getting error mentioned @ bottom. cannot understand error in code. in advance. below screenshots of postman data: headers: body: below code: nsmutableurlrequest *request = [nsmutableurlrequest requestwithurl:[nsurl urlwithstring:@"https://apifm.azurewebsites.net/api/checkout/checkoutorders"]]; // specify post request request.httpmethod = @"post"; [request setvalue:@"application/x-www-form-urlencoded" forhttpheaderfield:@"content-type"]; [request setvalue:@"application/json" forhttpheaderfield:@"accept"]; [request setvalue:@"bearer vmueufkfbsafmghchyvvepnn7pwj80rdpsbej7gpvtafq9p6ohdfkepqcei3dippau3rthqntrrqbktaqur4rifiew05dekwhhablvbbbwm8vzx9hgd9asmv-crehqbtknglvvt7nuyxn1lssdorsa4ut0jvxyzezramyglayllet9qwrlkcca1_rm9gj_kzfzoag6vwp70jn0ujahqchpnlb1ape_kjmlxiqwv0ajyaigr4qwsownvyiv8qdhuhvsoaqfpcipkuviyg5fmpkyfletswjptbf5tzhedp_kbg6xaipb7pfjqtbxzyvj...