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 std.stdio, std.random, core.time; | |
void main() { | |
int data[32768]; | |
foreach(ref x; data) | |
x = uniform(0, 256); | |
data.sort; |
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 std.stdio, core.time; | |
class msTimer { | |
TickDuration start; | |
this() { reset(); } | |
long split() { return (TickDuration.currSystemTick() - start).msecs(); } | |
void reset() { start = TickDuration.currSystemTick(); } | |
} |
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 math | |
import random | |
class PrimeBuilder: | |
_p = set() | |
_maxChecked = 0 | |
def __init__(self, p = {2, 3, 5}): | |
self._p = p | |
self._maxChecked = max(p) |
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
<html> | |
<head> | |
<title>Extreme E-Mail Obfuscation</title> | |
<style> | |
.something-else { | |
font-size: 15pt; | |
} | |
</style> | |
<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
<?php | |
class ErrorStack { | |
private $errorPage; | |
private $stack; | |
function __construct($errorPage = 'showErrors.php') { | |
$this->errorPage = $errorPage; | |
} | |
public function add($desc) { |
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 | |
require_once "error.php"; | |
class Oracle { | |
private $connection; | |
private $connected; | |
function __construct($connectionString, $username, $password) { | |
global $err; |
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 (!window.query) { | |
(function () { | |
var match, | |
search = /([^&=]+)=?([^&]*)/g, | |
decode = function (s) { return decodeURIComponent(s.replace(/\+/g, ' ')); }, | |
query = window.location.search.substring(1); | |
window.query = {}; | |
while (match = search.exec(query)) { | |
window.query[decode(match[1])] = decode(match[2]); |
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 random | |
import itertools | |
import bisect | |
BNC = [ | |
('the', 6187267), | |
('be', 4239632), | |
('of', 3093444), | |
('and', 2687863), | |
('a', 2186369), |
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
' ADO Abstraction Class for VBA | |
' Christopher Harrison | |
' This is meant for simple, read-only access to an ODBC database (e.g., for | |
' report writing in Excel, etc.). It constructs parameterised queries, with | |
' optional varchar parameters (ordered, not named) passed as a collection. | |
' (SELECT statements, at least, are weakly typed (or can be casted), so using | |
' strings isn't really a concern.) | |
' Notes: |
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
Number.prototype.ordinal = function() { | |
return this < 0 ? undefined | |
: this + ['th', 'st', 'nd', 'rd'][this % 10 < 4 ? (this % 10) * (parseInt(this / 10, 10) % 10 == 1 ? 0 : 1) : 0]; | |
} |
OlderNewer