07 2013 档案
摘要:console.group('分组1');console.table( [ {key1: 1,key2: 2,key3: 3}, {key1: 1,key2: 2,key3: 3}, {key1: 1,key2: 2,key3: 3} ], ['key1', 'key2'] /*可选:要显示的key,其它忽略*/);console.groupEnd('分组1');//-------------------------console.groupCollapsed('分组2'); /*默认关闭的分组*/console.
阅读全文
摘要:打开调试器,切换到timer,点击左下角的record按钮开始,切换到memory视图,在文档中点击鼠标左右键,看股价走势图function Allocate(kbs){ this.mem = new Array(kbs * 1024 + 1).join(' '); this.destroy = function(){ this.mem = null; }}var located = [];window.onload = function(){ document.body.oncontextmenu = function(){ if(!loc...
阅读全文
摘要:# ~/.bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then . ~/.bashrcfi# User specific environment and startup programsnone="\033[0m"black="\033[0;30m"dark_gray="\033[1;30m"blue="\033[0;34m"light_blue="\033[1;34m"green="\033[0;32
阅读全文
摘要:ls | xargs -I @ gm convert -resize 50%x50% @ ../20130706-20130707\ 南澳西涌_50%/@看了很多说明上都在用-i,这是一个已经废弃了的参数
阅读全文
摘要:对于“JavaScript 函数参数是传值(byVal)还是传址(byRef)”这个问题,普遍存在一个误区:number,string等“简单类型”是传值,Number, String, Object, Array等“复杂类型”是传址。
这样不对吗?为什么会有这样的误区?
阅读全文
摘要:function getServerNow(){ return new Date(new Date() + svrMinusLocal);}svrMinusLocal是服务器时间减本地时间的时间差,这代码有什么问题?console.log(new Date() + 1); // 这里的new Date()会返回字符串与"1"连接起来console.log(new Date() - 1); // 这里的new Date()会返回数字与数字1相减得到一个数字// 个人猜测 自动转换类型中, toString 比 valueOf 优先?于是做了如下实验var autoType =
阅读全文

浙公网安备 33010602011771号