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 | |
| sys = require('sys'), | |
| chunk = "1234567890htcje,stdl", | |
| chunk_length = parseInt(process.ARGV[2]), | |
| count = parseInt(process.ARGV[3]), | |
| i; | |
| function doBenchmark(title, execute_function) { | |
| var | |
| start, |
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 sys = require("sys"); | |
| var mysql_libmysqlclient = require("mysql-libmysqlclient"); | |
| var conn = mysql_libmysqlclient.createConnection(host, user, password, database); | |
| if (!conn.connected()) { | |
| sys.puts("Connection error: " + conn.connectErrno() + ", " + conn.connectError()); | |
| process.exit(1); | |
| } | |
| var string = conn.escape("Sannis's code"); |
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'), | |
| sys = require('sys'); | |
| function walk(path, callback) { | |
| var recur_or_cb = function( abspath ) { | |
| return function(err, stats) { | |
| if ( stats.isDirectory() ) | |
| walk(abspath, callback); | |
| else | |
| callback(err, abspath); |
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 http = require('http'); | |
| var Buffer = require('buffer').Buffer; | |
| http.createServer(function (req, res) { | |
| res.writeHead(200, | |
| {'Content-Type': 'text/html', | |
| 'Content-Length': 0}); | |
| res.end(new Buffer(0), 'binary'); | |
| } | |
| ).listen(3000); |
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
| Impulse parameters: | |
| Sr: ~5 | |
| St: ~5 | |
| Initial step: 1e-3 | |
| Simple: | |
| 00100 0.010000 1.000000 0.499973642552 0.500000000000 1.000032834871 | |
| Error: 0.000052715 (reference) | |
| With 1 buffer step: |
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
| x = 0.1 | |
| y = 10 | |
| Arithmetic_mean(x, y) = 5.05 | |
| Geometric_mean(x, y) = 1 | |
| Harmonic_mean(x, y) = 0.198019802 | |
| Quadratic_mean(x, y) = 7.071421356 |
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
| (define (script-fu-saturation-contrast-unsharp image drawable) | |
| (let* | |
| ( | |
| (saturation +20) | |
| (contrast 3) | |
| (unsharp-radius 3) | |
| (unsharp-amount 0.5) | |
| (unsharp-threshold 0) | |
| ) | |
| ; Start |
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
| From 39538a7584f87ad204bdbb57592d8235b568f032 Mon Sep 17 00:00:00 2001 | |
| From: Oleg Efimov <[email protected]> | |
| Date: Fri, 29 Oct 2010 17:07:27 +0400 | |
| Subject: [PATCH 1/2] Add DESTDIR support to Makefile | |
| --- | |
| Makefile | 17 +++++++++-------- | |
| 1 files changed, 9 insertions(+), 8 deletions(-) | |
| diff --git a/Makefile b/Makefile |
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
| From c980b2e11f5a477b63fc797e4ebf37b4a19c876c Mon Sep 17 00:00:00 2001 | |
| From: Oleg Efimov <[email protected]> | |
| Date: Fri, 29 Oct 2010 18:10:37 +0400 | |
| Subject: [PATCH 2/2] Add node headers installation | |
| --- | |
| Makefile | 18 ++++++++++++++++++ | |
| 1 files changed, 18 insertions(+), 0 deletions(-) | |
| diff --git a/Makefile b/Makefile |
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
| # http://henrik.nyh.se/2008/12/git-dirty-prompt | |
| # http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
| # username@Machine ~/dev/dir[master]$ # clean working directory | |
| # username@Machine ~/dev/dir[master*]$ # dirty working directory | |
| function parse_git_branch_name { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/" | |
| } | |
| function parse_git_push_queue { | |
| git log --no-color --oneline origin/$(parse_git_branch_name)...$(parse_git_branch_name) 2> /dev/null | wc -l | grep -v -P "^0$" | sed -e "s/\(.*\)/\(+\1\)/" | |
| } |
OlderNewer