时间限制:1 秒
内存限制:128 兆
特殊判题:否
提交:3468
解决:291
题目描述:
给定一个数组,判断数组内是否存在一个连续区间,使其和恰好等于给定整数k。
输入:
输入包含多组测试用例,每组测试用例由一个整数n(1
接下去一行为n个整数,描述这个数组,整数绝对值不大于100。
最后一行为一个整数k(大小在int范...
分类:
其他好文 时间:
2015-03-17 15:53:19
阅读次数:
198
环境:eclipse + eclipse hadoop插件, hadoop + rhel6.4
package test;
import java.io.IOException;
import java.net.URI;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
im...
分类:
编程语言 时间:
2015-03-17 15:53:05
阅读次数:
255
之前的笔记里面也说到了路由的使用问题,但总有种“被动”的感觉,要在浏览器里输入地址才能访问相应的url。我们希望的是点击按钮或者链接就可以到达别的页面,昨天终于搞定了这个。...
分类:
Web程序 时间:
2015-03-17 15:52:53
阅读次数:
124
今天 apache 突然启动不起来了,查看了一下错误日志发现了如下错误:
[Tue Mar 17 11:27:32 2015] [crit] Parent: child process exited with status 3 -- Aborting.
[Tue Mar 17 11:28:25 2015] [notice] Apache/2.2.11 (Win32) PHP/5.2.9-2 c...
分类:
Web程序 时间:
2015-03-17 15:53:00
阅读次数:
147
标题的意思是Java NIO的分散集中
Java NIO带有内置的分散收集的支持。分散收集的概念主要用于通道的读写。
对一个通道的分散读取就是将数据读到多个buffer中,因此,通道将数据分散到多个buffer中。
对一个通道的集中写就是将数据从多个buffer中写到一个通道中,因此,通道从多个buffer将数据收集到一个通道中。
分散收集经常用于对传输数据分开处理的场景。比如,一条消息由h...
分类:
编程语言 时间:
2015-03-17 15:53:01
阅读次数:
188
1. 题目Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is defi...
分类:
其他好文 时间:
2015-03-17 15:52:52
阅读次数:
131
题意:Surround the TreesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 209 Accepted Submission(s): 104 Problem DescriptionThere are a lot of trees in...
分类:
其他好文 时间:
2015-03-17 15:50:50
阅读次数:
135
要用vs2013开发一个博客网站,.net framework 4,需要一个HTML编辑器作为写文章的工具。经多方试用,排除了dotnettextbox、kceditor。觉得xheditor 不错,现将使用方法记录如下:
1.到http://download.csdn.net/download/chenhaoying/4274663下载,会得到一个名为:“xheditor-1.1.13在...
分类:
Web程序 时间:
2015-03-17 15:51:07
阅读次数:
264
?####创建线程
格式如下
threading.Thread(group=None, target=None, name=None, args=(), kwargs={})
这个构造器必须用关键字传参调用
- group 线程组
- target 执行方法
- name 线程名字
- args target执行的元组参数
- kwargs target执行的字典参数Thread对象...
分类:
编程语言 时间:
2015-03-17 15:52:53
阅读次数:
191
话不多说先上图:
类似于这样的效果,很简单。这是一个listview,item是自定义的view,有两个特点:
传入长度,动态改变柱状图的长度;根据长度改变色值,长度越长越红,反之越黄。
用到的知识点无非是paint在canvas上画图,这里不赘述,想了解但是不了解的童鞋可以看我上一篇日志。
传送门:http://blog.csdn.net/zhaoyingkun/arti...
分类:
移动开发 时间:
2015-03-17 15:52:46
阅读次数:
188
SecurityContextHolder, SecurityContext和Authentication
SecurityContextHolder是SpringSecurity最基本的组件了,是用来存放SecurityContext的对象,默认是使用ThreadLocal实现的,这样就保证了本线程内所有的方法都可以获得SecurityContext对象。
SecurityContext...
分类:
编程语言 时间:
2015-03-17 15:52:04
阅读次数:
253
1584 - Circular Sequence
Some DNA sequences exist in circular forms as in the following figure, which shows a circular sequence ``CGAGTCAGCT", that is, the last symbol ``T" in ``CGAGTCAGCT" is conn...
分类:
其他好文 时间:
2015-03-17 15:50:25
阅读次数:
156
1.打开两个模拟器:
在命令行中定位到SDk的tools下面,输入emulator -data foo 启动两个模拟器。
2.确定其中一个作为服务器:
需要让android模拟器作为服务器之前检测两个模拟器是否正常其命令语句:adb devices 之后在把其中一个设置为服务器。其命令行语句为:telnet localhost +模拟器的名称例如:telnet localhost 5554 :中的“5554”即为模拟器的名称。显示“OK”之后继续执行一下语句:redir add tcp:8...
分类:
移动开发 时间:
2015-03-17 15:52:04
阅读次数:
164
Given two binary trees, write a function to check if they are equal or not.
Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
这道题是要判断两棵树是不...
分类:
其他好文 时间:
2015-03-17 15:49:15
阅读次数:
88
swfupload 文件上传,解决 文件太多问题。 You have ettempted to queue to many files.You may select one files....
分类:
其他好文 时间:
2015-03-17 15:50:42
阅读次数:
157