Skip to content

Instantly share code, notes, and snippets.


Leegorous Leegorous

View GitHub Profile
View jquery-selectAll.js
/* ===================================================
* jQuery SelectAll plugin
* ===================================================
* @author:
* @license: Licensed under the Apache License, Version 2.0 (the "License"),
* see
* ===================================================
* Example:
Leegorous /
Created Jun 16, 2013
If there are some requests you don't want to wait, just set the socket & connection timeout & no retry on error. Restlet 设置连接超时的方法。
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));
Representation entity = client.get();
# 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
You can’t perform that action at this time.