Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
function isNumeric(value) { | |
return ((! isNaN(parseFloat(value))) && isFinite(value)); | |
} |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
function createStorage() { | |
var | |
_, | |
map | |
; | |
map = new WeakMap(); | |
return (function (object) { | |
var |
#include <assert.h> | |
#include <pthread.h> | |
#include <stdio.h> | |
void *function(void *argument) { | |
printf("%s\n", (char *) argument); | |
return NULL; | |
} |
require 'tire' | |
require 'nobrainer' | |
NoBrainer.connect 'rethinkdb://server/company' | |
class Employee | |
include NoBrainer::Document | |
field :name | |
field :title |
#include <math.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#define BOOLEAN_FEEDBACK(boolean) ((boolean) ? "yes" : "no") | |
bool is_prime_clever(unsigned int number); | |
bool is_prime_naive(unsigned int number); | |
int main() { |
(function () { | |
function Animal() {} | |
Object.defineProperties(Animal.prototype, { | |
noise: { | |
configurable: false, | |
enumerable: false, | |
value: null, | |
writable: false | |
} |
var fs = require('fs'); | |
var pathJoin = require('path').join; | |
// Given a repo instance and a fs path, import the path (recursivly) and return | |
// the final root hash. Supports symlinks and executable files. | |
module.exports = function (repo, path, callback) { | |
return importPath(repo, path, function (err, stat) { | |
if (err) return callback(err); | |
return callback(null, stat.hash); | |
}); |
class Hello | |
def world | |
puts 'Hello world!' | |
sleep 1 | |
end | |
end | |
SimpleMethodBenchmark.wrap! Hello, %i{world} | |
hello = Hello.new |
set FISH_CONFIG_FILE $HOME/.config/fish/config.fish | |
set INITIAL_GEMS bundler foreman pry | |
set RBENV_HOME_DIRECTORY $HOME/.rbenv | |
set RBENV_RUBIES 2.1.0 jruby-1.7.10 # example: set RBENV_RUBIES 1.9.3 2.1.0 jruby-1.7.10 | |
set RBENV_GLOBAL_RUBY $RBENV_RUBIES[1] | |
git clone 'https://github.com/sstephenson/rbenv.git' $RBENV_HOME_DIRECTORY | |
and mkdir -p $RBENV_HOME_DIRECTORY/{cache,plugins} | |
# . $FISH_CONFIG_FILE | |
cd $HOME/.rbenv/plugins |