//父类function Father(){ this.width=10; this.data=[1,2,3]; this.key="this is Father";}//子类function Child(){}//方法1Child.prototype=new Father();//方法2Ch...
分类:
其他好文 时间:
2014-12-27 12:35:49
阅读次数:
95
今天碰到一个问题,用node.js 执行shell命令时,会碰到有空格的目录和文件名。
按照常识应该要escape,当然可以自己写escape,但是要想处理复杂的escape,不是那么容易的。那么系统有没有提供呢?
google后发现可以使用
child_process.execFile(file, [args], [options], [callback])
中的args数组来帮自己...
分类:
Web程序 时间:
2014-12-26 16:44:11
阅读次数:
185
selinux导致故障一例
这样的报错还是第一次遇到,排查过程没有头绪,一直纠结在child setpgid这个地方,还好在google过程中看到有人在设置selinux的时候的相关案例,于是想到从这方面入手。
原因为selinux开启导致的,但是比较诡异的是从别的terminal ssh 跳转过去之后无法执行任何操作,包括配置selinux,后来还是从后台远程管理口登陆上去之后设置并重启,彻...
分类:
系统相关 时间:
2014-12-26 14:36:39
阅读次数:
210
题目:(Greedy)There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the foll...
分类:
其他好文 时间:
2014-12-26 06:10:48
阅读次数:
261
linearLayout中包含有weight的child时,linearLayout会measure两次:第一次 测量 child 的 原始值:第二次 测量 child 的 比重值:然后将2次测量的值相加,得到child 的具体的宽 或 高。//---------------------------...
分类:
移动开发 时间:
2014-12-25 20:00:22
阅读次数:
246
在一个7x7的表格当中nth-child(1); td.parents("table").find("tr :nth-child(1)").css("background-color", "blue");得到eq(1);td.parents("table").find("tr :eq(1)").cs...
分类:
Web程序 时间:
2014-12-25 17:40:33
阅读次数:
168
当子元素浮动时无法撑开父元素,父元素高度为0。这时可以通过在浮动的子元素后清除浮动来使父元素获得正确的高度。 child
分类:
其他好文 时间:
2014-12-24 19:51:41
阅读次数:
179
Windows xp sp3 Unable to modify the parent container element before the child element is closed (KB927917)PowerPointFrame.aspx安装 KB2416400补丁,搞定IE8补丁:h...
分类:
其他好文 时间:
2014-12-23 12:08:50
阅读次数:
181
今天学习jQuery,看到nth-child(even)用法,特意找了下这个选择器的用法,在CSS3标准中,用法很强大。对此,我把CSS3标准中nth-child()用法大致介绍下:CSS3伪类选择器:nth-child()简单的归纳下nth-child()的几种用法。第一:nth-child(nu...
分类:
Web程序 时间:
2014-12-23 10:12:48
阅读次数:
174
Android的layoutInflate.inflate ()方法讲解,每个参数对应什么状况。为什么会有he specified child already has a parent. You must call removeView()。...
分类:
移动开发 时间:
2014-12-22 19:39:24
阅读次数:
331