上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 27 下一页
摘要: //比较两字符的大小、相等长度、是否包含 function compareLen(str1,str2,n1=0,n2=0) { //求出相等部分 let len=0; let dis=-2; let isEnd=1; while (dis 2){ const l1=n1+len const l2=n 阅读全文
posted @ 2021-04-19 20:22 无工时代 阅读(51) 评论(0) 推荐(0) 编辑
摘要: //比较两字符的相等长度和大小 function compareLen(n1,n2,str1,str2) { //求出相等部分 var len=0; while (n1+len<=str1.length&&n2+len<=str2.length&&str1.charCodeAt(n1+len) st 阅读全文
posted @ 2021-04-16 18:22 无工时代 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 思路: 1、从点结构变成平行线条结构 2、线条对象 { x,y,w,v, area:{ w, h:1, s, e:s, bg:-1 },} 3、从线结构提取梯度数据area 4、判断区域area是否为背景 if(area.w>88){ isBg=true} 5、求最近的背景,识别文字内的背景色 le 阅读全文
posted @ 2021-03-22 17:18 无工时代 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 项目地址:https://www.npmjs.com/package/execfromnode-loader 让前端的js执行nodejs 配置文件 execFromNodeOptions.js const fs=require('fs') const path=require('path') // 阅读全文
posted @ 2021-01-27 17:44 无工时代 阅读(161) 评论(0) 推荐(0) 编辑
摘要: const domTags=['div','section','img','p','span'] //深度遍历html节点 function depthSearch(node,childProp='children'){ const nodeList=[] const depthEach=funct 阅读全文
posted @ 2021-01-13 16:01 无工时代 阅读(969) 评论(0) 推荐(0) 编辑
摘要: /* 并发加载函数 防止接口重复提交以及查询 id:唯一值 syncFunc:Promise函数 */ const _map={} const _startTimeMap={} function conCurentLoad (id,syncFunc) { //兼容并发加载的情况 if(!_map[i 阅读全文
posted @ 2020-12-24 22:53 无工时代 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 技术栈:马尔可夫模型、多维数据的相似度夹角 1、定义标签 X1:词语1、词语2、词语3、... X2:词语1、词语2、词语3、... 2、用马尔可夫分词模型,对内容分词识别出多维标签,生成一个多维向量(X1,X2) 阅读全文
posted @ 2020-12-04 00:06 无工时代 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 1、js、css本地缓存,离线化应用,替换webpack4中的加载方式 2、接口设置过期时间,本地缓存30条ajax(场景:查询接口) 3、相同接口并发请求多个,实际请求一个 4、webpack4拆包,生成多个公共chuck 5、提供webpack4构建速度,对module去重处理 6、webpac 阅读全文
posted @ 2020-12-01 11:35 无工时代 阅读(173) 评论(0) 推荐(0) 编辑
摘要: /* 缓存加载函数 cacheLen:最多缓存多少个接口 id:唯一值 name:方法名 syncFunc:加载函数 */ // 缓存最近的20个接口 const methodCacheArr = [] let cacheLen = 20 try { const arr=JSON.parse(loc 阅读全文
posted @ 2020-11-18 16:07 无工时代 阅读(122) 评论(0) 推荐(0) 编辑
摘要: /* 并发加载函数 id:唯一值 syncFunc:加载函数 */ const _map={} async function conCurentLoad (id,syncFunc) { //兼容并发加载的情况 if(!_map[id]){ _map[id]=[]; const res = await 阅读全文
posted @ 2020-11-13 19:20 无工时代 阅读(124) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 27 下一页