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 Node { | |
constructor(value) { | |
this.val = value; | |
this.left = null; | |
this.right = null; | |
this.elemCount = 1 | |
this.leftCount = 0 | |
} | |
} |
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 Readable = require('stream').Readable | |
var util = require('util'); | |
function ConcatStream(){ | |
Readable.call(this); | |
this.streams = []; | |
} | |
util.inherits(ConcatStream, Readable); |
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
#!/bin/bash | |
i=0 | |
while read line; do | |
targets[i]=$line | |
v=$($line"/haxe" 2>&1 | head -1) | |
[[ $v =~ [0-9]+\.[0-9]+(\.[0-9]+)? ]] && versions[i]=$BASH_REMATCH | |
i=$((i+1)) | |
done < <(find /usr/lib -name haxe\* -depth 1 -type d) | |
echo 'Which installed version of Haxe you want to set ?' |
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
#!/bin/bash | |
if [[ -z $1]]; then | |
v=3.0.0 | |
else | |
v=$1 | |
fi | |
echo "Downloading and installing Haxe3" | |
curl http://haxe.org/file/haxe-$v-osx.tar.gz -o haxe-$v-osx.tar.gz && | |
tar -xzf haxe-$v-osx.tar.gz && |