输出 truewww.baidu.com/a.js ...
分类:
其他好文 时间:
2016-11-08 01:49:06
阅读次数:
232
如何在一个网站或者一个页面,去书写你的js代码:1.js的分层(功能):jquery(tool) 组件(ui) 应用(app),mvc(backboneJs)2.js的规划():避免全局变量和方法(命名空间,闭包,面向对象),模块化(seaJs,requireJs) 常用内部类:Data Array ...
分类:
Web程序 时间:
2016-11-08 00:52:58
阅读次数:
435
Description Given n integers. You have two operations: U A B: replace the Ath number by B. (index counting from 0) Q A B: output the length of the lon ...
分类:
其他好文 时间:
2016-11-07 22:24:48
阅读次数:
355
在开发过程中,当一个Linux程序异常退出时,我们可以通过core文件来分析它异常的详细原因。缺省情况下,Linux在程序异常时不产生core文件,要想让程序异常退出时产生core dump文件,需要使用ulimit命令更改coredump的设置: 上面的命令表示在程序异常时产生core dump文 ...
分类:
系统相关 时间:
2016-11-07 12:26:07
阅读次数:
206
// 时间格式化Date.prototype.format = function(format) { /* * eg:format="yyyy-MM-dd hh:mm:ss"; */ var o = { "M+" : this.getMonth() + 1, // month "d+" : this ...
分类:
Web程序 时间:
2016-11-06 02:51:03
阅读次数:
219
就是在今天,发现了一个问题 "0_0 (: /-\ : ) 0-0".replace(/\s/g,'') 结果是"0_0(:/-:)0-0" 本来只是想把空白符删掉的,可是为什么"\"也会被替换掉 忽略了一个小细节,字符串中"\"是转义字符,是无法显示出来的 "0_0 (: /-\\ : ) 0-0 ...
分类:
其他好文 时间:
2016-11-06 02:33:59
阅读次数:
132
10个div点击一个div变绿色,其他都为红色,立即执行函数包裹代码防止全局变量产生选取对象集合如何实现,给每个div添加事件,循环这个对象集合 (在点击的这个div的时候做判断,判断当前的这个div是否是红色,如果是红色就变为绿色, 把所有div变成绿色,再把当前点击的这个div变成红色(所有di ...
分类:
Web程序 时间:
2016-11-05 17:34:40
阅读次数:
249
Add Powershell as Terminal instead of cmd 1.Open VS Code. Select File > Preferences > User Settings: 2. replace terminal.integrated.shell.winows confi ...
分类:
其他好文 时间:
2016-11-05 14:40:19
阅读次数:
215
当前时间和输入时间比较 var timeLong = Date.parse(new Date());//当前时间var t1 = Date.parse($("#returnTime2").val().replace(/-/g, "/")); timeLong是通过js获取当前时间 t1 火狐不支持2 ...
分类:
编程语言 时间:
2016-11-05 11:40:16
阅读次数:
137