#MooTools Timer Example
Below is a code snippet that uses the Timer and TimerTask classes.
##Script
function print(id, value) {
document.getElementById(id).innerHTML = value;
}
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- Created by Isaac Holmlund ([email protected]) --> | |
<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"/> |
/* Simple JavaScript Inheritance for ES 5.1 ( includes polyfill for IE < 9 ) | |
* based on http://ejohn.org/blog/simple-javascript-inheritance/ | |
* (inspired by base2 and Prototype) | |
* MIT Licensed. | |
*/ | |
(function (global) { | |
"use strict"; | |
if (!Object.create) { | |
Object.create = (function () { |
#MooTools Timer Example
Below is a code snippet that uses the Timer and TimerTask classes.
##Script
function print(id, value) {
document.getElementById(id).innerHTML = value;
}
function decToHex(dec) { | |
return (function (hex) { | |
return hex.length == 1 ? "0" + hex : hex; | |
})(dec.toString(16)); | |
} | |
function hexToRgb(hex) { | |
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); | |
if (result) { | |
return { |
package com.stackoverflow.utils; | |
import java.util.List; | |
import com.google.common.base.Function; | |
import com.google.common.base.Joiner; | |
import com.google.common.collect.Collections2; | |
public class CollectionUtils { | |
public static <T> String mapJoin(List<T> list) { |
Updated January 27th, 2015, up-to-date to version 1.8.5505.15894.
Custom SublimeText theme for the JSONView browser plugin.
Paste the sublime-text.css stylesheet rules into the theme editor.
Tip: Themes can be configure under the options in the extensions page in the browser.
A sorting helper to sort an array of objects using multiple sorting properties. Property scoping is supported.
Your sorters can be simple property strings, or sorter objects.
This gist can be viewed at bl.ocks.org. Alternatively, you can view this example over at JSFiddle.