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
pulic void getG(Graphics g){ | |
this.g == g; | |
} |
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
/** | |
* @(#)Pen.java | |
* | |
* | |
* @author | |
* @version 1.00 2013/4/25 | |
*/ | |
//free hand drawing | |
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
/** | |
* @(#)Main.java | |
* | |
* | |
* @author | |
* @version 1.00 2013/4/25 | |
*/ | |
import java.awt.*; | |
import java.applet.Applet; |
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
if (dir == 1) { sprite = Sprite.player_side; | |
if (walking) { | |
frame = 1; | |
switch(frame) | |
case 1: sprite = Sprite.player_side_1;frame++;break; | |
case 2: sprite = Sprite.player_side_2;freme++;break; | |
case 3: sprite = Sprite.player_side_3;frame++;break; | |
case 4: sprite = Sprite.player_side_4;frame++;break; | |
case 5: sprite = Sprite.player_side_5;frame++;break; | |
case 6: sprite = Sprite.player_side_6; frame=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
def acceptable_input(n): | |
'''This function determines wether or not the input is considered valid | |
based on wether it is a digit and also if typecasted to an int (a natural | |
number datatype) it is divisible by three ''' | |
return (n.isdigit() and int(n) % 3 == 0) | |
def cube(n): | |
'''Tests if input is acceptable and returns the cube of n or -1 if it is not |
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
from bs4 import BeautifulSoup | |
html_doc = """ | |
<html><head><title>The Dormouse's story</title></head> | |
<body> | |
<p class="title"><b>The Dormouse's story</b></p> | |
<p class="story">Once upon a time there were three little sisters; and their names were | |
<a href="http://example.com/elsie" class="sister" id="link1">Elsie</a>, | |
<a href="http://example.com/lacie" class="sister" id="link2">Lacie</a> and | |
<a href="http://example.com/tillie" class="sister" id="link3">Tillie</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 hello(list_of_output,output=1): | |
if output == 1: | |
print(list_of_output[0]) | |
elif output == 2: | |
print(list_of_output[1]) | |
else: | |
print(list_of_output[2]) | |
def how_many_bitches(name): | |
if name == "joao": |
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
for percent_acid in range(0,101): | |
for acid_total in range(0,800*100): | |
for other_acid_total in range(0,800*100): | |
if .99*(518) + (percent_acid/100)*(acid_total/100) == .94 *(other_acid_total/100): | |
print('percent acid:', percent_acid/100,'acid total: ',acid_total/100,'other acid total: ',other_acid_total/100) |
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
program_words = open("main.cpp", 'r').read() | |
text_words = open("word.txt", 'r').readlines() | |
output_file = open("output.txt", 'w') | |
output_string = "" | |
program_words_index = 0 | |
program_words = program_words.replace("\n","") | |
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
char grader(int grade){ | |
if(grade >= 90) | |
return 'A'; | |
else if ( grade >= 80) | |
return 'B'; | |
else if (grade >= 70) | |
return 'C'; | |
else if (grade >= 60) | |
return 'D'; | |
return 'F'; |
OlderNewer