Great liter. reviews
http://web.iitd.ac.in/~rrkalaga/pubs/JPT-2015-Prakhar-Rao-Arrival-Prediction-Model.pdf
http://www.sciencedirect.com.ezproxy.macewan.ca/science/article/pii/S0968090X11000155
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
interface EventRegister<T> { | |
event: keyof T, | |
// any used here because ts is picky, doesn't make a difference | |
// may be able to replace with T[keyof T] in future versions | |
callback: {(data: any): void}, | |
once: boolean | |
} | |
/** | |
* Basic callback based publish / subscribe baseclass |
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
#!/usr/bin/python3 | |
from sys import argv | |
with open(argv[1]) as f: | |
print(f.read(), end="") | |
try: | |
while True: | |
print(input(), end="") |
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
#include <setjmp.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <stdlib.h> // EXIT_SUCCESS | |
#include <unistd.h> // sbrk | |
struct datum { | |
int v1; | |
int v2; | |
int v3; |
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 ProxyPromise extends Promise { | |
constructor(...args) { | |
super(...args); | |
return new Proxy(this, { | |
get(target, property, receiver) { | |
if (property in target) { | |
const prop = Reflect.get(target, property, receiver); | |
if (typeof prop === "function") { | |
return prop.bind(target); | |
} else { |
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
(Always returns undefined function and does nothing) | |
a=Function.prototype | |
a("hello world") | |
(edited) | |
(Identity function, returns the first argument you give it) | |
a=Function.prototype.call.bind([][Symbol.iterator]().__proto__.__proto__[Symbol.iterator]) | |
a("hello world") === "hello world" |
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
#!/bin/bash | |
if ! [[ $1 ]]; then | |
exit 1 | |
fi | |
echo "target,factorization,num_factors" | |
for t in `seq 2 $1`; do | |
facts=$(./primes <<< "$t") |
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
foo |
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
/** | |
* index.js | |
* July 20th 2017 | |
*/ | |
"use strict"; | |
function DataViewObject() { |
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
More effiecent or accurate | |
# Spot on | |
http://www.sciencedirect.com/science/article/pii/S0968090X03000238 | |
# Probably not that useful | |
http://jeb.biologists.org/content/209/1/128.short |