摘要:
注:List.of()方法需要1.8以上才支持 1.filter,过滤,关键:Predicate Stream.of( new Fruit("草莓", "", "1", "red"), new Fruit("香蕉", "", "2", "yellow"), new Fruit("苹果", "", " 阅读全文
摘要:
class Solution { public int[] searchRange(int[] nums, int target) { int x = left(nums, target); if (x == -1) { return new int[] { -1, -1 }; }else{ ret 阅读全文
摘要:
1.Java的二分查找 public int searchInsert(int[] nums, int target) { int i = 0, j = nums.length - 1; while (i <= j) { int m = (i + j) >>> 1; if (target < num 阅读全文
摘要:
1.基础版 public int search(int[] nums, int target) { int i = 0, j = nums.length - 1; while (i <= j) { int middle = (i + j) >>> 1; if (target < nums[middl 阅读全文
摘要:
1.拉取镜像 docker pull nginx 2.创建容器 docker run --name my-nginx -p 80:80 -d nginx 3.找个文件夹创建以下目录,mkdir -p {conf,conf.d,html,logs} 4.从创建的nginx容器中复制配置文件到本地目录 阅读全文
摘要:
1.数据聚合 1.1.聚合的种类 聚合常见的有三类: - **桶(Bucket)**聚合:用来对文档做分组 - TermAggregation:按照文档字段值分组,例如按照品牌值分组、按照国家分组 - Date Histogram:按照日期阶梯分组,例如一周为一组,或者一月为一组 - **度量(Me 阅读全文
摘要:
Git 全局设置: git config --global user.name "ni" git config --global user.email "gstszbc@163.com" 创建 git 仓库: mkdir myelastic cd myelastic git init touch R 阅读全文
摘要:
官网啥都有 https://baomidou.com/ 1.引入依赖 <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.5.3.1</v 阅读全文
摘要:
es,倒排索引 倒排索引的概念是基于MySQL这样的正向索引而言的。 倒排索引中有两个非常重要的概念: - 文档(`Document`):用来搜索的数据,其中的每一条数据就是一个文档。例如一个网页、一个商品信息- 词条(`Term`):对文档数据或用户搜索数据,利用某种算法分词,得到的具备含义的词语 阅读全文
摘要:
工作队列模型 workQueue,多个消费者绑定到一个队列,当队列堆积消息时,可使用work模型。 多个消费者绑定一个队列,同一条消息只会被一个消费者处理 通过设置prefetch来控制消费者预取的消息数量 spring: rabbitmq: listener: simple: prefetch: 阅读全文