考虑使用静态工厂方法来替代构造方法, 这样的做的好处有四点.1.
更好的表意有的构造方法实际上有特殊的含义, 使用静态工厂方法能更好的表达出他的意思. 例如BigInteger(int, int, Random),
它返回一个可能是素数的 BigInteger. 使用工厂方法 BigInteger....
分类:
编程语言 时间:
2014-06-09 16:13:02
阅读次数:
347
1.程序运行后异常显示:解决方案:在项目上点击右键->properties->Java
Build Path,remove掉Android Dependences即可
分类:
编程语言 时间:
2014-06-09 00:52:35
阅读次数:
247
js中的类工厂就是因为js中一直没有真正的类。创建类工厂是为了模拟类,类工厂的主要部分就是prototype的扩展和返回一个基本的用来new的函数prototype扩展首先是prototype的扩展,可以用一个简单的for...in...循环来实现。for(var
item in from){ .....
分类:
Web程序 时间:
2014-06-08 23:21:09
阅读次数:
410
據說小学生几秒就做出;高中生几分钟;大学生半小时以上;博士可能要一辈子......What
takes an elementary school student just seconds to do; takes a high school
student several minutes; take...
分类:
其他好文 时间:
2014-06-08 20:10:07
阅读次数:
222
未翻译完 待续(英语烂,求斧正)Type Casting类型转换Type casting is
a way to check the type of an instance, and/or to treat that instance as if it
is a different supercla...
分类:
其他好文 时间:
2014-06-08 19:50:25
阅读次数:
269
Android界面中有时候需要显示稍微复杂的界面时,就需要我们自定义一个adapter,而此adapter就要继承BaseAdapter,重新其中的方法.
Android中Adapter类其实就是把数据源绑定到指定的View上,然后再返回该View,而返回来的这个View就是ListView中的某一行item。
这里返回来的View正是由我们的Adapter中的getView方法返回的。这样就...
分类:
其他好文 时间:
2014-06-08 18:27:09
阅读次数:
203
题目
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this binary tree is symmetric:
1
/ 2 2
/ \ / 3 4 4 3
...
分类:
其他好文 时间:
2014-06-08 18:12:04
阅读次数:
248
extjs4 tree check 级联选择 实现效果:关键代码:
function changeAllNode(node, isCheck) {
allChild(node, isCheck);
allParent(node, isCheck);
function allChild(nodec, isCheckc) {
var chileNodes = n...
分类:
Web程序 时间:
2014-06-08 15:25:20
阅读次数:
222
股票价格涨跌趋势,常用蜡烛图技术中的K线图来表示,分为按日的日K线、按周的周K线、按月的月K线等。以日K线为例,每天股票价格从开盘到收盘走完一天,对应一根蜡烛小图,要表示四个价格:开盘价格Open(早上刚刚开始开盘买卖成交的第1笔价格)、收盘价格Close(下午收盘时最后一笔成交的价格)、中间的最高价High和最低价Low。
如果CloseOpen,表示为“R-Hollow”(即“空心红蜡烛...
分类:
其他好文 时间:
2014-06-08 15:19:29
阅读次数:
180
你刚学会ArrayAdapter、SimpleAdapter
后来你学会了BaseAdapter,你觉得你可以写好多东西了
后来你又学会了下拉刷新,上拉加载,你觉得你会了很多了
再后来,你解决了ListView的item带有checkbox的问题,你觉得对于ListView掌握的差不多了。
突然有一天,你碰到一个特别简单的问题:怎么根据item的控件值来获取控件?
请你告诉我,怎...
分类:
其他好文 时间:
2014-06-08 02:21:50
阅读次数:
225