节流 throttle 节流点击按钮,设置三秒以后才可以点击下一次,在这三秒时间内无论点击多少次都不会触发函数,只有当到达三秒钟后才会继续触发函数 function fn(){ console.log(1) }function throttle(cd,wait){ //第一次执行的时间 let fi ...
分类:
其他好文 时间:
2020-12-21 11:48:42
阅读次数:
0
当 Clock 组件第一次被渲染到 DOM 中的时候,就为其设置一个计时器。这在 React 中被称为“挂载(mount)”。 同时,当 DOM 中 Clock 组件被删除的时候,应该清除计时器。这在 React 中被称为“卸载(unmount)”。 我们可以为 class 组件声明一些特殊的方法, ...
分类:
Web程序 时间:
2020-12-21 11:48:28
阅读次数:
0
本文转自鸟窝 获取 goroutineID package main import ( "fmt" "runtime" "strconv" "strings" "sync" ) func GoID() int { var buf [64]byte n := runtime.Stack(buf[:], ...
分类:
其他好文 时间:
2020-12-21 11:47:58
阅读次数:
0
在Linux中使用Shell写一个显示目录结构的命令,快速寻找目录结构。 1、代码 #!/usr/bin/env bash # 本命令用于显示指定路径或者当前路径的文件结构,支持搜索 # tf 显示当前目录的文件结构 # tf 接关键词 搜索当前目录 # tf 目录 关键词 搜索指定目录 # 本命令 ...
分类:
系统相关 时间:
2020-12-21 11:34:00
阅读次数:
0
import time """ N 皇后问题,不同皇后不能放置在同一直线或对角线上 """ def Nqueen(n): # arr[i] 表示每行皇后放置的第几列 arr = [0 for i in range(n)] cnt = 0 i = 0 resume_flag = False # 回溯标 ...
分类:
编程语言 时间:
2020-12-21 11:17:30
阅读次数:
0
记关于WIndow Server 2012 一次时间同步 Windows Server 2012的时间不一致,需要同步时间,按照正常设置,使用Internet时间同步time.windows.com,同步失败。使用阿里云服务其也失败。这里失败的原因主要是网络限制。 然后改用域控的时间同步地址,发现也 ...
1.查看系统信息 lsb_release -a #cat /proc/version No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.7 LTS Release: 16.04 Codenam ...
分类:
系统相关 时间:
2020-12-19 12:51:55
阅读次数:
5
近日K8s官方称最早将在1.23版本弃用docker作为容器运行时,并在博客中强调可以使用如containerd等CRI运行时来代替docker。本文会做详细解读,并介绍docker与containerd的关系,以及为什么containerd是更好的选择。这里先回答下TKE用户关心的问题:我们的集群该怎么办?TKE集群该怎么办TKE早在2019年5月就已经支持选择containerd作为容器运行时
分类:
其他好文 时间:
2020-12-19 12:50:38
阅读次数:
2
所有进程的祖宗进程,就是系统启动时的 init进程。init进程会启动很多daemon进程,为系统运行提供服务。然后启动getty,让用户登录,登录后运行shell。 ...
分类:
系统相关 时间:
2020-12-19 12:44:50
阅读次数:
3
# 基本操作from selenium import webdriverimport timedriver = webdriver.Chrome() # 指定webdriver的位置driver.get('https://www.baidu.com') # 打开指定的网址time.sleep(3)d ...
分类:
其他好文 时间:
2020-12-18 13:17:38
阅读次数:
3