多态的概念 多态==晚绑定。 不要把函数重载理解为多态。 因为多态是一种运行期的行为,不是编译期的行为。 多态:父类型的引用可以指向子类型的对象。 比如 Parent p = new Child(); 当使用多态方式调用方法时,首先检查父类中是否有该方法,如果没有,则编译错误; ...
分类:
编程语言 时间:
2014-08-07 18:40:00
阅读次数:
238
在android开发过程中,对于控件的高度,宽度,虽然在xml中用android:layout_height="match_parent"设置了 高度(match_parent和fill_parent是一样的,2.2版本后就用match_parent代替fill_parent了。)但有时, 程序需要...
分类:
移动开发 时间:
2014-08-07 12:27:09
阅读次数:
324
case描述: innodb中,父表和子表通过foreign constraint进行关联, 因为在更新数据时需要check 外键constraint,如果父表被大量的子表reference, 那么在open的时候,需要open所有的child table和所有的foreign const...
分类:
数据库 时间:
2014-08-06 18:38:21
阅读次数:
298
Cannot delete or update a parent row: a foreign key constraint fails (`myreview/zmax_text`, CONSTRAINT `zmax_text_ibfk_1` FOREIGN KEY (`lang`) REFEREN...
分类:
其他好文 时间:
2014-08-06 17:36:52
阅读次数:
277
1问题:FragmentStatePagerAdapter+viewpager第二次进入该fragment不显示数据解决方法:在含有ViewPager的Fragment的onCreateView方法中添加代码:if(view!=null){ ViewGroupparent=(ViewGroup)view.getParent(); if(parent!=null){ parent.removeView(view); } ret..
分类:
移动开发 时间:
2014-08-05 22:56:31
阅读次数:
302
child_of此操作符,从代码来看,等价于:[('x','child_of',id)] ==> x.prarent_left >=id.parent_left && x.parent_left categ_id.prarent_left >=id.parent_left && categ_id.....
分类:
其他好文 时间:
2014-08-05 22:07:40
阅读次数:
377
删除:1、org.springframework.dao.DataIntegrityViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`life`.`tb_ad`, CO...
分类:
系统相关 时间:
2014-08-05 22:00:30
阅读次数:
288
onItemSelected(AdapterView parent, View v, int position, long id) { TextView v1 = (TextView)v; v1.setTextColor(Color.WHITE); //可以随意设置自己要的颜色值 }本文转自:ht....
分类:
其他好文 时间:
2014-08-05 15:30:59
阅读次数:
233
DOM event delegation is a mechanism of responding to ui-events via a single common parent rather than each child, through the magic of event "bubbling" (aka event propagation).
When an event is tri...
分类:
其他好文 时间:
2014-08-05 14:06:30
阅读次数:
259
树的3种常用链表结构1 双亲表示法(顺序存储结构)优点:parent(tree, x)操作可以在常量时间内实现缺点:求结点的孩子时需要遍历整个结构用一组连续的存储空间来存储树的结点,同时在每个结点中附加一个指示器(整数域) ,用以指示双亲结点的位置(下标值) 。图所示是一棵树及其双亲表示的存储结构。...
分类:
编程语言 时间:
2014-08-05 00:30:18
阅读次数:
414