一、模式定义 简单工厂模式(Simple Factory Pattern):又称为静态工厂方法(Static Factory Method)模式,它属于类创建型模式。在简单工厂模式中,可以根据参数的不同返回不同类的实例。简单来说,也就是由一个工厂类根据传入的参数决定创建出哪一种产品类的实例。 二、模 ...
分类:
其他好文 时间:
2019-06-23 19:11:02
阅读次数:
136
原题链接在这里:https://leetcode.com/problems/flip-equivalent-binary-trees/ 题目: For a binary tree T, we can define a flip operation as follows: choose any nod ...
分类:
其他好文 时间:
2019-06-23 15:52:29
阅读次数:
121
db_file_multiblock_read_count对cost(%cpu)的整个结果的影响跟踪
分类:
数据库 时间:
2019-06-23 12:48:42
阅读次数:
154
01一般格式 If else和 if elif else 02 多重分支 实现多重分支(Python没有switch) 可以通过配合字典表进行操作 例子:定义了一个字典operation Lambda内容简要补充 例子:字典和函数结合实现多重分支 03三元运算符 一般如只有两个判断,就用三元简单 格 ...
分类:
编程语言 时间:
2019-06-21 22:23:59
阅读次数:
184
推荐一个git教程连接:https://www.yiibai.com/git/git_clone_operation.html ...
分类:
其他好文 时间:
2019-06-21 12:49:09
阅读次数:
95
写在前面 上篇文章介绍了restful接口的增删改查,本篇文章将介绍,如何通过数据流进行文件的上传及下载操作。 系列文章 Restful风格wcf调用 Restful风格wcf调用2——增删改查 一个例子 添加一个wcf服务,并在global.asax中注册路由,并修改svc文件的标记,添加Fact ...
分类:
其他好文 时间:
2019-06-21 09:32:27
阅读次数:
110
146. LRU Cache Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put. get ...
分类:
Web程序 时间:
2019-06-20 22:32:21
阅读次数:
182
If you are searching for a key programmer for your car, Lonsdor KH100 will be your best choice. This post will highlight function, registration and up ...
分类:
其他好文 时间:
2019-06-18 14:15:49
阅读次数:
151
注意:当执行多条数据查询、增删改时,一定要用mget、bulk,提升性能,减少网络传输 mget 回顾:查询单个文档 GET /beauties/my/2 mget 查询多个文档: 不同 index、不同type、不同id GET /_mget { "docs":[ { "_index":"beau ...
分类:
其他好文 时间:
2019-06-16 22:04:34
阅读次数:
193
回顾: bulk的语法要求:每个json串都不能换行,不同json串之间,必须换行 为什么不用标准json数组呢?如: [ { "create":{...} }, { "update":{...}s } ] 因为,如果使用这种Json数组,ES需要做的是 把字符串转成 Json数组对象 按每个Jso ...
分类:
Web程序 时间:
2019-06-16 21:35:37
阅读次数:
154