This file contains hidden or 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
<p> | |
<span> | |
<span>The <a>quick</a> brown</span> | |
<span>fox. jump. ed </span> | |
over the lazy dogs. | |
</span> | |
</p> | |
["","","",""] |
This file contains hidden or 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
python -m SimpleHTTPServer 9914 |
This file contains hidden or 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> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> | |
<script type="text/javascript" src="http://documentcloud.github.com/underscore/underscore-min.js"></script> | |
<style> | |
body { | |
margin:0px; | |
padding:0px; | |
} |
This file contains hidden or 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> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> | |
<script type="text/javascript" src="http://documentcloud.github.com/underscore/underscore-min.js"></script> | |
<style> | |
body { | |
margin:0px; | |
padding:0px; | |
} |
This file contains hidden or 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> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> | |
<script type="text/javascript" src="http://documentcloud.github.com/underscore/underscore-min.js"></script> | |
<style> | |
body { | |
margin:0px; | |
padding:0px; | |
} |
This file contains hidden or 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 a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; | |
var b = _(a).reduceRight(function(memo,n){ return memo.concat([n]); },[]); |
This file contains hidden or 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
['Quad', 'Cubic', 'Quart', 'Quint'].each(function(transition, i){ | |
Fx.Transitions[transition] = new Fx.Transition(function(p){ | |
return Math.pow(p, i + 2); | |
}); | |
}); |
This file contains hidden or 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
for(var i=0;i<1;i=i+0.1){ console.log(Math.pow(i, 4)); } | |
0 | |
0.00010000000000000005 | |
0.0016000000000000007 | |
0.008100000000000005 | |
0.02560000000000001 | |
0.0625 | |
0.1296 | |
0.24009999999999992 | |
0.40959999999999985 |
This file contains hidden or 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 JimBob = function Barf(x){ this.x = x; }; | |
JimBob.prototype.klass = "JimBobbbbb"; | |
var creator = function(c, args){ | |
var instance_of = {}; | |
instance_of[c.klass] = function(){ | |
return c; | |
}; | |
return new (instance_of[c.klass].call(this, args)); | |
}; |
This file contains hidden or 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 extend = function (protoProps, classProps) { | |
var child = inherits(this, protoProps, classProps); | |
child.extend = extend; | |
return child; | |
}; | |
// Set up inheritance for the model, collection, and view. | |
Backbone.Model.extend = Backbone.Collection.extend = Backbone.Controller.extend = Backbone.View.extend = extend; |