This file contains 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
/* | |
* Splits array into subarrays. | |
* count parameter indicates that how many item per subarray contains. | |
* Example usage: splitIntoSubArray([1,2,3,4,5], 2) -> [[1, 2], [3, 4], [5]] | |
*/ | |
function splitIntoSubArray(arr, count) { | |
var newArray = []; | |
while (arr.length > 0) { | |
newArray.push(arr.splice(0, count)); | |
} |
This file contains 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
''' | |
Example of Tornado that autoreloads/watches all files in folder 'static' | |
''' | |
import tornado.ioloop | |
import tornado.web | |
import tornado.autoreload | |
import os | |
''' serves index.html''' |