1 2 3 4 5 6 7 8 9 10 11 12 13 |
function prova(){ var myMessage = '{"success": true,"counters": [{"counter_name": "dsd", "counter_type": "sds", "counter_unit": "sds" }, { "counter_name": "gdg", "counter_type": "dfd", "counter_unit": "ds" }, { "counter_name": "sdsData", "counter_type": "sds", "counter_unit": " dd " }, { "counter_name": "Stoc final", "counter_type": "number ", "counter_unit": "litri " }, { "counter_name": "Consum GPL", "counter_type": "number ", "counter_unit": "litri " }, { "counter_name": "sdg", "counter_type": "dfg", "counter_unit": "gfgd" }, { "counter_name": "dfgd", "counter_type": "fgf", "counter_unit": "liggtggggri " }, { "counter_name": "fgd", "counter_type": "dfg", "counter_unit": "kwfgf " }, { "counter_name": "dfg", "counter_type": "dfg", "counter_unit": "dg" }, { "counter_name": "gd", "counter_type": "dfg", "counter_unit": "dfg" } ] }'; var jsonData = JSON.parse(myMessage); for (var i = 0; i < jsonData.counters.length; i++) { var counter = jsonData.counters[i]; document.getElementById("idTesto").innerHTML = counter.counter_name; } } |
using this simple code you can have the size of your client area in pix
1 2 3 4 5 6 7 8 9 10 11 |
function getScreenSize() { var w = window, d = document, e = d.documentElement, g = d.getElementsByTagName('body')[0], x = w.innerWidth || e.clientWidth || g.clientWidth, y = w.innerHeight|| e.clientHeight|| g.clientHeight; return x + 'px ' + y + 'px'; } |
1 |
window.addEventListener('resize',<yourFuncName>); |
1 2 3 4 |
select PK_ID from USERS start with FK_USER_PARENT = PK_USER connect by prior PK_ID = FK_USER_PARENT; |
int2hex example in delphi:
1 2 3 4 5 6 7 8 9 |
var str : string; // hex value b : byte; begin b := 15; str := system.sysutils.inttohex(b,2); end; // the result in str will be : '0F' |
hex2int example:
1 2 3 4 5 6 7 8 9 |
var strHexVal : string; // hex value intVal : integer; begin strHexVal := '0F'; intVal := StrToInt('$' + strHexVal); end; // the result in intVal will be : 15 |