Given an array of integers, find two numbers such
that they add up to a specific target number.The function twoSum should return
indices of the two nu...
分类:
其他好文 时间:
2014-05-26 19:50:39
阅读次数:
314
出题:TRIE树 (Trie Tree or Prefix
Tree);分析:又称字典树或者前缀树,一种用于快速检索的多叉树结构;英文字母的Trie树为26叉树,数字的Trie树为10叉树;All the
descendants of a node have a common prefix of t...
分类:
其他好文 时间:
2014-05-26 18:31:06
阅读次数:
297
原文:SQL Server AlwaysON 同步模式的疑似陷阱SQL Server 2012
推出的最重要的功能之一Alwayson,是一个集之前Cluster和Mirror于一体的新功能,即解决了Cluster依赖共享存储的问题,又解决了镜像不能实时读以及转移后连接串需要添加转移IP的问题,看起...
分类:
数据库 时间:
2014-05-26 17:37:24
阅读次数:
343
SQL Server 2012
推出的最重要的功能之一Alwayson,是一个集之前Cluster和Mirror于一体的新功能,即解决了Cluster依赖共享存储的问题,又解决了镜像不能实时读以及转移后连接串需要添加转移IP的问题,看起来的确很实用。而且Alwayson多副本的功能为实现读写分离提供...
分类:
数据库 时间:
2014-05-26 17:35:43
阅读次数:
346
你有两个选择可以实现在Cubieboard上安装NodeJS,下载别人已经编译完成适用于Cubieboard的NodeJS二进制包,或者自己下载源码自行在Cubieboard上进行编译。使用编译完成的二进制包在这里下载适用于ARM架构的Node.js,如果在Cubieboard社区找不到相关资源,可...
分类:
Web程序 时间:
2014-05-26 17:14:03
阅读次数:
348
1001
暴力
#include
#include
#include
using namespace std;
const int maxn = 100100;
int ll[maxn], rr[maxn];
struct node
{
int x, y, bj;
}e[maxn];
int main()
{
int cas = 1;
int T;
scanf("%d...
分类:
其他好文 时间:
2014-05-25 21:32:50
阅读次数:
268
最近写了一个接受socket数据包,然后再重组上层协议包的东西。每次read到数据就将数据添加到一个链表的尾部,然后检查是否收到了一个完整的包。为了减少内存碎片,把用过的链表节点添加到另外一个链表中,这样下次可以从这个cache链表中重用节点。
在debug的时候我把cache list中的数据打印出来,代码如下:
struct seg_node
{
void* bu...
分类:
其他好文 时间:
2014-05-25 21:31:09
阅读次数:
326
Elasticsearch is a powerful open source search
and analytics engine. The vulnerability allows attackers read from or append to
files on the system hos...
分类:
其他好文 时间:
2014-05-25 16:40:56
阅读次数:
349
通常我们通过登录具有外网ip的远程机器来连接内网的机器;本文介绍,通过putty进行ssh
tunnel,进而达到使用本机直接连接远程内网机器;1,在putty中创建一个session,输入具有外网ip的node信息:2,在connection以下找到SSH,打开SSH点击tunnel输入sourc...
分类:
其他好文 时间:
2014-05-25 11:38:32
阅读次数:
210
链接dp[x][y][node][sta]
表示走到在x,y位置node节点时状态为sta的方法数,因为只有2个病毒串,这时候的状态只有4种,根据可走的方向转移一下。这题输入的是m、N,先列后行,因为输反了,WA了N次啊。。
1 #include 2 #include 3 #include ...
分类:
其他好文 时间:
2014-05-25 11:37:30
阅读次数:
297