javascript - changing the content of .txt file - on browsing file -


i want draw structure of chemicals based on values in log file . write javascript drawing , works predefined x,y,z coordinates value

.txt file contain enter image description here

its 5th,6th,7th indicates x,y,z coordinates value.

log file contain following fields log file content

is there way browse file user , accept value in 5th,6th,7th field of .txt file.

to file uploaded check out kk anu's answer.

once have file in access , can read it, it's straight forward iteration of each line.

var linesfromfile= file.split(/[ ,]+/);  linesfromfile.foreach(function(entry) {     var parsedfloat = parsefloat(entry);      if(parsedfloat === number(parsedfloat)  && parsedfloat%1!==0){         // parsed float     } }); 

you have adapt code needs, function go with.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -