ES5中的回调地狱了解吗?如a回调b,b回调c,c回调d……层层回调,就叫回调地狱 //异步,回调函数 //1 function loadScript(src,callback){ let script=document.createElement('script'); script.src=src ...
分类:
其他好文 时间:
2020-06-04 01:14:51
阅读次数:
57
题目如下: You are given an integer num. You will apply the following steps exactly two times: Pick a digit x (0 <= x <= 9). Pick another digit y (0 <= y < ...
分类:
其他好文 时间:
2020-06-03 23:33:43
阅读次数:
70
var arr1 = [1,2,3,-1]var arr2 = [4,5,6,7,8,9,10,12,13,14,15,16,17,18,29,30,31,32,33,34,35,36,37,38,39,40]var arr = arr1.concat(arr2)借用apply方法 ,push、sp ...
分类:
其他好文 时间:
2020-06-03 15:59:32
阅读次数:
131
1 决定this指向的是函数执行的时候,而不是函数声明的时候。 2 谁调用的函数,this就指向谁,class和构造函数也适用,this指向实例。 3 箭头函数不改变this指向,this是上级函数作用域的this。 4 fn1.call({x:1}),用call函数调用,this就是传入{x:1} ...
分类:
其他好文 时间:
2020-06-03 00:57:25
阅读次数:
80
1.call 实现(apply 类似) Function.prototype.call= function(context){ context = context || window; context.fn = this; let args =[]; for(let i=1;i<arguments. ...
分类:
编程语言 时间:
2020-06-03 00:54:51
阅读次数:
83
https://router.vuejs.org/zh/guide/essentials/dynamic-matching.html#%E5%93%8D%E5%BA%94%E8%B7%AF%E7%94%B1%E5%8F%82%E6%95%B0%E7%9A%84%E5%8F%98%E5%8C%96 之 ...
分类:
其他好文 时间:
2020-06-02 23:09:07
阅读次数:
112
DOM元素使用addEventListener绑定事件的时候经常会碰到想把当前作用域传到函数内部,可以使用以下两种放下: var bindAsEventListener=function (object, fun) { return function(event){ return fun.call( ...
分类:
其他好文 时间:
2020-06-02 23:04:02
阅读次数:
140
ERROR 1 : Running migrations: No migrations to apply. No changes detected Running migrations: No migrations to apply. 成功之后,数据库会新增多张表: ...
分类:
数据库 时间:
2020-06-02 22:57:55
阅读次数:
118
为什么需要Helm? K8S上的应用对象,都是由特定的资源描述组成,包括deployment、service等。都保存各自文件中或者集中写到一个配置文件。然后kubectl apply –f 部署。 如果应用只由一个或几个这样的服务组成,上面部署方式足够了。 而对于一个复杂的应用,会有很多类似上面的 ...
分类:
其他好文 时间:
2020-06-02 13:01:00
阅读次数:
79
1. Run [Start] - [Server Manager] and Click [Tools] - [Internet Information Services (IIS) Manager]. 2. Select Hostname on the left pane and Click [FT ...
分类:
其他好文 时间:
2020-06-02 12:59:21
阅读次数:
80