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
package test object hello { def qsort: List[Int] => List[Int] = { case Nil => Nil case first :: rest => val (smaller, larger) = rest.partition(_ < first) qsort(smaller) ::: first :: qsort(larger) }
...
-
1 2 3 4 5 6 7 8
class Lazy[A](thunk : () => A) { lazy val body = thunk() } object Lazy { def lazy_[A](x : => A) = new Lazy(() => x) def force[A](x : Lazy[A]) = x.body }
...
-
1 2 3 4 5 6 7 8
class Lazy[A](thunk : () => A) { lazy val body = thunk() } object Lazy { def lazy_[A](x : => A) = new Lazy(() => x) def force[A](x : Lazy[A]) = x.body }
...
-
1 2 3 4 5 6 7 8
class Lazy[A](thunk : () => A) { lazy val body = thunk() } object Lazy { def lazy_[A](x : => A) = new Lazy(() => x) def force[A](x : Lazy[A]) = x.body }
...
-
1 2 3 4 5 6 7 8
class Lazy[A](thunk : () => A) { lazy val body = thunk() } object Lazy { def lazy[A](x : => A) = new Lazy(() => x) def force[A](x : Lazy[A]) = x.body }
...
-
1 2 3 4 5 6 7 8
class StaticVariable{ static int noOfInstances; StaticVariable(){ noOfInstances++; } public static void main(String[] args){ StaticVariable sv1 = new StaticVariable(); System.out.println("No. of instances for sv1 : " + sv1.noOfInstances);
...
-
1 2 3 4 5 6 7 8
public class StaticVariable{ static int noOfInstances; StaticVariable(){ noOfInstances++; } public static void main(String[] args){ StaticVariable sv1 = new StaticVariable(); System.out.println("No. of instances for sv1 : " + sv1.noOfInstances);
...
-
1 2 3 4 5 6 7 8 9
class Compare{ public static void main(String[] args){ var a: integer; a=10; System.out.println("The largest integer is:",+a); }
-
1 2 3 4 5 6 7 8 9
class Compare{ public static void main(String[] args){ var a: integer; a=10; System.out.println("The largest integer is:",+ 'a'); }
-
1 2 3 4 5 6 7 8 9
class Compare{ public static void main(String[] args){ var a: integer; a=10; System.out.println("The largest integer is:",+ 'a'); }
-
1 2 3 4 5 6 7 8 9
class Compare{ public static void main(String[] args){ var a: integer; var b: integer; var c: integer; a=1; b=3; c=2; if (a>b) { if (a>c) { System.out.println("The largest integer is:",'a');
...
-
1 2 3 4 5 6 7 8 9
public class Compare{ public static void main(String[] args){ var a: integer; var b: integer; var c: integer; a=1; b=3; c=2; if (a>b) { if (a>c) { System.out.println("The largest integer is:",'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
a="malayalam\0" i=0 digits=0 while(a[i]!='\0'): i=i+1 digits=i j=digits-1 flag=1 while(i<j):
...
-
1
print "Kode Multus"
-
1
print "Kode Multus"
-
1 2 3 4 5 6 7 8 9
object Main extends Application { case class ParameterA(l:List[Int]) case class ParameterB(l:List[String]) implicit def toParameterA(l:List[Int]) = ParameterA(l) implicit def toParameterB(l:List[String]) = ParameterB(l) def f(l:ParameterA) = println(l) def f(l:ParameterB) = println(l) f(List(1)) f(List("hello"))
...
-
1 2 3 4 5 6 7 8 9
abstract class A[T <: AnyRef : ClassManifest]{ def whichClass: Class[_ <: T] = classManifest[T].erasure } case class X() object B extends A[X] object Main{
...
-
1 2 3 4 5 6 7 8 9
abstract class A[T <: AnyRef : ClassManifest]{ def whichClass: Class[T] = classManifest[T].erasure } case class X() object B extends A[X] object Main{
...
-
1 2 3 4 5 6 7 8 9
abstract class A[T <: AnyRef : ClassManifest]{ def whichClass = classManifest[T].erasure } case class X() object B extends A[X] object Main{
...
-
1 2 3 4 5
object { def main(arg: Array[String]) { println out } }
-
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
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
object HelloWorld { def main(args: Array[String]) { println("Hello, world!") } }
-
1 2 3 4 5 6 7 8 9
def sort(xs: Array[Int]) { def swap(i: Int, j: Int) { val t = xs(i); xs(i) = xs(j); xs(j) = t } def sort1(l: Int, r: Int) { val pivot = xs((l + r) / 2) var i = l; var j = r while (i <= j) { while (xs(i) < pivot) i += 1
...
-
1 2 3 4 5 6 7 8 9
import java.io.{BufferedReader, InputStreamReader} def combinations[T](k: Int, list: List[T]) : List[List[T]] = { | list match { | case Nil => Nil | case head :: xs => | if (k <= 0 || k > list.length) { | Nil | } else if (k == 1) { | list.map(List(_))
...
-
1 2 3 4 5 6 7 8 9
def combinations[T](k: Int, list: List[T]) : List[List[T]] = { | list match { | case Nil => Nil | case head :: xs => | if (k <= 0 || k > list.length) { | Nil | } else if (k == 1) { | list.map(List(_)) | } else {
...
-
1 2 3 4 5 6 7 8 9
def combinations[T](k: Int, list: List[T]) : List[List[T]] = { list match { case Nil => Nil case head :: xs => if (k <= 0 || k > list.length) { Nil } else if (k == 1) { list.map(List(_)) } else {
...
-
1 2 3 4 5 6 7 8 9
def ints(n: Int): Stream[Int] = Stream.cons(n, ints(n+1)) def primes(nums: Stream[Int]): Stream[Int] = Stream.cons(nums.head, primes ((nums tail) filter (x => x % nums.head != 0)) ) val allPrimes = primes(ints(2)) def goldbach(i: Int) = { val primes = allPrimes.takeWhile(_ < i).toSet val intersection = primes & primes.map(i - _) if (intersection.isEmpty)
...


