摘要: 1. 用局部变量存储本地范围之外的变量值,如果它们在函数中的使用多于一次。 2. 实例成员与原型成员的关系hasOwnProperty 3. 一般来说,将经常使用的对象成员,数组项,和域外变量存入局部变量中。然后访问局部变量的速度会快于那些原始变量; Dom操作: 1. 访问Dom次数越多,代码执行 阅读全文
posted @ 2018-10-11 09:47 MakeCoder 阅读(319) 评论(0) 推荐(0) 编辑
摘要: 1. 自定义console 另外可以更改样式: " text-shadow: 0 1px 0 #ccc,0 2px 0 #c9c9c9,0 3px 0 #bbb,0 4px 0 #b9b9b9,0 5px 0 #aaa,0 6px 1px rgba(0,0,0,.1),0 0 5px rgba(0, 阅读全文
posted @ 2018-09-18 00:19 MakeCoder 阅读(766) 评论(0) 推荐(0) 编辑
摘要: function Emitter(){ this._listener = []; } Emitter.prototype.bind = function(eventName, callback){ let listener = this._listener[eventName] || []; listener.push(callback); this._listener[eventN... 阅读全文
posted @ 2018-05-25 09:27 MakeCoder 阅读(1025) 评论(0) 推荐(0) 编辑
摘要: public static class HttpClientHelper { public static HttpClient GetXXXClient() { return GetHttpClient(ConfigurationManager.AppSettings["xxxxRESTService"]); } ... 阅读全文
posted @ 2017-12-14 23:10 MakeCoder 阅读(5333) 评论(0) 推荐(1) 编辑
摘要: GNU General Public License 商业软件不能使用GPL协议的代码。 GNU Lesser General Public License 商业软件可以使用,但不能修改LGPL协议的代码。 BSD License 商业软件可以使用,也可以修改使用BSD协议的代码。 MIT Lice 阅读全文
posted @ 2017-12-06 09:22 MakeCoder 阅读(1537) 评论(0) 推荐(1) 编辑
摘要: 1. 下面是考察JS的上下文环境中的变量以及函数提前问题: 结果输出,f a(){ console.log(10) }, 结果是执行到a()时候出错,因为a被重新赋值为3,已经不是函数,所以执行a()出错。 这里需要注意一点是,js上下文提前的时候,函数的优先级比变量优先级高; 2. 主要考察闭包问 阅读全文
posted @ 2017-12-02 17:52 MakeCoder 阅读(129) 评论(0) 推荐(0) 编辑
摘要: git rm -r --cached . git add . git commit -m 'update .gitignore' 阅读全文
posted @ 2017-09-26 17:49 MakeCoder 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 1. 用来检测TCP连接和SSL连接分别耗费的时间: curl -w "TCP handshake: %{time_connect}, SSL handshake: %{time_appconnect}\n" -so /dev/null https://www.alipay.com 阅读全文
posted @ 2017-03-16 20:35 MakeCoder 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 循环中执行setTimeout代码,1,2为并行,不保证执行顺序,效率高 阅读全文
posted @ 2017-03-15 20:16 MakeCoder 阅读(544) 评论(0) 推荐(0) 编辑
摘要: var arr = [1000, 3000, 500]; function next() { var d = jQuery.Deferred(), i = 0, doNext = function () { if (i < arr.length) { console.log(arr[i] + "------... 阅读全文
posted @ 2017-03-15 20:14 MakeCoder 阅读(647) 评论(0) 推荐(0) 编辑