名称: 抽象工厂模式(Abstract Factory Pattern) 问题: Provide an interface for creating families of related or dependent objects without specifying their concrete ...
分类:
其他好文 时间:
2020-06-20 19:16:37
阅读次数:
66
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document< ...
分类:
其他好文 时间:
2020-06-20 16:16:38
阅读次数:
54
# abs(-3) #取绝对值 # all('1,a,3,0') #对传入的值做布尔运算,全为真则为真。 # any([2,None,]) #对传入的值做布尔运算,有真则为真 # bin(15) #转二进制输出 # oct(15) #转八进制输出 # hex(15) #转十六进制输出 # bool( ...
分类:
编程语言 时间:
2020-06-20 14:19:21
阅读次数:
86
mount挂载 环境准备 主机名 安装服务 wan lan web01 nfs客户端 10.0.0.7 172.16.1.7 web02 nfs客户端 10.0.0.8 172.16.1.8 nfs nfs服务端 10.0.0.9 172.16.1.9 流程分析 1.安装ansible 2.优化an ...
分类:
其他好文 时间:
2020-06-19 21:18:54
阅读次数:
220
at if not, Start Atd Service systemctl status atd.service //output: ┌─[root@nedrain]─[~] └──? $systemctl status atd.service ● atd.service - Job spooli ...
分类:
系统相关 时间:
2020-06-19 13:45:08
阅读次数:
66
1.什么是方法的重写(override 或 overwrite)? 子类继承父类以后,可以对父类中同名同参数的方法,进行覆盖操作. 2. 应用: 重写以后,当创建子类对象以后,通过子类对象调用子父类中的同名同参数的方法时,实际执行的是子类重写父类的方法。3.举例: class Circle{publ ...
分类:
其他好文 时间:
2020-06-18 21:21:01
阅读次数:
58
ConcurrentHashMap源码解析 ConcurrentHashMap是什么? 它是对HashMap线程安全性的增强类,保证了Map对象在多线程环境下的读写的线程安全性。在使用方法上和HashMap保持一致,都是Map接口的实现类。 类结构 核心数据结构 核心数据结构和HashMap相同,都 ...
分类:
其他好文 时间:
2020-06-18 19:44:46
阅读次数:
64
实际上,这是一个编译时选项。默认会使用内部的 slab 分配器。您确实确实应该 使用内建的 slab 分配器。最早的时候,memcached 只使用 malloc/free 来管理 内存。然而,这种方式不能与 OS 的内存管理以前很好地工作。反复地 malloc/free 造成了内存碎片,OS 最终 ...
分类:
系统相关 时间:
2020-06-18 11:02:57
阅读次数:
55
其实就是把概念抄一遍,并没有背住. Math类1.Math.abs(int a)取a的绝对值;2.Math.ceil(10.1)向上取整;3.Math.floor(10.9)向下取整;4,Math.round(2.5)四舍五入;5,Math.max(a,b)取大,Math.min()取小; Math ...
(function() { let myTool = { $: function(id) { return typeof id "string" ? document.getElementById(id) : null }, screenClient: function() { if (window ...
分类:
其他好文 时间:
2020-06-16 23:05:47
阅读次数:
54