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
#current style | |
class Test: | |
constructor: (name) -> | |
@name: name | |
instancemethod() | |
@classmethod: (name) -> | |
"hey" + name | |
instancemethod: -> | |
"hey" + @name |
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
x: (test...) -> | |
alert(test) |
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
(function() { | |
var ident, result, x; | |
x = function(obj, func) { | |
return func(obj); | |
}; | |
ident = function(x) { | |
return x; | |
}; | |
result = x({ | |
one: ident(1) |
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
__bind = (function(){ | |
var _bind = Function.prototype.bind; | |
if (_bind) { | |
return function(func, context) { | |
return bind.call(func, context); | |
} | |
} | |
else { | |
return function(func, context) { | |
return function(){ return func.apply(context, arguments); } |
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> | |
<title>Drag and Drop Download</title> | |
<script> | |
window.addEventListener('DOMContentLoaded', function () { | |
var downloadLink = document.getElementById('download'); | |
/* |
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
# | |
# Module dependencies | |
# | |
utils = require './utils' | |
# | |
# @api private | |
# | |
class Mapper | |
constructor: (@phases, @riak) -> |
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> | |
<title>Image Preview</title> | |
</head> | |
<body> | |
<input type="file" id="picker" multiple="multiple"> | |
<script type="text/javascript"> | |
var picker = document.getElementById('picker'); |
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 video = document.getElementsByTagName('video')[0]; | |
var audio = new Audio(); | |
function saveMeta(event) { | |
audio.mozSetup(video.mozChannels, video.mozSampleRate); | |
} | |
function saveAudio(event) { | |
audio.mozWriteAudio(event.frameBuffer); |
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
<html> | |
<head> | |
<title>Depth Experiment</title> | |
</head> | |
<body> | |
<script> | |
var data = {"depths": [0.0, 0.12958113849163055, 0.24288934469223022, 0.41884708404541016, 0.8312229514122009, 1.0], "width": 1200, "depthmap": [[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.997050404548645, 0.912054181098938, 1.0, 1.0, 1.0, 1.0, 1.0, 0.996872067451477, 1.0, 1.0, 0.8829076290130615, 0.8656907677650452], [1.0, 1.0, 1.0, 0.9910506010055542, 1.0, 1.0, 1.0, 1.0, 0.3564097583293915, 0.7398068904876709, 1.0, 1.0, 0.9993961453437805, 1.0, 1.0, 0.9813909530639648, 0.9962142705917358, 0.9825999140739441, 0.8920065760612488, 0.9654608964920044], [1.0, 1.0, 1.0, 0.9991970658302307, 1.0, 1.0, 0.9978106617927551, 0.879845142364502, 0.1211555153131485, 0.8312267065048218, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.9779077768325806, 0.9561600685119629, 1.0], [1.0, 1.0, 1.0, 0.9976791143417358, 0.993761420249939, 1.0, 0.9646276235580444, 0.8590946197509766, 0.08840379863977432, 0.39600735902786255 |
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
""" Patch utility to apply unified diffs | |
Brute-force line-by-line non-recursive parsing | |
Copyright (c) 2008-2011 anatoly techtonik | |
Available under the terms of MIT license | |
Project home: http://code.google.com/p/python-patch/ | |
OlderNewer