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
set.seed(0) numRows <- 100 age <- ceiling(100*runif(numRows)) income <- ceiling(1e5*round(rlnorm(numRows),2)) debtToIncome <- 10*runif(numRows) dataMatrix <- matrix(c(age,income,debtToIncome), nrow=numRows, ncol=3,
...
-
1 2 3 4 5 6 7 8 9
set.seed(0) numRows <- 100 age <- ceiling(100*runif(numRows)) income <- ceiling(1e5*round(rlnorm(numRows),2)) debtToIncome <- 10*runif(numRows) dataMatrix <- matrix(c(age,income,debtToIncome), nrow=numRows, ncol=3,
...
-
1 2 3 4 5 6 7 8 9
set.seed(0) numRows <- 100 age <- ceiling(100*runif(numRows)) income <- ceiling(1e5*round(rlnorm(numRows),2)) debtToIncome <- 10*runif(numRows) dataMatrix <- matrix(c(age,income,debtToIncome), nrow=numRows, ncol=3,
...
-
1 2 3 4 5 6 7 8 9
set.seed(0) numRows <- 100 age <- ceiling(100*runif(numRows)) income <- ceiling(1e5*round(rlnorm(numRows),2)) debtToIncome <- 10*runif(numRows) dataMatrix <- matrix(c(age,income,debtToIncome), nrow=numRows, ncol=3,
...
-
1 2
x<-c(1:100) quantile(x)
-
1
-
1 2 3 4 5 6 7 8 9
set.seed(0) numRows <- 100 age <- ceiling(100*runif(numRows)) income <- ceiling(1e5*round(rlnorm(numRows),2)) debtToIncome <- 10*runif(numRows) dataMatrix <- matrix(c(age,income,debtToIncome), nrow=numRows, ncol=3,
...
-
1
pow(2,3)
-
1 2 3 4 5 6 7 8 9
n <- 0 while(TRUE) { if(n==-1 || n==256) n <- 0 cmd <- scan(n=1,what='character') fun <- switch(cmd, d=function(x) x-1, i=function(x) x+1, o=function(x) { cat(x,"\n"); x }, s=function(x) x*x)
...
-
1 2 3 4 5 6 7 8 9
song<-function(n=99) { a<-" bottle" b<-" of beer on the wall, " c<-" of beer. " d<-"Take one down and pass it around: " # ## set "beer counter" vector counter<-c(as.character(n:1),"No more") #
...
-
1 2 3 4 5 6 7 8 9
song<-function(n=99) { a<-" bottle" b<-" of beer on the wall, " c<-" of beer. " d<-"Take one down and pass it around: " # ## set "beer counter" vector counter<-c(as.character(n:1),"No more") #
...
-
1 2 3 4 5 6 7 8 9
song<-function(n=99) { a<-" bottle" b<-" of beer on the wall, " c<-" of beer. " d<-"Take one down and pass it around: " # ## set "beer counter" vector counter<-c(as.character(n:1),"No more") #
...
-
1 2 3 4 5 6 7 8 9
song<-function(n=99) { a<-" bottle" b<-" of beer on the wall, " c<-" of beer. " d<-"Take one down and pass it around: " # ## set "beer counter" vector counter<-c(as.character(n:1),"No more") #
...
-
1 2 3 4 5 6 7 8 9
with Ada.Integer_Text_Io, Ada.Text_Io; use Ada.Integer_Text_Io, Ada.Text_Io; procedure Test is subtype Small is Integer range 0..99; Input : Small; begin loop Get(Input);
...
-
1 2
x=1:2 x
-
1 2 3 4 5 6 7 8 9
cards = paste(rep(c("A",2:10,"J","Q","K"),4),c("H","D","S","C")); winner = function() { result = sample(cards,length(cards)); returning = 0; aces = 0; for(i in 1:length(cards)) { if(result[i] == "7 C")
...
-
1 2 3 4 5 6 7
f = function(n) { sample(1:6, n, replace=T); } mean(f(1)); mean(f(15)); mean(f(100));
-
1 2 3 4 5 6 7 8 9
x1 = 1.26; s1 = 0.32; x2 = 0.78; s2 = 0.32; n = 7; se = sqrt(((s1 * s1) / n) + ((s2 * s2) / n)); error = qt(0.975, df = n - 1) * se; (x1 - x2) - error; (x1-x2) + error;
-
1 2 3 4 5 6 7
x1 = 1.26; s1 = 0.32; x2 = 0.78; s2 = 0.32; n = 7; t = (x1 - x2) / sqrt(((s1 * s1) / n) + ((s2 * s2) / n)); pt(t, n - 1);
-
1 2 3 4 5 6 7
x1 = 1.26; s1 = 0.32; x2 = 0.78; s2 = 0.32; n = 7; t = (x1 - x2) / sqrt(((s1 * s1) / n) + ((s2 * s2) / n)); pt(t, n - 1);
-
1 2
data = c(7.4, 7.1, 6.5, 7.5, 7.6, 6.3, 6.9, 7.7, 6.5, 7.0); t.test(data, conf.level = 0.99, mu = 7.5, alternative = "less")
-
1 2
data = c(7.4, 7.1, 6.5, 7.5, 7.6, 6.3, 6.9, 7.7, 6.5, 7.0); t.test(data, conf.level = 0.99);
-
1 2 3
data = c(7.4, 7.1, 6.5, 7.5, 7.6, 6.3, 6.9, 7.7, 6.5, 7.0); mean(data); sd(data);
-
1 2 3 4
n = 30; x = 7.3; s = 0.2; pt((x - 7.5) / (s / sqrt(n)), n - 1);
-
1 2 3 4
n = 30; x = 7.3; s = 0.2; (x - 7.5) / (s / sqrt(n));
-
1 2 3 4 5 6 7 8 9
cards = paste(rep(c("A",2:10,"J","Q","K"),4),c("H","D","S","C")); winner = function() { result = sample(cards,length(cards)); returning = 0; aces = 0; for(i in 1:length(cards)) { if(result[i] == "7 C")
...
-
1 2 3 4 5 6 7 8 9
cards = paste(rep(c("A",2:10,"J","Q","K"),4),c("H","D","S","C")); winner = function() { result = sample(cards,length(cards)); returning = 0; aces = 0; for(i in 1:length(cards)) { if(result[i] == "7 C")
...
-
1 2 3 4 5 6 7 8 9
cards = paste(rep(c("A",2:10,"J","Q","K"),4),c("H","D","S","C")); winner = function() { result = sample(cards,length(cards)); returning = 0; aces = 0; for(i in 1:length(cards)) { if(result[i] == "7 C")
...
-
1 2 3 4 5 6 7 8 9
cards = paste(rep(c("A",2:10,"J","Q","K"),4),c("H","D","S","C")); winner = function() { result = sample(cards,length(cards)); returning = 0; aces = 0; for(i in 1:length(cards)) { if(result[i] == "7 C")
...
-
1 2 3 4 5 6 7 8 9
cards = paste(rep(c("A",2:10,"J","Q","K"),4),c("H","D","S","C")); winner = function() { result = sample(cards,length(cards)); returning = 0; aces = 0; for(i in 1:length(cards)) { if(result[i] == "7 C")
...


