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 | |
$data = array( | |
array('company'=>'AIG', 'id'=>1, 'balance'=> '-$99,999,999,999.00'), | |
array('company'=>'Wachovia', 'id'=>2, 'balance'=> '-$10,000,000.00'), | |
array('company'=>'HP', 'id'=>3, 'balance'=> '$555,000.000.00'), | |
array('company'=>'IBM', 'id'=>4, 'balance'=> '$12,000.00') | |
); | |
$renderer = new ArrayToTextTable($data); |
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
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php | |
$('[placeholder]').focus(function() { | |
var input = $(this); | |
if (input.val() == input.attr('placeholder')) { | |
input.val(''); | |
input.removeClass('placeholder'); | |
} | |
}).blur(function() { | |
var input = $(this); |
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
// The `quickEach` method will pass a non-unique jQuery instance | |
// to the callback meaning that there will be no need to instantiate | |
// a fresh jQuery instance on each iteration. Most of the slow-down | |
// inherent in jQuery's native iterator method (`each`) is the constant | |
// need to have access to jQuery's methods, and so most developers | |
// see constructing multiple instances as no issue... E.g. | |
// $(...).each(function(){ $(this)... $(this)... $(this)... }); | |
// A better approach would be `quickEach`. | |
jQuery.fn.quickEach = (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
/* | |
* media.matchMedium()- test whether a CSS media type or media query applies | |
* primary author: Scott Jehl | |
* Copyright (c) 2010 Filament Group, Inc | |
* MIT license | |
* adapted by Paul Irish to use the matchMedium API | |
* http://www.w3.org/TR/cssom-view/#media | |
* Doesn't implement media.type as there's no way for crossbrowser property | |
* getters. instead of media.type == 'tv' just use media.matchMedium('tv') |
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
/*! | |
* SSSL: smallest, simpelst script loader | |
* version: 1.0.1 | |
* | |
* API: | |
* Normal usage | |
* sssl(source [,complete]); | |
* | |
* Example: | |
* sssl('jquery.js', 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
/* | |
* Property prefix hacks | |
*/ | |
/* IE6 only - any combination of these characters */ | |
_ - £ ¬ ¦ | |
/* IE6/7 only - any combination of these characters */ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Calculating zoom using Javascript</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script> | |
<script> | |
function hasPageBeenResized() { | |
var isResized; |
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 | |
/* PHP PBKDF2 implementation | |
* | |
* PBKDF2 is a key derivation function defined in RFC2898. It's used to | |
* generate longer and more secure passwords from short, human-entered | |
* passwords. The number of rounds can be increased to keep ahead of | |
* improvements in CPU/GPU performance. | |
* | |
* You should use a different salt for each password (it's safe to store it |
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
/** | |
* fullscreenify() | |
* Stretch canvas to size of window. | |
* | |
* Zachary Johnson | |
* http://www.zachstronaut.com/ | |
* | |
* See also: https://gist.github.com/1178522 | |
*/ |
OlderNewer