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 curry(f) { | |
return function() { | |
if(arguments.length < f.length) | |
return curry(f.bind.apply(f, [this].concat([].slice.call(arguments)))); | |
return f.apply(this, arguments); | |
}; | |
} | |
var sum = curry(function(x, y) { | |
return x + y; |
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 typeUtils = | |
literals = ['boolean', 'string', 'number', 'object'], | |
types2test = literals.concat([new RegExp(/asd/), new Number(1), new String('#')]), | |
testArrays = [ | |
[true, false, true], | |
[1, 2, 3], | |
['a', 'b', 'c'], | |
[/sdf/, /asdf/, /asf/], | |
[{}, {}, {}], | |
[new String('a'), new String('b'), new String('c')], |
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
.idea/ | |
*~ | |
*.swp |
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
/* | |
* Stringverarbeitung.c | |
*/ | |
#include <stdio.h> // for printf, fgets, stdin | |
int main() { | |
printf("String insert:"); | |
char string[100]; | |
fgets(&(string[0]), 100, stdin); |
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 drawProgress (factor) { | |
var progress = $('#progress'); | |
var bar = progress.children('#bar'); | |
var maxwidth = progress.width(); | |
factor = factor > 1 ? 1 : factor < 0 ? 0 : factor; | |
bar.width( maxwidth * factor ); | |
} | |
function calculate (params) { | |
var schwarze = new Array(); |
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 cron = require('./cron'), sys = require('sys'); | |
cron.Every((2).seconds(), function() { sys.puts('Working!'); }); |