View element_style_aggregation.js
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
if(!Element.siblingsBefore){ | |
Element.implement({ | |
siblingsBefore : function(){ | |
var results = []; | |
var found = false; | |
this.getParent().getChildren().each(function(child){ | |
if(this == child) found = true; | |
if(!found) results.push(child); | |
}); | |
return new Elements(results); |
View Function.whenTrue.js
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
if(!Function.actionTimeout) Function.actionTimeout = 16384; | |
if(!Function.whenTrue){ | |
Function.implement({ | |
whenTrue : function(actionFunction, args, delayFunction, timeoutFunction, timeout, counter){ | |
if(!timeout) timeout = Function.actionTimeout; | |
if(!counter) counter = 0; | |
if(!timeoutFunction) timeoutFunction = function(event){ | |
throw('Condition not met after '+event.time+'ms'); | |
}; | |
var result = this(); |
View MooToolsEntityEncoding.js
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
if(!String.regexEncode){ | |
String.regexChars = ['\\', '&','^', '$', '*', '+', '?', '.', '(', ')', '|', '{', '}', '[', ']']; | |
String.regexEncodeRegexObject = new RegExp('([\\'+String.regexChars.join('|\\')+'])', 'g'); | |
String.implement({ | |
regexEncode : function(){ | |
return this.replace(String.regexEncodeRegexObject, '\\$1'); | |
} | |
}); | |
} |
View String.whenInDOM.js
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
if(!String.whenInDOM){ | |
if(!String.defaultReplacementTimeout) | |
String.defaultReplacementTimeout = 16384; | |
String.implement({ | |
whenInDOM : function( | |
callback, | |
delayCallback, | |
timeoutCallback, | |
timeout, | |
counter |
View code_environment.tex
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
\definecolor{altlinecolor} {rgb}{0.7,0.7,0.7} | |
\renewcommand{\FancyVerbFormatLine}[1]{% | |
\ifodd\value{FancyVerbLine}% | |
\colorbox{altlinecolor}{ | |
\hspace{-0.04in}\makebox[\textwidth - 16pt][l]{#1} | |
}\else#1\fi} | |
\DefineVerbatimEnvironment{CleanCode}{Verbatim} | |
{ |
View draft_watermark.tex
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
\usepackage{everypage} | |
\newenvironment{water}{\AddEverypageHook{\waterb}}{ | |
\AddThispageHook{\waterb}\AddEverypageHook{\watere} | |
} | |
\makeatletter | |
\newcommand{\waterb}{ | |
\AddToShipoutPicture*{% | |
\setlength{\@tempdimb}{.5\paperwidth}% |
View font_styles.tex
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
\setsansfont[Mapping=tex-text,Scale=1.1]{Scrawler} | |
\setmainfont[Mapping=tex-text,Scale=1.0]{Lucida Grande} | |
\setmonofont{Courier} |
View load_parse_render.js
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 parser = new SVGParser(); | |
var svgRequest = new Request({ | |
url: 'awesome.svg', | |
onSuccess: function(responseText, responseXML) { | |
//once we recieve the SVG, we parse it | |
parser.parse(responseText); | |
} | |
}).send(); |
View soup_talker.php
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
<?php | |
$soups = array("Avgolemono ", "Borscht ", "Caldo verde ", "Fasolada ", | |
"Goulash soup", "Islensk Kjotsupa ", "Kimchi jjigae ", "Lentil soup", | |
"Menudo", "Mulligan Stew", "Philadelphia Pepper Pot ", "Pho", | |
"Sundubu jjigae ", "Snert ", "Solyanka ", "Tomato soup", "Cold borscht", | |
"Dashi soup ", "Okroshka", "Sour cherry soup", "Vichyssois", "Ginataan", | |
"Naengmyeon ", "Fruktsuppe", "Cioppino ", "Fanesca ", "Lan Sikik ", | |
"Sliced fish soup", "Ukha or Lohikeitto", "Bird's nest soup", "Fuhn", | |
"Mian", "Ramen", "Saimin", "French onion soup", "Tinola", "Crab bisque", | |
"Chestnut bisque", "Cream of Crab Soup", "Clam chowder", "Chupe", |
View Element.optimalWidth.js
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
Element.implement({ | |
// if called with callback, the element is set to the optimalWidth and called back when ready | |
// else the optimalWidth is calculated and returned | |
optimalWidth : function(callback){ | |
var increment = 10; | |
var fuse = 10; //how many unchanged iterations before we're done? | |
var originalSize = this.getSize(); | |
var lastForwardChange; | |
for(var lcv=0; lcv < fuse; lcv++){ | |
var currentSize = this.getSize(); |
OlderNewer