Posts

how to keep track of previous value before changing it in vb.net -

private sub chkloop_checkedchanged(sender object, e eventargs) handles chkloop.checkedchanged intvalue1 = nudx4.value intvalue2 = nudy4.value dim g triglib.triglib = new triglib.triglib ' make shape closed making last point same first point. if chkloop.checked nudx4.value = nudx1.value nudy4.value = nudy1.value lblarea.text = "area: " & cint(g.areatriangle(new point(nudx1.value, nudy1.value), new point(nudx2.value, nudy2.value), new point(nudx3.value, nudy3.value))) elseif chkloop.checkstate = checkstate.unchecked nudx4.value = intvalue1 nudy4.value = intvalue2 lblarea.text = "" i trying store previous values of point nudx4 , nudy4 in 2 local variable. when uncheck checkbox values of nudx4 , nudy4 remain equal values of nudx1 , nudy1 instead of changing previous values. please help. private sub chkloop_checkedchanged(sender object, e eventargs) handles chkloop.checked...

php - Android App unable to create directory on server -

i have app supposed create directory on server via url. when enter url web browser, works. when register through app, nothing appears. have tried file server , worked. file has 777 permission , still nothing on phone side. please help this php code $gcmregid = $_post["regid"]; $gcmusername = $_post["username"]; $gcmfoldername = $_post["foldername"]; $gcmdate = date("d/m/y"); $conn = new mysqli($servername, $username, $password, $dbname); if($conn->connect_error){ die("connection failed: " . $conn->connect_error); } $in_user = "user"; $in_password = "null"; $in_email = "null"; $in_dob = "null"; $in_role = "user"; $in_datejoined = "0000-00-00"; $sql = "insert user(password,regid,name,e...

which sensor i have to use to find out distance of a particular device using sensors in iot -

i want create device tracker find objects keys or important things. want add sensor valuable thing find object left. can't use motion sensor, ultrasonic sensor or air proximity because of check distance form 1 direction. need find out distance of object direction. consider using 1 of both: gps rdf (radio direction find) the first great if have open sky , client (the looking device) able navigate through gps (thinking in smartphone). the second indoor can hard program , find parts. soloshot . follows beacon attached person of interest. don´t have spec kind of rdf bet. airplanes use avionic based on rdf idea. read wikpeadia article on rdf . others may come other ideas, first popped in mind.

c# - how to cast my y.Value to List<Dictionary<string, object>> -

Image
i want cast y.value list<dictionary<string, object> . i tried: y.value list<dictionary<string, object>> but return null . this watch: . i don't know how handle object {system.collections.generic.dictionary<string,object>} . thanks y.value list<object> casted object , , objects dictionary<string, object> , although casted object too. typing not helpful here. you can use linq dictionaries out: var list = ((ienumerable<object>)y.value) .cast<dictionary<string, object>>() .tolist();

list - python if-else statement returning true only for if condition -

i using python read numeric weather data file , checking humidity conditions. if humidity less or equal 75 humidity should re-written "low" , if humidity greater 75 should re-written "high". following data in file. outlook, temperature, humidity, windy, permission_to_play sunny,85,85,false,no sunny,80,90,true,no overcast,83,86,false,yes rainy,70,96,false,yes rainy,68,80,false,yes rainy,65,70,true,no overcast,64,65,true,yes sunny,72,95,false,no sunny,69,70,false,yes rainy,75,80,false,yes sunny,75,70,true,yes overcast,72,90,true,yes overcast,81,75,false,yes rainy,71,91,true,no i reading file in list , accessing humidity value. following code have written. def fetchdata(filename): datalist = [] rd =open(filename,mode='r') list = rd.readlines() l in list: sublist = l.strip().split(',') humidity=sublist[2] if humidity>75: sublist[2]="high" else: ...

python - JSON data to Pandas DataFrame -

help have json file , can't load in python dataframe. first question should json file? resulting file when chart rendered on web page , end data pulled chrome network inspection. it seems there code in front not json or not table messing import. http://pastebin.com/ne4rrrgp can please help the below loads file in python import json pprint import pprint open('data2.json') data_file: data = json.load(data_file) and pprint(data) does print data can't convert pandas dataframe edit ok must javascript file think json. just use pandas.read_json , merely wrapper around json class, can take remote url local filename: import pandas pd pandas_dataframe = pd.read_json('data2.json') hope helps.

Facing Issue while sending mail in java using JavaMail.jar and Activation.jar -

i trying send mail office 365 mail id in java.i have added mail.jar , activation.jar in project. facing following exception. javax.mail.messagingexception: not convert socket tls; nested exception is: java.net.socketexception: java.security.nosuchalgorithmexception: default sslcontext not available @ com.sun.mail.smtp.smtptransport.starttls(smtptransport.java:1907) @ com.sun.mail.smtp.smtptransport.protocolconnect(smtptransport.java:666) @ javax.mail.service.connect(service.java:317) @ javax.mail.service.connect(service.java:176) @ javax.mail.service.connect(service.java:125) @ javax.mail.transport.send0(transport.java:194) @ javax.mail.transport.send(transport.java:124) @ agent.client.attributegroups.sendreceive.sendmail(sendreceive.java:75) @ agent.client.attributegroups.mailqueue.calculatetime(mailqueue.java:39) @ agent.client.mainclass.<init>(mainclass.java:59) @ agent.client.mainclass.main(mainclass.java:152) caused by: j...