3 比 2 要慢不少, 囧rz.
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
template <class T> | |
class BSTNode{ | |
public: | |
T value; | |
BSTNode *left; | |
BSTNode *right; | |
BSTNode(T value1, BSTNode *l, BSTNode *r): | |
value(value1),left(l),right(r) {} | |
}; |
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
template <class T> | |
class BSTree { | |
private: | |
BSTNode<T> *mRoot; | |
public: | |
BSTree(); | |
~BSTree(); | |
// 前序遍历"二叉树" |
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 KMP(Str str, Str substr, int next[]){ | |
int i=0,j=0; | |
while(i<str.length && j<substr.length){ | |
if(j==-1||str.ch[i] == substr.ch[j]){ | |
++i; | |
++j; | |
} | |
else{ | |
j=next[j]; | |
} |
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
void form_fun(string s, vector<pair<int, int>>& people){ | |
if(s.at(0)=='[' && s.at(1)=='[' && s.at(s.size()-2)==']' && s.at(s.size()-1)==']'){ | |
pair<int,int> p; | |
for(int i=0;i<s.size();i++){ | |
while(i<s.size() && (s.at(i)>'9' || s.at(i)<'0')) | |
i++; | |
if(i<s.size() && s.at(i)<='9' && s.at(i)>='0'){ | |
string buffer=""; | |
buffer += s.at(i); | |
while(i<s.size() && s.at(i+1)<='9' && s.at(i+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
#include <stdio.h> | |
#include <malloc.h> | |
struct NODE { | |
char data; | |
struct NODE *U;//上 | |
struct NODE *R;//右 | |
struct NODE *D;//下 | |
struct NODE *L;//左 | |
} *B,*q; | |
struct NODE *m[10]; |
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
idString=`ipfs id` | |
str="ID\": \"" | |
subIdStr=${idString#*$str} | |
str1="\"," | |
subIdStr1=${subIdStr%%$str1*} | |
echo $subIdStr1 | |
sed -i "" "/root: / s/\/ipns\/$subIdStr1\//\//" _config.yml | |
sed -i "" "/url: / s/http:\/\/ipfs.io\/ipns\/$subIdStr1/http:\/\/liuqinh2s.github.io/" _config.yml | |
hexo clean | |
hexo g -d |
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
while(True): | |
# 日线 | |
tradeDayLineURL = "https://www.aex.com/trade/getTradeDayLine.php?coinname=BTS&mk_type=bitcny" | |
tradeDayLineResponse = requests.post(tradeDayLineURL, headers=headers) | |
while tradeDayLineResponse.status_code!=200: | |
tradeDayLineResponse = requests.post(tradeDayLineURL, headers=headers) | |
dayContent = json.loads(tradeDayLineResponse.text) | |
dayListContent = list(dayContent) | |
dayLength = dayListContent.__len__() | |
# print(dayLength) |
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
Function endFunction(path, number) | |
File.Write(path, number) | |
EndScript | |
End Function | |
// 转账按钮界面的所有操作都包装在这个函数里 | |
Function transfer(jpgStorePath, pngStorePath, path, number, itemNumber) | |
// 有没有头像的转账按钮位置不同,所以只能通过颜色来判断位置 | |
Dim transferPointX, transferPointY |
OlderNewer