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
var M = Backbone.Model.extend({}); | |
var C = Backbone.Collection.extend({model: M}); | |
var NUM = 100000; | |
var data = new Array(NUM); | |
data.forEach(function(item, i, list){ | |
list[i] = { | |
a: i, | |
b: "test"+i, | |
c: "test"+(NUM - i) |
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 getPair(num) { | |
var randColor = function(){ | |
var rnd = Math.random(); | |
var color = Math.floor(rnd * 16777215).toString(16); | |
var oposite = Math.floor(16777215 - rnd * 16777215).toString(16); | |
while (oposite.length < 6) { | |
oposite = '0' + oposite; | |
} | |
return color +'/'+ oposite; | |
} |