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
hi
-
1 2 3 4 5 6 7 8 9
class Puzzle def initialize(size) @field = Array.new(size) { Array.new(size) { 1 == (rand 2) } } end # Нажатие на любой элемент матрицы # приводит к инверсии всех элементов # в этом ряду и в этом столбце def press(row, col)
...
-
1 2 3 4 5 6 7 8 9
def choose(m) self.factorial / (m.factorial * (self - m).factorial) end def fact (n) if n < 2 return 1 end (2..n).inject(1) { |f, n| f * n } end
...
-
1 2 3 4 5 6 7 8 9
def choose(m) self.factorial / (m.factorial * (self - m).factorial) end def fact (n) if n < 2 return 1 end (2..n).inject(1) { |f, n| f * n } end
...
-
1 2 3 4 5 6 7 8 9
def choose(m) self.factorial / (m.factorial * (self - m).factorial) end def fact (n) if n < 2 return 1 end (2..n).inject(1) { |f, n| f * n } end
...
-
1
while (s=gets.chomp()) != "42" do puts s end
-
1
puts RUBY_VERSION
-
1 2 3 4 5 6 7 8 9
#!/usr/bin/env ruby #The recursive function to find out all the expressions which evaluate to a given value #The technique used is "backtracking" def findExpr(s, expr, k) if s.length != 0 expr += s[0].chr val = eval(expr)
...
-
1 2 3 4 5 6 7 8 9
#!/usr/bin/env ruby #The recursive function to find out all the expressions which evaluate to a given value #The technique used is "backtracking" def findExpr(s, expr, k) if s.length != 0 expr += s[0].chr val = eval(expr)
...
-
1 2 3 4 5 6 7 8 9
#!/usr/bin/env ruby #The recursive function to find out all the expressions which evaluate to a given value #The technique used is "backtracking" def findExpr(s, expr, k) if s.length != 0 expr += s[0].chr val = eval(expr)
...
-
1 2
require 'fileutils' FileUtils.pwd
-
1 2
require FileUtils FileUtils.pwd
-
1
FileUtils.pwd
-
1 2 3
n=gets.to_i 1.upto(n) {|x|puts "#{n} X #{x} = #{n*x}"} gets
-
1 2
1.upto(gets.to_i) {|x|puts "#{n} X #{x} = #{n*x}"} gets
-
1
print 'hello'
-
1 2 3 4 5 6 7 8 9
claass Fruta attr_acccessor:nombre def initialize(n="pera") @nombre=n end def inspect "La fruta es una :"+@nombre end end
...
-
1 2 3 4 5 6 7 8 9
claass Fruta attr_acccessor:nombre def initialize(n="pera") @nombre=n end def inspect "La fruta es una :"+"@nombre end end
...
-
1
puts `ls`
-
1 2 3 4 5 6 7 8
nums = [] 5.times do |i| nums[i] = 20+Random.rand(11) end sorted = false while sorted == false
...
-
1 2
nums = 10.times.map{ 20+Random.rand(11) } p nums
-
1 2 3 4 5 6 7 8
nums = [] 5.times do |i| nums[i] = 20+Random.rand(11) end sorted = false while sorted == false
...
-
1 2 3 4 5 6 7
nums = [] 5.times do |i| nums[i] = 20+Random.rand(11) p nums[i] p i end
-
1 2 3 4 5 6
nums = [] 5.times do |i| nums[i] = 20+Random.rand(11) p nums[i] end
-
1 2 3 4 5 6
nums = [] 5.times do nums[i] = 20+Random.rand(11) p nums[i] end
-
1
puts "hello"
-
1 2 3 4 5
set_trace_func proc { |event, file, line, id, binding, classname| printf "%8s %s:%-2d %10s %8s\n", event, file, line, id, classname } 1 / 0
-
1 2 3 4 5 6 7 8 9
a="malayalam\0" i=0 digits=0 while(a[i]!='\0') do i=i+1 end i=0 digits=i j=digits-1
...
-
1 2 3 4 5 6 7 8 9
a="malayalam\0" i=0 digits=0 while(a[i]!='\0') do i=i+1 end digits=i j=digits-1 flag=1
...
-
1 2 3 4 5 6 7 8 9
a="malayalam\0" i=0 digits=0 while(a[i]!='\0') do i=i+1 end digits=i j=digits-1 flag=1
...


