http lib | connect timeout (ms) | read timeout | write timeout | concurrency |
---|---|---|---|---|
OkHttp, retrofit, picasso |
10,000 | 10,000 | 10,000 | 64 total, 5 per host |
Volley |
2,500 | 2,500 | 2,500 | 4 |
HttpUrlConnection |
up to few minutes | up to few minutes | n/a | 5 |
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
int longest_substring(const string& str1, const string& str2) { | |
int n = str1.length(); | |
int m = str2.length(); | |
int suffix[n + 1][m + 1] = {}; | |
int result = 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
update apps SET no_nw_timeout = 5 where id = '49e68ee79f254ae49b344873be35668d'; | |
mysql -h rds1.packetzoom.net --ssl-ca=~/rds-combined-ca-bundle.pem -u pz_user --password=this |
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
https://coderwall.com/p/7smjkq/multiple-ssh-keys-for-different-accounts-on-github-or-gitlab | |
chmod 400 chmod 400 ~/.ssh/id_rsa_dev | |
ssh gitlab.packetzoom.net -v |
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
private final OkHttpClient client; | |
public ConfigureTimeouts() throws Exception { | |
client = new OkHttpClient.Builder() | |
.connectTimeout(10, TimeUnit.SECONDS) | |
.writeTimeout(10, TimeUnit.SECONDS) | |
.readTimeout(30, TimeUnit.SECONDS) | |
.build(); | |
} |
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
//Dispatcher.java | |
/** | |
* Policy on when async requests are executed. | |
* | |
* <p>Each dispatcher uses an {@link ExecutorService} to run calls internally. If you supply your | |
* own executor, it should be able to run {@linkplain #getMaxRequests the configured maximum} number | |
* of calls concurrently. | |
*/ | |
public final class Dispatcher { | |
private int maxRequests = 64; |
NewerOlder