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 Question: | |
def __init__(self, q, a): | |
self.question = q | |
self.answer = a | |
# 34 Quetsions | |
questions = [ | |
Question("Zapatisa Army of National Liberation", "Group who declared war against the Mexican state in 1994. They are mostly supported by native South Americans, there view point is anti-gloablizm"), | |
Question("PRI", "Main political party that was in power for most of the 20th century after its creation in 1929 formed by Calles. Its ideas are historically nationalism, and social democracy"), | |
Question("Plan de Ayala", "Created by the revolutionary leader Emiliano Zapata. Denounced Madero for betraying the revolutionary ideals. Reform, Freedom, Justice and Law!"), |
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
using System; | |
using System.Data; | |
using System.Configuration; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Security; | |
using System.Web.UI; | |
using System.Web.UI.HtmlControls; | |
using System.Web.UI.WebControls; | |
using System.Web.UI.WebControls.WebParts; |
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
test |
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 optparse import OptionParser | |
#from scipy.stats import ks_2samp | |
parser = OptionParser () | |
parser.set_defaults(verbose=False) | |
parser.set_defaults(infile=True) | |
parser.set_defaults(outfile=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
<?php $dir = "."; | |
function contents($dir, $path = null) { | |
if (is_dir($dir)) { | |
if ($dh = opendir($dir)) { | |
$odd = false; | |
while (($file = readdir($dh)) !== false) { | |
if ($file != "." && $file != ".." && $file != "index.php") { | |
// Do something with this file | |
} |
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
using System; | |
using System.Data; | |
using System.Configuration; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Security; | |
using System.Web.UI; | |
using System.Web.UI.HtmlControls; | |
using System.Web.UI.WebControls; |
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 | |
$dir = "pics"; | |
if (is_dir($dir) && $scan_dir = scandir($dir)) echo count($scan_dir); | |
?> |
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
function config(target:*, args:Object):* { | |
for (var a:* in args) target[a] = args[a]; | |
return target; | |
} |
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
// pass in object where key is child you want to bind an event to and value is the function being bound | |
public function bind(args:Object):void { | |
for(var i:String in args) if (this[i]) this[i].addEventListener(MouseEvent.CLICK, args[i]); | |
} |
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
public function arrayContains(target:*, a:Array):Boolean { | |
var doesNotContain:Boolean = false; | |
return a.some(function(e:*, i:int, ar:Array):Boolean { | |
var contains:Boolean = false; | |
if (target is Array) { | |
for(var ii:String in target) if (!arrayContains(target[ii], a)) doesNotContain = true; | |
contains = doesNotContain? false:true; | |
} else contains = (e == target); | |
return contains; | |
}); |
OlderNewer