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
/** | |
* jQuery wrapper/plugin for console functions in FF/IE/Chrome. | |
* | |
* These functions execute silently when no console is available, so | |
* you can safely leave diagnotics calls in place during development | |
* and beta-testing. | |
* | |
* Examples: | |
* | |
* $.log('Hello, World.',1,2,3); |
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
/// This interface defines an event listener | |
interface Listener<Event> { | |
(event: Event): void | |
} | |
/// This interface represents a hookable type | |
interface Hookable<Event> { | |
/// Attach a handler to this hookable | |
(handler: Listener<Event>): void | |
} |
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
/* | |
Version: 1.1 | |
Developer: Rasmus Schultz <http://mindplay.dk> | |
License: GPL v3 <http://www.gnu.org/licenses/gpl-3.0-standalone.html> | |
Gist: <https://gist.github.com/724347> | |
Removing this notice from the source code would be bad karma. | |
*/ |
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
/*! | |
* jQuery Scrollbar Width v1.0 | |
* | |
* Copyright 2011, Rasmus Schultz | |
* Licensed under LGPL v3.0 | |
* http://www.gnu.org/licenses/lgpl-3.0.txt | |
*/ | |
(function($){ |
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
/** | |
* http://plugins.jquery.com/project/swap-jumble | |
*/ | |
(function($){ | |
$.fn.swap = function(b){ | |
b = $(b)[0]; | |
var a = this[0]; | |
var t = a.parentNode.insertBefore(document.createTextNode(''), a); | |
b.parentNode.insertBefore(a, b); |
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
/* | |
bugfix for "DocsByReflection.cs" | |
http://jimblackler.net/blog/?p=49 | |
Replace broken XMLFromName() method with the following fixed method: | |
*/ |
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 | |
/** | |
* Proportional word-wrap (approximation) | |
* | |
* Attempts to work as a drop-in replacement for wordwrap() | |
* | |
* Based on http://www.php.net/manual/en/function.wordwrap.php#82580 | |
*/ | |
function pwordwrap($str, $width=75, $break="\n") |
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 | |
class SecurityContext | |
{ | |
private $_readonly = false; | |
private $_context = array(); | |
public static $actions = array( | |
); |
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
/* | |
This code assumes an IEntity interface that identifies your persistent types. | |
*/ | |
/// <summary> | |
/// This static class provides common extension methods for <see cref="IEntity"/> types. | |
/// </summary> | |
public static class EntityExtensions |
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
// let's say we have a house: | |
$house = new House(); | |
// let's say the house has a door: | |
$door = new Door(); | |
// why does it take two steps to add the door to the house? |