摘要: 题目描述: 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 阅读全文
posted @ 2016-06-07 21:28 godlei 阅读(174) 评论(0) 推荐(0)
摘要: 题目描述: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see 阅读全文
posted @ 2016-06-07 19:55 godlei 阅读(200) 评论(0) 推荐(0)
摘要: 题目描述: You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if and only if both 阅读全文
posted @ 2016-06-07 12:06 godlei 阅读(568) 评论(0) 推荐(0)
摘要: 使用hibernate开发持久层时,我们会发现:虽然entity类的含义和需求不同,其对应的Dao层类对应的方法也是不同的。但是有许多方法操作确实相同的。比如实体的增加,删除,修改更新,以及许多常用的查询方法。这些都是可复用的。因此可以把这些操作写在一个BaseDao中,其他的dao都继承于这个Da 阅读全文
posted @ 2016-06-07 01:39 godlei 阅读(4830) 评论(1) 推荐(3)
摘要: 题目描述: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complex 阅读全文
posted @ 2016-06-07 01:21 godlei 阅读(246) 评论(0) 推荐(0)
摘要: 每次写一个新的web项目时都要写配置文件。比较麻烦,现在把常用到的配置文件记录下来,方便以后使用 web.xml App-servlet.xml: applicationContext.xml: 阅读全文
posted @ 2016-06-06 10:41 godlei 阅读(1343) 评论(0) 推荐(2)
摘要: 题目描述: Given a string, find the length of the longest substring without repeating characters. 解题思路: 这个题我认为还是比较有难度的,解题的关键在于理解对于一串数字a[0],a[1],……a[m],……a[ 阅读全文
posted @ 2016-06-05 18:38 godlei 阅读(228) 评论(0) 推荐(0)
摘要: 最近因为项目的要求,需要使用httpclient来发送请求。但是查阅了许多博客,大家发送请求的方法各不相同。原因是因为httpclient的jar包的不同版本,其内部方法也不相同。因此抛开具体用到的jar包而直接复制方法是没有意义的,很容易出现找不到方法的情况。所以在此给出用到的jar包,和在这个j 阅读全文
posted @ 2016-06-05 14:46 godlei 阅读(7221) 评论(1) 推荐(2)
摘要: 题目描述: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a s 阅读全文
posted @ 2016-06-05 14:31 godlei 阅读(253) 评论(0) 推荐(1)
摘要: 1.修改端口号 打开tomcat的service.xml文件; 找到<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>这句话,把8080改为你想要设置的端口号即可。 2. 阅读全文
posted @ 2016-06-05 11:04 godlei 阅读(411) 评论(0) 推荐(0)