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
class Start | |
{ | |
public static void main(String args[]) | |
{ | |
int a[] = {3,4,5,6,7}; | |
change(a); | |
for(int i: a) | |
{ | |
System.out.println(a); |
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
def go(direc): | |
direcs = ["north",'n', "south",'s', "east",'e', "west",'w'] | |
diags = ["northeast",'ne', "northwest",'nw', "southeast",'se', "southwest",'sw'] | |
if direc in direcs: | |
if direc == direcs[0] or direc == direcs[1]: | |
x += 1 | |
elif direc == direcs[2] or direc == direcs[3]: | |
x -= 1 | |
elif direc == direcs[4] or direc == direcs[5]: | |
y += 1 |
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
(icharacters | |
Player | |
p1 | |
(dp2 | |
S'status' | |
p3 | |
S'dead' | |
p4 | |
sS'weapons' | |
p5 |
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
towns = ['1', ['1.1', ['1.1.1', '1.1.2', '1.1.3'], '1.2', ['1.2.1', '1.2.2']], | |
'2', ['2.1', '2.2'], '3'] | |
""" | |
1 | |
|\ | |
| 1.1 | |
| | \ | |
| | 1.1.1 | |
| | | |
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 os | |
from random import randint | |
from text import text | |
def printInfo(case): | |
os.system("cls" if os.name=='nt' else "clear") | |
if case == "start": | |
print "Rock, Paper, Scissors!" | |
print text % (wins, losses, ties) | |
else: |
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
: |=o=| ." I am a TIE Fighter!" ; |
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
( Current ToDo: | |
* Fix direction bug when picking up gem | |
* Figure out how to have it decide where to go when it has more than 1 path | |
) | |
: allot loop 0 , 1- dup while drop ; | |
create walkables 4 allot | |
create from -1 , | |
var n-dirs |
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 Main { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
String inputString; | |
Stack stack = new Stack(); | |
while(true) { |
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 XCTest | |
class WordCountTest: XCTestCase { | |
func XCTAssertEqualDictionaries(first: [String: Int], second: [String: Int]) { | |
XCTAssertEqual(first, second) | |
} | |
func testCountOneWord() { | |
let words = WordCount(words: "word") |
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
- (IBAction)displayDay:(id)sender { | |
NSDate *chosen = [self.datePicker date]; | |
NSDateFormatter *formatter = [[NSDateFormatter alloc]init]; | |
[formatter setDateFormat:@"EEEE"]; | |
NSString *day = [formatter stringFromDate:chosen]; | |
NSString *msg = [[NSString alloc] initWithFormat:@"That's a %@.", day]; | |
OlderNewer