node-webworkers
is an implementation of the Web Workers
API for
node.js.
See the design document here.
def hoppity(x) | |
(1..(x)).each do |i| | |
x = (i%3==0 && i%5==0) ? "Hop" : (i%3==0) ? "Hoppity" : (i%5==0) ? "Hophop" : nil | |
puts x if x | |
end | |
end |
$(this).attr('backround-size', (10000/parseInt($("this").width())+"%")); | |
//or | |
function bgsize(width) { return 10000/width; } |
fun xadd(t1 :moneh, t2 :moneh) = if ((#2 t1)+(#2 t2))>100 then (((#1 t1)+(#1 t2)+1), ((#2 t1)+(#2 t2)-100)) else if ((#2 t1)+(#2 t2)<0) then (((#1 t1)+(#1 t2)-1), (((#2 t1)+(#2 t2))+100)) else (((#1 t1)+(#1 t2)), ((#2 t1)+(#2 t2))); |
var request = require('request'), | |
jsdom = require('jsdom'), | |
sys = require('sys'); | |
function getAttendees(eventID, accessToken, callback) { | |
var attendees; | |
console.log("fetching: "+"https://graph.facebook.com/"+eventID+"/attending?access_token="+accessToken); | |
request({uri:"https://graph.facebook.com/"+eventID+"/attending?access_token="+accessToken}, function (error, response, body) { | |
console.log("sucess!"); | |
if (!error && response.statusCode == 200) { |
function loadData(req, res, next) { | |
/* Loads all data. */ | |
/*var filter = {} | |
if(req.params.tag) { | |
console.log("fetching data for tag: "+req.params.tag) | |
filter = {"tag": req.params.tag} | |
}*/ | |
WorkInstance.find({}, ['_id','tag', 'start', 'stop'], {sort:[['start', -1]]}, function(err, docs) { |
#!/usr/bin/env ruby | |
require 'sinatra' | |
require 'digest/sha1' | |
def getShit(keys) | |
hashprimer = "" | |
keys.each do |k| | |
hashprimer = hashprimer + params[k]+"&" if k=="pmt_action" | |
hashprimer = hashprimer + params[k]+"&" if k=="pmt_version" | |
hashprimer = hashprimer + params[k]+"&" if k=="pmt_selleriban" |
node-webworkers
is an implementation of the Web Workers
API for
node.js.
See the design document here.
{"log": | |
{"version":"1.2" , | |
"creator": | |
{"name":"WebInspector" , | |
"version":"535.1"} , | |
"pages":[ | |
{"startedDateTime":"2011-06-20T09:25:50.941Z" , | |
"id":"https://maksuturva.fi/NewPaymentExtended.pmt" , | |
"title":"" , |
var Flags = Backbone.View.extend({ | |
el: $('#main'), | |
initialize: function() { | |
_.bindAll(this, 'render'); | |
this.render(); | |
}, | |
render: function() { | |
var append=""; | |
append += '<div id="flag-0" class="one smaller"></div><div id="flag-1" class="two smaller"></div>' |
app.get('/:user/:tag', work.loadData, function(req, res) { | |
var uname = (req.session) ? (req.session.user===undefined) ? "" : req.session.user.name : ""; | |
res.render('index', { | |
title: req.params.tag, | |
page: "index", | |
data: req.workDatas, | |
username: uname, | |
tracking: true | |
}) | |
}); |