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 (eratosthenes n) | |
(define (sift list p) | |
(filter (lambda (n) | |
(not (zero? (modulo n p)))) | |
list)) | |
(define (iter nums primes) | |
(let ((p (car nums))) | |
(if (> (* p p) n) | |
(append (reverse primes) nums) | |
(iter (sift (cdr nums) p) (cons p primes))))) |
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
#!/usr/local/bin/node | |
var | |
sys = require('sys'), | |
path = require('path'), | |
http = require('http'), | |
paperboy = require('/usr/local/lib/node/paperboy'), | |
PORT = 8003, | |
WEBROOT = process.cwd(); |
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 fs = require("fs"); | |
var path = require("path"); | |
http.createServer(function(request, response) { | |
unique_filename(function(filename) { | |
upload_file(filename, request, response); | |
}); | |
}).listen(8000); |
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 092ae12aec59cc8883f6f6454f111df56260338e Mon Sep 17 00:00:00 2001 | |
From: Dustin Barker <[email protected]> | |
Date: Thu, 15 Oct 2009 20:49:22 -0700 | |
Subject: [PATCH] If a mock dir exists and is a symlink, resolve it | |
Fixes specs that fail on Mac OS X due to symlink /var -> /private/var | |
--- | |
core/dir/fixtures/common.rb | 12 +++++++++++- | |
1 files changed, 11 insertions(+), 1 deletions(-) |
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 0be864d8f6eac17afb245b44020e53b932412770 Mon Sep 17 00:00:00 2001 | |
From: Dustin Barker <[email protected]> | |
Date: Thu, 15 Oct 2009 19:24:08 -0700 | |
Subject: [PATCH] If a mock dir exists and is a symlink, resolve it. | |
Fixes specs that fail on Mac OS X due to symlink /var -> /private/var | |
--- | |
core/dir/fixtures/common.rb | 4 +++- | |
1 files changed, 3 insertions(+), 1 deletions(-) |
NewerOlder