摘要: https://labuladong.gitee.io/algo/2/ 阅读全文
posted @ 2021-07-27 10:38 灏月天染 阅读(20) 评论(0) 推荐(0) 编辑
摘要: docker exec -it nginx nginx -t docker exec -it nginx nginx -s reload nginx 指令 nginx -s reopen #重启Nginx nginx -s reload #重新加载Nginx配置文件,然后以优雅的方式重启Nginx 阅读全文
posted @ 2021-05-25 11:41 灏月天染 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 1.ie请求问题 请求相同url,会去拿第一次请求下来缓存的数据,导致更新不及时,显示旧数据 解决方法:在请求拦截处,增加时间戳 2.iconfont在ie上不显示 需要将iconfont的eot,ttf,svg,woff, woff2文件导入到项目中,并在iconfont.css中正确引入文件路径 阅读全文
posted @ 2021-04-21 11:44 灏月天染 阅读(47) 评论(0) 推荐(0) 编辑
摘要: vue中体现缓存函数,用以下代码解释 function cached(fn){ const cache = Object.create(null) return (function cachedFn(str){ const hit = cache[str] return hit || (cache[ 阅读全文
posted @ 2021-02-24 18:03 灏月天染 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 1.页面跳转时,需要明知页面是否时Tab页面,如果是,需要使用switchTab进行跳转 2.onShow和onLoad同时使用问题,如果想实现页面跳转到其他页面,并且返回时需要页面进行刷新,可以使用redirectTo 3.uni.showToast,定义动画展示时间,但是有跳转页面立即跳转,可以 阅读全文
posted @ 2021-01-28 18:41 灏月天染 阅读(111) 评论(0) 推荐(0) 编辑
摘要: var:没有确定的作用域,弱类型,变量提升 let,const: 1.块级作用域 2.变量不允许重复声明 3.暂存式死区(必须先声明才能使用) 4.不能用window变量访问 1.const必须先赋值,赋值后不允许在更改其值 阅读全文
posted @ 2021-01-18 17:33 灏月天染 阅读(38) 评论(0) 推荐(0) 编辑
摘要: /* 使用递归求 a1 = 1,a2 = 2,a3 = a2 + a1,a4 = 4,a5 = a4 + a3,a6 = 6 an 观察到第一项为1 以后偶数项为索引值 其他奇数项和为a - 2 和 a - 1 */function f(n){ if(n == 1){ return 1 } if(n 阅读全文
posted @ 2021-01-12 17:03 灏月天染 阅读(65) 评论(0) 推荐(0) 编辑
摘要: js引擎有一个叫monitoring process,它用来检测主线程栈是否为空,不为空时,主线程任务依次执行,否则,将从Event table中拿到event queue 1.微任务在前,宏任务在后,并且队列也以顺序区分 2.微任务有:process.nexttick以及promise中的then 阅读全文
posted @ 2021-01-11 18:51 灏月天染 阅读(81) 评论(0) 推荐(0) 编辑
摘要: function Observer(){this.fns = []} Observer.prototype = { subscribe:function(fn){ this.fns.push(fn) }, unsubscribe:function(fn){ this.fns = this.fns.f 阅读全文
posted @ 2021-01-11 18:23 灏月天染 阅读(156) 评论(0) 推荐(0) 编辑
摘要: nodejs:https://www.jianshu.com/p/48f72002a9a5 csrf攻击和xss攻击 https://www.jianshu.com/p/a72bf060eeaa https://www.imooc.com/article/45936 https://www.kids 阅读全文
posted @ 2020-08-21 15:26 灏月天染 阅读(159) 评论(0) 推荐(0) 编辑