设计模式 1、工厂模式 在工厂模式中,我们在创建对象时不会对客户端暴露创建逻辑,并且是通过使用一个共同的接口来指向新创建的对象。工厂模式作为一种创建模式,一般在创建复杂对象时,考虑使用;在创建简单对象时,建议直接new完成一个实例对象的创建。 1.1、简单工厂模式 主要特点是需要在工厂类中做判断,从 ...
分类:
编程语言 时间:
2020-02-12 18:56:37
阅读次数:
74
1、cinder-volume服务的程序入口 #!/usr/bin/python2 # PBR Generated from u'console_scripts' import sys from cinder.cmd.volume import main if __name__ == "__main ...
分类:
其他好文 时间:
2020-02-12 16:42:28
阅读次数:
101
1.创建表:注意:` ` ' ' , 三种符号 if not exists primary key(`id`)engine= innodb charset=utf8 create table if not exists `stu`( `id` int(4) auto_increment commen ...
分类:
数据库 时间:
2020-02-12 16:14:29
阅读次数:
87
Apollo移植 环境 平台 ubuntu16.04 Apollo_kernel 1.0 安装步骤步骤 步骤一:安装ubuntu(官方建议使用Ubuntu 14.04.3) "步骤一和步骤二参考文档路径" 启动软件更新程序 终端中执行下面的命令(新机需要更换Ubuntu的下载源,详细步骤见https ...
分类:
其他好文 时间:
2020-02-12 16:02:49
阅读次数:
251
更多LeetCode解题详解 Easy Given an array arr of integers, check if there exists two integers N and M such that N is the double of M ( i.e. N = 2 * M). More ...
分类:
其他好文 时间:
2020-02-12 00:59:17
阅读次数:
85
一、前言 本文演示虚拟机安装,和真机区别可能在网卡驱动上有差异。 真机环境:CentOS Linux release 7.6.1810 (Core) 虚拟机(虽然centos系统自带虚拟机软件,但是习惯用这个):VMware Workstation 15 Player 虚拟机系统:dvd版本 Cen ...
分类:
系统相关 时间:
2020-02-11 19:20:03
阅读次数:
96
题目解读: 此题涉及到的数据库表:【departments 部门信息】、【dept_emp 部门_员工 关系表】、【employees 员工信息】 方法一:not exists 1. 思路 查找符合下列条件的雇员:不存在一个部门,雇员没有在该部门工作过; 2. sql 语句 select emp_n ...
分类:
其他好文 时间:
2020-02-10 18:25:21
阅读次数:
277
查询某个字段存在的语句 db.getCollection('tableName').find({"RouteInfo":{"$exists":true}}) 查询某个字段不存在的语句 db.getCollection('tableName').find({"RouteInfo":{"$exists" ...
分类:
数据库 时间:
2020-02-10 11:23:09
阅读次数:
57
题目如下: Given an array arr of integers, check if there exists two integers N and M such that N is the double of M ( i.e. N = 2 * M). More formally check ...
分类:
其他好文 时间:
2020-02-09 18:55:33
阅读次数:
79
https://mp.weixin.qq.com/s/9nMo6IYmDCz7S-ALFx824g 简单介绍TLDebugModuleOuter的实现。 1. DebugModuleAccessType 定义调试模块访问宽度: 2. DebugAbstractCommandError 定义抽象命令访 ...
分类:
其他好文 时间:
2020-02-09 16:51:35
阅读次数:
74