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 | |
define("COMPARATOR_VERSION", "0.1"); | |
ini_set("memory_limit", "512M"); | |
$node1 = json_decode(@file_get_contents($argv[1]), true); | |
if($node1 == ""){ | |
echo "Provide a valid json file produced by the Extractor".PHP_EOL; | |
exit(1); | |
} | |
$node2 = json_decode(@file_get_contents($argv[2]), 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 | |
if(!extension_loaded("pthreads") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "pthreads." . PHP_SHLIB_SUFFIX) === false){ | |
trigger_error("Unable to find pthreads extension", E_USER_ERROR); | |
exit(1); | |
} | |
function kill($pid){ | |
$uname = strtoupper(php_uname("s")); |
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
//This is a port of Ken Perlin's "Improved Noise" | |
// http://mrl.nyu.edu/~perlin/noise/ | |
// Originally from http://therandomuniverse.blogspot.com/2007/01/perlin-noise-your-new-best-friend.html | |
// but the site appears to be down, so here is a mirror of it | |
class Perlin { | |
var $p, $permutation, $seed; | |
var $_default_size = 64; |
NewerOlder