摘要: 1、回调函数 fn1( fn2 ); 2、事件监听 3、发布-订阅 4、 promises 5、generator 6、 async 函数 阅读全文
posted @ 2017-09-18 16:43 王小窝 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 、istanbul 和 mocha 结合进行nodejs测试的时候最后执行 istanbul cover _mocha test.sqrt.js的时候报错 如图: 用 ../node_modules/mocha/bin/_mocha 代替 _mocha 即,执行的命令为 istanbul cover 阅读全文
posted @ 2017-09-15 15:20 王小窝 阅读(1179) 评论(0) 推荐(0) 编辑
摘要: windows 下 1、查询端口占用的进程ID: netstat -aon | findstr "80" 80为端口号, 输出为: TCP 0.0.0.0:3000 0.0.0.0:0 LISTENING 10820 2、查看端口号所对应的应用程序: tasklist | findstr " 108 阅读全文
posted @ 2017-09-15 11:07 王小窝 阅读(299) 评论(0) 推荐(0) 编辑
摘要: Document 1admin 23程序员 天津admin@kali.com 2guest 23测试员 北京guest@kali.com --> 【表格举例】 列-A ... 阅读全文
posted @ 2017-04-07 11:49 王小窝 阅读(3295) 评论(0) 推荐(0) 编辑
摘要: 根据容器的边框定位 例如:容器的盒模型如下:设置了padding:20px;border:rgba(0,0,0,0.5) solid 10px; 阅读全文
posted @ 2017-01-13 15:09 王小窝 阅读(2204) 评论(0) 推荐(0) 编辑
摘要: contain:包含 按比例调整图片,使得图片的宽度自适应容器的宽度。 相当于在ps中,约束比例设置原始图片的宽度值等于容器的宽度值。 如果图片过大,等比压缩后容器的高度方向上可能会有空白。 cover:覆盖 相当于ps中,约束比例设置原始图片的高度等于容器的高度。 得到的图片的宽度可能会大于容器的 阅读全文
posted @ 2017-01-13 13:29 王小窝 阅读(162) 评论(0) 推荐(0) 编辑
摘要: http://www.ruanyifeng.com/blog/2013/11/stack.html 阅读全文
posted @ 2017-01-09 12:45 王小窝 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 原文链接:http://www.ruanyifeng.com/blog/2010/04/using_this_keyword_in_javascript.html this是js语言的几个关键字,代表函数运行时,自动生成的一个内部对象,只能在函数内部使用。 比如 随着函数使用场合不同,this的值发 阅读全文
posted @ 2016-11-02 17:17 王小窝 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 一、封装 原文链接:http://www.ruanyifeng.com/blog/2010/05/object-oriented_javascript_encapsulation.html 1.1 原始模型 这就是最简单的封装了,把两个属性封装在一个对象中,但是这样的封装有两个缺点 1、如果写多个实 阅读全文
posted @ 2016-11-02 12:26 王小窝 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 原文链接:https://my.oschina.net/u/2331760/blog/468672?p={{currentPage+1}} 函数基本概念: 函数声明:function box(){} 函数表达式:var box = function(){}; 匿名函数:function(){} 属于 阅读全文
posted @ 2016-10-31 18:21 王小窝 阅读(16018) 评论(0) 推荐(2) 编辑