上一页 1 2 3 4 5 6 7 ··· 10 下一页
摘要: 1. nodejs 如何启动两个端口, 比如一个一个proxy一个service const proxy = require('./src/proxy'); //一些变量可以加载起来 const service = require('./src/service'); proxy.start(); / 阅读全文
posted @ 2021-03-03 22:15 connie313 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 1) 从几到题开始, a. 千分位 10000000 => 10,000,000 note: a(?=x) 仅匹配a后面跟着的x, ax. =. x a(?:\d{3}) 仅仅作为匹配, 不做记忆。 (a) 作为匹配的结果 1 '10000000'.replace(/(\d)?=((?:\d{3}) 阅读全文
posted @ 2021-02-18 22:45 connie313 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 1) 面对可视化需求, 应该选择canvas还是svg? 答: canvas是基于HTMLCanvasElement, 图形是调用api绘制的, 主要是写js。不过, 对于复杂的path,比svg的path稍微步骤多一点, svg只要用字母数字组成string即可。 svg是类似于HTML的, 元素 阅读全文
posted @ 2021-02-18 22:27 connie313 阅读(135) 评论(0) 推荐(0) 编辑
摘要: React.cloneElement 可以给子组件传递props 用法 React.cloneElement( element, [props], [...child] ) parent class { getChildren(){ const _this = this; let { childre 阅读全文
posted @ 2021-01-04 07:55 connie313 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 自定义vscode extension 阅读全文
posted @ 2020-12-10 08:29 connie313 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 1. 防止重复请求 2. inteceptor before / after 阅读全文
posted @ 2020-12-10 08:26 connie313 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 在foreach中实现异步 首先。 在foreach中打印出1,2,3,4,5 需要在执行for的时候,指定元素的作用域 a.forEach(i=>{ console.log(i) }) for(var i=0; i< a.length; i++){ ((m)=>setTimeout(()=>con 阅读全文
posted @ 2020-12-07 23:01 connie313 阅读(1238) 评论(0) 推荐(0) 编辑
摘要: var cluster = requre('custer'); var http = require('http'); var numCPUs = require('os').cpus().length; if(cluster.isMaster){ // fork workers for(var i 阅读全文
posted @ 2020-10-29 19:53 connie313 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 动画 阅读全文
posted @ 2020-10-26 19:43 connie313 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 对于是弹性布局, 需要在父级元素上。#parent{ display:flex } 如果原先定义了子元素的高度, 会变成无效, 因为默认???shrink 如果需要元素页面居中, .item{ justify-content: center; align-items:center; //这两个用的很 阅读全文
posted @ 2020-10-25 18:45 connie313 阅读(82) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 10 下一页