Posts

How to use the variable of one method in another method in Java(android) -

i retrieving value of textview protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.calculation); textview heading = (textview) findviewbyid(r.id.paper_name); ...... } i have method in same class @override public void onclick(view v) { int black_and_white_multiuplier = 4200; int color_multiuplier = 6400; switch (v.getid()) { case r.id.btcalculate: int multiplier = rbcolor.ischecked() ? color_multiuplier : black_and_white_multiuplier; int column = integer.parseint((string) spcolumn.getselecteditem()); int inch = integer.parseint((string) spinch.getselecteditem()); tvamount.settext((multiplier * column * inch) + ""); break; } } i want set value of color_multiuplier , black_and_white_multiuplier based on value of heading have got oncreate method. possible? declare textview @ class level... textview heading; pro...

c# - How to solve "RadAsyncUpload does not have permission to write files in the TemporaryFolder. ..." -

my webapp(asp.net webform c#) working when uploaded it, telerik's radgrid working radasyncupload giving me following error. radasyncupload not have permission write files in temporaryfolder. in medium trust scenarios, temporaryfolder should subfolder of application path. i found useapplicationpoolimpersonation , impersonate="true" in web.config will solve problem under tag should add it? way new iis7. if you're using windows authentication, want put inside <system.web> <identity impersonate="true" username="domain\username" password="mypassword" /> if you're using anonymous auth, don't need username or password. cheers

java - Mac JVM rendering JTabbedPane differences between 1.6 and above -

Image
this how jtabbedpane renders in java 1.6: when using java 1.7 (or 1.8 ea), see bottom of tabs getting clipped: i tried, without success (or effect) system properties -dcom.apple.macos.smalltabs=true , -dcom.apple.smalltabs=true . any solution or hack appreciated. running example , unable reproduce effect shown on mac os x 10.9.2 using java 7. suspect neglecting pack() enclosing window , might compare code 1 shown reference.

amazon ec2 - create a hybrid cloud between aws ec2 and my local openstack instance -

Image
i want create hybrid cloud demo purpose using public cloud aws ec2 instance , private cloud openstack instance present on local network. can give me idea begin. if successful, should able ping private ip address of ec2 instance openstack's instance? i have tried bit openvpn access server on openstack's instance , creating vpc , customer gateway in aws. right way it? tinc , work long have public ip address on 1 of vpc instances. keep in mind machines need connected same virtual tinc network. same way openvpn . require external public ip address. another way of doing creating customer gateway, virtual gateway , vpn connection in vpc configuration on amazon. can connect branch or office router vpn connection using ipsec. amazon recommends following router:

html - Css Triangle not rendering properly in IE -

i trying create css trianlge header navigation.i have achieved not rendering in ie. here working fiddle solution sample have created.i have fixed position when try run in ie(currently have ie 11.0) triangle rendered square box when try run in chrome , ff working fine. fiddler : http://jsfiddle.net/cknyq/20/ a:hover:after { background: white; border: solid black; border-width: 1px 1px 0 0; bottom: 0px; content: ' '; display: block; height: 10px; left: 32px; position: absolute; width: 10px; z-index: 99; -webkit-transform: rotate(-45deg); -webkit-transform-origin: 50% 50%; } use -ms-transform: rotate(-45deg)

jQuery Mobile: Submitted form not staying on "thank you" page -

i'm new jquery mobile, have started using wordpress site that's supposed used via smartphone. way looks added jqm equation. the problem have after submit form, correctly takes me "thank you" page, @ point single line of text reading "thank playing", after goes original form came from. might not able explain better, recorded video issue here: http://screencast.com/t/qmd0bprosg if disable ajax "$.mobile.ajaxenabled = false;" works, meaning doesn't go form, having ajax enabled , working way it's supposed to, rid of couple of other issues have. fixing behaviour save me lot of time! here's html: <form id="stop-spin" action="/thanks-for-playing" method="post"> <input type="hidden" id="stop-spin-nonce" name="stop-spin-nonce" value="c96ef6a79f"> <input type="hidden" name="_wp_http_referer" value="/spinner/"> ...

mysql - mysqlslap access denied on windows8 -

i'm getting access deniedwhen trying run mysqlslap, , i'm suspecting has me running on windows 8.1 machine, can't confirm anywhere. the line i'm trying run mysqlslap.exe --query="myquery" --iterations=10 --user=root -p=password --host=127.0.0.1 --delimiter=";" --create-schema=mydb i've tried running -p without password prompted password, access denied before ever getting prompted password. i've tried , without --host, --delimiter , --password besides error on command prompt popup windows saying app cannot run on pc. searching mysqlslap , windows 8 didn't much. i confirmed password logging mysql via commandpropt user root , password passed argument mysqlslap try this: open cmd( here link showing how do). in cmd enter in mysql bin folder "c:\program files\mysql\mysql server 5.5\bin".(to open folder in cmd use comand "cd" or "cd.." folder, here link showing how todo do) so enter c...