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
/* =================================================== | |
* jQuery SelectAll plugin | |
* =================================================== | |
* @author: https://gist.github.com/Leegorous | |
* @license: Licensed under the Apache License, Version 2.0 (the "License"), | |
* see http://www.apache.org/licenses/LICENSE-2.0 | |
* =================================================== | |
* | |
* Example: | |
* |
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
Context ctx = new Context(); | |
ctx.getParameters().add("socketTimeout", "200"); // http.socket.timeout | |
ctx.getParameters().add("socketConnectTimeoutMs", "100"); // http.connection.timeout | |
ClientResource client = new ClientResource(uri); | |
client.setNext(new Client(ctx, Protocol.HTTP)); | |
client.setRetryOnError(false); | |
Representation entity = client.get(); |
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
# before run this script, run sudo ls, type your password | |
sudo mkdir -p /usr/lib/jvm | |
sudo tar xvzf ./jdk-7u21-linux-x64.tar.gz -C /usr/lib/jvm | |
cd /usr/lib/jvm | |
sudo mv jdk1.7.0_21 java-7-sun | |
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-7-sun/bin/java 300 | |
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-7-sun/bin/javac 300 |