This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10.times do | |
puts "Hello world!" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class InputTest { | |
public static void main (String [] args) { | |
Scanner scanner = new Scanner(System.in); | |
String s; | |
int i; | |
double d; | |
System.out.println("Enter a string:"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class Accumulator { | |
private int accum = 0; | |
public void add(int val) { | |
accum = accum + val; | |
} | |
public int getValue() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class Accumulator { | |
private int accum = 0; | |
public void add(int val) { | |
accum = accum + val; | |
} | |
public int getValue() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="page"> | |
<div id="header"></div> | |
<div id="content"></div> | |
<div id="footer"></div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, body { | |
padding: 0; | |
margin: 0; | |
height: 100%; /* so that the page is "defined" to be 100% */ | |
} | |
#page { | |
position: relative; | |
min-height: 100%; /* this way the page div stretches to occupy even a short page */ | |
} | |
#content { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package WordPress | |
* @subpackage Default_Theme | |
*/ | |
get_header(); | |
?> | |
<div id="content" class="narrowcolumn"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int i = 1, | |
fact = 1; | |
// Invariant (fact == i!) is true here | |
while (i<N) { | |
i = i + 1; | |
fact = fact * i; | |
// Invariant (fact == i!) is true here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# js-scheme-0.4 is here: http://code.google.com/p/js-scheme/ | |
# | |
diff -urN js-scheme-0.4.orig/.htaccess js-scheme-0.4-offline/.htaccess | |
--- js-scheme-0.4.orig/.htaccess 1970-01-01 09:00:00.000000000 +0900 | |
+++ js-scheme-0.4-offline/.htaccess 2010-04-25 17:10:52.000000000 +0900 | |
@@ -0,0 +1 @@ | |
+AddType text/cache-manifest .manifest | |
diff -urN js-scheme-0.4.orig/cache.manifest js-scheme-0.4-offline/cache.manifest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import math | |
from pprint import pprint | |
CLASS_FIELD = 'Survived' | |
FIELD_SUMMARY_TYPES = { | |
'Sex': 'bin_prob', | |
'Age': 'mean_stdev', | |
'Pclass': 'bin_prob', |
OlderNewer