const axios=require('axios') const fs = require('fs-extra'); const https=require('https') const path=require('path') function resolve (dir) { return p ...
分类:
Web程序 时间:
2021-05-24 17:11:19
阅读次数:
0
let 和 const:let 和 const 都是是块级变量声明的方式,没有变量提升。let 声明的变量不能重复声明,后续可修改变量值;const 声明的是常量,后续不可修改变量值 箭头函数:箭头函数中的 this 指向,不会随着调用环境的变化而变化,是在 定义的时候 决定的,比如,一个箭头函数在 ...
变量名不占空间 变量:用来标识(identify)一块内存区域,这块区域的值一般是可以更改的,这就是它“变”的由来,但是我们可以通过使用如const等一些修饰符号来限定这一内存区域的操作特性(characteristic),即变量的操作特性。用const修饰的使变量不能更改的就和常量一样的变量叫做常 ...
分类:
其他好文 时间:
2021-05-24 16:45:15
阅读次数:
0
数组去重不仅在工作中经常使用,也会在面试中经常问到,现在有几种常用的方法: 比如要将数组去重: const arr = [1, 2, 3, "1", 2, undefined, undefined, "undefined", NaN, NaN]; 方法一: 直接通过indexOf 或者 includ ...
分类:
编程语言 时间:
2021-05-24 16:35:21
阅读次数:
0
#include<cstdio> #include<iostream> #include<cstring> #include<cmath> #include<algorithm> using namespace std; const int N=505; int s,p,tot,cnt; struc ...
分类:
其他好文 时间:
2021-05-24 16:03:43
阅读次数:
0
一、关于promise 1. 处理异步操作 2. 是一个构造函数,可实例化 3. 支持链式调用,解决回调地狱问题 二、 promise初使用 const p = new Promise((resolve,reject) => { setTimeout(()=>{ let n = rand(1,100 ...
分类:
其他好文 时间:
2021-05-24 15:29:20
阅读次数:
0
在网页版Vue中,我使用的是js-cookie这个包来实现cookie的 但是Electron中似乎不可以用,查询官方文档发现有一个cookies的类 于是在此类上重写cookie的get,set的实现 API参考:类:Cookies | Electron (electronjs.org) cons ...
分类:
其他好文 时间:
2021-05-24 14:26:13
阅读次数:
0
多文件合并下载 依赖于 https://github.com/feross/multistream const streams = []; for (const file of files) { streams.push(fs.createReadStream(file)); } this.ctx. ...
分类:
Web程序 时间:
2021-05-24 14:10:30
阅读次数:
0
#include <iostream> #include <cstring> #include <cmath> using namespace std; using ll=long long ; const int maxn=1e3+10; int dp[maxn][maxn]; int sum[m ...
分类:
其他好文 时间:
2021-05-24 13:59:03
阅读次数:
0
<?php class One{ private static $_one; private function __construct(){} private function __clone(){} public static function getOne(){ if(!self::$_one ...
分类:
Web程序 时间:
2021-05-24 13:36:59
阅读次数:
0