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 | |
function getPageTitle($url, $to_encoding) | |
{ | |
$fh = fopen($url, 'r'); | |
$content = ""; | |
$title = ""; | |
while (!feof($fh)) | |
{ | |
$content .= fread($fh, 8192); |
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
/* Richard's Traffic Light Program */ | |
int pinRedLed = 2; | |
int pinYelLed = 3; | |
int pinGrnLed = 4; | |
int lightState = 0; | |
void setup() { | |
pinMode(pinRedLed, OUTPUT); /* Set the LED pins to output */ | |
pinMode(pinYelLed, OUTPUT); |
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 | |
class FibonnaciSequence implements Iterator { | |
private $index = 0; | |
protected $oldnum = 0; | |
private $currnum = 1; | |
private $nextnum = 1; | |
public function current() { | |
return $this->currnum; | |
} |
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
<script src="http://maps.google.com/maps/api/js?sensor=true"></script> | |
<script src="geocoder.test.js"></script> |
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 HelloWorld | |
write (*,*) 'Hello, world!' | |
end program |
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 | |
class SlowClockCalculator { | |
private $target_hour = 0; | |
private $target_minute = 0; | |
private $slow = 0; | |
private $difference = 0; | |
private $result = 0; | |
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 | |
class Vehicle { | |
private $speed; | |
private $distance_travelled; | |
private $time_taken; | |
public function setSpeed($speed) { | |
$this->speed = $speed; | |
} | |
public function travelTime($time) { |
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 | |
$foo = 'This, yes, is insane...'; | |
${$foo} = 1; | |
${'This gets worse...'} = 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
ALTER TABLE `table_1` ADD | |
( | |
`nb_something_else` INTEGER | |
); |
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
operands = { | |
'+': lambda a, b: a + b, | |
'-': lambda a, b: a - b, | |
'x': lambda a, b: a * b, | |
'/': lambda a, b: a / b | |
} | |
def parse(eq): | |
bits = [] |
OlderNewer