什么是冒泡:简单的说就是触发一个子容器的事件,父容器的事件也会跟着被触发。 parent child在child和parent上分别添加了alert(‘child’)和alert(‘parent’)事件,这个时候假如我们点击child,会先执行alert(‘child’),然后父元素的aler...
分类:
编程语言 时间:
2014-10-22 17:46:07
阅读次数:
216
参考:http://www.geeksforgeeks.org/inorder-tree-traversal-without-recursion-and-without-stack/
1. Initialize current as root
2. While current is not NULL
If current does not have left child
a)...
分类:
其他好文 时间:
2014-10-22 14:38:08
阅读次数:
187
用jQuery判断一个元素是否显示用jQuery判断一个元素是否显示:$(element).is(":visible");类似的,判断一个元素是不是第一个子元素:$(element).is(":first-child") 判断一个checkbox元素是否选中:$(elemen...
分类:
Web程序 时间:
2014-10-22 12:35:16
阅读次数:
240
:first:选择第一个出现符合的元素:first-child:选择限制条件中的第一个元素,并且必须和冒号前面的标签一致:first-of-type:选择所有限制条件下的第一个冒号前面的标签元素,此标签可以不是第一个测试:first代码:123Hello1Hello2Hello3Hello4Hell...
分类:
Web程序 时间:
2014-10-21 19:21:53
阅读次数:
194
使用BaseExpandableListAdapter 可以实现所谓的可折叠的列表,例如QQ里好友的分组的功能。
基于基于BaseExpandableListAdapter扩展的ExpandableList用法,现在网上流行的主要有两种:第一种是向BaseExpandableListAdapter传入两个数组,第一个是表示Group(目录头)信息的一维数组,第二个是表示Child(目录子项)...
分类:
移动开发 时间:
2014-10-21 17:50:42
阅读次数:
187
设计意图:初始化一次spawn对象,执行ssh后下发,一系列cmds。网上大部分时通过sshroot@ipcmd的方法,这样的话,我就之需要通过for调用:defSSH_COMMANDS(ip,user,passwd,command):
try:
ssh_pc=pexpect.spawn(‘ssh%s@%s%s‘%(user,ip,command),timeout=5,logfile=logfile)
...
..
分类:
编程语言 时间:
2014-10-21 15:37:09
阅读次数:
658
============问题描述============ 我有一百条groupview(父listview),点击展开后每一条groupview下面显示的childview(子listview)里的每一行数据不同而且行数也不同数据是从sqlite得到的怎么弄? ...
分类:
其他好文 时间:
2014-10-19 22:45:21
阅读次数:
163
JavaScript中模仿接口有三种方法1. 注释法/*interface Composite(){ function add(child); function remove(child); function getChild(index);}interface FormItem(...
分类:
编程语言 时间:
2014-10-19 11:24:53
阅读次数:
186
Implement insert and delete in a tri-nary tree. A tri-nary tree is much like a binary tree but with three child nodes for each parent instead of two -...
分类:
其他好文 时间:
2014-10-19 02:40:16
阅读次数:
236
点击AlertDialog 关闭之后再点击报错:The specified child already has a parent. You must call removeView() on the child's parent first.意思是这个子view 已经有个父view了,你现在要使用的...
分类:
其他好文 时间:
2014-10-18 13:50:44
阅读次数:
170