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 JavaScript Library v1.4.4 | |
* http://jquery.com/ | |
* | |
* Copyright 2010, John Resig | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://jquery.org/license | |
* | |
* Includes Sizzle.js | |
* http://sizzlejs.com/ |
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 JavaScript Library v1.4.4 | |
* http://jquery.com/ | |
* | |
* Copyright 2010, John Resig | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://jquery.org/license | |
* | |
* Includes Sizzle.js | |
* http://sizzlejs.com/ |
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
Copyright (c) 2011 Christopher Chedeau, http://blog.vjeux.com/ | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: | |
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
// Source: http://davidflanagan.com/Talks/jsconf11/BytesAndBlobs.html | |
// Load File | |
function loadBlob(path, callback) { | |
webkitRequestFileSystem( // Ask for filesystem | |
PERSISTENT, 50*1024*1024, | |
function(fs) { // When we get filesystem | |
fs.root.getFile( // Ask for a fs entry | |
path, {}, // With this name | |
function(entry) { // When we get entry |
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
// Handle when the DOM is ready | |
ready: function( wait ) { | |
// Either a released hold or an DOMready/load event and not yet ready | |
if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { | |
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). | |
if ( !document.body ) { | |
return setTimeout( jQuery.ready, 1 ); | |
} | |
// Remember that the DOM is ready |
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
/* Input */ | |
function f1(i) { | |
console.log('f1'); | |
if (i) { | |
console.log(1); | |
} else if (i > 2) | |
console.log(2); | |
else if (true) { |
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
// Change | |
status = xhr.status; | |
responseHeaders = xhr.getAllResponseHeaders(); | |
responses = {}; | |
xml = xhr.responseXML; | |
// Construct response list | |
if ( xml && xml.documentElement /* #4958 */ ) { | |
responses.xml = xml; |
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
while outer_condition() | |
while inner_condition() | |
[a, b] = pick2() | |
delta = swap a, b | |
if delta < 0 or Math.random() < Math.exp(-(delta + 1) / T) | |
cost += delta | |
else | |
swap a, b # revert | |
T *= C |
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
{ header: { reserved: 0, type: 0, imageCount: 1, padding: [ 0, 1, 0 ] }, | |
images: | |
[ { width: 16, | |
height: 16, | |
paletteCount: 16, | |
reserved: 0, | |
colorPlanes: 1, | |
bitsPerPixel: 4, | |
size: 296, | |
offset: 22, |
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
Copyright (c) 2011 Christopher Chedeau, http://blog.vjeux.com/ | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: | |
OlderNewer