CAS,当oldVal与expected相同时,将oldVal更新为newVal,原子操作ABA problem:when a location is read
twice, has the same value for both reads, and "value is same“ is used...
分类:
其他好文 时间:
2014-05-26 16:06:53
阅读次数:
217
不能再简化了#include#include#includeint
meng_read_proc(char*page,char**start,off_t offset,int count,int*eof,void*data){
char*s="Hello. This is meng p...
分类:
系统相关 时间:
2014-05-26 15:52:49
阅读次数:
463
\n"; while($file = $mydir->read()) {
if((is_dir("$directory/$file")) AND ($file!=".") AND ($file!="..")) { echo
"$fi...
分类:
Web程序 时间:
2014-05-26 14:22:05
阅读次数:
239
Features 256 bits EEPROM memory organized in 8
pages of 32 bits each 32 bits unique factory programmed serial number Typical
operating frequency : ...
分类:
其他好文 时间:
2014-05-26 13:32:43
阅读次数:
287
IOzone是一个文件系统测试基准工具。可以测试不同的操作系统中文件系统的读写性能。可以通过
write, re-write, read, re-read, random read, random write, random mix, backwards
read, record rewirte, ...
分类:
其他好文 时间:
2014-05-26 13:15:14
阅读次数:
298
这几天,接手一个同事的代码,关于微信接口开发的,那一堆的
if,看得哥蛋痛了,这个毛病也是很多新手容易犯的,所以特地把这次重构写出来。下面来我们看看这个代码的问题所在,if else
里面的代码块逻辑,不好改,使得它的重用性为 0,并且难以阅读。当然,如果 if 只有一两个,或者3个,这样写是问题不...
分类:
其他好文 时间:
2014-05-23 07:09:35
阅读次数:
265
只有深刻理解审计原则,自然而然就能写出设计模式。通过refactor(重构)得到设计模式。——现在还是不是很理解1、针对接口编程,而不是针对实现编程2、优先使用对象组合,而不是类继承3、封装变化点1、针对接口编程,而不是针对实现编程客户(程序)无需知道所使用对象的特定类型,只需要知道对象拥有客户所期...
分类:
其他好文 时间:
2014-05-23 03:47:22
阅读次数:
231
Direct request is the simplest method used to request a semaphore. The request behaves as an atomic read and set operation. The result of a request is either to grant the semaphore
to the requesting...
分类:
其他好文 时间:
2014-05-22 17:21:38
阅读次数:
517
--查询数据库状态select name,user_access,user_access_desc,
snapshot_isolation_state,snapshot_isolation_state_desc,
is_read_committed_snapshot_onfrom sys.dat.....
分类:
数据库 时间:
2014-05-22 16:48:03
阅读次数:
340
shell命令分成内置命令和外部命令。
内置命令(builtin command) 是shell解释程序内建的,有shell直接执行,不需要派生新的进程。有一些内部命令可以用来改变当前的shell环境。
常见的内部命令有:.(点命令)、bg、cd、continue、echo、exec、exit、export、fg、jobs、pwd、read、return、set、shift、t...
分类:
其他好文 时间:
2014-05-21 13:33:24
阅读次数:
213