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 deltaX = 0, | |
queued = false; | |
function myAction(){ | |
//your awesome code here uses deltaX | |
deltaX = 0; //we reset the deltaX so it can be incremented next time onEvent is executed | |
queued = false; | |
} | |
function onEvent(evt){ |
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
function tick(){ | |
//we clean if we've changed the size of the quadrant | |
if(needsClean){ | |
cleanCanvas(); | |
} | |
//if we have to change the quadrant's frame because we are the active one (or the opposite) | |
if(newFrame){ | |
drawFrame(); //we draw just the frame in a separate canvas so it doesn't need to be calculated all the time, and it is still faster than copying from an image | |
} |
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
"use strict"; | |
var request = require('request'), | |
request = request.defaults({ | |
// jar: false, | |
headers: { | |
'Accept': 'text/html, application/xhtml+xml, */*', | |
'Accept-Language': 'en-US,en;q=0.5', | |
'User-Agent': 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)'}}), | |
websites = ['http://cnet.com', |
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
(function () { | |
var root = $(document.getElementsByTagName('body')); | |
var watchers = []; | |
var f = function (element) { | |
if (element.data().hasOwnProperty('$scope')) { | |
angular.forEach(element.data().$scope.$$watchers, function (watcher) { | |
watchers.push(watcher); | |
}); | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.