This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function calcVH () { | |
var vH = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); | |
document.querySelector('body').setAttribute("style", "height:" + vH + "px;"); | |
} | |
window.onload = calcVH(); | |
window.addEventListener('onorientationchange', calcVH, true); | |
window.addEventListener('resize', calcVH, true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Create2DArray(rows, columns) { | |
var arr = []; | |
for (var i = 0; i < rows; i++) { | |
var col = []; | |
for (var j = 0; j < columns; j++){ | |
col[j] = 0; | |
} | |
arr[i] = col; | |
} | |
return arr; |
NewerOlder