1、some(过滤) const bool = [2, 3, 4].some((v, i, a) => { // v当前值,i下标,a当前数组 console.log(v) console.log(i) console.log(a) return v > 1 // 只要有其中一个数值满足就不再执行 ...
分类:
编程语言 时间:
2020-07-21 14:11:25
阅读次数:
75
1、创建数组 // 推荐使用 var arr = [1, ,2 ,3]; // 不推荐使用 var arr = new Array(1, 2); 2、数组的本质 本质上,数组属于一种特殊的对象。 typeof[1, 2, 3] // "Object" 数组的特殊性体现在,它的键名是按次序排列的一组整 ...
分类:
编程语言 时间:
2020-07-21 14:06:07
阅读次数:
89
轮廓发现是基于图像边缘提取寻找对象轮廓的方法,所以边缘提取的阈值选定会影响最终的轮廓发现结果 cv::findContours() InputOutputArray binImg//输入图像,非0像素被看成1,0的像素值保持不变8-bit OutputArrayOfArrays contours// ...
分类:
其他好文 时间:
2020-07-21 09:28:03
阅读次数:
63
Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain 1. 安装maven # 安装wget http://mirrors.hust.edu.cn/apache/maven ...
分类:
Web程序 时间:
2020-07-21 01:23:54
阅读次数:
241
我们经常使用Android自身独有的定位方式, driver.find_element_by_id("xxxxx") driver.find_elements_by_id("xxxx") driver.find_element_by_class_name("xxxx") 这里写的elements的意 ...
分类:
移动开发 时间:
2020-07-20 18:32:51
阅读次数:
96
Nothing to fear 种一棵树最好的时间是十年前,其次是现在! 那些你早出晚归付出的刻苦努力,你不想训练,当你觉的太累了但还是要咬牙坚持的时候,那就是在追逐梦想,不要在意终点有什么,要享受路途的过程,或许你不能成就梦想,但一定会有更伟大的事情随之而来。 mamba out~ 人一我十,人十 ...
分类:
其他好文 时间:
2020-07-20 17:18:26
阅读次数:
74
$("#test1").parent(); // 父节点 $("#test1").parents(); // 全部父节点 $("#test1").parents(".mui-content");//返回class为mui-content的父节点 $("#test1").children(); // ...
分类:
Web程序 时间:
2020-07-20 13:17:42
阅读次数:
76
概述 本文主要介绍正则表达式的代码使用。 学习正则表达式的基本语法,可以参考使用手册:https://tool.oschina.net/uploads/apidocs/jquery/regexp.html 但是有几个问题需要特别注意: ① 转义符号 \ 的问题 比如,我们需要匹配一个数字,对应的正则 ...
分类:
编程语言 时间:
2020-07-20 13:08:56
阅读次数:
78
Given a string S, return the number of substrings of length K with no repeated characters. Example 1: Input: S = "havefunonleetcode", K = 5 Output: 6 ...
分类:
其他好文 时间:
2020-07-20 10:52:27
阅读次数:
55
abstract: 抽象的 1.可以用来修饰:类、方法 2.具体的:abstract修饰类:抽象类 * > 此类不能实例化 * > 抽象类中一定有构造器,便于子类实例化时调用(涉及:子类对象实例化的全过程) * > 开发中,都会提供抽象类的子类,让子类对象实例化,完成相关的操作 >抽象的使用前提:继 ...
分类:
其他好文 时间:
2020-07-19 23:32:42
阅读次数:
71