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
class Dicer | |
def Dicer.roll(faces, n = 1) | |
result = 0 | |
n.times { result = result + 1 + rand(faces) } | |
result | |
end | |
end | |
class Dice | |
attr_reader :faces, :rolls, :result |
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
/* | |
Hash - Guillermo Estrada | |
Marko Mikulicic | |
Kyle Lemons | |
Simple utility to obtain the MD5 and/or SHA-1 | |
of a file from the command line. | |
2011 | |
*/ |
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
C:\Users\some\user> bundle install | |
Fetching source index for http://rubygems.org/ | |
Using rack (1.4.1) | |
Using adsf (1.0.1) | |
Using builder (3.0.0) | |
Using coffee-script-source (1.2.0) | |
Using multi_json (1.0.4) | |
Using execjs (1.3.0) | |
Using coffee-script (2.2.0) | |
Using haml (3.1.4) |
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
Loading site data... | |
Compiling site... | |
C:/Ruby193/lib/ruby/gems/1.9.1/gems/nanoc-3.3.1/lib/nanoc/cli/commands/compile.rb:220: [BUG] Segmentation fault | |
ruby 1.9.3p125 (2012-02-16) [i386-mingw32] | |
-- Control frame information ----------------------------------------------- | |
c:0044 p:---- s:0183 b:0183 l:000182 d:000182 CFUNC :new | |
c:0043 p:0037 s:0180 b:0180 l:000d9c d:000d9c METHOD C:/Ruby193/lib/ruby/gems/1.9.1/gems/nanoc-3.3.1/lib/nanoc/cli/commands/compile.rb:220 | |
c:0042 p:0070 s:0175 b:0175 l:0007e8 d:000174 BLOCK C:/Ruby193/lib/ruby/gems/1.9.1/gems/nanoc-3.3.1/lib/nanoc/cli/commands/compile.rb:155 | |
c:0041 p:---- s:0171 b:0171 l:000170 d:000170 FINISH |
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
/* | |
Processing version | |
http://www.openprocessing.org/sketch/2097 | |
by Thor Frølich | |
Go version | |
by Guillermo Estrada | |
*/ | |
package main |
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
/********************************************************************************************************************************************* | |
** GNU LESSER GENERAL PUBLIC LICENSE | |
** Version 2.1, February 1999 | |
** | |
** Copyright (C) 1991, 1999 Free Software Foundation, Inc. | |
** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
** Everyone is permitted to copy and distribute verbatim copies | |
** of this license document, but changing it is not allowed. | |
** | |
** This is the first released version of the Lesser GPL. It also counts |
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
package main | |
import ( | |
"bitbucket.org/jpoirier/cpu" | |
"database/sql" | |
"encoding/json" | |
"fmt" | |
_ "github.com/mattn/go-sqlite3" | |
"math/rand" | |
"os" |
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
local sql = require "ffi/ljsqlite3" | |
-- Global Variables | |
local singledb = "single.sqlite" | |
local manydb = "multi.sqlite" | |
local elapsed = 0 | |
local times = {} | |
local values = 1000000 | |
local tables = 1000 | |
local x, y, z = {}, {}, {} |
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
//Attractors and Fractals | |
//Grant Schindler, 2008 | |
//Variables and Coefficients (Initial Values) ------------------------------------ | |
float a = 1.78125, b = -0.78125, c = 1.90625, d = 2.65625, e = 0.7, f = -1.1; //Coefficients | |
float x = 0.6, y = 0.9, z = 0.3; //Variables | |
float xn,yn,zn,la,lb,lc,ld; //Temporary Copies of Variables, Coefficients | |
int N = 512, u, v; //Image Size, Pixel Coordinates | |
PImage img = createImage(N,N,RGB); //Image Itself |
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
package main | |
import ( | |
"bufio" | |
"bytes" | |
"encoding/binary" | |
"flag" | |
"fmt" | |
"github.com/spf13/nitro" | |
"io" |
OlderNewer