单例模式是一种比较简单的模式,其定义是ensure a class has only one intance ,and provide a global point of access to it .(取保某一个类只有一个实例,并自行是实例化,并向整个系统提供这个实例)主要分为2种模式,饿汉式和懒汉...
分类:
其他好文 时间:
2015-10-12 00:29:26
阅读次数:
131
The file named errorlog is too largeThe file named errorlog is too large1 ProblemOne day, when I install android-sdk, I found that one error "NO space...
分类:
其他好文 时间:
2015-10-11 14:10:17
阅读次数:
153
servlet的编程步骤:1:建立servlet类package com.baidu.one;import java.io.IOException;import javax.servlet.ServletException;import javax.servlet.http.HttpServlet;...
分类:
其他好文 时间:
2015-10-11 01:38:39
阅读次数:
213
JavaScript里面函数的参数都是arguments对象,如果有形式参数,那么就可以把形式参数当做arguments对象的属性,调用形式参数,既可以用属性名,如: function fuck(One, Two){ alert(One); alert(Two);}也可以用argu...
分类:
编程语言 时间:
2015-10-11 00:18:00
阅读次数:
238
Given an array containingndistinct numbers taken from0, 1, 2, ..., n, find the one that is missing from the array.For example,Givennums=[0, 1, 3]retur...
分类:
其他好文 时间:
2015-10-10 21:22:39
阅读次数:
166
文档模型关系 Model One-to-One Relationships with Embedded Documents Overview Pattern Model One-to-Many Relationships with Embedded Documents Overview Patter...
分类:
数据库 时间:
2015-10-10 17:21:00
阅读次数:
205
Here is the mind flow: we don't know 1st token right? then we try it one by one - recursively.typedef unordered_map HMap;class Solution { bool go(s...
分类:
其他好文 时间:
2015-10-10 15:20:36
阅读次数:
120
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity...
分类:
其他好文 时间:
2015-10-10 12:00:43
阅读次数:
125
题目:
Given an array nums containing n +
1 integers where each integer is between 1 and n (inclusive),
prove that at least one duplicate number must exist. Assume that there is only one duplicate n...
分类:
其他好文 时间:
2015-10-10 10:41:33
阅读次数:
206
There is a fence with n posts, each post can be painted with one of the k colors.You have to paint all the posts such that no more than two adjacent f...
分类:
其他好文 时间:
2015-10-10 09:06:22
阅读次数:
307