上一页 1 2 3 4 5 6 ··· 18 下一页
摘要: 1、数组元素量级大而合并次数少时,性能对比: concat() > push() > […array1,…array2] 2、数组元素少但合并次数多时,性能对比: push() > concat() > […array1,…array2] 参考资料:http://www.seozhijia.net/ 阅读全文
posted @ 2024-01-08 17:55 醒日是归时 阅读(41) 评论(0) 推荐(0) 编辑
摘要: import QRCode from 'qrcode'; QRCode.toDataURL(res.data.qrcodeUrl, { margin: 2, type: 'image/jpeg', quality: 0.3 }, (error, url) => { if (error) consol 阅读全文
posted @ 2024-01-05 10:31 醒日是归时 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 读写文件的模式 r - 读取模式w - 写入模式(覆盖现有内容) a - 附加模式(附加在现有内容之后) b - 二进制模式 r+ - 读取更新模式(现有数据保留) w+ - 写入更新模式(现有数据擦除) a+ - 附加更新模式(现有数据保留,只在文件末尾附加) do --read data fro 阅读全文
posted @ 2023-12-27 17:59 醒日是归时 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 痛点 在一些场景中,需要把一些大文件(几 GB 到 几十 GB)传输到服务器上,理论可用的方法有 通过 http 上传、ssh(scp) 等方法;但 http 上传的逻辑中,需要将文件拷贝至磁盘中某个缓冲区,如此一来不仅需要等待拷贝,还可能面临磁盘空间不足等问题;如果是使用 ssh 等软件,比如 t 阅读全文
posted @ 2023-12-27 14:43 醒日是归时 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 背景 为网关提供健康检查功能时需要对节点发送http或者tcp探活请求。Openresty 提供cosocket来处理非阻塞IO。 实现 跟工程结合在一起,这里简单拼接数据结构 local function __default_check_alive(status) return status >= 阅读全文
posted @ 2023-12-20 16:26 醒日是归时 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 目录1、Edit编辑操作快捷键2、Run / Debug 运行与调试3、窗口操作 1、Edit编辑操作快捷键 双击 shift:全局搜索 command + F:当前文件内进行查找 command + r :当前文件内替换 command + shift + r:全局替换 option + comm 阅读全文
posted @ 2023-12-18 15:29 醒日是归时 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 方法一: cloneDeep import { cloneDeep } from 'lodash-es' // 直接使用 const items = cloneDeep(multipleSelection) 方法二: ​通过JSON.parse(JSON.stringify(obj)) 优缺点 满足 阅读全文
posted @ 2023-12-12 11:07 醒日是归时 阅读(313) 评论(0) 推荐(0) 编辑
摘要: <el-upload class="upload-demo" :action="''" :show-file-list="false" :auto-upload="false" :before-upload="beforeUpload" :on-success="handleSuccess" :on 阅读全文
posted @ 2023-11-14 16:28 醒日是归时 阅读(256) 评论(0) 推荐(0) 编辑
摘要: before-upload data(){ return { ... //判断是否需要做文件检查 checkFileFormat:false } }, beforeUpload(rawFile) { this.loading = true; ... 检查文件格式 检查文件大小 ... if (thi 阅读全文
posted @ 2023-10-09 16:31 醒日是归时 阅读(162) 评论(0) 推荐(0) 编辑
摘要: rewite 在server块下,会优先执行rewrite部分,然后才会去匹配location块server中的rewrite break和last没什么区别,都会去匹配location,所以没必要用last再发起新的请求,可以留空 location中的rewirte: 不写last和break - 阅读全文
posted @ 2023-08-11 17:09 醒日是归时 阅读(710) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 18 下一页