1.阿里巴巴java规约推荐使用java线程池ThreadPoolExecutor service = new ThreadPoolExecutor(5, 200, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(1024), new Thr ...
分类:
编程语言 时间:
2020-04-16 19:43:46
阅读次数:
80
Problem Description Given two rectangles and the coordinates of two points on the diagonals of each rectangle,you have to calculate the area of the in ...
分类:
其他好文 时间:
2020-04-15 13:51:02
阅读次数:
82
注意是在MySQL主从的基础上做MySQL主主。互为主从。 192.168.10.18上创建一个用户 mysql> grant replication slave on *.* to slave@'192.168.10.17' identified by '123456'; Query OK, 0 ...
分类:
数据库 时间:
2020-04-15 12:22:26
阅读次数:
88
什么是Here Document Here Document 是在Linux Shell 中的一种特殊的重定向方式,它的基本的形式如下 cmd << delimiter Here Document Content delimiter 它的作用就是将两个 delimiter 之间的内容(Here Do ...
分类:
系统相关 时间:
2020-04-14 22:23:46
阅读次数:
88
在openwrt系统内init进程被procd取代,procd作为父进程可以监控子进程的状态。一旦子进程退出后即可在某一个时刻尝试进行重启进程。在op系统内使用procd监控的有uhttpd,netifd等。在/etc/init.d/文件夹内带有USE_PROCD=1标志,下面就介绍如何让procd ...
分类:
其他好文 时间:
2020-04-14 18:56:41
阅读次数:
247
随机的概念也就是任意,有时候我们需要随机数,对于时间可能也有时候需要任意时间,我们都知道python中对于随机数,大概就是用到random!!! 同样的,对于获取随机事件,我们也同样可以使用random,不过稍微需要变化一下。 一、随机数--random 我们先来看下random import ra ...
分类:
编程语言 时间:
2020-04-13 19:34:28
阅读次数:
82
刚开始用vue或者react,很多时候我们都会把ES6这位大兄dei加入我们的技术栈中。但是ES6那么多那么多特性,我们真的需要全部都掌握吗?秉着二八原则,掌握好常用的、有用的这个可以让我们的开发快速起飞。 接下来我们就聊聊ES6那些可爱的新特性吧。 1.变量声明const和let 在ES6之前,我 ...
分类:
其他好文 时间:
2020-04-13 15:33:26
阅读次数:
90
问题: degree:给定数组中重复最多元素的次数 求重复次数为degree的元素中,距离最短子数组的长度。 Example 1: Input: [1, 2, 2, 3, 1] Output: 2 Explanation: The input array has a degree of 2 beca ...
分类:
其他好文 时间:
2020-04-12 18:26:54
阅读次数:
58
``` #include #define f first #define s second using namespace std; typedef long long ll; const int N=300005; typedef pair P; int n,tot,t,V; map mp; ma... ...
分类:
其他好文 时间:
2020-04-12 18:18:38
阅读次数:
100