Add class to checkbox
1 2 3 4 5 6 7 |
<div id="checkboxList"> <div><input type="checkbox" value="1" class="myChk"> Value 1</div> <div><input type="checkbox" value="2" class="myChk"> Value 2</div> <div><input type="checkbox" value="3" class="myChk"> Value 3</div> <div><input type="checkbox" value="4" class="myChk"> Value 4</div> <div><input type="checkbox" value="5" class="myChk"> Value 5</div> <div> |
Create a function to return a JSON string
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
function arrayChk(){ var arrAn = []; var m = $('.myChk'); var arrLen = $('.myChk').length; for ( var i= 0; i < arrLen ; i++){ var w = m[i]; if (w.checked){ arrAn.push( { "myVal" : w.value } ); console.log(w.value ); } } var myJsonString = JSON.stringify(arrAn); //convert javascript array to JSON string console.log( 'result' + myJsonString); alert(myJsonString); return myJsonString; } |
Here an example https://jsfiddle.net/a3owjh85/1/
Welcome to VR6 @ Synaptica Farm VR6 is a fully customized Dell R740XD dual Xeon performance server for high performance in the KVM Virtualization System. Higher performance less core (on 18 per processor) more frequency (plus 3Ghz) memory RDIMM ECC 2666GHz … less virtual machine but faster. Why VR6? Each production server in Synaptica has…
Read more
Using the JPackageInfo class is simple to retrive the version of your Android application. This class is already wrapped by Embarcadero in the following unit: Androidapi.JNI.GraphicsContentViewText {code} {$IFDEF ANDROID} var PackageManager: JPackageManager; PackageInfo: JPackageInfo; begin PackageManager := SharedActivityContext.getPackageManager; PackageInfo := PackageManager.getPackageInfo (SharedActivityContext.getPackageName, 0); result := JStringToString(PackageInfo.versionName); End; {$ENDIF}
L’obiettivo era quello di connettersi a livello programmatico ad una specifica WiFi da qui è sorta l’esigenza di gestire in modo completo la classe Java WifiManager. Nei tre metodi principali riportati di seguito avremo: riconoscimento dell’IP Address assegnato alla porta wifi Elenco delle Wifi disponibili (quelle che il dispositivo riconosce) Elenco delle configurazioni WiFi salvate…
Read more
Following this tutorial you’ll be able to configure your RaspBerryPi model 3 to accept incoming connections using its built-it WiFi antenna and to forward the requests to the Ethernet port. Requirements 1x RaspBerryPi model 3 (earlier versions will not work unless you have a WiFi dongle. In that case, just follow this Adafruit tutorial) 1x…
Read more
To find a file in the Android Shell “ADB” you can use this command:
1 |
# busybox find "filetosearch" |
you can do the same with
1 |
# ls -R | grep "filetosearch" |
but you can’t see the directory where is the file