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(); while(false == line.equals("42")) { System.out.println(line);
...
-
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
object Main { def main(args: Array[String]) { val secret = List('3', '_', 'r', '@', '!', '?', 'a') // Just a Map from Char to Char val key = Map( '@' -> 'a', 'x' -> 'y',
...
-
1 2 3 4 5 6 7 8 9
object Main { def main(args: Array[String]) { val secret = List('3', '_', 'r', '@', '!', '?', 'a') val key = Map( '@' -> 'a', 'x' -> 'y', '?' -> 'm',
...
-
1 2 3 4 5 6 7 8 9
object Puzzle { def main(args: Array[String]) { val secret = List('3', '_', 'r', '@', '!', '?', 'a') val key = Map( '@' -> 'a', 'x' -> 'y', '?' -> 'm',
...
-
1 2 3 4 5 6 7
object Main { def main(_args : Array[String]) { val xs = Stream.from(1) map {i => println(i); i} xs.take(3).toList xs.take(3).toList } }
-
1 2 3 4 5 6 7
object Main { def main(_args : Array[String]) { def xs = Stream.from(1) map {i => println(i); i} xs.take(3).toList xs.take(3).toList } }
-
1 2 3 4 5 6 7
object Main { def main(_args : Array[String]) { def xs = Stream.from(1) map {i => println(x); i} xs.take(3).toList xs.take(3).toList } }
-
1 2 3 4 5 6 7
object Main { def main(_args : Array[String]) { def xs = Stream.continually { println ("hello") } xs.take(3).toList xs.take(3).toList } }
-
1 2 3 4 5 6
object Main { def main(_args : Array[String]) = { def xs = Stream.continually { println ("hello") } xs.take(3).toList } }
-
1 2 3 4 5 6
object Main { def main(_args : Array[String]) = { def xs = Stream.continually { println ("hello") } xs.take(3).toList() } }
-
1 2 3 4 5 6
object Main { def main(_ : Array[String]) = { def xs = Stream.continually { println"hello" } xs.take(3).toList() } }
-
1
while (s=gets.chomp()) != "42" do puts s end
-
1 2 3 4 5 6 7 8 9
object Main { def main(args: Array[String]) { def proposed(a:Array[Int]) = { var minInd = 0 var count = 0 for ( i <- 1 to a.length - 1) { println(a(i)) } a
...
-
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 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
trait SemiGroup[A <: SemiGroup[A]] { def +(other: A): A } trait Ring[A <: Ring[A]] extends SemiGroup[A] { def *(other: A): A } sealed abstract class Nat extends Ring[Nat] { def pred: Nat def succ = S(this)
...
-
1 2 3 4 5 6 7 8 9
trait SemiGroup[A <: SemiGroup[A]] { def +(other: A): A } trait Ring[A <: Ring[A]] extends SemiGroup[A] { def *(other: A): A } sealed abstract class Nat extends Ring[Nat] { def pred: Nat def succ = S(this)
...
-
1 2 3 4 5 6 7 8 9
trait SemiGroup[A <: SemiGroup[A]] { def +(other: A): A } trait Ring[A <: Ring[A]] extends SemiGroup[A] { def *(other: A): A } sealed abstract class Nat extends Ring[Nat] { def pred: Nat def succ = S(this)
...
-
1 2 3 4 5 6 7 8 9
trait SemiGroup[A <: SemiGroup[A]] { def +(other: A): A } trait Ring[A <: Ring[A]] extends SemiGroup[A] { def *(other: A): A } sealed abstract class Nat extends Ring[Nat] { def pred: Nat def succ = S(this)
...
-
1 2 3 4 5 6 7 8 9
sealed abstract class Nat { def pred: Nat def succ = S(this) def +(other: Nat): Nat def times[A](f: A => A)(x: A): A } case object O extends Nat { val pred = this override def +(other: Nat) = other
...
-
1 2 3 4 5 6 7 8 9
sealed abstract class Nat { def pred: Nat def succ = S(this) def +(other: Nat): Nat def times[A](f: A => A)(x: A): A } case object O extends Nat { val pred = this override def +(other: Nat) = other
...
-
1 2 3 4 5 6 7 8
object Main { def main(args: Array[String]) { val partial = { case x :: _ => x case Seq(x, _*) => x } println(partial.isDefinedAt("")) }
-
1 2 3 4 5 6 7 8
println("Hello World") class Thing(val i:Int, val j:Int) { @override def toString() = { "("+i+","+j+")" } } println( new Thing(1,5) )
-
1 2 3 4 5 6 7 8 9
object reco{ //Returns a distance-based similarity score for person1 and person2 def sim_distance(prefs:List,person1:Int ,person2:Int) : Double{ var si=List();
...
-
1 2 3 4 5 6 7 8 9
//Returns a distance-based similarity score for person1 and person2 def sim_distance(prefs:List,person1:Int ,person2:Int) : Double{ var si=List(); var sum_of_squares:Int = 0 var i : Int = 0 for (i<-0 to prefs(person1).length)
...
-
1 2 3 4 5 6 7 8 9
//Returns a distance-based similarity score for person1 and person2 def sim_distance(prefs:List,person1:Int ,person2:Int) : Double{ var si=List(); var sum_of_squares:Int = 0 var i : Int = 0 for (i<-0 to prefs(person1).length)
...
-
1 2 3 4 5 6 7 8 9
import scala.Math //Returns a distance-based similarity score for person1 and person2 def sim_distance(prefs:List,person1:Int ,person2:Int):Double{ var si=List(); var sum_of_squares:Int = 0 var i : Int = 0 for (i<-0 to prefs(person1).length)
...
-
1 2 3 4 5 6 7 8 9
import scala.Math //Returns a distance-based similarity score for person1 and person2 def sim_distance(prefs:List,person1:Int ,person2:Int):double{ //Get the list of shared_itemsva var si=List(); //list = {{x,x,x},{x.......}} var sum_of_squares:Int = 0 var i : Int = 0
...
-
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);
...


