- 博客(11)
- 资源 (15)
- 问答 (1)
- 收藏
- 关注
原创 leetcode——Distinct Subsequences
题目:Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from the original string by deleting some (c
2015-01-31 21:15:56 618
原创 Eclipse集成Tomcat及配置
1、集成Eclipse中点击Windows——>Preference——>Server——>RuntimeEnvironment出现如下界面,点击Add按钮,选择tomcat版本,并勾选createNewLocalServer,点击next按照向导安装即可。2、更改配置(安装路径、发布路径等)由于集成之后的tomcat是由eclipse进行托管,因此tomcat的默
2015-01-25 13:54:07 1247
原创 使用spring 2.5.6初探mvc框架
1. Project Dependencyspring 2.5.6所有包: spring 2.5.6 全集下载commons-logging-1.1.3.jar: commons-logging-1.1.3下载2. Controller & Mapping从2.5开始,spring开始支持@RequestMapping标注,可对符合的url路径进行判别
2015-01-21 21:50:01 1854
原创 leetcode——Dungeon Game
题目:The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K) was in
2015-01-20 11:14:41 1023
原创 leetcode——Factorial Trailing Zeroes
题目:Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.思路:在1到n这些数字中,能够贡献多少个因子5,就有多少个0.因为0是由10得到的,而10=2*5;显然2的数量远
2015-01-20 10:15:53 1285
原创 leetcode——Largest Number
题目:Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330.Note: The result ma
2015-01-19 16:48:14 664
原创 Spring常用注解
常用注解有以下几种:@Autowired@Qualifier("")@Repository@Service@Component@Controller@WebServelet@Entity@Table(name="")@Id@Column(length=)@GeneratedValue(strategy=GenerationType.AUTO)@S
2015-01-14 14:54:51 1217
转载 为什么网页Cookies用了曲奇饼干这个词?
这个名称是UNIX操作系统的“magic cookie”的简称。 “magic cookie”1994年已经被程序猿Lou Montulli用于计算时的网络通信 而“magic cookie”,是在程序中交流的一个令牌或者短报文数据。使用它的Web开发人员,可以帮助用户浏览他们的网站,有效地执行某些功能。 取名曲奇有取之“小而美味”的意思。 Cook
2015-01-13 13:25:40 1449
原创 Java 中的try-catch-finally
java 的异常处理中,在不抛出异常的情况下,程序执行完 try 里面的代码块之后,该方法并不会立即结束,而是继续试图去寻找该方法有没有 finally 的代码块,如果没有 finally 代码块,整个方法在执行完 try 代码块后返回相应的值来结束整个方法;如果有 finally 代码块,此时程序执行到 try 代码块里的 return 语句之时并不会立即执行 return,
2015-01-07 23:20:03 528
原创 Java 8 中HashMap的改进
HashMap的快速高效,使其使用非常广泛。其原理是,调用hashCode()和equals()方法,并对hashcode进行一定的哈希运算得到相应value的位置信息,将其分到不同的桶里。桶的数量一般会比所承载的实际键值对多。当通过key进行查找的时候,往往能够在常数时间内找到该value。但是,当某种针对key的hashcode的哈希运算得到的位置信息重复了之后,就发生了哈希碰撞。这会对H
2015-01-07 22:51:52 1556
原创 Java 中的多态和动态绑定
在Java中,如果一个类B继承了类A,则A为父类,B为子类。在运行的时候,系统能够根据具体的子类对象,将父类中用于指向某个方法的指针自动指向到该子类的“覆盖方法”上,从而调用这个“覆盖方法”运行。该现象就是后期绑定,即在运行时根据对象的类型进行绑定,也叫动态绑定或者运行时绑定。这样做的好处是具有拓展性,调用的时候可以仅仅使用父类调用,而不用关心子类到底是什么,只要子
2015-01-07 22:42:39 530
spring4.0.0.RELEASE全套jar包
2015-06-05
lucene 3.0.1 jar包
2015-01-09
一个音乐网站爬虫
2014-08-27
ja v a 泛型中的擦除问题
2014-11-24
TA创建的收藏夹 TA关注的收藏夹
TA关注的人