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
wget http://ia700402.us.archive.org/8/items/MIT_Structure_of_Computer_Programs_1986/lec1a.mp4 | |
wget http://ia700401.us.archive.org/8/items/MIT_Structure_of_Computer_Programs_1986/lec1b.mp4 | |
wget http://ia700401.us.archive.org/8/items/MIT_Structure_of_Computer_Programs_1986/lec2a.mp4 | |
wget http://ia700401.us.archive.org/8/items/MIT_Structure_of_Computer_Programs_1986/lec2b.mp4 | |
wget http://ia700401.us.archive.org/8/items/MIT_Structure_of_Computer_Programs_1986/lec3a.mp4 | |
wget http://ia700401.us.archive.org/8/items/MIT_Structure_of_Computer_Programs_1986/lec3b.mp4 | |
wget http://ia700401.us.archive.org/8/items/MIT_Structure_of_Computer_Programs_1986/lec4a.mp4 | |
wget http://ia700401.us.archive.org/8/items/MIT_Structure_of_Computer_Programs_1986/lec4b.mp4 | |
wget http://ia700401.us.archive.org/8/items/MIT_Structure_of_Computer_Programs_1986/lec5a.mp4 | |
wget http://ia700401.us.archive.org/8/items/MIT_Structure_of_Computer_Programs_1986/lec5b.mp4 |
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 firstname = ko.observable(); | |
var firstname = ko.observable('Bjorn'); |
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
obsvar firstName; | |
obsvar firstName = "Bjorn"; |
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
macro obsvar { | |
case $name => { | |
var $name = ko.observable() | |
} | |
case $name = $param => { | |
var $name = ko.observable($param) | |
} | |
} |
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 Rx = require('rx'); | |
var sawtooth = Rx.Observable.interval(10); | |
sawtooth.combineLatest(sawtooth.delay(1000), function (a,b) { | |
console.log("a: " + a); | |
console.log("b: " + b); | |
return (a+b);}).subscribe(function (x) {console.log(x);}); | |
~ | |
~ |
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
// Laster inn moduler | |
var drone = require('ar-drone').createClient(); | |
var gzip = require('zlib').createGzip(); | |
var bacon = require('baconjs').Bacon; | |
var Stream = require('stream'); | |
var fs = require('fs'); | |
// Lager en strøm av eventer fra navdata | |
var eventStream = bacon.fromEventTarget(drone, 'navdata'); |
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 linestream = require('linestream'); | |
var SlowStream = require('./slowStream.js'); | |
var bacon = require('baconjs').Bacon; | |
var unzip = require('zlib').createGunzip(); | |
var fs = require('fs'); | |
var unzippedStream = fs.createReadStream('logdata.txt.gz').pipe(unzip); | |
var slowStream = new SlowStream(10); | |
linestream.create(unzippedStream).pipe(slowStream); |
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 Stream = require('stream'); | |
// Her lager vi en stream som bremser hver gang den får data | |
// og venter litt med å si at den er klar igjen | |
// Jeg ser på det som et skikkelig trangt rør | |
var SlowStream = function (delayInMs) { | |
var slowStream = new Stream(); | |
slowStream.writable = true; | |
slowStream.write = function(val) { | |
slowStream.emit('data', val); | |
// Hvis en stream returnerer false, vil alle |
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 fs = require('fs'), | |
PNG = require('pngjs').PNG, | |
async = require('async'), | |
jsfeat = require('jsfeat'), | |
_ = require('underscore'); | |
fs.createReadStream('otter_in_waterfall.png') | |
.pipe(new PNG({ | |
// Haven't bothered looking into this, here's what it means |
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 net = require('net'); | |
var rx = require('rx'); | |
require('./extendObservable.js'); // Adds the toObservable method to EventEmitter | |
var RGBAStream = require('./RGBAStream'); | |
var PaVEParser = require('./node_modules/ar-drone/lib/video/PaVEParser'); | |
var FaceStream = require('./FaceStream'); | |
var parser = new PaVEParser(); | |
var face = new FaceStream(); |