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
var STORAGE_KEY = 'http://twitter.github.com/bootstrap/customize.html::settings'; | |
function findLabel(name) { | |
$.each($('label'), function (index, label) { | |
if(getName(label) === name) { | |
return name; | |
} | |
}); | |
} | |
function isInput(element) { | |
return $(element).prop('nodeName') === 'INPUT'; |
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
((Morganucodon oehleri,Morganucodon watsoni)Morganucodon,(Haldanodon exspectatus,(((Eomaia scansoria,(((((((Amblysomus hottentotus,Echinops telfairi)Afrosoricida,(Leptictis dakotensis,Rhynchocyon cirnei))Afroinsectivora,(Orycteropus afer,(Procavia capensis,(Thomashuxleya externa,(Carodnia vieirai,(Loxodonta africana,(Moeritherium lyonsi,Trichechus manatus)Pan-Sirenia)Tethytheria))Pan-Tethytheria)Paenungulata)Colbertia)Afrotheria,(((((Protungulatum donnae,(((Apheliscus insidiosus,Hyopsodus paulus),(Phenacodus intermedius,(Didolodus multicuspis,Protolipterna ellipsodontoides))),(Mesonyx obtusidens,(Rodhocetus balochistanensis,((Lama glama,(Sus scrofa,(Bos taurus,(Archaeotherium mortoni,(Hippopotamus amphibius,(Artiocetus clavis,(Basilosaurus cetoides,(Caperea marginata,Tursiops truncatus)Cetacea))Cetaceamorpha)Cetancodonta)Cetancodontamorpha)))Artiodactyla,(Equus caballus,Mesohippus bairdi)Perissodactyla)Euungulata))))Pan-Euungulata,(Pteropus giganteus,((Icaronycteris index,Onychonycteris finneyi),(Rhinopoma ha |
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
walkManagerChain( manager:any , event:any ):void{ | |
while( manager ){ | |
if( manager.hasOwnProperty( '_' + event.type ) ){ | |
manager[ '_' + event.type ]( event ); | |
} | |
if( manager.hasOwnProperty( 'manager' ) ){ | |
manager = manager.manager; | |
}else{ | |
return; | |
} |
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
function combineUIDs(o) | |
{ | |
function cu(a, b) | |
{ | |
function cc(a, b) | |
{ | |
if (a === '-') return '-'; | |
return Number(parseInt(a, 16) ^ parseInt(b, 16)).toString(16); | |
} | |
var i = 0, |
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
module aop | |
{ | |
export function after<R>( | |
f: (...args: any[]) => R, | |
advice: (result: R, ...args: any[]) => any | |
): (...args: any[]) => R | |
{ | |
return function() | |
{ | |
var result = f.apply(this, arguments), |
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
interface Oboe | |
{ | |
(url: string): Oboe.Call; | |
doDelete(url: string): Oboe.Call; | |
doDelete(request: Oboe.Request): Oboe.Call; | |
doGet(url: string): Oboe.Call; | |
doGet(request: Oboe.Request): Oboe.Call; | |
doPatch(url: string, body: any): Oboe.Call; | |
doPatch(request: Oboe.BodyRequest): Oboe.Call; | |
doPost(url: string, body: any): Oboe.Call; |
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
var CHANCE_OF_LIGHTNING = 1 / 100; // Tweak this. | |
var TOTAL_FRAMES = 4; // Include 'still' frame and lightning frames. | |
this.stop(); | |
this.addEventListener('tick', function() | |
{ | |
if (Math.random() < CHANCE_OF_LIGHTNING) | |
{ | |
this.gotoAndStop(Math.floor(Math.random() * (TOTAL_FRAMES - 1)) + 1); | |
} |
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
module Newtonsoft.Json | |
{ | |
export function deserialize(o: any): any | |
{ | |
const dict: { [$id: string]: Object } = {}; | |
function _deserialize(o: any): any | |
{ | |
if (typeof o === "object" && o !== null) | |
{ | |
let $id: string; |
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
declare module node_neo4j { | |
export interface PropertyContainer | |
{ | |
// The URL of this property container. | |
self: string; | |
// Whether this property container exists in (has been persisted to) the Neo4j database. | |
exists: boolean; | |
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
export function levenshtein(a: string, b: string): number | |
{ | |
const an = a ? a.length : 0; | |
const bn = b ? b.length : 0; | |
if (an === 0) | |
{ | |
return bn; | |
} | |
if (bn === 0) | |
{ |
OlderNewer