Function ReadFileToArray($filename) Dim $handle $handle=freefilehandle() if open($handle,$filename)<>0 exit @error endif ;-- prepare the array with an initial size -- Dim $incr, $size, $line, $index $incr = 128 $size = $incr dim $arr[$size] ;-- read file and put each line in the array -- $index = -1 $line = ReadLine($handle) while not @error $index = $index + 1 if $index>UBound($arr) $size = $size + $incr redim preserve $arr[$size] endif $arr[$index] = $line $line = ReadLine($handle) loop ;-- truncate the array to the minimum size -- redim preserve $arr[$index] ;-- close the file -- $_=close($handle) ;-- set the return data -- $ReadFileToArray=$arr exit 0 EndFunction
Generated in 0.205 seconds in which 0.141 seconds were spent on a total of 13 queries. Zlib compression enabled.
") !=-1) { tempah=tempah.substring(tempah.indexOf("")+5,tempah.indexOf("")); codes[i].innerHTML="" + dotag(tempah.substring()) + ""; } } //var pres = document.getElementsByTagName("pre"); //for (var i=0, maxi = pres.length; i < maxi; i++) { // var tempah = pres[i].innerHTML; // if (tempah.indexOf("[postprep") !=-1) { // tempah=tempah.substring((tempah.indexOf("]",tempah.indexOf("[postprep"))+1)); // pres[i].innerHTML=dotag(tempah); // } //} function ytag(which_one) { var codes = document.getElementsByClassName("ubbcode-body"); var thisone = codes[which_one].innerHTML; codes[which_one].innerHTML = "" + dotag(thisone.substring(5+thisone.indexOf(""),thisone.indexOf(""))) + ""; var heads = document.getElementsByClassName("ubbcode-header"); heads[which_one].innerHTML = "Code:" + ' '; } function ttag(which_one) { var codes = document.getElementsByClassName("ubbcode-body"); var thisone = ""; if (codes[which_one].innerText != undefined) { thisone += codes[which_one].innerText; } else { thisone += codes[which_one].textContent; } codes[which_one].innerHTML = thisone + ""; var heads = document.getElementsByClassName("ubbcode-header"); heads[which_one].innerHTML = "Code:" + ' '; }
")+5,tempah.indexOf("
" + dotag(tempah.substring()) + "
" + dotag(thisone.substring(5+thisone.indexOf(""),thisone.indexOf(""))) + "
"),thisone.indexOf("
"; if (codes[which_one].innerText != undefined) { thisone += codes[which_one].innerText; } else { thisone += codes[which_one].textContent; } codes[which_one].innerHTML = thisone + "