定义几个常用的方法 const utils = { //定义变量是否存在 js有两个表示不存在的值 undefined|null true表示存在 false表示不存在(undefined|null) existy(val) { return val != null //undefined 也是可以 ...
分类:
其他好文 时间:
2020-11-27 11:46:22
阅读次数:
19
// 代理访问和设置 const options = { // 主题色 themeColor: 'red', // 文本主颜色 textColor: '#333', // h1 h2 h3 h4 h5 h1: '1.6rem', h2: '1.4rem', h3: '1.2rem', h4: '1r ...
分类:
Web程序 时间:
2020-11-27 11:40:32
阅读次数:
16
1.组件 const watermark = ({ // 使用 ES6 的函数默认值方式设置参数的默认取值 container = document.body, width = '250px', height = '160px', textAlign = 'left', textBaseline = ...
分类:
其他好文 时间:
2020-11-27 11:16:56
阅读次数:
6
problem: 给你n个数字,和m个查询. 将[l,r]之间数第一次出现的位置信息弄成一个新的数组,然后找出其中k/2大的数.(k为位置的数量) #include<bits/stdc++.h> using namespace std; const int maxn=2e5+100; const i ...
分类:
其他好文 时间:
2020-11-26 14:12:20
阅读次数:
3
1.Vue插件全局属性以及方法 //引入组件 import ComponentName from url; //定义加载方法 const install= (Vue,option) => { //1.常规方法 //新增插件1 Vue.component('ComponentName',Compone ...
分类:
其他好文 时间:
2020-11-25 13:05:10
阅读次数:
25
1 #include <stdio.h> 2 #include <wiringPi.h> 3 #include <softPwm.h> 4 5 const int Red_Pin = 9; 6 const int Green_Pin = 10; 7 const int Blue_Pin = 11; ...
分类:
编程语言 时间:
2020-11-25 12:45:11
阅读次数:
8
新建validator.js,内容如下,参考补充: const valid = { REG_PHONE: /^[1]([3-9])[0-9]{9}$/, checkNull(rule, value, callback, message, flag = true) { if (isNullOrEmpt ...
分类:
其他好文 时间:
2020-11-25 12:29:42
阅读次数:
4
Case 1 : ParamType是一个指针或者引用,但不是universal reference T& const T& T* Case 2 : ParamType是Universal Reference 注意区别Universal Reference与右值引用 Case 3 : ParamTy ...
分类:
编程语言 时间:
2020-11-25 12:10:25
阅读次数:
6
Case 1 : type specifier是一个指针或者引用,但不是universal reference Case 2 : type specifier是一个universal reference Case 3 : type specifier既不是指针也不是引用 数组和函数类型推断 auto ...
分类:
编程语言 时间:
2020-11-25 12:09:31
阅读次数:
7
https://codeforces.ml/contest/888/problem/G struct TrieNode { int cnt; int num; int nxt[2]; void Init() { cnt = 0; num = 0; memset(nxt, 0, sizeof(nxt) ...
分类:
其他好文 时间:
2020-11-24 12:58:41
阅读次数:
10