TODO: Write a project description
TODO: Describe the installation process
//The sum of 'weights' elements should be equal 1. | |
let weights = [0.1, 0.9]; // probabilities | |
//The possible results | |
let results = [0, 1]; // values to return | |
function getRandom () { | |
let num = Math.random(), | |
s = 0, | |
lastIndex = weights.length - 1; |
<script> | |
var cacheStatusValues = []; | |
cacheStatusValues[0] = 'uncached'; | |
cacheStatusValues[1] = 'idle'; | |
cacheStatusValues[2] = 'checking'; | |
cacheStatusValues[3] = 'downloading'; | |
cacheStatusValues[4] = 'updateready'; | |
cacheStatusValues[5] = 'obsolete'; | |
var cache = window.applicationCache; | |
cache.addEventListener('cached', logEvent, false); |