Recent public codes are listed below. You can filter them by the following programming languages:
- view
- All
- Ada
- Assembler
- Assembler
- AWK (gawk)
- AWK (mawk)
- Bash
- bc
- Brainf**k
- C
- C#
- C++
- C++0x
- C99 strict
- CLIPS
- Clojure
- COBOL
- COBOL 85
- Common Lisp (clisp)
- D (dmd)
- Erlang
- F#
- Factor
- Falcon
- Forth
- Fortran
- Go
- Groovy
- Haskell
- Icon
- Intercal
- Java
- JavaScript (rhino)
- JavaScript (spidermonkey)
- Lua
- Nemerle
- Nice
- Nimrod
- Objective-C
- Ocaml
- Oz
- Pascal (fpc)
- Pascal (gpc)
- Perl
- Perl 6
- PHP
- Pike
- Prolog (gnu)
- Prolog (swi)
- Python
- Python 3
- R
- Ruby
- Scala
- Scheme (guile)
- Smalltalk
- SQL
- Tcl
- Text
- Unlambda
- VB.NET
- Whitespace
-
1 2 3 4 5
def h(name) puts "Hello #{name}!!" end h("Test")
-
1 2 3 4
def h puts "Hello World" end
-
1 2 3 4
def h puts "Hello World" end h
-
1
while (s=gets.chomp()) != "42" do puts s end
-
1 2
#!/usr/bin/ruby print "Hello World\n"
-
1 2
#!/usr/bin/ruby print "Hello World\n
-
1
while (s=gets.chomp()) != "42" do puts s end
-
1 2 3 4 5 6 7 8 9
require 'time' s = '01/Jan/2010:00:05:45 +0900' s = s.gsub(/\//, ' ').sub(/:/, ' ') begin p Time.rfc2822(s) rescue ArgumentError => err puts "format err: #{err}"
...
-
1 2 3 4 5 6 7 8 9
require 'time' s = '01/Jan/2010:00:05:45 +0900' s.gsub!(/\//, ' ') begin p Time.rfc2822(s) rescue ArgumentError => err puts "format err: #{err}"
...
-
1 2 3 4 5 6 7 8 9
require 'time' rfc2822_time = 'Sun, 31 Aug 2008 12:08:19 +0900' t = Time.rfc2822(rfc2822_time) p t.kind_of?(Time) #=> true non_rfc2822_time = '01/Jan/2010:00:05:45 +0900' begin p Time.rfc2822(non_rfc2822_time)
...
-
1 2 3 4 5 6 7 8 9
require 'time' rfc2822_time = 'Sun, 31 Aug 2008 12:08:19 +0900' t = Time.rfc2822(rfc2822_time) p t.kind_of?(Time) #=> true non_rfc2822_time = '31 Aug 2008 12:08:19 +0900' begin p Time.rfc2822(non_rfc2822_time)
...
-
1 2 3 4 5 6 7 8 9
require 'time' rfc2822_time = 'Sun, 31 Aug 2008 12:08:19 +0900' t = Time.rfc2822(rfc2822_time) p t.kind_of?(Time) #=> true non_rfc2822_time = 'Sun 31 Aug 2008 12:08:19 +0900' begin p Time.rfc2822(non_rfc2822_time)
...
-
1 2
i = 5 puts i.methods
-
1
puts i.methods
-
1 2 3
for i in 2..5 puts i end
-
1 2 3
for i in 0..5 puts i end
-
1
while (s=gets.chomp()) != "42" do puts s end
-
1 2 3
for i in o..5 puts i end
-
1 2 3 4 5 6 7 8 9
#Part 2 class CartesianProduct include Enumerable def initialize(p1, p2) @first = p1 @second = p2 end
...
-
1 2 3 4 5 6 7 8 9
#Part 2 class CartesianProduct include Enumerable def initialize(p1, p2) @first = p1 @second = p2 end
...
-
1 2 3 4 5 6 7 8 9
@memo={} def F x return @memo[x] if @memo[x] return @memo[x]=if x%2==1 x*3+1 else x/2 end end
...
-
1 2 3 4 5 6 7 8
def abc puts "holy shit" end def xyz puts "no way." abc end
-
1 2 3 4 5 6 7 8
def abc puts "holy shit" end def def puts "no way." abc end
-
1 2 3 4 5 6 7 8 9
$solutions = 0 $numbers = [] $flags = [] def find_solutions(k, target_sum) if target_sum == 0 # found a solution! (0..$numbers.length).each { |i| if ($flags[i]) then print $numbers[i], " "; end } print "\n"
...
-
1 2 3 4 5 6 7 8 9
$solutions = 0 $numbers = [8,9,14,15,16,22,26,32] $flags = [] def find_solutions(k, target_sum) if target_sum == 0 # found a solution! (0..$numbers.length).each { |i| if ($flags[i]) then print $numbers[i], " "; end } print "\n"
...
-
1 2 3 4 5 6 7 8 9
$solutions = 0 $numbers = [8,9,14,15,16,22,26,32] $flags = [] def find_solutions(k, target_sum) if target_sum == 0 # found a solution! (0..$numbers.length).each { |i| if ($flags[i]) then print $numbers[i], " "; end } print "\n"
...
-
1 2 3 4 5 6 7 8 9
$solutions = 0 $numbers = [] $flags = [] def find_solutions(k, target_sum) if target_sum == 0 # found a solution! (0..$numbers.length).each { |i| if ($flags[i]) then print $numbers[i], " "; end } print "\n"
...
-
1 2 3 4 5 6 7 8 9
$solutions = 0 $numbers = [] $flags = [] def find_solutions(k, target_sum) if target_sum == 0 # found a solution! (0..$numbers.length).each { |i| if ($flags[i]) then print $numbers[i], " "; end } print "\n"
...
-
1 2 3 4 5 6 7 8 9
$solutions = 0 $numbers = [] $flags = [] def find_solutions(k, target_sum) if target_sum == 0 # found a solution! (0..$numbers.length).each { |i| if ($flags[i]) then print $numbers[i], " "; end } print "\n"
...
-
1 2 3 4 5 6 7 8 9
$solutions = 0 $numbers = [] $flags = [] def find_solutions(k, target_sum) if target_sum == 0 # found a solution! (0..$numbers.length).each { |i| if ($flags[i]) then print $numbers[i], " "; end } print "\n"
...


