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
// test about the reverse iter | |
package main | |
import ( | |
"context" | |
"flag" | |
"log" | |
"strings" | |
"github.com/pingcap/tidb/kv" |
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
sds sdscatescape(sds s, const char *p, size_t len) { | |
s = sdscatlen(s,"\"",1); | |
while(len--) { | |
switch(*p) { | |
case '\\': | |
case '"': | |
s = sdscatprintf(s,"\\%c",*p); | |
break; | |
case '\n': s = sdscatlen(s,"\\n",2); break; | |
case '\r': s = sdscatlen(s,"\\r",2); break; |
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 <string.h> | |
#include <stdlib.h> | |
int kmp(const char *s, const char *sub){ | |
int ls = strlen(s); | |
int lsub = strlen(sub); | |
char *next = malloc(lsub); | |
/*Build the next array*/ |
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
SELECT [QunNum], [QQNum], [Age], [Gender], [Auth], [Nick] FROM [GroupData1].[dbo].[Group1]; | |
SELECT [QunNum], [QQNum], [Age], [Gender], [Auth], [Nick] FROM [GroupData1].[dbo].[Group2]; | |
SELECT [QunNum], [QQNum], [Age], [Gender], [Auth], [Nick] FROM [GroupData1].[dbo].[Group3]; | |
SELECT [QunNum], [QQNum], [Age], [Gender], [Auth], [Nick] FROM [GroupData1].[dbo].[Group4]; | |
SELECT [QunNum], [QQNum], [Age], [Gender], [Auth], [Nick] FROM [GroupData1].[dbo].[Group5]; | |
SELECT [QunNum], [QQNum], [Age], [Gender], [Auth], [Nick] FROM [GroupData1].[dbo].[Group6]; | |
SELECT [QunNum], [QQNum], [Age], [Gender], [Auth], [Nick] FROM [GroupData1].[dbo].[Group7]; | |
SELECT [QunNum], [QQNum], [Age], [Gender], [Auth], [Nick] FROM [GroupData1].[dbo].[Group8]; | |
SELECT [QunNum], [QQNum], [Age], [Gender], [Auth], [Nick] FROM [GroupData1].[dbo].[Group9]; | |
SELECT [QunNum], [QQNum], [Age], [Gender], [Auth], [Nick] FROM [GroupData1].[dbo].[Group10]; |
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
pppd options in effect: | |
debug # (from command line) | |
nodetach # (from command line) | |
logfd 2 # (from command line) | |
dump # (from command line) | |
noauth # (from /etc/ppp/peers/Sina) | |
name [email protected] # (from /etc/ppp/peers/Sina) | |
remotename Sina # (from /etc/ppp/peers/Sina) | |
# (from /etc/ppp/peers/Sina) | |
pty pptp vpn.sina.com --nolaunchpppd # (from /etc/ppp/peers/Sina) |
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
set<int>::iterator it1 = s1.begin(); | |
set<int>::iterator it2 = s2.begin(); | |
while(it1 != s1.end() && it2 != s2.end()) | |
{ | |
if(*it1 < *it2) | |
{ | |
result.push_back(*it1); | |
++it1; | |
} |
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
all:hello test1 test2 test3 | |
hello:hello.o | |
g++ -o hello hello.o | |
hello.o:hello.cc | |
g++ -c -o hello.o hello.cc | |
clean: | |
rm *.o hello | |
install: | |
cp hello /usr/local/bin |
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
1. 解决命名冲突的问题,不同的日志,如果用了相同的名字,如何解决?协商? | |
2. 日志请求改为异步,为了便于调试,现在用的是同步机制 | |
3. 探索双server模式,避免单点故障 |