题目:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique lo....
分类:
编程语言 时间:
2014-08-04 04:10:26
阅读次数:
374
/*C++中返回一个对象时的实现及传说中的右值——临时对象*/如下代码: 1 /**********************************************/ 2 class CStudent; 3 CStudent GetStudent() 4 { 5 CStudent lo...
分类:
编程语言 时间:
2014-08-03 20:33:35
阅读次数:
217
listen 80; listen 443; ssl on; ssl_certificate /passport.crt; ssl_certificate_key /passport.key; ssl_session_timeout 5m; server_name lo...
分类:
编程语言 时间:
2014-08-03 12:32:55
阅读次数:
348
平衡二叉树定义(AVL):它或者是一颗空树,或者具有以下性质的二叉树:它的左子树和右子树的深度之差的绝对值不超过1,且它的左子树和右子树都是一颗平衡二叉树。
平衡因子(bf):结点的左子树的深度减去右子树的深度,那么显然-1
很显然,平衡二叉树是在二叉排序树(BST)上引入的,就是为了解决二叉排序树的不平衡性导致时间复杂度大大下降,那么AVL就保持住了(BST)的最好时间复杂度O(lo...
分类:
其他好文 时间:
2014-08-01 19:49:22
阅读次数:
296
lua中打印所以类型功能实现本人測试 number、string、bool、nil、table嵌套table、userdata没问题 共享一下有什么问题请拍砖 代码例如以下cclog = function( ... ) local tv = "\n" local xn = 0 lo...
分类:
其他好文 时间:
2014-08-01 19:35:42
阅读次数:
194
A data stream is a real-time, continuous, ordered sequence of items. Some examples include sensor data, Internet traffic, financial tickers, on-line auctions, and transaction logs such as Web usage lo...
分类:
其他好文 时间:
2014-08-01 13:47:14
阅读次数:
235
飞信机器人大家应该并不陌生,我们经常用它来作为监控系统的报警,在32位系统上安装比较简单,而在64位系统上安装稍微麻烦些。1、首先下载fetion以及其依赖的库文件大家自己想办法吧,好像无法访问官方网站了。然后上传到linux上的/usr/local/fetion,共以下几个文件:[root@lo..
分类:
其他好文 时间:
2014-08-01 00:16:21
阅读次数:
332
Primitive Roots
题目链接:http://poj.org/problem?id=1284
利用定理:素数 P 的原根的个数为euler(p - 1)
typedef long long ll;
using namespace std;
/*
求原根
g^d ≡ 1(mod p) 其中d最小为p-1,g 便是一个原根
复杂度:O(m)*lo...
分类:
其他好文 时间:
2014-07-30 20:43:34
阅读次数:
260
简单说就是发现某系统无法被ping通,需要确认是服务器收到了ping包没有响应,还是它压根没有收到ping包在Linux系统上执行以下命令tcpdump-ieth0icmp-i:指定检测哪个网口,不指定此参数将捕获所有接口数据,包括lo;#-v:显示详细信息,可选,对于上述问题来讲,不加-v也能完成..
分类:
系统相关 时间:
2014-07-30 15:02:14
阅读次数:
352
按照文档:http://www.micmiu.com/bigdata/hadoop/hadoop2x-eclipse-mapreduce-demo/安装配置好Eclipse后,运行WordCount程序报错: log4j:WARN No appenders could be found for lo...