我与领域驱动之缘

缘起 正式接触到领域驱动还是耗子叔在易观峰会上的演讲,当时听的一知半解,现在回头来看一看真的很棒。 深入 领域驱动设计适用于复杂的业务系统,但对于……

阅读全文

TDD 中使用的工具

Junit 常用单元测试工具 MockMvc Spring 提供的模拟 Controller 接口调用的工具 Mocktio 能够提供 Mock 方法 Cucumber 行为驱动开发,以用户故事为核心,算是 TDD 的升级版,能够结合其他工具生成报表……

阅读全文

tf-idf 算法

tf-idf (term frequence-inverse document frequence) 词频-逆文档频率,是搜索常用的一个权重相关算法,其作用是评估一个 document 在一整个 document list 中的重要程度,下面分开来讲。 term frequence tf 的意思就是一个词语……

阅读全文

gitlab 添加代码规范检测

环境 gitlab 10.5.X + gitlab + ali p3c.pmd 好的代码能让人赏心悦目,方便 CodeReview 进行,为此,必须强制性的将代码规范起来。 如何做 git custom hooks client hooks 客户端钩子是存在本地的,按项目去配,……

阅读全文

query 改写

什么是 query 改写 query 改写是搜索系统中最基础也是最重要的一个模块,简单来讲就是把用户输入的 keyword 转换成最贴近搜索系统内部的可识别的 keyword。 搜索引……

阅读全文

阶段性总结

博客断断续续的在更着,总是想写总是找不到合适的时间。 做了那些事情 搜索 用 solr 将公司的搜索系统重构了一遍,但是感觉很有成就感,但现在看来真的很 low ,……

阅读全文

操作系统作用

操作系统作用 1、资源管理者 都能管理什么? 自底向上 对于操作系统内部来讲 硬件资源 像 CPU 、内存、设备(输入输出设备、磁盘、时钟、网卡) 软件资源 磁盘上……

阅读全文

Consideration make three pointers , pre,current,next; initial pre as null use tmp to save current’s next node info change current’s next to link pre node(first is null) move pre pointer to next node move current pointer to next node soultion 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 /** * Definition for singly-linked list.……

阅读全文

hamming-distance

The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calculate the Hamming distance. Note: 0 ≤ x, y < 231. Example: Input: x = 1, y = 4 Output: 2 Explanation: 1 (0 0 0 1) 4 (0 1 0 0) ↑ ↑ The above arrows point to positions where the corresponding bits are different.……

阅读全文

ElasticSearch API 基本操作

查看集群健康值 GET _cat/health?v 查看 node 信息 GET _nodes 查看索引信息 GET _cat/indices?v 创建索引 PUT /test?pretty 删除索引 DELETE /test?pretty 新建文档并建立索引 创建一个index为 ecommerce 的索引 PUT /ecommerce/_doc/1 { "product_id":1234, "product_name": "……

阅读全文