1. 下载zookeeper https://mirrors.cnnic.cn/apache/zookeeper/ 选择带bin的 2. 解压 3.创建配置文件 cp ${path}/conf/zoo_sample.cfg ${path}/conf/zoo.cfg 4.修改配置文件 zk1配置 # ...
分类:
其他好文 时间:
2021-04-13 12:29:00
阅读次数:
0
答案是对着这段区间 [L,R] 不断询问直到不存在 x+1 得来的; 例如一个区间有为 1,2,4,4; 首先询问 1,发现存在 1,ans = 1; 然后询问 ans+1 = 2,发现存在 2,则 [1,3] 都能凑出,ans = 3; 接着询问 ans+1 = 4,发现存在两个 4,则 [1,1 ...
分类:
其他好文 时间:
2021-04-13 12:16:27
阅读次数:
0
利用上一题求深度的做法 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = ...
分类:
其他好文 时间:
2021-04-13 12:05:30
阅读次数:
0
阈值类型 阈值产生的算法,阈值类型 THRESH_BINARY表示大于thresh的取maxval,否则取0; THRESH_BINARY_INV表示大于thresh的取0,否则取maxvalue; THRESH_TRUNC表示大于thresh取threshold,否则不改变灰度值; THRESH_ ...
分类:
编程语言 时间:
2021-04-13 11:43:12
阅读次数:
0
求字符串出现次数最多字符 let str = "aaabbccccddddd" function longSre(str) { let zifu; let max = 0; let arr = str.split('') let map = new Map() for (let i = 0; i < ...
分类:
编程语言 时间:
2021-04-13 11:42:07
阅读次数:
0
MySQL:系统提供了很多函数 Count:统计个数,次数,null不统计 Max:最大值 Min:最小值 Sum:求和 Avg:平均值 Round:四舍五入 ...
分类:
其他好文 时间:
2021-04-12 12:55:32
阅读次数:
0
//这里面的核心思想是通过递归或遍历来查找要broadcast或dispatch的组件名字,然后在组件自身上emit与on function broadcast(componentName, eventName, params) { this.$children.forEach(child => { ...
分类:
Web程序 时间:
2021-04-12 12:52:40
阅读次数:
0
问题:假设你是某地区的消防队长,该地区包括N个城市和M条连结城市的公路,N个城市各自驻扎的消防队员数量业已给出,假设你位于城市c1处,当城市c2发生火灾时,你需要从城市c1出发,走最短的路径到达城市c2,与此同时,沿线征兆尽可能多的消防队员。编程解出城市c1与c2之间最短路径的数目,以及最多能征兆多 ...
分类:
其他好文 时间:
2021-04-12 12:45:28
阅读次数:
0
/* typeScript 中的数据类型 boolean number string array tuple 元组类型 enum 枚举类型 any 任意类型 null 和 undefined void 类型 never 类型 */ let str: string = '你好' // str = 1 ...
分类:
其他好文 时间:
2021-04-12 12:40:46
阅读次数:
0
Description: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row ...
分类:
其他好文 时间:
2021-04-12 12:32:28
阅读次数:
0