摘要: 1.es的基本概念 _index文档在哪存放 _type文档表示的对象类别 _id文档唯一标识 其中id可以自己设置也可以让es帮助我们自动生成 如果是指定id使用 PUT /website/blog/123 如果不指定id使用post POST /website/blog/ 倒排索引的就是记录某个 阅读全文
posted @ 2020-07-23 10:15 TheQi 阅读(135) 评论(0) 推荐(0) 编辑
摘要: B 指定字符B \xhh 十六进制值为0xhh的字符 \uhhhh 十六进制表现为0xhhhh的Unicode字符 \t 制表符Tab \n 换行符 \r 回车 \f 换页 \e 转义(Escape) 表达式含义 . 任意字符 [abc] 包含a、b或c的任何字符(和`a [^abc] 除a、b和c 阅读全文
posted @ 2020-06-30 11:46 TheQi 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 适配器模式: 相当于类中组合类一个基类 然后比如构造 传过来一个派生类来给这个基类负值 类中的方法就使用这个基类来调用 阅读全文
posted @ 2020-06-09 23:01 TheQi 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 一、对象的概念 1.1组合与聚合: 组合和聚合都属于关联关系的一种,只是额外具有整体-部分的意义。至于是聚合还是组合,需要根据实际的业务需求来判断。可能相同超类和子类,在不同的业务场景,关联关系会发生变化。只看代码是无法区分聚合和组合的,具体是哪一种关系,只能从语义级别来区分。聚合关系中,整件不会拥 阅读全文
posted @ 2020-06-02 22:53 TheQi 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 一.命令相关: 1.总体命令: 1.1 常用命令 dbsize 看有多少键 exists key 查看key是否存在 存在返回1 不存在返回0 del key [key...] 返回成功删除key的个数 type key 可以查看key的数据结构 object encoding key 查看redi 阅读全文
posted @ 2020-04-14 14:11 TheQi 阅读(143) 评论(0) 推荐(0) 编辑
摘要: RandomListNode* Clone(RandomListNode* pHead) { if(pHead==nullptr) return nullptr; //第一步:复制链表结点 RandomListNode* oldnode=pHead; while(oldnode) { RandomL 阅读全文
posted @ 2019-10-25 15:38 TheQi 阅读(365) 评论(0) 推荐(0) 编辑
摘要: //集合转数组List list = new ArrayList(2); list.add("guan"); list.add("bao"); String[] array = new String[list.size()]; array = list.toArray(array); //数组转集合 Sring[] -> list list list.toArray(new Strin... 阅读全文
posted @ 2019-08-26 13:24 TheQi 阅读(126) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { ForkJoinTask<Long> myForkJoinPool = new MyForkJoinPool(1L,999999999L); ForkJoinPool pool = ForkJoinPool.commonPool(); Future<Long> future = pool.submit(myForkJ 阅读全文
posted @ 2019-08-23 17:26 TheQi 阅读(193) 评论(0) 推荐(0) 编辑
摘要: import com.google.common.collect.Lists; import com.jayway.jsonpath.Configuration; import com.jayway.jsonpath.DocumentContext; import com.jayway.jsonpath.JsonPath; import com.jayway.jsonpath.Option; ... 阅读全文
posted @ 2019-08-22 11:56 TheQi 阅读(231) 评论(0) 推荐(0) 编辑
摘要: private static final Logger logger = LoggerFactory.getLogger(JsonUtils.class); private static final ObjectMapper mapper = new ObjectMapper(); static { mapper.configure(JsonParser.Feature.ALLOW_COMMENT 阅读全文
posted @ 2019-08-22 10:41 TheQi 阅读(614) 评论(0) 推荐(0) 编辑