捕获是这样一种机制:可以使用模式串的一部分匹配目标串的一部分。将你想捕获的模式用圆括号括起来,就指定了一个捕获。在string.find使用捕获的时候,函数会返回捕获的值作为额外的结果。这常被用来将一个目标串拆分成多个:pair = "name = Anna"_, _, key, value = s...
分类:
其他好文 时间:
2015-02-11 18:17:49
阅读次数:
209
Hi guys,I just want to share what I did today. I ordered an OBDII ELM327 scanner off EOBD2.FR to pair with my iPhone 5 and just got it this morning. O...
分类:
移动开发 时间:
2015-02-11 16:00:54
阅读次数:
158
三道题都很类似。给出1741的代码#include#include#includeusing namespace std;#define MAXN 10001typedef pair Point;int n,K,ans;int v[MAXN<<1],w[MAXN<<1],first[MAXN],ne...
分类:
其他好文 时间:
2015-02-11 14:10:11
阅读次数:
187
梗概:使用证书登陆,可以减少密码的使用,避免密码泄露,证书登陆更加方便、安全。Secure CRT和Putty原理相同,生成密钥对(Key pair)操作有所不同。1、生成key pair,先以SecureCRT为例密钥类型有RSA和DSA两种,sshd_config里面两种都支持,一般选用RSA....
分类:
系统相关 时间:
2015-02-11 01:46:14
阅读次数:
332
注意题目给的是到终点的距离,需要转成到起点的距离,还有就是将终点也看成是加油站,这样写起来方便很多,不必要单独考虑最后一个加油站不在终点以后的情况
#include
#include
#include
#include
#include
using namespace std;
int N,P,L;
pair d[10100];
bool cmp(pair a, pair b)
{...
分类:
其他好文 时间:
2015-02-09 18:23:46
阅读次数:
146
#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#define pii pair#d...
分类:
其他好文 时间:
2015-02-09 12:26:49
阅读次数:
117
Calculate a + bInputThe input will consist of a series of pairs of integers a and b,separated by a space, one pair of integers per line.OutputFor each...
分类:
其他好文 时间:
2015-02-07 15:44:43
阅读次数:
183
我希望要一个ArrayList,类似C++中的pair,可是Map.Entry是个接口,不能实例化,能够像以下这样写HashMap G = new HashMap();G.put(1, 9); G.put(4, 6); G.put(2, 8);G.put(3, 7); ArrayList> a...
分类:
编程语言 时间:
2015-02-05 20:21:03
阅读次数:
229
配置key首先创建新的KEYssh-keygen -t rsa -C "your_email@youremail.com"Creates a new ssh key using the provided email Generating public/private rsa key pair.#此处...
分类:
其他好文 时间:
2015-02-05 13:14:08
阅读次数:
153
Topcoder SRM 648 Div1 250
给一个长度为N的"AB"字符串S,S只含有两种字符'A' 或 'B',设pair(i,j)(0=<i<j<N)表示一对 i,j 使得S[i]='A',S[j]='B'。现给定一个K,求字符串S,使得pair(i,j)的个数恰好为K。若不存在,则返回空串。...
分类:
其他好文 时间:
2015-02-03 09:38:17
阅读次数:
156