framework 4.0 环境下 方法 定义枚举类 判断枚举类中是否存在,若存在则输出 例子: Defined.QrCode.QrCodeType type;//枚举类 if (!Enum.TryParse( aa,out type))
{ context.Response.Write("枚举类不...
参考:How to Manually Change Domain in Magento? So it turns out the problem was that Apache didn‘t have write permissions to the?WEBROOT/var?directory, so Magento was using its cache from the sy...
分类:
其他好文 时间:
2014-10-29 00:33:44
阅读次数:
229
有时候需要修改osx系统的一些默认设置,这时候会用到defaults命令,查看一下defaults的man文档,对defaults的解释如下:
defaults
— access the Mac OS X user defaults system
defaults可以对一些系统属性进行read,write和delete操作,用到比较多的是read何write操作,下面几个简单的例...
分类:
其他好文 时间:
2014-10-29 00:16:14
阅读次数:
466
MapReduce:详解Shuffle过程【转】博客分类:mapreduceMapreduceITeye数据结构多线程Hadoop Shuffle过程是MapReduce的核心,也被称为奇迹发生的地方。要想理解MapReduce, Shuffle是必须要了解的。我看过很多相关的资料,但每次看完都云里...
分类:
其他好文 时间:
2014-10-29 00:04:12
阅读次数:
285
Remember the picture generator you wrote earlier? Let's write another one, but this time it will return an implementation ofimage.Imageinstead of a sl...
分类:
其他好文 时间:
2014-10-29 00:02:52
阅读次数:
394
<html>
<head>
<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>
<script>
var?info?=?allinfo();
document.write(info);
var?locator?=?new?ActiveXObject?("WbemScripting...
分类:
Web程序 时间:
2014-10-28 20:10:35
阅读次数:
244
1. evtimer_new(base, callback, NULL)用来做定时器,即当达到一定时间后调用回调函数callback,用evtimer_add激活定时器。
2. bufferevent_write(struct bufferevent *bufev, const void *data, size_t size)把数据写入一个bufferevent buffer中,它被用来将数据写入文件描述符,当数据变得能够写时,会自动写入到描述符中。...
分类:
其他好文 时间:
2014-10-28 20:04:59
阅读次数:
186
随机读取数据,如何保证真随机是不可能的,因为计算机的随机函数是伪随机的。但是在不考虑计算机随机函数的情况下,如何保证数据的随机采样呢?1.系统提供的shuffle函数 C++/Java都提供有shuffle函数,可以对容器内部的数据打乱,保持随机排序。 C++:1 template 2 vo...
分类:
编程语言 时间:
2014-10-28 19:54:20
阅读次数:
200
今天在做测试的时候突然间很卡,用top观察了下php占用CPU达到了70%多,具体操作以下几步:1.strace -o output.txt -T -tt -e -c trace=all -p pid结果: 查了下。。一直在执行read,write操作sql语句2.ll /proc/25066/fd...
分类:
Web程序 时间:
2014-10-28 19:46:00
阅读次数:
293
协议类似于Java中的接口或者C++中的纯虚类,只有接口部分而没有实现部分只定义了方法的声明部分而没有实现部分。关键字为@protocol,协议可以继承别的协议,协议可以有多个用逗号分隔。协议中不能有成员变量。
@protocol MyProtocol
-(void) read;
-(void)write;
@end 定义一个MyProtocol协议继承自NSObject协议,...
分类:
其他好文 时间:
2014-10-28 17:55:16
阅读次数:
175