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
### Keybase proof | |
I hereby claim: | |
* I am alexandrugheorghe on github. | |
* I am alexandrugheorgh (https://keybase.io/alexandrugheorgh) on keybase. | |
* I have a public key ASApzwqa82U53T1aGb4V4yzvmV4U0ha73NtkTgFPgqJbhAo | |
To claim this, I am signing this object: |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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 | |
ini_set('memory_limit','512M'); | |
CONST WORKER_POOL = 3; | |
CONST INPUT_FILE = 'in.txt'; | |
CONST OUTPUT_FILE = 'out.txt'; | |
CONST PROCESS_DESCRIPTORS = [0 => ['pipe', 'r'], 1 => ['pipe', 'w'], 2 => ['file', 'error.log', 'a']]; | |
$workers = []; | |
$pipes = []; |
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
var docsQueue = []; | |
function processRefs(document, field) | |
{ | |
for(var field in document) { | |
if (document[field] instanceof Array) { | |
for(var embededDoc in document[field]){ | |
if (document[field][embededDoc] instanceof DBRef) { | |
document[field][embededDoc] = document[field][embededDoc]["$id"].str; | |
} else if (document[field][embededDoc] instanceof DBRef) { |