$ sudo npm install -g hexo-cli
$ hexo -v
hexo-cli: 0.1.9
June 2011 - Chris O'Hara - (archived original post)
Rate limiting can be an effective way of conserving resources and preventing automated or nefarious activities on your site.
A common use case is to limit the amount of requests an IP can make over a certain time frame. For example, you might want to restrict users from using an expensive search utility on your site. If the user attempts to search more than 5 times a minute, you can redirect them to another page informing them that they need to wait.
IP based rate limiting is already in use on larger sites. Google and Yahoo both employ the technique to prevent (or at least complicate) automated requests to their services.
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
git config --global https.proxy http://127.0.0.1:1080 | |
git config --global https.proxy https://127.0.0.1:1080 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
npm config delete proxy |
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
http://blog.csdn.net/godleading/article/details/8090917 |
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
x&(x-1) == 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
import java.util.Scanner; | |
public class Sort{ | |
private int []letterArray; | |
private void sortLetter(int length) { | |
for (int i = 0;i < length-1;i++){ | |
System.out.printf("%d ",letterArray[i]); | |
letterArray[i] = (letterArray[i] + letterArray[i+1]) % 10; | |
} | |
System.out.printf("%d \n",letterArray[length-1]); |
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
public class Sort{ | |
private int []letterArray; | |
private void sortLetter(int length) { | |
if (length == 1){ | |
return; | |
} | |
for (int i = 0;i < length-1;i++){ | |
letterArray[i] = letterArray[i] + letterArray[i+1]; | |
System.out.printf("%d ",letterArray[i]); |
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
//package main | |
//author: Lubia Yang | |
//create: 2013-12-6 | |
//refer: www.lubia.me/multicore-scheduler-design | |
package main | |
import ( | |
"fmt" | |
"math/rand" |
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
package main | |
import ( | |
"fmt" | |
"labix.org/v2/mgo" | |
"labix.org/v2/mgo/bson" | |
"time" | |
) | |
type Person struct { |
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
package main | |
import ( | |
"fmt" | |
"net" | |
"os" | |
) | |
var data []byte | |
var length = 1024 * 100 |
NewerOlder