Forked from Chris Coyier's Pen clip-path examples.
A Pen by Captain Anonymous on CodePen.
| $(document).ready(function() | |
| { | |
| pagesPositions = []; | |
| $(".pagenumber").each(function() | |
| { | |
| pagesPositions.push(this.offsetTop); | |
| }); | |
| }); |
| /* Loads the user data and executes callback() ; also executes it (but with no userData passed) if failed */ | |
| loadUserData = function(argsDict, userID, callback) | |
| { | |
| var installationName = argsDict.Installation || "main"; | |
| if (!userDataCache[userID]) | |
| userDataCache[userID] = new Object(); | |
| /* Checks if the entry is cached */ |
| /* A very simple text search algorithm */ | |
| var calcRelevance = function(app) | |
| { | |
| /* Constants */ | |
| var KeyPriority = 2, posImportance=2, fillImportance = 1; | |
| var rel = 0; | |
| /* Apply the action in every one of these keys of the app; at the beginning of the cycle, increment the priority | |
| * which means that the further the key is in this array, the more priority it gets (Name is the most important) */ |
| { | |
| "name": "uspehite", | |
| "scripts": { | |
| "start": "./website-server.js" | |
| }, | |
| "version": "0.0.0-6", | |
| "engines": { | |
| "node": "0.6.x" | |
| }, | |
| "subdomain": "uspehite2", |
| Array.prototype.sum = function() { var s = 0; for (var i=0; i!=this.length; i++) s+=this[i]; return s; } | |
| function equi ( A ) { | |
| for (var i=0; i!=A.length ;i++) | |
| { | |
| var sumOne = A.slice(0,i).sum(), | |
| sumTwo = A.slice(i+1).sum(); | |
| if (sumOne == sumTwo) | |
| return i; | |
| } | |
| return -1; |
| var digitCount = 10, | |
| max = Math.pow(10, digitCount), | |
| placeholder = []; | |
| for (var i=0; i!=digitCount; i++) placeholder+="0"; | |
| for (var i=0; i!=max; i++) tryCombo(placeholder.slice(i.toString().length) + i.toString()); | |
| function tryCombo(c) { console.log(c); } |
| var peersByCountry = data.peers.map(function(peer) | |
| { | |
| var country = getCountry(peer.ip), | |
| loc = countryLoc[country.country_code.toLowerCase()]; | |
| country.peer = peer; | |
| if (!loc) | |
| { | |
| console.error("no location for ",country); | |
| country.proximity = 99; |
| var http = require("http"), | |
| zlib = require("zlib"), | |
| DHT = require("bittorrent-dht"), | |
| net = require("net"), | |
| hat = require("hat"), | |
| bncode = require("bncode"), | |
| async = require("async"), | |
| wire = require("peer-wire-protocol"); | |
| var noop = function() {}; |
Forked from Chris Coyier's Pen clip-path examples.
A Pen by Captain Anonymous on CodePen.
| #include <node.h> | |
| #include <v8.h> | |
| using namespace v8; | |
| char* buf; | |
| const unsigned size = 400*400; | |
| void GetVideoFrame(const v8::FunctionCallbackInfo<Value>& args) | |
| { |