最近在学设计模式,学到创建型模式的时候,碰到单例模式(或叫单件模式),现在整理一下笔记。 在《Design Patterns:Elements of Resuable Object-Oriented Software》中的定义是:Ensure a class only has one instanc ...
分类:
其他好文 时间:
2016-05-23 18:44:50
阅读次数:
147
ON_COMMAND(ID_FILE_OPEN, &CWinApp::OnFileOpen) void CWinApp::OnFileOpen() { ENSURE(m_pDocManager != NULL); m_pDocManager->OnFileOpen(); } CDocManager*... ...
分类:
其他好文 时间:
2016-05-13 09:10:19
阅读次数:
278
cache一致性
On machines or bus configurations inwhich the hardware does not ensure cache coherence for DMA operations—such ascertain Intel Itanium systems—the standard Windows DMA implementation does th...
分类:
其他好文 时间:
2016-05-12 16:53:49
阅读次数:
758
Before the browser can render the page it needs to construct the DOM and CSSOM trees. As a result, we need to ensure that we deliver both the HTML and ...
分类:
其他好文 时间:
2016-05-03 20:26:27
阅读次数:
142
1. 单例模式的定义
单例模式(Singleton Pattern)是一个比较简单的模式,其原始定义如下:Ensure a class has only one instance, and provide a global point of access to it. 即确保只有一个实例,而且自行实例化并向整个系统提供这个实例。单例模式的通用类如下图所示:...
分类:
编程语言 时间:
2016-04-21 20:34:43
阅读次数:
238
先看代码实例 dumps(obj, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, encoding='utf-8', de ...
分类:
编程语言 时间:
2016-04-20 13:30:51
阅读次数:
340
阅读了(Association of Computing Machinery,简称 ACM)列出的《软件工程师道德实践准则》。因为是英文版本,阅读的不太顺畅。 印象最深的两个地方如下: To ensure, as much as possible, that their efforts will b ...
分类:
其他好文 时间:
2016-04-17 06:22:07
阅读次数:
125
一、添加任务计划vim/etc/puppet/mainfests/site.ppcron{‘ntpupdate‘:ensure=>present,command=>"ntpupdate
ntp.time.com",user
=>"root",minute
=>"0",hour
=>"0",monthday=>"*",month
=>‘*‘,weekday
=>‘*‘,}二、删除任务计划vim/etc/puppet/mainfest..
分类:
其他好文 时间:
2016-04-13 20:58:02
阅读次数:
149
一、用户管理生成用户秘钥:grub-crypt--sha-512Password:Retypepassword:$6$lYIpu8h4TH7Nf0RM$3lUprHO3gy4XqmCwf0EMqyZjJz1alnISVEk0D/VV9pR3jVBhrzk/vysBRWaTfAZjiuYmc/OrPas8Hs8torqm91普通创建vim/etc/puppet/manifests/site.ppuser
{‘longge‘:ensure
=>present,home
=&..
分类:
其他好文 时间:
2016-04-13 20:56:17
阅读次数:
120
最近在学设计模式,学到创建型模式的时候,碰到单例模式(或叫单件模式),现在整理一下笔记。 在《Design Patterns:Elements of Resuable Object-Oriented Software》中的定义是:Ensure a class only has one instanc ...