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 6 7 8 9
import java.io.{BufferedReader, InputStreamReader} object Main { def main(args: Array[String]) { var stdin = new BufferedReader(new InputStreamReader(System.in)); var line = stdin.readLine(); var j : int = 0; while(false == line.equals("42")) {
...
-
1 2 3 4 5 6
val j : int = 0; for (i <- 0 until 10) { j=j+1; } System.out.println(j);
-
1 2 3 4 5 6
j=0 for (i <- 0 until 10) { j=j+1 } System.out.println(j)
-
1 2 3 4 5 6 7 8 9
object Main { def main(args: Array[String]) { println("Hello, world!") } def ona{ println ("marlena");
...
-
1 2 3 4 5 6 7 8 9
object Main { def main(args: Array[String]) { println("Hello, world!") } def ona{ println ("marlena");
...
-
1 2 3 4 5 6 7 8 9
object Main { def main(args: Array[String]) { println("Hello, world!") } def ona{ println ("marlena");
...
-
1 2 3 4 5 6 7 8 9
object main { def main(args: Array[String]) { println("Hello, world!") } def ona{ println ("marlena");
...
-
1 2 3 4 5
object HelloWorld { def main(args: Array[String]) { println("Hello World!") } }
-
1 2 3 4 5 6 7 8 9
object sen{ def main(args: Array[String]) { println("Hello, world!") } def ona{ println ("marlena");
...
-
1 2 3 4 5 6 7 8 9
class sen{ def main(args: Array[String]) { println("Hello, world!") } def ona{ println ("marlena");
...
-
1 2 3 4 5
class sen{ def ona{ println ("marlena"); } }
-
1 2 3
def ona{ println ("marlena"); }
-
1
println ("marlena");
-
1 2 3 4 5
class x { def main(args: Array[String]){ val x = List(1,2,3) } }
-
1 2 3 4
class x { val x = List(1,2,3) }
-
1 2 3 4 5 6 7 8
val x = List(1,2,3)
...
-
1 2 3 4 5 6 7 8 9
import annotation.tailrec abstract class Tree(val left: Tree) { def o = new Ball(this) def x = new Spike(this) def * = new Candle(this) def oxo = new BigBall(this) def oo = new DoubleBall(this) def *** = new ElectricCandle(this)
...
-
1 2 3 4 5 6 7 8 9
import annotation.tailrec abstract class Tree(val left: Tree) { def o = new Ball(this) def x = new Spike(this) def * = new Candle(this) def oxo = new BigBall(this) def oo = new DoubleBall(this) def *** = new ElectricCandle(this)
...
-
1 2 3 4 5 6 7 8 9
import java.io.{BufferedReader, InputStreamReader} object Main { def main(args: Array[String]) { var stdin = new BufferedReader(new InputStreamReader(System.in)); var line = stdin.readLine(); while(false == line.equals("42")) { System.out.println(line);
...
-
1 2 3 4 5 6 7 8 9
import annotation.tailrec abstract class Tree(val left: Tree) { def o = new Ball(this) def x = new Spike(this) def * = new Candle(this) def oxo = new BigBall(this) def oo = new DoubleBall(this)
...
-
1
(1 until 1000).filter(n => n % 3 == 0 || n % 5 == 0).foldLeft(0)(_ + _)
-
1 2 3 4 5 6 7 8 9
import annotation.tailrec abstract class Tree(val left: Tree) { def o = new Ball(this) def x = new Spike(this) def * = new Candle(this) def oxo = new BigBall(this) def oo = new DoubleBall(this) def *** = new ElectricCandle(this)
...
-
1 2 3 4 5 6 7 8 9
import annotation.tailrec abstract class Tree(val left: Tree) { def o = new Ball(this) def x = new Spike(this) def * = new Candle(this) def oxo = new BigBall(this) def oo = new DoubleBall(this) def *** = new ElectricCandle(this)
...
-
1 2 3 4 5
object Main { def main(args:Array[String]) { println("Hello world!") } }
-
1 2 3 4 5 6 7
import math._ def p(z:Int,n:Int,s:Double):Unit= if(n==1e6)0 else{val q=1.0*z/n val x=if(abs(Pi-q)<s){println(z+"/"+n) abs(Pi-q)}else s if(Pi-q<0)p(z,n+1,x)else p(z+1,n,x)} p(3,1,1)
-
1 2 3 4 5 6 7 8 9
val pi=math.Pi @annotation.tailrec def toPi (zaehler: Int = 3, nenner: Int = 1, sofar: Double=1): Unit = { if (nenner == 1000000) () else { val quotient = 1.0*zaehler/nenner val diff = (pi - quotient) val adiff= math.abs (diff) val next = if (adiff < sofar) {
...
-
1 2 3 4 5 6 7
import math._ def p(z:Int,n:Int,s:Double):Unit= if(n==1e6)0 else{val q=1.0*z/n val x=if(abs(Pi-q)<s){println(z+"/"+n) abs(Pi-q)}else s if(Pi-q<0)p(z,n+1,x)else p(z+1,n,x)} p(3,1,1)
-
1 2 3 4 5 6 7 8 9
import java.util.Scanner object Main { type Door = (Int, Boolean) type Doors = List[Door] def main(args: Array[String]) { val noOfDoors = new Scanner(System.in) nextInt val doors = List.tabulate(noOfDoors)(x => (x + 1, false))
...
-
1 2 3 4 5 6 7 8 9
object Main { def main(args: Array[String]) = { println("Hello!") val x = 1 .+(2) // "+" is just a method on Int val y = 1 + 2 // alternate syntax for methods with one parameter println(x + " " + y) val lst1 = List(1, 2, 3, 4, 5) map (x => x % 2 == 0) // map is a function on iterable types val lst2 = List(1, 2, 3, 4, 5) map (_ % 2 == 0) // shorthand function literal when a variable is only used once println(lst2)
...
-
1 2 3 4 5 6 7 8 9
object Main { def main(args: Array[String]) = { println("Hello!") val x = 1.+(2) // "+" is just a method on Int val y = 1 + 2 // alternate syntax for methods with one parameter println(x + " " + y) val lst1 = List(1, 2, 3, 4, 5) map (x => x % 2 == 0) // map is a function on iterable types val lst2 = List(1, 2, 3, 4, 5) map (_ % 2 == 0) // shorthand function literal when a variable is only used once println(lst2)
...


