Run 5 times, with one second delay between calls
t1 = new Timer(500, function(){
console.log(this.count);
if (this.count >= 5) {
this.stop();
}
});
function product() { | |
var args = Array.prototype.slice.call(arguments); // makes array from arguments | |
return args.reduce(function tl (accumulator, value) { | |
var tmp = []; | |
accumulator.forEach(function (a0) { | |
value.forEach(function (a1) { | |
tmp.push(a0.concat(a1)); | |
}); | |
}); | |
return tmp; |
;(function ($, window) { | |
var intervals = {}; | |
var removeListener = function(selector) { | |
if (intervals[selector]) { | |
window.clearInterval(intervals[selector]); | |
intervals[selector] = null; | |
} |
function urlObject(options) { | |
"use strict"; | |
/*global window, document*/ | |
var url_search_arr, | |
option_key, | |
i, | |
urlObj, | |
get_param, | |
key, |
/* | |
jQuery.reduce - a jQuery plugin for functional programming | |
@author John Hunter | |
created 2010-09-17 | |
use: $.reduce(arr, fnReduce, valueInitial); | |
fnReduce is called with arguments: [valueInitial, value, i, arr] | |
reduce will never be jQuery core - its not prototype :p (http://dev.jquery.com/ticket/1886) | |
*/ | |
(function ($) { |
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- Created by Isaac Holmlund (isaacch@gmail.com) --> | |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
<xs:element name="type" nillable="false"> | |
<xs:simpleType> | |
<xs:restriction base="xs:string"> | |
<xs:enumeration value="action"/> | |
<xs:enumeration value="action-attack"/> | |
<xs:enumeration value="action-duration"/> | |
<xs:enumeration value="action-reaction"/> |