上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 28 下一页
摘要: const axios=require('axios') const fs = require('fs-extra'); const https=require('https') const path=require('path') function resolve (dir) { return p 阅读全文
posted @ 2021-05-20 18:29 无工时代 阅读(136) 评论(0) 推荐(0)
摘要: /* 缓存管理器 cacheLen:最多缓存多少个数据 id:唯一值 name:方法名 syncFunc:加载函数 */ class cacheManage { //cacheLen:最多缓存多少个数据 constructor(cacheLen){ this.cacheLen=cacheLen||2 阅读全文
posted @ 2021-05-20 13:05 无工时代 阅读(43) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>数据分类器demo</title> </head> <body> <button onclick="splitArr()">分类</button> <div i 阅读全文
posted @ 2021-05-19 16:26 无工时代 阅读(112) 评论(0) 推荐(0)
摘要: /* * 分类器*/ class ArraySplit { constructor(getDis) { this.getDis=getDis; } //计算元素key的最大长度dis、最大长度对应的元素arr getMaxKey(key1,indexArr,sArr) { const getDis= 阅读全文
posted @ 2021-05-13 16:59 无工时代 阅读(105) 评论(0) 推荐(0)
摘要: //欧几里得算法 求两个数a、b的最大公约数 function gcd(a,b){ return b 0?a:gcd(b,a%b) } //获取一个位置的相似度 function getOneSame(x,y,rect1,rect2){ let endn,n,i; const arrX=[] con 阅读全文
posted @ 2021-05-13 14:16 无工时代 阅读(102) 评论(0) 推荐(0)
摘要: //比较两字符的大小、相等长度、是否包含 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 无工时代 阅读(62) 评论(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 无工时代 阅读(86) 评论(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 无工时代 阅读(105) 评论(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 无工时代 阅读(170) 评论(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 无工时代 阅读(1037) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 28 下一页