This file contains hidden or 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
| public boolean nestParen(String str) { | |
| if (str == "") | |
| return true; | |
| else if (str.indexOf("(") != -1) | |
| return nestParen(str.substring(str.indexOf("(")+1, str.lastIndexOf(")"))); | |
| else | |
| return false; | |
| } |
This file contains hidden or 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
| public String stringClean(String str) { | |
| if (str.length() < 2) | |
| return str; | |
| else if (str.charAt(0) == str.charAt(1)) | |
| return stringClean(str.substring(1)); | |
| else | |
| return str.charAt(0) + stringClean(str.substring(1)); | |
| } |
This file contains hidden or 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
| public abstract class Bird | |
| { | |
| public abstract void Call(); | |
| } |
This file contains hidden or 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
| # VI editing mode EVERYWHERE. | |
| set editing-mode vi | |
| # Tab completion will automatically correct case. | |
| set completion-ignore-case on | |
| # So useful! After typing a ), the cursor bounces to the opening ( for a | |
| # fraction of a second. | |
| set blink-matching-paren on |
This file contains hidden or 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
| #!/usr/bin/env python2 | |
| import random | |
| BOY=1 | |
| PARTICULAR_BOY=2 | |
| GIRL=3 | |
| def is_boy(n): | |
| return n == BOY or n == PARTICULAR_BOY |
This file contains hidden or 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
| Word name 1 | Word name 1 | <strong>Word name 1</strong><ul><li>Definiton one</li><li>Definition two</li><li>Definition three</li></ul><emph>(Example)</emph> | |
|---|---|---|---|
| Word name 2 | Word name 2 | <strong>Word name 2</strong><ul><li>Definiton one</li><li>Definition two</li><li>Definition three</li></ul><emph>(Example)</emph> |
This file contains hidden or 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
| /* | |
| * Program to compute an approximation of pi | |
| * by Brian Westley, 1988 | |
| * (requires pcc macro concatenation; try gcc -traditional-cpp) | |
| */ | |
| #define _ -F<00||--F-OO--; | |
| int F=00,OO=00; | |
| main(){F_OO();printf("%1.3f\n",4.*-F/OO/OO);}F_OO() | |
| { |
This file contains hidden or 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
| """ | |
| Patrols the edges of the map going clockwise. Just drives around in circles, | |
| taking pains not to hit a wall. | |
| When we see a wall, turn right a little. | |
| """ | |
| from courier import RoboLink |
This file contains hidden or 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
| class TICalcRandom { | |
| public static void main(String[] args) { | |
| Calculator calc = new Calculator(); | |
| calc.seed(1); | |
| System.out.println( calc.rand() ); | |
| System.out.println( calc.rand() ); | |
| System.out.println( calc.rand() ); | |
| System.out.println( calc.rand() ); | |
| System.out.println( calc.rand() ); | |
| } |