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
license: gpl-3.0 |
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
RewriteEngine On | |
RewriteRule ^ index.php [L] |
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
/* a joke between myself and a fellow student */ | |
import bible.God; | |
class Religion { | |
public static function main():Void { | |
if ( God.isReal() ) { | |
self.worship( God ); | |
} | |
else { | |
self.insult( God.worshippers ); |
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 class Luhn { | |
/** | |
* validate the given card-number with the luhn mod10 algorithm | |
*/ | |
public static boolean luhn(String card) { | |
int total = 0; // sum of all digits | |
int v; // variable to hold the numeric value of the "current" char | |
int i = card.length(); // current position in the String | |
/* |
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
package ; | |
// https://github.com/DavisDevelopment/tnative/blob/master/src/tannus/io/Prompt.hx | |
import tannus.io.Prompt; | |
class PrompUse { | |
/* Program's main function */ | |
public static function main():Void { | |
var namePrompt:Prompt = new Prompt("What's your name? "); | |
namePrompt.getLine( handle_input ); |
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 Prompt( object ): | |
# Constructor Function | |
def __init__(self, msg): | |
self.message = msg | |
# Method to get the input as a String | |
def get_string(self): | |
return (input(self.message).strip()) | |
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
### | |
This file assumes the existence of some function 'request', which takes a URL as it's first argument, | |
and a callback as it's second. | |
The callback, when the Request has completed, will be invoked with the HTTP response received from the URL as it's first argument | |
### | |
#- The HTML data received from google.com | |
html_data = [null] | |
#- Make a request to google.com, and get the response |
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
import js.JQuery; | |
private typedef Property = {name:String, value:Dynamic}; | |
abstract HashWrap (Dynamic) from Dynamic { | |
public inline function new(o : Dynamic):Void { | |
this = o; | |
} | |
private var self(get, never):HashWrap; |
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
/* | |
-- | |
> SUPER SIMPLE example of a GetterSetter function which operates on a normal variable | |
-- | |
*/ | |
//- The Variable the GetterSetter will be operating on | |
var name = "Ryan Davis"; | |
/** |