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
let n1 = read_int();; let s1 = read_line();; let n2 = read_int();; let s2 = read_line();; let read_input( n1 s1 n2 s2)= let matrix = Array.make_matrix n1 n2 0 in (n1,s1,n2,s2,matrix) ;;
...
-
1 2 3 4 5 6 7 8
let read_input () = let n1 = read_int() in let s1 = read_line() in let n2 = read_int() in let s2 = read_line() in let matrix = Array.make_matrix n1 n2 0 in (n1,s1,n2,s2,matrix) ;;
...
-
1
function ( x1 , x2 ) -> x1 + x2 ;;
-
1 2 3 4 5 6 7 8 9
let n1=read_int();; let s1=read_line();; let n2=read_int();; let s2=read_line();; let i=0 mutable;; let j=0 mutable;; let cont=0 mutable;; let maiorseq=0 mutable;; let indice=0;;
...
-
1 2 3 4 5 6 7 8 9
let n1=read_int();; let s1=read_line();; let n2=read_int();; let s2=read_line();; let i=0 mutant; let j=0 mutant; let cont=0 mutant; let maiorseq=0 mutant; let indice=0;
...
-
1
-
1 2 3 4 5 6 7 8 9
let next_int () = Scanf.bscanf Scanf.Scanning.stdib " %d" (fun s -> s) in let rec solve nn n k pos a dp = if pos < nn && a.(pos) = -1 then solve nn n k (pos+1) a dp else match n, k, pos with | _, k, _ when k < 0 -> max_int / 2 | _, 0, _ -> 0 | 0, _, _ -> max_int / 2 | _, _, pos when pos = nn -> max_int / 2 | _, _, _ when dp.(n).(k).(pos) > 0 -> dp.(n).(k).(pos)
...
-
1 2 3 4 5 6
while true do let n = read_int () in if n = 42 then exit 0; print_int n; print_newline () done;;
-
1
let x = if true then 3 else 1/0 in x;;
-
1
if true then 2 else 1/0;;
-
1 2 3 4 5 6 7 8 9
type name = Name of string | Int of int | Bool of bool;; type constant = { name : name; constr : bool; arity : int} type var = string type expr = | Var of var | Const of constant
...
-
1 2 3 4 5 6 7 8 9
import java.sql.*; class A { void disp() throws Exception { } }
...
-
1 2 3 4 5 6 7 8 9
import java.io.*; import java.sql.*; class A { void disp() throws Exception { } }
...
-
1 2 3 4 5 6 7 8 9
import java.io.*; import java.sql.*; class B extends A { static public void main(String ar[]) { } void disp() throws SQLException
...
-
1
print_endline"-- haskell\nimport Data.List;import Data.Bits;import Data.Char;main=putStrLn(\"/* C */\\n#include<stdio.h>\\nint main(void){char*s[501]={\"++intercalate\",\"(c(tail(init(show(\"/* Java */\\npublic class QuineRelay{public static void main(String[]a){String[]s={\"++intercalate\",\"(c(\"brainfuck\\\\n++++++++[>++++<-]+++++++++>>++++++++++\"++(concat(snd(mapAccumL h 2(\"110\"++g(length s)++\"22111211100111112021111102011112120012\"++concatMap(\\c->let d=ord c in if d<11then\"21002\"else\"111\"++g d++\"22102\")s++\"21002111010120211222211211101000120211021120221102111000110120211202\"))))))++\",\\\"\\\\n\\\"};int i=0;for(;i<94;i++)System.out.print(s[i]);}}\")))))++\",0};int i=0;for(;s[i];i++)printf(\\\"%s\\\",s[i]);puts(\\\"\\\");return 0;}\");c s=map(\\s->\"\\\"\"++s++\"\\\"\")(unfoldr t s);t[]=Nothing;t s=Just(splitAt(if length s>w&&s!!w=='\"'then 501else w)s);w=500;f 0=Nothing;f x=Just((if x`mod`2>0then '0'else '1'),x`div`2);g x= reverse (unfoldr f x);h p c=let d=ord c-48in(d,replicate(abs(p-d))(if d<p then '<'else '>')++\".\");s=\"# ruby\\n\"++\"l=92.chr;eval s=\\\"s=s.dump[r=1..-2].gsub(/(\\\"+l*4+\\\"){4,}(?!\\\\\\\")/){|t|'\\\\\\\"+l*%d+\\\\\\\"'%(t.size/2)};5.times{s=s.dump[r]};puts\\\\\\\"# python\\\\\\\\nprint(\\\\\\\\\\\\\\\"# perl\\\\\\\\\\\\\\\\nprint(\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"# lua\\\"+l*4+\\\"nprint(\\\"+l*7+\\\"\\\\\\\"(* ocaml *)\\\"+l*8+\\\"nprint_endline\\\"+l*15+\\\"\\\\\\\"-- haskell\\\"+l*16+\\\"nimport Data.List;import Data.Bits;import Data.Char;main=putStrLn(\\\"+l*31+\\\"\\\\\\\"/* C */\\\"+l*32+\\\"n#include<stdio.h>\\\"+l*32+\\\"nint main(void){char*s[501]={\\\"+l*31+\\\"\\\\\\\"++intercalate\\\"+l*31+\\\"\\\\\\\",\\\"+l*31+\\\"\\\\\\\"(c(tail(init(show(\\\"+l*31+\\\"\\\\\\\"/* Java */\\\"+l*32+\\\"npublic class QuineRelay{public static void main(String[]a){String[]s={\\\"+l*31+\\\"\\\\\\\"++intercalate\\\"+l*31+\\\"\\\\\\\",\\\"+l*31+\\\"\\\\\\\"(c(\\\"+l*31+\\\"\\\\\\\"brainfuck\\\"+l*64+\\\"n++++++++[>++++<-]+++++++++>>++++++++++\\\"+l*31+\\\"\\\\\\\"++(concat(snd(mapAccumL h 2(\\\"+l*31+\\\"\\\\\\\"110\\\"+l*31+\\\"\\\\\\\"++g(length s)++\\\"+l*31+\\\"\\\\\\\"22111211100111112021111102011112120012\\\"+l*31+\\\"\\\\\\\"++concatMap(\\\"+l*32+\\\"c->let d=ord c in if d<11then\\\"+l*31+\\\"\\\\\\\"21002\\\"+l*31+\\\"\\\\\\\"else\\\"+l*31+\\\"\\\\\\\"111\\\"+l*31+\\\"\\\\\\\"++g d++\\\"+l*31+\\\"\\\\\\\"22102\\\"+l*31+\\\"\\\\\\\")s++\\\"+l*31+\\\"\\\\\\\"21002111010120211222211211101000120211021120221102111000110120211202\\\"+l*31+\\\"\\\\\\\"))))))++\\\"+l*31+\\\"\\\\\\\",\\\"+l*63+\\\"\\\\\\\"\\\"+l*64+\\\"n\\\"+l*63+\\\"\\\\\\\"};int i=0;for(;i<94;i++)System.out.print(s[i]);}}\\\"+l*31+\\\"\\\\\\\")))))++\\\"+l*31+\\\"\\\\\\\",0};int i=0;for(;s[i];i++)printf(\\\"+l*63+\\\"\\\\\\\"%s\\\"+l*63+\\\"\\\\\\\",s[i]);puts(\\\"+l*63+\\\"\\\\\\\"\\\"+l*63+\\\"\\\\\\\");return 0;}\\\"+l*31+\\\"\\\\\\\");c s=map(\\\"+l*32+\\\"s->\\\"+l*31+\\\"\\\\\\\"\\\"+l*63+\\\"\\\\\\\"\\\"+l*31+\\\"\\\\\\\"++s++\\\"+l*31+\\\"\\\\\\\"\\\"+l*63+\\\"\\\\\\\"\\\"+l*31+\\\"\\\\\\\")(unfoldr t s);t[]=Nothing;t s=Just(splitAt(if length s>w&&s!!w=='\\\"+l*31+\\\"\\\\\\\"'then 501else w)s);w=500;f 0=Nothing;f x=Just((if x`mod`2>0then '0'else '1'),x`div`2);g x= reverse (unfoldr f x);h p c=let d=ord c-48in(d,replicate(abs(p-d))(if d<p then '<'else '>')++\\\"+l*31+\\\"\\\\\\\".\\\"+l*31+\\\"\\\\\\\");s=\\\"+l*31+\\\"\\\\\\\"# ruby\\\"+l*32+\\\"n\\\"+l*31+\\\"\\\\\\\"++\\\"+l*31+\\\"\\\\\\\"l=92.chr;eval s=\\\\\\\"+(z=l*31)+\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"+s+z+\\\\\\\"\\\\\\\\\\\\\\\"\\\"+l*31+\\\"\\\\\\\"++\\\"+l*31+\\\"\\\\\\\"\\\"+l*32+\\\"n\\\"+l*31+\\\"\\\\\\\"\\\"+l*15+\\\"\\\\\\\"\\\"+l*7+\\\"\\\\\\\")\\\"+l*4+\\\"n\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\")\\\\\\\\\\\\\\\")\\\\\\\"########### (c) Yusuke Endoh, 2009 ###########\\\\n\\\"\"++\"\\n\""
-
1 2 3 4 5 6 7 8 9
import math a, x, y = raw_input().split(' ') if y%a == 0: print "-1" exit() sd = math.ceil(y/a) if 0 < sd <= 2: print sd
...
-
1 2 3 4 5 6
let rec f2 n = match n with 0 -> n+1 | 1 -> f2(n+1);; f2 1;;
-
1 2 3 4 5 6
let rec f2 n = match n with 0 -> k+1 | 1 -> f2(k+1);; f2 1;;
-
1 2 3 4 5
let rec f1 n = if n = 0 then 1 else n + f1(n-2);; f1 6;;
-
1 2 3 4 5
let rec f1 n = if n = 0 then 1 else n + f1 (n-2);; f1 6;;
-
1 2 3 4 5
let rec pgcd = function | (a, 0) -> a | (a,b) -> pgcd (b, a mod b) ;; print_int (pgcd (12473, 273738));;
-
1 2 3 4 5
let rec pgcd = function | (a, 0) -> a | (a,b) -> pgcd (b, a mod b) ;; pgcd (12473, 273738)
-
1 2 3 4
let rec pgcd = function | (a, 0) -> a | (a,b) -> pgcd (b, a mod b) ;;
-
1 2 3 4
let rec pgcd = function | (a, 0) -> a | (a,b) -> (b, a mod b) ;;
-
1 2 3 4 5 6 7 8 9
open Graphics let yg x y z=moveto x y; set_color black; fill_circle x y z; set_color white; fill_rect x (y-z) (2*z) (2*z); fill_circle x (y+z/2) (z/2); set_color black;
...
-
1 2 3 4 5 6 7 8 9
let yg x y z=moveto x y; set_color black; fill_circle x y z; set_color white; fill_rect x (y-z) (2*z) (2*z); fill_circle x (y+z/2) (z/2); set_color black; fill_circle x (y-z/2) (z/2); draw_circle x y z;
...
-
1 2 3 4 5 6 7 8 9
let yg x y z=moveto x y; set_color black; fill_circle x y z; set_color white; fill_rect x (y-z) (2*z) (2*z); fill_circle x (y+z/2) (z/2); set_color black; fill_circle x (y-z/2) (z/2); draw_circle x y z;
...
-
1 2 3 4 5 6 7 8
# -*- python -*- # vim:set ft=python: # @@PLEAC@@_NAME # @@SKIP@@ Python # @@PLEAC@@_WEB # @@SKIP@@ http://www.python.org
...
-
1 2 3 4 5 6 7 8
# -*- python -*- # vim:set ft=python: # @@PLEAC@@_NAME # @@SKIP@@ Python # @@PLEAC@@_WEB # @@SKIP@@ http://www.python.org
...
-
1 2 3 4 5 6 7 8 9
# -*- perl -*- # ^^PLEAC^^_NAME Perl # ^^PLEAC^^_WEB http://www.perl.org/ # ^^PLEAC^^_1.0
...


