摘要: 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. 阅读全文
posted @ 2013-07-29 15:34 Arliang 阅读(351) 评论(1) 推荐(0) 编辑
摘要: 打开调试器,切换到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... 阅读全文
posted @ 2013-07-24 23:24 Arliang 阅读(287) 评论(0) 推荐(0) 编辑
摘要: # ~/.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 阅读全文
posted @ 2013-07-11 11:14 Arliang 阅读(500) 评论(0) 推荐(0) 编辑
摘要: ls | xargs -I @ gm convert -resize 50%x50% @ ../20130706-20130707\ 南澳西涌_50%/@看了很多说明上都在用-i,这是一个已经废弃了的参数 阅读全文
posted @ 2013-07-08 00:54 Arliang 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 对于“JavaScript 函数参数是传值(byVal)还是传址(byRef)”这个问题,普遍存在一个误区:number,string等“简单类型”是传值,Number, String, Object, Array等“复杂类型”是传址。 这样不对吗?为什么会有这样的误区? 阅读全文
posted @ 2013-07-02 13:57 Arliang 阅读(3253) 评论(9) 推荐(1) 编辑
摘要: 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 = 阅读全文
posted @ 2013-07-02 11:59 Arliang 阅读(584) 评论(0) 推荐(0) 编辑
摘要: 下载相应的lib,编译安装就行了cd ~#下载包wget http://www.imagemagick.org/download/delegates/zlib-1.2.7.tar.gzwget http://www.imagemagick.org/download/delegates/libpng-1.6.2.tar.gzwget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/delegates/libjpeg-6b.tar.gzwget http://downloads.sourceforge.net/project/graphicsmagi 阅读全文
posted @ 2013-06-24 10:19 Arliang 阅读(11523) 评论(0) 推荐(0) 编辑
摘要: 在用jQuery.upload的时候遇到一个跨域的错误提示,似乎是top中设置了document.domain="abc.com",而iframe中没有这样的设置(iframe也是abc.com)导致无法读取innerHTML。最后换成由服务端返回script片段解决<script>document.domain = "abc.com";top.callback( /* response data */);</script> 阅读全文
posted @ 2013-05-29 17:57 Arliang 阅读(430) 评论(0) 推荐(0) 编辑
摘要: 每次运行到断点下一行,$fileBtn就不见了。。。最后才发现,是右边的监视变量改变了$fileBtn。---都说了是“监视变量”,活该在监视变量中写了修改的代码 @_@---以后得注意了 阅读全文
posted @ 2013-05-20 15:15 Arliang 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Useful chainable methods of cursor. These can optionally be options offindinstead of method calls:.limit(n).skip(m)to control paging..sort(fields)Order by the given fields. There are several equivalent syntaxes:.sort({field1: -1, field2: 1})descending by field1, then ascending by field2..sort([[' 阅读全文
posted @ 2013-05-17 18:44 Arliang 阅读(4386) 评论(0) 推荐(0) 编辑