05 2021 档案
摘要:Array.prototype.pushOnly=function(one){ if(this.indexOf(one) 1){ this.push(one) } } /* * 分类器*/ class ArraySplit { constructor(getDis,sArr,maxDeep) { t
阅读全文
摘要:const axios=require('axios') const fs = require('fs-extra'); const https=require('https') const path=require('path') function resolve (dir) { return p
阅读全文
摘要:/* 缓存管理器 cacheLen:最多缓存多少个数据 id:唯一值 name:方法名 syncFunc:加载函数 */ class cacheManage { //cacheLen:最多缓存多少个数据 constructor(cacheLen){ this.cacheLen=cacheLen||2
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>数据分类器demo</title> </head> <body> <button onclick="splitArr()">分类</button> <div i
阅读全文
摘要:/* * 分类器*/ class ArraySplit { constructor(getDis) { this.getDis=getDis; } //计算元素key的最大长度dis、最大长度对应的元素arr getMaxKey(key1,indexArr,sArr) { const getDis=
阅读全文
摘要://欧几里得算法 求两个数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
阅读全文