Note, please replace "WWW/tools" with where ever you store your web tools.
$ mkdir ~/WWW/tools
$ cd ~/WWW/tools
$ git clone https://github.com/phacility/libphutil.git
$ git clone https://github.com/phacility/arcanist.git
var assert = require('chai').assert; | |
var when = require('when'); | |
var def1 = when.defer(); | |
function getProm() { | |
return def1.promise; | |
} |
class Tree | |
{ | |
public int x; | |
public Tree l; | |
public Tree r; | |
}; | |
class Task3 | |
{ | |
public int solution(Tree T) |
sudo wget http://d3kbcqa49mib13.cloudfront.net/spark-2.1.0-bin-hadoop2.7.tgz | |
sudo tar -zxvf spark-2.1.0-bin-hadoop2.7.tgz | |
cd spark-2.1.0-bin-hadoop2.7 | |
sudo cp conf/log4j.properties.template conf/log4j.properties | |
sudo sed -i -e 's/INFO/WARN/g' conf/log4j.properties | |
sudo cp conf/spark-env.sh.template conf/spark-env.sh | |
sudo cp conf/slaves.template conf/slaves |
/* | |
Load Sinon.JS in the SpecRunner: | |
<script type="text/javascript" src="lib/jasmine-1.0.1/jasmine.js"></script> | |
<script type="text/javascript" src="lib/jasmine-1.0.1/jasmine-html.js"></script> | |
<script type="text/javascript" src="sinon-1.0.0.js"></script> | |
<script type="text/javascript" src="sinon-ie-1.0.0.js"></script> | |
http://cjohansen.no/sinon/ | |
*/ |
$ brew update | |
$ brew install hive |
public class Retry { | |
private static final Logger log = Logger.getLogger(Retry.class); | |
public static interface CallToRetry<T> { | |
<T> T doIt() throws Exception; | |
} | |
public static T withRetry(int maxTimes, long initialWait, int waitMultiplier, CallToRetry<T> call) { | |
if(maxTimes <= 0) { |
# scala install | |
wget www.scala-lang.org/files/archive/scala-2.11.7.deb | |
sudo dpkg -i scala-2.11.7.deb | |
# sbt installation | |
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 642AC823 | |
sudo apt-get update | |
sudo apt-get install sbt |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" /> | |
<!-- when.js Promises implementation --> | |
<script src="https://raw.github.com/cujojs/when/master/when.js"></script> | |
<!-- Unit testing and mocking framework --> | |
<script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script> |