<script> var resultValue = "1"; function throttle(fn) { console.log(arguments); let params = Array.from(arguments); params.shift(); let res = argument ...
分类:
其他好文 时间:
2021-06-10 18:43:06
阅读次数:
0
方法1,使用闭包 let arr = [] function fn(){ let arg = [...arguments] // 用另一个变量表示外部函数的实参 function closure(){ // 使用闭包将变量持久化 arr = [...arr,...arg] } closure() r ...
分类:
其他好文 时间:
2021-06-08 23:38:44
阅读次数:
0
class Human { constructor(name, age) { //name age 是传参 this.name = name; this.age = age } } let ren = new Human("小明", 100); // 使用Human类,实例化类 console.lo ...
分类:
Web程序 时间:
2021-06-07 20:11:10
阅读次数:
0
一.偏函数 (partial) 1.partial 的作用 当函数的参数个数太多,需要简化时,使用functools.partial可以创建一个新的函数,这个新函数可以固定住原函数的部分参数,从而在调用时更简单 2.示例 partial 的第一个参数是原函数, 后面是原函数的参数 from func ...
分类:
其他好文 时间:
2021-06-05 17:51:40
阅读次数:
0
一、前言 在我们做接口或者是app自动化的时候,有一个比较常见的场景就是测试流程一致,入参不同。而junit5也提供了很好的解决方案。 二、依赖的加入 maven方式,使用junit5参数化需要导入junit-jupiter-params库 <!-- https://mvnrepository.co ...
分类:
其他好文 时间:
2021-06-03 18:17:33
阅读次数:
0
new 运算符 new 运算符创建一个用户定义的对象类型的实例或具有构造函数的内置对象的实例。 语法 new constructor[[arguments]]; 参数 constructor - 一个指定对象实例的类型的类或函数。 arguments - 一个用于被 constructor 调用的参 ...
分类:
Web程序 时间:
2021-06-03 17:49:20
阅读次数:
0
1.选中要生成的文件。 2.点击菜单栏 Tools->Generate JavaDoc,进入以下界面 3.将Other command line arguments:设置为-encoding utf-8 -charset utf-8 ,这是确认编码方式,防止有中文乱码,后面的windowtitle是 ...
分类:
编程语言 时间:
2021-06-02 17:10:43
阅读次数:
0
exchange_declare($exchange, $type, $passive = false, $durable = false, $auto_delete = true, $internal = false, $nowait = false, $arguments = array(), ...
分类:
其他好文 时间:
2021-05-24 15:51:32
阅读次数:
0
##环境准备 安装windows最新版本git,硬盘建议空闲空间大于100G,内存16G。 安装vs2019,选择默认安装路径,组件选择最新的windows sdk和c++环境,因为google chromium的源码庞大,第三库极多,所以MFC和ATL也需要勾选安装。 打开控制面板,选中windo ...
相当于sleep 1秒 setTimeout(function () { console.log('我被调用了'); setTimeout(arguments.callee, 1000); }, 1000); 相当于sleep 1秒 【程序不会挂住,直接运行接下来的代码】 setInterval(f ...
分类:
编程语言 时间:
2021-05-04 15:35:41
阅读次数:
0