时间限制:10000ms单点时限:1000ms内存限制:256MB描述Given a sequence {an}, how many non-empty sub-sequence of it is a prefix of fibonacci sequence.A sub-sequence is a ...
分类:
其他好文 时间:
2015-09-29 23:21:30
阅读次数:
253
一、1、取字符串的前i个字符(1)string str1=str.Substring(0,i);(2)string str1=str.Remove(i,str.Length-i);2、去掉字符串的前i个字符string str1=str.Remove(0,i);string str1=str.Sub...
从2.6.31内核开始,linux内核自带了一个性能分析工具perf,能够进行函数级与指令级的热点查找。perfPerformance analysis tools for Linux.Performance counters for Linux are a new kernel-based sub...
分类:
其他好文 时间:
2015-09-29 18:53:23
阅读次数:
228
使用Redis的发布订阅功能redis另一个常见的用途是发布订阅功能 。 它非常的简单 ,当连接失败时 ConnectionMultiplexer 会自动重新进行订阅 。ISubscriber sub = redis.GetSubscriber();GetSubscriber 方法返回一个 ISub...
分类:
其他好文 时间:
2015-09-29 16:31:24
阅读次数:
2182
server { listen 80; server_name sub.domain.com; set $root_path '/var/www/html/application_name/public'; root $root_path; ...
分类:
其他好文 时间:
2015-09-29 11:26:37
阅读次数:
115
今天调试程序的时候,发现一个奇怪的问题,之前调试都没问题的,今早加了一点东西,就出现错误,跳到调试位置,如下4行红色部分1 ; Find next lower page and probe2 cs20:3 sub eax, _PAGESIZE_ ; decre...
分类:
编程语言 时间:
2015-09-29 11:16:21
阅读次数:
206
首先由一下三段代码,请给出打印结果:测试类:1 public class Test {2 public static void main(String[] args) {3 Base p = new Sub("SubClass");4 p.printA();5...
分类:
其他好文 时间:
2015-09-28 20:55:20
阅读次数:
152
HTTP 头部解释 ================================================ Accept 告诉WEB服务器自己接受什么介质类型,*/* 表示任何类型,type/* 表示该类型下的所有子类型,type/sub-type。 Accept-Charset 浏览器申...
分类:
Web程序 时间:
2015-09-28 16:08:27
阅读次数:
294
我们基于Spring+JMS+ActiveMQ+Tomcat,做一个Spring4.1.0和ActiveMQ5.11.1整合实例,实现了Point-To-Point的异步队列消息和PUB/SUB(发布/订阅)模型,简单实例,不包含任何业务。...
分类:
编程语言 时间:
2015-09-27 01:19:50
阅读次数:
310
实现的思路是,查表找到该字的所有读音,然后取首字母.代码:while () { chomp; my ($head, $all) = /^(.{3})(.*)$/; $all =~ s/^\s+//; ### 只保留无音标号的首字母 sub toshorter { my $str ...
分类:
其他好文 时间:
2015-09-26 22:44:15
阅读次数:
317