题意:给你两个字符串,为你第一个字符串的前缀等于第二个字符串的后缀的最大长度是多少解题思路:KMP,两次匹配,不过方法比较巧妙,两次分开求next就行解题代码: 1 // File Name: getnext.cpp 2 // Author: darkdream 3 // Created Time:...
分类:
其他好文 时间:
2014-09-10 20:56:31
阅读次数:
169
题意:求一个字符串的所有前缀是否是复制出来的。解题思路:next 数值判断即可解题代码: 1 // File Name: getnext.cpp 2 // Author: darkdream 3 // Created Time: 2014年09月09日 星期二 22时35分02秒 4 5 #inc....
分类:
其他好文 时间:
2014-09-10 20:56:21
阅读次数:
229
题意:找文本串中模式串的个数解题思路:裸KMP解题代码: 1 // File Name: getnext.cpp 2 // Author: darkdream 3 // Created Time: 2014年09月09日 星期二 22时35分02秒 4 5 #include 6 #include ....
分类:
其他好文 时间:
2014-09-10 20:53:51
阅读次数:
214
[root@puppetmaster~]#/etc/init.d/puppetmasterstartStartingpuppetmaster:/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in`gem_original_require‘:nosuchfiletoload--json(LoadError) from/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in`requ..
分类:
Web程序 时间:
2014-09-10 19:45:21
阅读次数:
323
收集流程1nxlog=>2logstash=>3elasticsearch1.nxlog使用模块im_file收集日志文件,开启位置记录功能2.nxlog使用模块tcp输出日志3.logstash使用input-tcp,收集日志,并格式化,输出至eswindows上面的nxlog配置文件nxlog.conf##Thisisasampleconfigurationfile.Seethenxlo..
分类:
Windows程序 时间:
2014-09-10 19:44:21
阅读次数:
1381
Android数据的四种存储方式 作为一个完成的应用程序,数据存储操作是必不可少的。因此,Android系统一共提供了四种数据存储方式。分别是:SharePreference、SQLite、Content Provider和File。由于Android系统中,数据基本都是私有的的,都是存放于“dat...
分类:
移动开发 时间:
2014-09-10 19:13:20
阅读次数:
217
google test version: 1.6c++ builder version: xe61 download google test 1.62 unzip the zip file. The project file for c++ build is in codegear folder3 ...
分类:
编程语言 时间:
2014-09-10 19:08:20
阅读次数:
197
/home/www/php/sbin/php-fpm/home/www/mysql/bin/mysqld_safe --defaults-file=/home/www/mysql/conf/my.cnf --ledir=/home/www/mysql/bin//home/www/se/bin/xs-...
分类:
其他好文 时间:
2014-09-10 19:04:50
阅读次数:
182
<?php?
class?CServerInfo
{
????static?public?function?getCpuData($speed?=?0.5)
????{
????????if?(false?===?($prevVal?=?@file("/proc/stat")))?return?false;
?????...
分类:
系统相关 时间:
2014-09-10 18:01:14
阅读次数:
495
通过/usr/share/tomcat7/bin下的./shutdown.sh 与./startup.sh 会报错 java.io.FileNotFoundException:?/usr/share/tomcat7/conf/server.xml?(No?such?file?or?directory) 原因是因为CATALINA_BASE配置错误...
分类:
其他好文 时间:
2014-09-10 17:58:11
阅读次数:
321