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
for( var current_index = 0; current_index < 10; current_index++ ){ | |
var photo_path = PVL.Viewer.getPhotoPath( photos[ current_index ] ); | |
var loadedIntoQueue = function (i) { | |
return function ( texture ){ | |
console.log( 'texture loaded in queue', i, new Date() ); | |
} | |
}; |
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 Instance = function (options) { | |
this.options = options; | |
}; | |
Instance.prototype.use = function (fn) { | |
var self = this; | |
process.nextTick(() => { | |
fn.call(self, self.options); | |
}) | |
return 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
exports.forceWreckError = function (method, timer) { | |
var original = Wreck[method]; | |
Wreck[method] = function () { | |
if (!timer) { | |
var callback = arguments[arguments.length - 1]; | |
Wreck[method] = original; | |
return callback(new Error('foo')); |
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 bad = function (options, callback) { | |
var a = options.a; | |
doSomethingAsync(function (err, res) { | |
callback(err, res); | |
}); | |
}; |
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 test1 = function () { | |
var options = { | |
hostname: 'google.com', | |
port: 80, | |
path: '/' | |
}; | |
http.get(options, function (res) { | |
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
// Load modules | |
// Declare internals | |
var internals = {}; | |
module.exports.foo = internals.foo = function(args) { | |
// do awesome stuff |
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 CameraShare = function (cameraId, username, target) { | |
this.cameraId = cameraId; | |
this.fromName = username; | |
this.target = target; | |
this.branchUrl = function(cb) { | |
branchUrl = "http://www.google.com/" | |
cb(branchUrl); |
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 init() { | |
var pswp = new Pswp(); | |
pswp.listen("gettingData", refreshSignedUrl(pswp)); | |
}; | |
function refreshSignedUrl(pswp) { | |
return function (index, item) { |
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 compose = function (f, g) { | |
var inner = function (x) { | |
return g(f(x)); | |
}; | |
}; |
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
<div class="row"> | |
<div class="col-md-3" id="playerContainer"></div> | |
<div class="col-md-6" id="playerDetailContainer"></div> | |
</div> | |
<script type="text/jsx"> | |
var loadData = function (self) { | |
$.ajax({ |
NewerOlder