<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>大鹏的博客（rocing's blog）</title>
		<link>http://www.rocing.cn/</link>
		<description>我们研究$，难道就是为了￥？</description>
		<copyright>Powered by SaBlog-X. Copyright (C) 2003-2012.</copyright>
		<generator>SaBlog-X Version 2.0 Build 20120305</generator>
		<lastBuildDate>Sat, 19 May 2012 08:38:48 +0000</lastBuildDate>
		<ttl>30</ttl>
		<item>
			<link>http://www.rocing.cn/archives/402/</link>
			<guid>http://www.rocing.cn/archives/402/</guid>
			<title>PHP垃圾回收机制</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p style="background-image:initial;background-attachment:initial;background-origin:initial;background-clip:initial;background-color:#FFFFFF;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;margin-top:0px;margin-bottom:24px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;vertical-align:baseline;color:#333333;font-family:Georgia, serif;font-size:16px;line-height:24px;white-space:normal;">
	<span style="display:none;" id="__kindeditor_bookmark_start_5__"></span>php 5.3之前使用的垃圾回收机制是单纯的“引用计数”，也就是每个内存对象都分配一个计数器，当内存对象被变量引用时，计数器 1；当变量引用撤掉后，计数器-1；当计数器=0时，表明内存对象没有被使用，该内存对象则进行销毁，垃圾回收完成。
</p>
<p style="background-image:initial;background-attachment:initial;background-origin:initial;background-clip:initial;background-color:#FFFFFF;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;margin-top:0px;margin-bottom:24px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;vertical-align:baseline;color:#333333;font-family:Georgia, serif;font-size:16px;line-height:24px;white-space:normal;">
	“引用计数”存在问题，就是当两个或多个对象互相引用形成环状后，内存对象的计数器则不会消减为0；这时候，这一组内存对象已经没用了，但是不能回收，从而导致内存泄露；
</p>
<p style="background-image:initial;background-attachment:initial;background-origin:initial;background-clip:initial;background-color:#FFFFFF;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;margin-top:0px;margin-bottom:24px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;vertical-align:baseline;color:#333333;font-family:Georgia, serif;font-size:16px;line-height:24px;white-space:normal;">
	php5.3开始，使用了新的垃圾回收机制，在引用计数基础上，实现了一种复杂的算法，来检测内存对象中引用环的存在，以避免内存泄露。
</p>
<p style="background-image:initial;background-attachment:initial;background-origin:initial;background-clip:initial;background-color:#FFFFFF;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;margin-top:0px;margin-bottom:24px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;vertical-align:baseline;color:#333333;font-family:Georgia, serif;font-size:16px;line-height:24px;white-space:normal;">
	该算法可以参考下面这篇文章，这是这篇小总结的主要参考文献:) ：浅谈PHP5中垃圾回收算法（Garbage Collection）的演化
</p>
<p style="background-image:initial;background-attachment:initial;background-origin:initial;background-clip:initial;background-color:#FFFFFF;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;border-image:initial;margin-top:0px;margin-bottom:24px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;vertical-align:baseline;color:#333333;font-family:Georgia, serif;font-size:16px;line-height:24px;white-space:normal;">
	<span style="display:none;" id="__kindeditor_bookmark_end_6__"></span> 
</p>
<div class="__kindeditor_paste__" style="position:absolute;width:1px;height:1px;overflow-x:hidden;overflow-y:hidden;left:-1981px;top:97px;white-space:nowrap;">
	<p style="margin-top:0px;margin-bottom:1em;white-space:normal;padding-bottom:0px;background-color:#FFFFFF;padding-left:0px;padding-right:0px;font-family:arial;line-height:26px;color:#6D6D6D;padding-top:0px;">
		<strong>1.PHP的垃圾回收机制</strong> 
	</p>
	<p style="margin-top:0px;margin-bottom:1em;white-space:normal;padding-bottom:0px;background-color:#FFFFFF;padding-left:0px;padding-right:0px;font-family:arial;line-height:26px;color:#6D6D6D;padding-top:0px;">
		php 5.3之前使用的垃圾回收机制是单纯的“引用计数”，也就是每个内存对象都分配一个计数器，当内存对象被变量引用时，计数器 1；当变量引用撤掉后，计数器-1；当计数器=0时，表明内存对象没有被使用，该内存对象则进行销毁，垃圾回收完成。
	</p>
	<p style="margin-top:0px;margin-bottom:1em;white-space:normal;padding-bottom:0px;background-color:#FFFFFF;padding-left:0px;padding-right:0px;font-family:arial;line-height:26px;color:#6D6D6D;padding-top:0px;">
		“引用计数”存在问题，就是当两个或多个对象互相引用形成环状后，内存对象的计数器则不会消减为0；这时候，这一组内存对象已经没用了，但是不能回收，从而导致内存泄露；
	</p>
	<p style="margin-top:0px;margin-bottom:1em;white-space:normal;padding-bottom:0px;background-color:#FFFFFF;padding-left:0px;padding-right:0px;font-family:arial;line-height:26px;color:#6D6D6D;padding-top:0px;">
		php5.3开始，使用了新的垃圾回收机制，在引用计数基础上，实现了一种复杂的算法，来检测内存对象中引用环的存在，以避免内存泄露。
	</p>
	<p style="margin-top:0px;margin-bottom:1em;white-space:normal;padding-bottom:0px;background-color:#FFFFFF;padding-left:0px;padding-right:0px;font-family:arial;line-height:26px;color:#6D6D6D;padding-top:0px;">
		该算法可以参考下面这篇<span style="font-size:14px;">文章，这是这篇小总结的主要参考文献:) ：</span><a target="_blank" style="color:#1463C4;"><span style="font-size:14px;">浅谈PHP5中垃圾回收算法（Garbage Collection）的演化<br style="line-height:10px;" />
</span></a> 
	</p>
	<p style="margin-top:0px;margin-bottom:1em;white-space:normal;padding-bottom:0px;background-color:#FFFFFF;padding-left:0px;padding-right:0px;font-family:arial;line-height:26px;color:#6D6D6D;padding-top:0px;">
		<span style="font-size:14px;"></span> 
	</p>
	<p style="margin-top:0px;margin-bottom:1em;white-space:normal;padding-bottom:0px;background-color:#FFFFFF;padding-left:0px;padding-right:0px;font-family:arial;line-height:26px;color:#6D6D6D;padding-top:0px;">
		<strong>2.查看内存是否泄露</strong> 
	</p>
	<p style="margin-top:0px;margin-bottom:1em;white-space:normal;padding-bottom:0px;background-color:#FFFFFF;padding-left:0px;padding-right:0px;font-family:arial;line-height:26px;color:#6D6D6D;padding-top:0px;">
		看是否有该释放的内存没有被释放，可以简单的通过 调用
	</p>
</div>]]></description>
			<link>http://www.rocing.cn/archives/402/</link>
			<category domain="http://www.rocing.cn/category/2/">SQL一下</category>
			<comments>http://www.rocing.cn/archives/402/#comments</comments>
			<pubDate>Wed, 09 May 2012 15:51:24 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/401/</link>
			<guid>http://www.rocing.cn/archives/401/</guid>
			<title>mysql 队列。实现并发读</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p>
	<br />
</p>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
	队列是常用的数据结构，基本特点就是先入先出，在事务处理等方面都要用到它，有的时候是带有优先级的队列。当队列存在并发访问的时候，比如多线程情况下，就需要锁机制来保证队列中的同一个元素不被多次获取。
</p>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
	一个 MySQL 表可以看作是一个队列，每一行为一个元素。每次查询得到满足某个条件的最前面的一行，并将它从表中删除或者改变它的状态，使得下次查询不会得到它。在没有并发访问的情况下，简单地用 SELECT 得到一行，再用UPDATE(或者DELETE)语句修改之，就可以实现。
</p>
<blockquote style="font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
<pre class="brush:php;">SELECT * FROM targets WHERE status='C' LIMIT 1;
UPDATE targets SET status='D' WHERE id='id';</pre>
<br />
</blockquote>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
	如果有并发访问，在SELECT和UPDATE语句之间可能会存在其他地SELECT查询，导致同一行被取出多次。为了保证在并发情况下仍然能正常工作，一种思路是使用数据库地锁来防止，就像在多线程环境下所做地一样。总之，要是的查询和修改为一个原子操作，不被其它的访问干扰。MySQL 5 支持存储过程，可以用它来实现。
</p>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
	单条 UPDATE 语句应该原子操作的，可以利用这个特性来保证并发访问情况下队列的正常工作。每次取元素时，先用 UPDATE 修改符合条件的第一行，然后再得到该行。可惜 UPDATE 语句没有返回值，重新用普通的SELECT的话又很难找到刚被改过的那条记录。
</p>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
	这里用到一个小技巧：在 UPDATE 时加上 id=LAST_INSERT_ID(id)，再用 &nbsp;SELECT LAST_INSERT_ID() 即可得到刚修改的那条记录的id。还有一个问题，当表中不存在符合条件的记录，导致 UPDATE 失败时，LAST_INSERT_ID() 会保留原来地值不变，因而不能区分队列中是否还有元素。
</p>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
	ROW_COUNT() 返回上一个语句影响的行数，把它作为 SELECT 的一个条件，可以帮助解决这个问题。
</p>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
	最后，支持并发访问的完整解决方案为：
</p>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
	<br />
</p>
<pre class=";">UPDATE  targets SET status='D', id=LAST_INSERT_ID(id) WHERE status='C' LIMIT 1;
SELECT * FROM targets WHERE ROW_COUNT()&gt;0 and id=LAST_INSERT_ID();</pre>
<p>
	<br />
</p>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
	更新：在实现带优先级的队列时这种方法有问题，带有 ORDER BY ... 条件的 UPDATE 语句非常慢，例如：
</p>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
	<br />
</p>
<pre class="brush:php;">UPDATE  targets SET status='D' WHERE status='C' ORDER BY schedule ASC LIMIT 1;</pre>
<p>
	<br />
</p>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
	而单独查询和更新则是很快的：
</p>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
	<br />
</p>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
<pre class="brush:php;">SELECT id FROM targets WHERE status='C' ORDER BY schedule ASC LIMIT 1;
UPDATE targets SET status='D' WHERE id='id';</pre>
</p>
<p>
	<br />
</p>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
	原来这是MySQL的<a href="http://bugs.mysql.com/bug.php?id=12915">Bug-12915</a>，一年多以前提出来的，虽然关闭了，却只解决了部分问题，尚不支持WHERE，见<a href="http://dev.mysql.com/doc/refman/5.0/en/news-5-0-15.html">MySQL 5.0.15 的 Changlog</a>。无奈，上面这种巧妙的方法也没有实用价值了。
</p>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
	最后采用了一种折衷方案，如下：
</p>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
	<br />
</p>
<p style="margin-top:0px;margin-bottom:0px;font-size:14px;line-height:21px;white-space:normal;font-family:宋体;">
<pre class="brush:php;">UPDATE  targets, (SELECT id FROM targets WHERE status='C' AND schedule&lt;CURRENT_TIMESTAMP ORDER BY schedule ASC LIMIT 1) tmp SET status='D' WHERE targets.id=LAST_INSERT_ID(tmp.id);
SELECT * FROM targets WHERE ROW_COUNT()&gt;0 and id=LAST_INSERT_ID();</pre>
</p>
<p>
	<br />
</p>
<p>
	<br />
</p>
<p style="font-family:宋体;font-size:14px;">
	<br />
</p>]]></description>
			<link>http://www.rocing.cn/archives/401/</link>
			<category domain="http://www.rocing.cn/category/2/">SQL一下</category>
			<pubDate>Tue, 10 Apr 2012 20:31:39 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/400/</link>
			<guid>http://www.rocing.cn/archives/400/</guid>
			<title>Linux下批量Kill多个进程</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p style="text-align: left; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: #333333; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">ps -ef|grep LOCAL=NO|grep -v grep|cut -c 9-15|xargs kill -9</p>
<p style="text-align: left; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: #333333; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;</p>
<p style="text-align: left; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: #333333; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">　　管道符&ldquo;|&rdquo;用来隔开两个命令，管道符左边命令的输出会作为管道符右边命令的输入。下面说说用管道符联接起来的</p>
<p style="text-align: left; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: #333333; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">几个命令：</p>
<p style="text-align: left; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: #333333; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;&nbsp;&nbsp;&nbsp; &ldquo;ps - ef&rdquo;是Red Hat 里查看所有进程的命令。这时检索出的进程将作为下一条命令&ldquo;grep LOCAL=NO&rdquo;的输入。</p>
<p style="text-align: left; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: #333333; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">　&nbsp; &ldquo;grep LOCAL=NO&rdquo;的输出结果是，所有含有关键字&ldquo;LOCAL=NO&rdquo;的进程，这是Oracle数据库中远程连接进程的共同特点。</p>
<p style="text-align: left; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: #333333; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">　　&ldquo;grep -v grep&rdquo;是在列出的进程中去除含有关键字&ldquo;grep&rdquo;的进程。</p>
<p style="text-align: left; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: #333333; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">　　&ldquo;cut -c 9-15&rdquo;是截取输入行的第9个字符到第15个字符，而这正好是进程号PID。</p>
<p style="text-align: left; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: #333333; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">　　&ldquo;xargs kill -9&rdquo;中的xargs命令是用来把前面命令的输出结果（PID）作为&ldquo;kill -9&rdquo;命令的参数，并执行该令。&nbsp;&nbsp;&nbsp;</p>
<p style="text-align: left; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: #333333; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&ldquo;kill -9&rdquo;会强行杀掉指定进程，这样就成功清除了oracle的所有远程连接进程。其它类似的任务，只需要修改&ldquo;grep LOCAL=NO&rdquo;中的关键字部分就可以了。</p>
<p style="text-align: left; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: #333333; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">&nbsp;</p>
<p style="text-align: left; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: #333333; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">ps -ef|grep /usr/local/apache-tomcat-document/|grep -v grep|cut -c 9-15|xargs kill -9</p>
<p>&nbsp;</p>]]></description>
			<link>http://www.rocing.cn/archives/400/</link>
			<category domain="http://www.rocing.cn/category/6/">系统&amp;服务</category>
			<comments>http://www.rocing.cn/archives/400/#comments</comments>
			<pubDate>Wed, 21 Mar 2012 09:51:25 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/399/</link>
			<guid>http://www.rocing.cn/archives/399/</guid>
			<title>八种不同的NoSql对比</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">虽然SQL数据库是非常有用的工具，但经历了15年的一支独秀之后垄断即将被打破。这只是时间问题：被迫使用关系数据库，但最终发现不能适应需求的情况不胜枚举。</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　但是NoSQL数据库之间的不同，远超过两 SQL数据库之间的差别。这意味着软件架构师更应该在项目开始时就选择好一个适合的 NoSQL数据库。针对这种情况，这里对&nbsp;</span><a style="font-size: 12px; color: rgb(92, 153, 17); text-decoration: none; line-height: 20px; font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " target="_blank" href="http://cassandra.apache.org/">Cassandra</a><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">、</span><a style="font-size: 12px; color: rgb(92, 153, 17); text-decoration: none; line-height: 20px; font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " target="_blank" href="http://www.mongodb.org/">Mongodb</a><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">、</span><a style="font-size: 12px; color: rgb(92, 153, 17); text-decoration: none; line-height: 20px; font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " target="_blank" href="http://couchdb.apache.org/">CouchDB</a><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">、</span><a style="font-size: 12px; color: rgb(92, 153, 17); text-decoration: none; line-height: 20px; font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " target="_blank" href="http://redis.io/">Redis</a><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">、&nbsp;</span><a style="font-size: 12px; color: rgb(92, 153, 17); text-decoration: none; line-height: 20px; font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " target="_blank" href="http://www.basho.com/Riak.html">Riak</a><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">、&nbsp;</span><a style="font-size: 12px; color: rgb(92, 153, 17); text-decoration: none; line-height: 20px; font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " target="_blank" href="http://www.couchbase.org/membase">Membase</a><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">、</span><a style="font-size: 12px; color: rgb(92, 153, 17); text-decoration: none; line-height: 20px; font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " target="_blank" href="http://neo4j.org/">Neo4j</a><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">和</span><a style="font-size: 12px; color: rgb(92, 153, 17); text-decoration: none; line-height: 20px; font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " target="_blank" href="http://hbase.apache.org/">HBase</a><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">进行了比较：</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　（编注1：NoSQL：是一项全新的数据库革命性运动，NoSQL的拥护者们提倡运用非关系型的数据存储。现今的计算机体系结构在数据存储方面要求具 备庞大的水平扩 展性，而NoSQL致力于改变这一现状。目前Google的 BigTable 和Amazon 的Dynamo使用的就是NoSQL型数据库。 参见</span><a style="font-size: 12px; color: rgb(92, 153, 17); text-decoration: none; line-height: 20px; font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " target="_blank" href="http://zh.wikipedia.org/zh/NoSQL">NoSQL词条</a><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">。）</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">1. CouchDB</strong><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">所用语言： Erlang特点：DB一致性，易于使用使用许可： Apache协议： HTTP/REST双向数据复制，持续进行或临时处理，处理时带冲突检查，因此，采用的是master-master复制（见编注2）MVCC - 写操作不阻塞读操作可保存文件之前的版本Crash-only（可靠的）设计需要不时地进行数据压缩视图：嵌入式 映射/减少格式化视图：列表显示支持进行服务器端文档验证支持认证根据变化实时更新支持附件处理因此， CouchApps（独立的 js应用程序）需要 jQuery程序库</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">最佳应用场景：</strong><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">适用于数据变化较少，执行预定义查询，进行数据统计的应用程序。适用于需要提供数据版本支持的应用程序。</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">例如：</strong><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">&nbsp;CRM、CMS系统。 master-master复制对于多站点部署是非常有用的。</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　（编注2：master-master复制：是一种数据库同步方法，允许数据在一组计算机之间共享数据，并且可以通过小组中任意成员在组内进行数据更新。）</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">2. Redis</strong><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">所用语言：C/C++特点：运行异常快使用许可： BSD协议：类 Telnet有硬盘存储支持的内存数据库，但自2.0版本以后可以将数据交换到硬盘（注意， 2.4以后版本不支持该特性！）Master-slave复制（见编注3）虽然采用简单数据或以键值索引的哈希表，但也支持复杂操作，例如 ZREVRANGEBYSCORE。INCR &amp; co （适合计算极限值或统计数据）支持 sets（同时也支持 union/diff/inter）支持列表（同时也支持队列；阻塞式 pop操作）支持哈希表（带有多个域的对象）支持排序 sets（高得分表，适用于范围查询）Redis支持事务支持将数据设置成过期数据（类似快速缓冲区设计）Pub/Sub允许用户实现消息机制</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">最佳应用场景：</strong><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">适用于数据变化快且数据库大小可遇见（适合内存容量）的应用程序。</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">例如：</strong><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">股票价格、数据分析、实时数据搜集、实时通讯。</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　（编注3：Master-slave复制：如果同一时刻只有一台服务器处理所有的复制请求，这被称为 Master-slave复制，通常应用在需要提供高可用性的服务器集群。）</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">3. MongoDB</strong><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">所用语言：C++特点：保留了SQL一些友好的特性（查询，索引）。使用许可： AGPL（发起者： Apache）协议： Custom, binary（ BSON）Master/slave复制（支持自动错误恢复，使用 sets 复制）内建分片机制支持 javascript表达式查询可在服务器端执行任意的 javascript函数update-in-place支持比CouchDB更好在数据存储时采用内存到文件映射对性能的关注超过对功能的要求建议最好打开日志功能（参数 --journal）在32位操作系统上，数据库大小限制在约2.5Gb空数据库大约占 192Mb采用 GridFS存储大数据或元数据（不是真正的文件系统）</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">最佳应用场景：</strong><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">适用于需要动态查询支持；需要使用索引而不是 map/reduce功能；需要对大数据库有性能要求；需要使用 CouchDB但因为数据改变太频繁而占满内存的应用程序。</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">例如：</strong><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">你本打算采用 MySQL或 PostgreSQL，但因为它们本身自带的预定义栏让你望而却步。</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">4. Riak</strong><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">所用语言：Erlang和C，以及一些Javascript特点：具备容错能力使用许可： Apache协议： HTTP/REST或者 custom binary可调节的分发及复制(N, R, W)用 JavaScript or Erlang在操作前或操作后进行验证和安全支持。使用JavaScript或Erlang进行 Map/reduce连接及连接遍历：可作为图形数据库使用索引：输入元数据进行搜索（1.0版本即将支持）大数据对象支持（ Luwak）提供&ldquo;开源&rdquo;和&ldquo;企业&rdquo;两个版本全文本搜索，索引，通过 Riak搜索服务器查询（ beta版）支持Masterless多站点复制及商业许可的 SNMP监控</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　最佳应用场景：适用于想使用类似 Cassandra（类似Dynamo）数据库但无法处理 bloat及复杂性的情况。适用于你打算做多站点复制，但又需要对单个站点的扩展性，可用性及出错处理有要求的情况。</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　例如：销售数据搜集，工厂控制系统；对宕机时间有严格要求；可以作为易于更新的 web服务器使用。</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">5. Membase</strong><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">所用语言： Erlang和C特点：兼容 Memcache，但同时兼具持久化和支持集群使用许可： Apache 2.0协议：分布式缓存及扩展非常快速（200k+/秒），通过键值索引数据可持久化存储到硬盘所有节点都是唯一的（ master-master复制）在内存中同样支持类似分布式缓存的缓存单元写数据时通过去除重复数据来减少 IO提供非常好的集群管理 web界面更新软件时软无需停止数据库服务支持连接池和多路复用的连接代理</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">最佳应用场景：</strong><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">适用于需要低延迟数据访问，高并发支持以及高可用性的应用程序</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　例如：低延迟数据访问比如以广告为目标的应用，高并发的 web 应用比如网络游戏（例如 Zynga）</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">6. Neo4j</strong><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">所用语言： Java特点：基于关系的图形数据库使用许可： GPL，其中一些特性使用 AGPL/商业许可协议： HTTP/REST（或嵌入在 Java中）可独立使用或嵌入到 Java应用程序图形的节点和边都可以带有元数据很好的自带web管理功能使用多种算法支持路径搜索使用键值和关系进行索引为读操作进行优化支持事务（用 Java api）使用 Gremlin图形遍历语言支持 Groovy脚本支持在线备份，高级监控及高可靠性支持使用 AGPL/商业许可</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">最佳应用场景：</strong><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">适用于图形一类数据。这是 Neo4j与其他nosql数据库的最显著区别</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　例如：社会关系，公共交通网络，地图及网络拓谱</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">7. Cassandra</strong><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">所用语言： Java特点：对大型表格和 Dynamo支持得最好使用许可： Apache协议： Custom, binary (节约型)可调节的分发及复制(N, R, W)支持以某个范围的键值通过列查询类似大表格的功能：列，某个特性的列集合写操作比读操作更快基于 Apache分布式平台尽可能地 Map/reduce我承认对 Cassandra有偏见，一部分是因为它本身的臃肿和复杂性，也因为 Java的问题（配置，出现异常，等等）</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">最佳应用场景：</strong><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">当使用写操作多过读操作（记录日志）如果每个系统组建都必须用 Java编写（没有人因为选用 Apache的软件被解雇）</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　例如：银行业，金融业（虽然对于金融交易不是必须的，但这些产业对数据库的要求会比它们更大）写比读更快，所以一个自然的特性就是实时数据分析</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">8. HBase</strong><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　（配合 ghshephard使用）</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">所用语言： Java特点：支持数十亿行X上百万列使用许可： Apache协议：HTTP/REST （支持&nbsp;</span><a style="font-size: 12px; color: rgb(92, 153, 17); text-decoration: none; line-height: 20px; font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " target="_blank" href="http://www.jobbole.com/entry.php/73">Thrift</a><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">，见编注4）在 BigTable之后建模采用分布式架构 Map/reduce对实时查询进行优化高性能 Thrift网关通过在server端扫描及过滤实现对查询操作预判支持 XML, Protobuf, 和binary的HTTPCascading, hive, and pig source and sink modules基于 Jruby（ JIRB）的shell对配置改变和较小的升级都会重新回滚不会出现单点故障堪比MySQL的随机访问性能　　</span><strong style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); ">最佳应用场景：</strong><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">适用于偏好BigTable:)并且需要对大数据进行随机、实时访问的场合。</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　例如： Facebook消息数据库（更多通用的用例即将出现）</span><br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<br style="line-height: 20px; color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " />
<span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">　　编注4：Thrift 是一种接口定义语言，为多种其他语言提供定义和创建服务，</span><a style="font-size: 12px; color: rgb(92, 153, 17); text-decoration: none; line-height: 20px; font-family: Tahoma; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); " target="_blank" href="http://www.jobbole.com/entry.php/73">由Facebook开发并开源</a><span style="color: rgb(102, 102, 102); font-family: Tahoma; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(222, 245, 242); display: inline !important; float: none; " class="Apple-style-span">。</span></p>]]></description>
			<link>http://www.rocing.cn/archives/399/</link>
			<category domain="http://www.rocing.cn/category/6/">系统&amp;服务</category>
			<comments>http://www.rocing.cn/archives/399/#comments</comments>
			<pubDate>Wed, 14 Dec 2011 18:53:15 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/398/</link>
			<guid>http://www.rocing.cn/archives/398/</guid>
			<title>10 个加速 CSS 开发的框架</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p>CSS 可以做很多事情，但开发者更习惯的是变量、常量和一般的更快速的语法，而 CSS 本身是不支持的。本文介绍了 10 个 CSS 预处理器，让 CSS 支持一些简单的编程语法。</p>
<p><strong><a href="http://compass-style.org/">Compass</a></strong></p>
<p>&nbsp;</p>
<p><strong><div class="attach"><a href="http://www.rocing.cn/attachment.php?id=184" target="_blank"><img src="http://www.rocing.cn/attachments/date_201109/53a2e2ef94fd137173e3ecb634dd5436.png" alt="1.png - 大小: 71.33 KB - 尺寸: 448 x 241 - 点击打开新窗口浏览全图" width="448" height="241" /></a></div></strong></p>
<p>&nbsp;</p>
<p>Compass 是一个开源的 CSS 制作框架。</p>
<p>&nbsp;</p>
<p><strong><a href="http://retired.haveamint.com/archive/2008/05/30/check_out_css_cacheer">CSS Cacheer</a></strong></p>
<p><a href="http://smashinghub.com/wp-content/uploads/2011/09/csscacheer.png"><img class="aligncenter" alt="" src="http://smashinghub.com/wp-content/uploads/2011/09/csscacheer.png" width="594" height="441" /></a></p>
<p>这是一个很棒的 CSS 预处理器，让开发者可以制作插件，要求 PHP 以及 Apache (mod_deflate 和 mod_rewrite)</p>
<p>&nbsp;</p>
<p><strong><a href="http://www.oschina.net/p/csscaffold">CSScaffold</a></strong></p>
<p><img class="aligncenter size-full wp-image-15697" title="scaffold" alt="scaffold" src="http://smashinghub.com/wp-content/uploads/2011/09/scaffold.jpg" width="500" height="250" /></p>
<p>CSScaffold是一款帮助CSS开发者快速进行开发的框架，使用PHP编写而成- Simple, but powerful ！</p>
<p>不同于许多CSS框架，它必须依靠PHP与Apache的mod_rewrite来执行，但也因为需要这两种东西，让CSScaffold变得很神奇、很方便，写起CSS来又快又轻松！</p>
<p>&nbsp;</p>
<p><strong><a href="http://www.oschina.net/p/sass">Sass</a></strong></p>
<p><img class="aligncenter" alt="" src="http://smashinghub.com/wp-content/uploads/2011/09/sass.png" width="594" height="441" /></p>
<p>Sass 扩展了 CSS3，增加了规则、变量、混入、选择器、继承等等特性。Sass 生成良好格式化的 CSS 代码，易于组织和维护。</p>
<p>&nbsp;</p>
<p><strong><a href="http://www.oschina.net/p/lesscss">Less CSS</a></strong></p>
<p><img class="aligncenter size-full wp-image-15685" alt="" src="http://static.oschina.net/uploads/img/201109/04022122_r5ik.png" width="594" height="441" /></p>
<p>Less CSS 是一个使用广泛的 CSS 预处理器，通过简单的语法和变量对 CSS 进行扩展，可减少很多 CSS 的代码量。</p>
<p>&nbsp;</p>
<p><strong><a href="http://turbine.peterkroener.de/index.php">Turbine</a></strong></p>
<p><img class="aligncenter size-full wp-image-15687" alt="" src="http://smashinghub.com/wp-content/uploads/2011/09/turbine.png" width="594" height="441" /></p>
<p>这是 PHP 爱好者的框架，提供最小化的语法、自动的 gzip 压缩以及多css文件的合并，修复跨浏览器支持问题等。</p>
<p>&nbsp;</p>
<p><strong><a href="http://www.oschina.net/p/switchcss">Switch CSS</a></strong></p>
<p><img class="aligncenter size-full wp-image-15688" alt="" src="http://smashinghub.com/wp-content/uploads/2011/09/switchcss.png" width="594" height="441" /></p>
<p>Switch 是一个全功能的稳定的 CSS 预处理器，基于 Apache 和 mod_python 下运行，也提供命令行处理工具。</p>
<p>&nbsp;</p>
<p><strong><a href="http://pornel.net/css">CSS Preprocessor</a></strong></p>
<p><img class="aligncenter size-full wp-image-15690" alt="" src="http://smashinghub.com/wp-content/uploads/2011/09/csspreprocessor.png" width="594" height="441" /></p>
<p>CSS Preprocessor 采用 PHP5 编写，有预处理器的常见功能，外，支持 CSS 表达式，如：margin-left: (200px * 3/2 &ndash; 10px);</p>
<p>&nbsp;</p>
<p><strong><a href="http://www.oschina.net/p/dtcss">DT CSS</a></strong></p>
<p><img class="aligncenter size-full wp-image-15691" alt="" src="http://smashinghub.com/wp-content/uploads/2011/09/dtcss.png" width="594" height="441" /></p>
<p>DtCSS 是一个 PHP 脚本，用来对 CSS 文件进行预处理。DtCSS 可通过扩展 CSS 的特性来加速 CSS 编码。例如嵌套选择器、颜色混合等等。DtCSS 读取 CSS 文件并对特殊语法进行处理，然后输出标准 CSS。DtCSS 包含一个智能的缓存系统。</p>
<p>&nbsp;</p>
<p><strong><a href="http://csspp.org/">CSS PP</a></strong></p>
<p><img class="aligncenter size-full wp-image-15692" alt="" src="http://smashinghub.com/wp-content/uploads/2011/09/csspp.png" width="594" height="441" /></p>
<p>目前还是 alpha 版本状态，支持 PHP、Python 和 Ruby。</p>]]></description>
			<link>http://www.rocing.cn/archives/398/</link>
			<category domain="http://www.rocing.cn/category/9/">经验聚合</category>
			<pubDate>Tue, 06 Sep 2011 14:52:09 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/397/</link>
			<guid>http://www.rocing.cn/archives/397/</guid>
			<title>历史回顾：Google的十大高价收购</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px 'Microsoft Yahei', Tahoma, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span">
<p style="padding-bottom: 0px; line-height: 20px; border-right-width: 0px; margin: 0px 0px 20px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">在风云变幻的科技行业，公司间的收购与被收购是常有的事。过去10年间，Google已经收购了超过100家的公司。是不是好奇哪些公司被Google花费巨资招为旗下呢?下面将回顾历史，看看Google的十大高价收购。</p>
<p style="padding-bottom: 0px; line-height: 20px; border-right-width: 0px; margin: 0px 0px 20px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">1.<strong style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">dMarc Broadcasting</strong><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
<a style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; outline-style: none; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; color: rgb(33,121,209); font-size: 14px; vertical-align: baseline; border-left-width: 0px; text-decoration: none; padding-top: 0px" href="http://www.36kr.com/?attachment_id=40439" rel="attachment wp-att-40439"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; background-color: rgb(255,255,255); margin: 0px; padding-left: 0px; padding-right: 0px; max-width: 650px; height: auto; font-size: 14px; vertical-align: baseline; border-top: 0px; border-right: 0px; padding-top: 0px; background-origin: initial; background-clip: initial" class="alignnone size-full wp-image-40439" title="dMarc" alt="" src="http://www.36kr.com/wp-content/uploads/2011/08/dMarc.jpg" width="176" height="65" /></a><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
时间：2006年1月 金额：1.02亿美元<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
说明：为加强自动广告系统上的实力，Google收购了该领域的公司dMarc Broadcasting。原dMarc Broadcasting公司的技术和产品都被整合到了现在的Google AdSense中。</p>
<p style="padding-bottom: 0px; line-height: 20px; border-right-width: 0px; margin: 0px 0px 20px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">2.<strong style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">On2 Technologies</strong><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
<a style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; outline-style: none; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; color: rgb(33,121,209); font-size: 14px; vertical-align: baseline; border-left-width: 0px; text-decoration: none; padding-top: 0px" href="http://www.36kr.com/?attachment_id=40440" rel="attachment wp-att-40440"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; background-color: rgb(255,255,255); margin: 0px; padding-left: 0px; padding-right: 0px; max-width: 650px; height: auto; font-size: 14px; vertical-align: baseline; border-top: 0px; border-right: 0px; padding-top: 0px; background-origin: initial; background-clip: initial" class="alignnone size-full wp-image-40440" title="On2" alt="" src="http://www.36kr.com/wp-content/uploads/2011/08/On2.jpg" width="200" height="172" /></a><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
时间：2010年10月 金额：1.33亿美元<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
说明：为了优化WebM使之成为未来互联网的主流视频格式，Google经过投标后将这家从事多媒体编解码器开发的公司拿下。</p>
<p style="padding-bottom: 0px; line-height: 20px; border-right-width: 0px; margin: 0px 0px 20px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">3.<strong style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">Slide</strong><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
<a style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; outline-style: none; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; color: rgb(33,121,209); font-size: 14px; vertical-align: baseline; border-left-width: 0px; text-decoration: none; padding-top: 0px" href="http://www.36kr.com/?attachment_id=40442" rel="attachment wp-att-40442"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; background-color: rgb(255,255,255); margin: 0px; padding-left: 0px; padding-right: 0px; max-width: 650px; height: auto; font-size: 14px; vertical-align: baseline; border-top: 0px; border-right: 0px; padding-top: 0px; background-origin: initial; background-clip: initial" class="alignnone size-full wp-image-40442" title="slide" alt="" src="http://www.36kr.com/wp-content/uploads/2011/08/slide.jpg" width="259" height="194" /></a><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
时间：2010年8月 金额：1.82亿美元<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
说明：Slide是一个相册分享的Web2.0网站，在被收购之前是Facebook上最大的第三方应用开发者。Google对Slide的收购被解读为&ldquo;Google对社交网络的重视&rdquo;。</p>
<p style="padding-bottom: 0px; line-height: 20px; border-right-width: 0px; margin: 0px 0px 20px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">4.<strong style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">Admeld</strong><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
<a style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; outline-style: none; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; color: rgb(33,121,209); font-size: 14px; vertical-align: baseline; border-left-width: 0px; text-decoration: none; padding-top: 0px" href="http://www.36kr.com/?attachment_id=40443" rel="attachment wp-att-40443"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; background-color: rgb(255,255,255); margin: 0px; padding-left: 0px; padding-right: 0px; max-width: 650px; height: auto; font-size: 14px; vertical-align: baseline; border-top: 0px; border-right: 0px; padding-top: 0px; background-origin: initial; background-clip: initial" class="alignnone size-full wp-image-40443" title="Admeld" alt="" src="http://www.36kr.com/wp-content/uploads/2011/08/Admeld.jpg" width="160" height="94" /></a><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
时间：2011年6月 金额：4亿美元<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
说明：这又是一家在线广告领域内的公司，专注于在线广告的简化展示。现在Admeld与同样被Google收购的Double Click和Invite Media被整合到了一起。</p>
<p style="padding-bottom: 0px; line-height: 20px; border-right-width: 0px; margin: 0px 0px 20px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">5.<strong style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">Postini</strong><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
<a style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; outline-style: none; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; color: rgb(33,121,209); font-size: 14px; vertical-align: baseline; border-left-width: 0px; text-decoration: none; padding-top: 0px" href="http://www.36kr.com/?attachment_id=40444" rel="attachment wp-att-40444"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; background-color: rgb(255,255,255); margin: 0px; padding-left: 0px; padding-right: 0px; max-width: 650px; height: auto; font-size: 14px; vertical-align: baseline; border-top: 0px; border-right: 0px; padding-top: 0px; background-origin: initial; background-clip: initial" class="alignnone size-full wp-image-40444" title="postini" alt="" src="http://www.36kr.com/wp-content/uploads/2011/08/postini.jpg" width="202" height="128" /></a><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
时间：2007年7月 金额：6.25亿美元<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
说明：这家公司提供云计算和垃圾邮件过滤的技术和服务，Google收购后将其整合进入了Gmail中。</p>
<p style="padding-bottom: 0px; line-height: 20px; border-right-width: 0px; margin: 0px 0px 20px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">6.<strong style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">ITA Software</strong><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
<a style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; outline-style: none; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; color: rgb(33,121,209); font-size: 14px; vertical-align: baseline; border-left-width: 0px; text-decoration: none; padding-top: 0px" href="http://www.36kr.com/?attachment_id=40445" rel="attachment wp-att-40445"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; background-color: rgb(255,255,255); margin: 0px; padding-left: 0px; padding-right: 0px; max-width: 650px; height: auto; font-size: 14px; vertical-align: baseline; border-top: 0px; border-right: 0px; padding-top: 0px; background-origin: initial; background-clip: initial" class="alignnone size-full wp-image-40445" title="ita software" alt="" src="http://www.36kr.com/wp-content/uploads/2011/08/ita-software.jpg" width="174" height="126" /></a><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
时间：2010年7月 金额:7亿美元<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
说明：为优化搜索结果中的旅游和机票优惠信息，Google将开发旅游业软件的ITA招入麾下。</p>
<p style="padding-bottom: 0px; line-height: 20px; border-right-width: 0px; margin: 0px 0px 20px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">7.<strong style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">AdMob</strong><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
<a style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; outline-style: none; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; color: rgb(33,121,209); font-size: 14px; vertical-align: baseline; border-left-width: 0px; text-decoration: none; padding-top: 0px" href="http://www.36kr.com/?attachment_id=40446" rel="attachment wp-att-40446"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; background-color: rgb(255,255,255); margin: 0px; padding-left: 0px; padding-right: 0px; max-width: 650px; height: auto; font-size: 14px; vertical-align: baseline; border-top: 0px; border-right: 0px; padding-top: 0px; background-origin: initial; background-clip: initial" class="alignnone size-full wp-image-40446" title="admob" alt="" src="http://www.36kr.com/wp-content/uploads/2011/08/admob.jpg" width="160" height="160" /></a><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
时间：2009年11月 金额：7.5亿美元<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
说明：为提升移动广告市场的实力，Google收购了该领域内的AdMob。</p>
<p style="padding-bottom: 0px; line-height: 20px; border-right-width: 0px; margin: 0px 0px 20px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">8.<strong style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">YouTube</strong><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
<a style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; outline-style: none; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; color: rgb(33,121,209); font-size: 14px; vertical-align: baseline; border-left-width: 0px; text-decoration: none; padding-top: 0px" href="http://www.36kr.com/?attachment_id=40447" rel="attachment wp-att-40447"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; background-color: rgb(255,255,255); margin: 0px; padding-left: 0px; padding-right: 0px; max-width: 650px; height: auto; font-size: 14px; vertical-align: baseline; border-top: 0px; border-right: 0px; padding-top: 0px; background-origin: initial; background-clip: initial" class="alignnone size-full wp-image-40447" title="youtube" alt="" src="http://www.36kr.com/wp-content/uploads/2011/08/youtube.jpg" width="267" height="189" /></a><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
时间：2006年10月 金额：16.5亿美元<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
说明：Google是通过换股并购的方式拿下这家世界最大的视频网站的。Google并没有把它和Google视频整合到一起，继续保持独立运营。</p>
<p style="padding-bottom: 0px; line-height: 20px; border-right-width: 0px; margin: 0px 0px 20px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">9.<strong style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">Double Click</strong><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
<a style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; outline-style: none; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; color: rgb(33,121,209); font-size: 14px; vertical-align: baseline; border-left-width: 0px; text-decoration: none; padding-top: 0px" href="http://www.36kr.com/?attachment_id=40448" rel="attachment wp-att-40448"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; background-color: rgb(255,255,255); margin: 0px; padding-left: 0px; padding-right: 0px; max-width: 650px; height: auto; font-size: 14px; vertical-align: baseline; border-top: 0px; border-right: 0px; padding-top: 0px; background-origin: initial; background-clip: initial" class="alignnone size-full wp-image-40448" title="double click" alt="" src="http://www.36kr.com/wp-content/uploads/2011/08/double-click.jpg" width="213" height="122" /></a><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
时间:2007年4月 金额：31亿美元<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
说明：这家曾经的最大的广告服务提供商和现在YouTube一样仍保持独立运营，为Google AdSense提供技术支持。</p>
<p style="padding-bottom: 0px; line-height: 20px; border-right-width: 0px; margin: 0px 0px 20px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">10.Motorola移动<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
<a style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; outline-style: none; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; color: rgb(33,121,209); font-size: 14px; vertical-align: baseline; border-left-width: 0px; text-decoration: none; padding-top: 0px" href="http://www.36kr.com/?attachment_id=40449" rel="attachment wp-att-40449"><img style="border-bottom: 0px; border-left: 0px; padding-bottom: 0px; background-color: rgb(255,255,255); margin: 0px; padding-left: 0px; padding-right: 0px; max-width: 650px; height: auto; font-size: 14px; vertical-align: baseline; border-top: 0px; border-right: 0px; padding-top: 0px; background-origin: initial; background-clip: initial" class="alignnone size-full wp-image-40449" title="motorola mobility" alt="" src="http://www.36kr.com/wp-content/uploads/2011/08/motorola-mobility.jpg" width="268" height="188" /></a><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
时间：2011年8月 金额：125亿美元<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
说明：昨日的<a style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; outline-style: none; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; color: rgb(33,121,209); font-size: 14px; vertical-align: baseline; border-left-width: 0px; text-decoration: none; padding-top: 0px" title="惊天快讯：谷歌以125亿美元的天价收购摩托罗拉移动" href="http://www.36kr.com/p/40242.html" target="_blank">惊天收购</a>震惊了整个IT业，必将改变现在的智能手机市场的格局。摩托罗拉移动是Android手持设备的39个生产商之一。在拥有了自己的硬件生产商之后，Google将加强对整个Android生态系统的掌控。</p>
<p style="padding-bottom: 0px; line-height: 20px; border-right-width: 0px; margin: 0px 0px 20px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">via<span class="Apple-converted-space">&nbsp;</span><a style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; outline-style: none; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; color: rgb(33,121,209); font-size: 14px; vertical-align: baseline; border-left-width: 0px; text-decoration: none; padding-top: 0px" href="http://mashable.com/2011/08/15/google-acquisitions-price/#2347110-Motorola-Mobility" target="_blank">Mashable</a></p>
<p style="padding-bottom: 0px; line-height: 20px; border-right-width: 0px; margin: 0px 0px 20px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; font-size: 14px; vertical-align: baseline; border-left-width: 0px; padding-top: 0px">更早的Google收购信息可以<a style="padding-bottom: 0px; border-right-width: 0px; margin: 0px; outline-style: none; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; color: rgb(33,121,209); font-size: 14px; vertical-align: baseline; border-left-width: 0px; text-decoration: none; padding-top: 0px" href="http://www.seobythesea.com/2005/12/google-acquisitions/" target="_blank">点此</a>查看。</p>
</span></p>]]></description>
			<link>http://www.rocing.cn/archives/397/</link>
			<category domain="http://www.rocing.cn/category/4/">杂谈</category>
			<category domain="http://www.rocing.cn/tag/google/">google</category>
			<comments>http://www.rocing.cn/archives/397/#comments</comments>
			<pubDate>Fri, 19 Aug 2011 09:27:19 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/396/</link>
			<guid>http://www.rocing.cn/archives/396/</guid>
			<title>编程巨星的唯一秘诀</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p>别以为是那些软件开发定律，别以为是开发出那些特殊用途的软件，别以为是软件设计技术本身。只有一条真理决定了一个软件程序员的成功还是失败。由于坚持这个真理，一个资深的程序员能在一天的时间里学会一门新的编程语言，而由于不坚持这条真理，一个初级的程序员用十年时间也只能挣到一份糊口的钱、永远是来实现别人的设计、永远不够优秀而得不到晋升的机会。这条真理让你看清了差的程序员和好的程序员的不同之处，好的程序员和伟大的程序员的不同之处，伟大的程序员和能通过自己的技术创造出一个亿万美元价值的程序帝国的超级程序员的不同之处。 <br />
<br />
不是什么复杂的道理，不是什么难懂的理论。不是具有什么天赋或&ldquo;编程超能力&ldquo;才能做到的事情。最终成为的是一个优秀的程序员还是一个很烂的程序员，这跟你的出身一点关系都没有。 <br />
<br />
而真正的原因只有一个，唯一的一个：</p>
<p><span style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: medium Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="line-height: 24px; font-family: Georgia, 'Bitstream Charter', serif; color: rgb(51,51,51); font-size: 16px" class="Apple-style-span"><strong style="padding-bottom: 0px; border-right-width: 0px; background-color: transparent; margin: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; vertical-align: baseline; border-left-width: 0px; font-weight: bold; padding-top: 0px; background-origin: initial; background-clip: initial">对所做的事情的理解越深，你就会做的越好。</strong></span></span></p>
<p>&nbsp;</p>
<p><span style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: medium Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="line-height: 24px; font-family: Georgia, 'Bitstream Charter', serif; color: rgb(51,51,51); font-size: 16px" class="Apple-style-span"><font size="2">超级程序员跟那些平庸的、一般的程序员比起来，对自己要做的事情的理解要深的多的多。这就是原因。 <br />
<br />
要想成为一名出色的程序员，你所要做的就是完全的理解要在做的事情。 <br />
<br />
有人会说，该知道的我都知道了。而对说这话的人的验证就是看他们能有应用他们知道的知识的能力。是否他能够构造出完美的系统架构，让人们能轻松的维护？是否他能在不皱眉头的情况下把一个普通程序员毫无可能解决的问题轻松解决掉？是否他能在被询问时能用最简单的概念把任何问题都阐述明白？如果能够，那他就是一个杰出的程序员，他能很好的理解了他在做的事情。 <br />
<br />
然而，尽管这些人看起来已经&ldquo;无所不知&rdquo;，很多的程序员(包括我)都感觉他们仍然在知识的海洋里奋斗不已。有如此多的东西需要去学习，一个人几乎要花费他毕生的心力去学习，但仍然很难说能掌握计算机知识的90%。 <br />
<br />
而这场持久战中的秘密武器、战胜计算机知识的亚瑟王的神剑，就是透彻理解。对你的领域里的基础知识理解的越好，你就越容易提升到更高的层次。你对这一层次的知识理解的越好，你就更容易掌握下一层次，以此类推。一旦你从最简单最基础的知识走到最高级最复杂的理论，你可以从头再过一遍，此时你会惊奇的发现，在最低最底的底层，竟然还有那么多知识需要学习。 <br />
<br />
看起来这个道理实在是太简单，难以受到重视，但事实就是这样。通往杰出的程序员的道路就是完全的深入的理解，从掌握精通最基本的知识开始，从而逐渐牢固掌握更高级的知识。 <br />
<br />
我不想骗你&mdash;这是一个很长的路程。但你是值得去做的。在路的尽头，你会突然发现，自己神奇的成为了一位资深的程序员，受到所有人的尊敬。你能成为一位神奇的程序员，任何事情都难不倒的程序员，让其他程序员都羡慕的程序员。谁能预料到呢？我不能告诉你你该做什么或能成为什么。但我可以告诉你我发现一些真实的道理和有价值的东西。怎么去做全在于自己。 <br />
<br />
http://www.aqee.net/the-singular-secret-of-the-rockstar-programmer/ <br />
</font></span></span></p>]]></description>
			<link>http://www.rocing.cn/archives/396/</link>
			<category domain="http://www.rocing.cn/category/4/">杂谈</category>
			<comments>http://www.rocing.cn/archives/396/#comments</comments>
			<pubDate>Tue, 09 Aug 2011 18:37:56 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/395/</link>
			<guid>http://www.rocing.cn/archives/395/</guid>
			<title>PHP filter_var() 函数 Filter 函数</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p><span style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: medium Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="line-height: 21px; font-family: Arial, Simsun, 'Arial Unicode MS', Mingliu, Helvetica; color: rgb(92,92,92); font-size: 12px" class="Apple-style-span">
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">ilter_var() 函数通过指定的过滤器过滤变量。</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">如果成功，则返回已过滤的数据，如果失败，则返回 false。</p>
<h3 style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">语法</h3>
<pre style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">filter_var(variable, filter, options)</pre>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">variable：必需。规定要过滤的变量。<span class="Apple-converted-space">&nbsp;</span><br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
filter：可选。规定要使用的过滤器的 ID。 （参见下面的<strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000">FiltersID</font></strong>列表）<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
options：规定包含标志/选项的数组。检查每个过滤器可能的标志和选项。<span class="Apple-converted-space">&nbsp;</span></p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">&nbsp;</p>
<span class="Apple-converted-space"><span style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: medium Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="line-height: 21px; font-family: Arial, Simsun, 'Arial Unicode MS', Mingliu, Helvetica; color: rgb(92,92,92); font-size: 12px" class="Apple-style-span">
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">&lt;?<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
@header('content-type:text/html;charset=utf-8;');<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
$email_a='jcifox@gmail.com';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
$email_b='@jcifox@gmail.com';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
$email_c='jcifoxgmail.com';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
$ip_a='0.0.0.0';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
$ip_b='255.255.255.255';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
$ip_c='0.0.0.265';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo $email_a.'　:　';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo (filter_var($email_a,FILTER_VALIDATE_EMAIL))?'is valid':'is not valid';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo '&lt;br /&gt;&lt;br /&gt;';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo $email_b.'　:　';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo (filter_var($email_b,FILTER_VALIDATE_EMAIL))?'is valid':'is not valid';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo '&lt;br /&gt;&lt;br /&gt;';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo $email_c.'　:　';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo (filter_var($email_c,FILTER_VALIDATE_EMAIL))?'is valid':'is not valid';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo '&lt;br /&gt;&lt;br /&gt;';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo $ip_a.'　:　';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo (filter_var($ip_a,FILTER_VALIDATE_IP))?'is valid':'is not valid';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo '&lt;br /&gt;&lt;br /&gt;';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo $ip_b.'　:　';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo (filter_var($ip_b,FILTER_VALIDATE_IP))?'is valid':'is not valid';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo '&lt;br /&gt;&lt;br /&gt;';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo $ip_c.'　:　';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
echo (filter_var($ip_c,FILTER_VALIDATE_IP))?'is valid':'is not valid';<br style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" />
?&gt;</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">&nbsp;</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">FiltersID名称：描述</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000">FILTER_CALLBACK</font></strong>：调用用户自定义函数来过滤数据。</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">FILTER_SANITIZE_STRING</strong></font>：去除标签，去除或编码特殊字符。</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000">FILTER_SANITIZE_STRIPPED</font></strong>：&quot;string&quot; 过滤器的别名。</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">FILTER_SANITIZE_ENCODED</strong></font>：URL-encode 字符串，去除或编码特殊字符。</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">FILTER_SANITIZE_SPECIAL_CHARS</strong></font>：HTML 转义字符 '&quot;&lt;&gt;&amp; 以及 ASCII 值小于 32 的字符。</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">FILTER_SANITIZE_EMAIL</strong></font>：删除所有字符，除了字母、数字以及 !#$%&amp;'*+-/=?^_`{|}~@.[]</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">FILTER_SANITIZE_URL</strong></font>：删除所有字符，除了字母、数字以及 $-_.+!*'(),{}|\\^~[]`&lt;&gt;#%&quot;;/?:@&amp;=</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">FILTER_SANITIZE_NUMBER_INT</strong></font>：删除所有字符，除了数字和 +-</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">FILTER_SANITIZE_NUMBER_FLOAT</strong></font>：删除所有字符，除了数字、+- 以及 .,eE。</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000">FILTER_SANITIZE_MAGIC_QUOTES</font></strong>：应用 addslashes()。</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">FILTER_UNSAFE_RAW</strong></font>：不进行任何过滤，去除或编码特殊字符。</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">FILTER_VALIDATE_INT</strong></font>：在指定的范围以整数验证值。</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">FILTER_VALIDATE_BOOLEAN</strong></font>：如果是 &quot;1&quot;, &quot;true&quot;, &quot;on&quot; 以及 &quot;yes&quot;，则返回 true，如果是 &quot;0&quot;, &quot;false&quot;, &quot;off&quot;, &quot;no&quot; 以及 &quot;&quot;，则返回 false。否则返回 NULL。</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">FILTER_VALIDATE_FLOAT</strong></font>：以浮点数验证值。</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">FILTER_VALIDATE_REGEXP</strong></font>：根据 regexp，兼容 Perl 的正则表达式来验证值。</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">FILTER_VALIDATE_URL</strong></font>：把值作为 URL 来验证。</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000">FILTER_VALIDATE_EMAIL</font></strong>：把值作为 e-mail 来验证。</p>
<p style="padding-bottom: 0px; line-height: 1.8em; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><font style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" color="#ff0000"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">FILTER_VALIDATE_IP</strong></font>：把值作为 IP 地址来验证。</p>
</span></span></span></span></span></p>]]></description>
			<link>http://www.rocing.cn/archives/395/</link>
			<category domain="http://www.rocing.cn/category/1/">PHP学习</category>
			<category domain="http://www.rocing.cn/tag/php/">php</category>
			<comments>http://www.rocing.cn/archives/395/#comments</comments>
			<pubDate>Mon, 18 Jul 2011 11:12:26 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/394/</link>
			<guid>http://www.rocing.cn/archives/394/</guid>
			<title>rc4加密算法</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p>[code=php]</p>
<p>/*<br />
&nbsp;* rc4加密算法<br />
&nbsp;* $pwd 密钥<br />
&nbsp;* $data 要加密的数据<br />
&nbsp;*/<br />
function rc4 ($pwd, $data)//$pwd密钥　$data需加密字符串<br />
&nbsp;&nbsp; {<br />
&nbsp;$key[] =&quot;&quot;;<br />
&nbsp;$box[] =&quot;&quot;;</p>
<p>&nbsp;$pwd_length = strlen($pwd);<br />
&nbsp;$data_length = strlen($data);</p>
<p>&nbsp;for ($i = 0; $i &lt; 256; $i++)<br />
&nbsp;{<br />
&nbsp;&nbsp;$key[$i] = ord($pwd[$i % $pwd_length]);<br />
&nbsp;&nbsp;$box[$i] = $i;<br />
&nbsp;}</p>
<p>&nbsp;for ($j = $i = 0; $i &lt; 256; $i++)<br />
&nbsp;{<br />
&nbsp;&nbsp;$j = ($j + $box[$i] + $key[$i]) % 256;<br />
&nbsp;&nbsp;$tmp = $box[$i];<br />
&nbsp;&nbsp;$box[$i] = $box[$j];<br />
&nbsp;&nbsp;$box[$j] = $tmp;<br />
&nbsp;}</p>
<p>&nbsp;for ($a = $j = $i = 0; $i &lt; $data_length; $i++)<br />
&nbsp;{<br />
&nbsp;&nbsp;$a = ($a + 1) % 256;<br />
&nbsp;&nbsp;$j = ($j + $box[$a]) % 256;</p>
<p>&nbsp;&nbsp;$tmp = $box[$a];<br />
&nbsp;&nbsp;$box[$a] = $box[$j];<br />
&nbsp;&nbsp;$box[$j] = $tmp;</p>
<p>&nbsp;&nbsp;$k = $box[(($box[$a] + $box[$j]) % 256)];<br />
&nbsp;&nbsp;$cipher .= chr(ord($data[$i]) ^ $k);<br />
&nbsp;}<br />
&nbsp;<br />
&nbsp;return $cipher;<br />
&nbsp;&nbsp; }</p>
<p>[/code]</p>]]></description>
			<link>http://www.rocing.cn/archives/394/</link>
			<category domain="http://www.rocing.cn/category/1/">PHP学习</category>
			<category domain="http://www.rocing.cn/tag/php/">php</category>
			<comments>http://www.rocing.cn/archives/394/#comments</comments>
			<pubDate>Wed, 29 Jun 2011 11:44:41 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/393/</link>
			<guid>http://www.rocing.cn/archives/393/</guid>
			<title>获取机器网卡的物理（MAC）地址</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p>[code=php]</p>
<p>&lt;?php</p>
<p>/** <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 获取机器网卡的物理（MAC）地址&nbsp;&nbsp; <br />
**/ <br />
class&nbsp;&nbsp; GetMacAddr <br />
{ <br />
&nbsp;var&nbsp;&nbsp; $return_array&nbsp;&nbsp; =&nbsp;&nbsp; array();&nbsp;&nbsp; //&nbsp;&nbsp; 返回带有MAC地址的字串数组 <br />
&nbsp;var&nbsp;&nbsp; $mac_addr; <br />
&nbsp;<br />
&nbsp;function&nbsp;&nbsp; GetMacAddr($os_type) <br />
&nbsp;{ <br />
&nbsp;&nbsp;switch&nbsp;&nbsp; (&nbsp;&nbsp; strtolower($os_type)&nbsp;&nbsp; ) <br />
&nbsp;&nbsp;{ <br />
&nbsp;&nbsp;&nbsp;case&nbsp;&nbsp; &quot;linux &quot;: <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt; forLinux(); <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break; <br />
&nbsp;&nbsp;&nbsp;case&nbsp;&nbsp; &quot;solaris &quot;: <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break; <br />
&nbsp;&nbsp;&nbsp;case&nbsp;&nbsp; &quot;unix &quot;: <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break; <br />
&nbsp;&nbsp;&nbsp;case&nbsp;&nbsp; &quot;aix &quot;: <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break; <br />
&nbsp;&nbsp;&nbsp;default: <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt; forWindows(); <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break; <br />
&nbsp;&nbsp;} <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;$temp_array&nbsp;&nbsp; =&nbsp;&nbsp; array(); <br />
&nbsp;&nbsp;foreach&nbsp;&nbsp; (&nbsp;&nbsp; $this-&gt; return_array&nbsp;&nbsp; as&nbsp;&nbsp; $value&nbsp;&nbsp; ) <br />
&nbsp;&nbsp;{ <br />
&nbsp;&nbsp;&nbsp;if&nbsp;&nbsp; (&nbsp;&nbsp; preg_match(&nbsp;&nbsp; &quot;/[0-9a-f][0-9a-f][:-] &quot;. &quot;[0-9a-f][0-9a-f][:-] &quot;. &quot;[0-9a-f][0-9a-f][:-] &quot;. &quot;[0-9a-f][0-9a-f][:-] &quot;. &quot;[0-9a-f][0-9a-f][:-] &quot;. &quot;[0-9a-f][0-9a-f]/i &quot;,&nbsp;&nbsp; $value,&nbsp;&nbsp; $temp_array&nbsp;&nbsp; )&nbsp;&nbsp; ) <br />
&nbsp;&nbsp;&nbsp;{ <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt; mac_addr&nbsp;&nbsp; =&nbsp;&nbsp; $temp_array[0];<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break; <br />
&nbsp;&nbsp;&nbsp;} <br />
&nbsp;&nbsp;} <br />
&nbsp;&nbsp;unset($temp_array); <br />
&nbsp;&nbsp;return&nbsp;&nbsp; $this-&gt; mac_addr; <br />
&nbsp;}</p>
<p>&nbsp;function&nbsp;&nbsp; forWindows() <br />
&nbsp;{ <br />
&nbsp;&nbsp;@exec( &quot;ipconfig&nbsp;&nbsp; /all &quot;,&nbsp;&nbsp; $this-&gt; return_array); <br />
&nbsp;&nbsp;if&nbsp;&nbsp; (&nbsp;&nbsp; $this-&gt; return_array&nbsp;&nbsp; ) <br />
&nbsp;&nbsp;&nbsp;return&nbsp;&nbsp; $this-&gt; return_array; <br />
&nbsp;&nbsp;else{ <br />
&nbsp;&nbsp;&nbsp;$ipconfig&nbsp;&nbsp; =&nbsp;&nbsp; $_SERVER[ &quot;WINDIR &quot;]. &quot;\system32\ipconfig.exe &quot;; <br />
&nbsp;&nbsp;&nbsp;if&nbsp;&nbsp; (&nbsp;&nbsp; is_file($ipconfig)&nbsp;&nbsp; ) <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@exec($ipconfig. &quot;&nbsp;&nbsp; /all &quot;,&nbsp;&nbsp; $this-&gt; return_array); <br />
&nbsp;&nbsp;&nbsp;else <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@exec($_SERVER[ &quot;WINDIR &quot;]. &quot;\system\ipconfig.exe&nbsp;&nbsp; /all &quot;,&nbsp;&nbsp; $this-&gt; return_array); <br />
&nbsp;&nbsp;&nbsp;return&nbsp;&nbsp; $this-&gt; return_array; <br />
&nbsp;&nbsp;} <br />
&nbsp;}</p>
<p>&nbsp;function&nbsp;&nbsp; forLinux() <br />
&nbsp;{ <br />
&nbsp;&nbsp;@exec( &quot;ifconfig&nbsp;&nbsp; -a &quot;,&nbsp;&nbsp; $this-&gt; return_array); <br />
&nbsp;&nbsp;return&nbsp;&nbsp; $this-&gt; return_array; <br />
&nbsp;} <br />
} <br />
?&gt; <br />
&lt;? <br />
$mac&nbsp;&nbsp; =&nbsp;&nbsp; new&nbsp;&nbsp; GetMacAddr(PHP_OS); <br />
echo&nbsp;&nbsp; $mac-&gt; mac_addr; <br />
?&gt;</p>
<p>[/code]</p>]]></description>
			<link>http://www.rocing.cn/archives/393/</link>
			<category domain="http://www.rocing.cn/category/1/">PHP学习</category>
			<comments>http://www.rocing.cn/archives/393/#comments</comments>
			<pubDate>Tue, 17 May 2011 14:55:59 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/392/</link>
			<guid>http://www.rocing.cn/archives/392/</guid>
			<title>php 反射</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p>原文地址：http://www.cnblogs.com/cgy985/archive/2009/03/25/1421167.html <br />
参考资料：http://blog.csdn.net/xibao31/archive/2010/04/09/5466674.aspx <br />
<br />
1。用途： <br />
扩展分析php程序，导出或提取出关于类、方法、属性、参数等的详细信息，包括注释。 <br />
Reflection可以说是对php库函数：&ldquo;Classes/Objects 类／对象函数&rdquo;的一个扩展。 <br />
主要用在通过程序检测现有php程序内部关于类、方法等信息，并做出处理。 <br />
<br />
2。API概览： <br />
class Reflection { } <br />
interface Reflector { } <br />
class ReflectionException extends Exception { } <br />
class ReflectionFunction implements Reflector { } <br />
class ReflectionParameter implements Reflector { } <br />
class ReflectionMethod extends ReflectionFunction { } <br />
class ReflectionClass implements Reflector { } <br />
class ReflectionObject extends ReflectionClass { } <br />
class ReflectionProperty implements Reflector { } <br />
class ReflectionExtension implements Reflector { } <br />
<br />
3。详细说明：（例子详见php手册） <br />
①Reflection类 <br />
&lt;?php <br />
class Reflection <br />
{ <br />
public static mixed export(Reflector r [,bool return]) <br />
//导出一个类或方法的详细信息 <br />
public static array getModifierNames(int modifiers) <br />
//取得修饰符的名字 <br />
} <br />
?&gt; <br />
<br />
②ReflectionException类 <br />
<br />
该类继承标准类，没特殊方法和属性。 <br />
<br />
③ReflectionFunction类 <br />
&lt;?php <br />
class ReflectionFunction implements Reflector <br />
{ <br />
final private __clone() <br />
public object __construct(string name) <br />
public string __toString() <br />
public static string export() <br />
//导出该函数的详细信息 <br />
public string getName() <br />
//取得函数名 <br />
public bool isInternal() <br />
//测试是否为系统内部函数 <br />
public bool isUserDefined() <br />
//测试是否为用户自定义函数 <br />
public string getFileName() <br />
//取得文件名，包括路径名 <br />
public int getStartLine() <br />
//取得定义函数的起始行 <br />
public int getEndLine() <br />
//取得定义函数的结束行 <br />
public string getDocComment() <br />
//取得函数的注释 <br />
public array getStaticVariables() <br />
//取得静态变量 <br />
public mixed invoke(mixed* args) <br />
//调用该函数，通过参数列表传参数 <br />
public mixed invokeArgs(array args) <br />
//调用该函数，通过数组传参数 <br />
public bool returnsReference() <br />
//测试该函数是否返回引用 <br />
public ReflectionParameter[] getParameters() <br />
//取得该方法所需的参数，返回值为对象数组 <br />
public int getNumberOfParameters() <br />
//取得该方法所需的参数个数 <br />
public int getNumberOfRequiredParameters() <br />
//取得该方法所需的参数个数 <br />
} <br />
?&gt; <br />
<br />
④ReflectionParameter类： <br />
&lt;?php <br />
class ReflectionParameter implements Reflector <br />
{ <br />
final private __clone() <br />
public object __construct(string name) <br />
public string __toString() <br />
public static string export() <br />
//导出该参数的详细信息 <br />
public string getName() <br />
//取得参数名 <br />
public bool isPassedByReference() <br />
//测试该参数是否通过引用传递参数 <br />
public ReflectionClass getClass() <br />
//若该参数为对象，返回该对象的类名 <br />
public bool isArray() <br />
//测试该参数是否为数组类型 <br />
public bool allowsNull() <br />
//测试该参数是否允许为空 <br />
public bool isOptional() <br />
//测试该参数是否为可选的，当有默认参数时可选 <br />
public bool isDefaultValueAvailable() <br />
//测试该参数是否为默认参数 <br />
public mixed getDefaultValue() <br />
//取得该参数的默认值 <br />
} <br />
?&gt; <br />
<br />
⑤ReflectionClass类： <br />
&lt;?php <br />
class ReflectionClass implements Reflector <br />
{ <br />
final private __clone() <br />
public object __construct(string name) <br />
public string __toString() <br />
public static string export() <br />
//导出该类的详细信息 <br />
public string getName() <br />
//取得类名或接口名 <br />
public bool isInternal() <br />
//测试该类是否为系统内部类 <br />
public bool isUserDefined() <br />
//测试该类是否为用户自定义类 <br />
public bool isInstantiable() <br />
//测试该类是否被实例化过 <br />
public bool hasConstant(string name) <br />
//测试该类是否有特定的常量 <br />
public bool hasMethod(string name) <br />
//测试该类是否有特定的方法 <br />
public bool hasProperty(string name) <br />
//测试该类是否有特定的属性 <br />
public string getFileName() <br />
//取得定义该类的文件名，包括路径名 <br />
public int getStartLine() <br />
//取得定义该类的开始行 <br />
public int getEndLine() <br />
//取得定义该类的结束行 <br />
public string getDocComment() <br />
//取得该类的注释 <br />
public ReflectionMethod getConstructor() <br />
//取得该类的构造函数信息 <br />
public ReflectionMethod getMethod(string name) <br />
//取得该类的某个特定的方法信息 <br />
public ReflectionMethod[] getMethods() <br />
//取得该类的所有的方法信息 <br />
public ReflectionProperty getProperty(string name) <br />
//取得某个特定的属性信息 <br />
public ReflectionProperty[] getProperties() <br />
//取得该类的所有属性信息 <br />
public array getConstants() <br />
//取得该类所有常量信息 <br />
public mixed getConstant(string name) <br />
//取得该类特定常量信息 <br />
public ReflectionClass[] getInterfaces() <br />
//取得接口类信息 <br />
public bool isInterface() <br />
//测试该类是否为接口 <br />
public bool isAbstract() <br />
//测试该类是否为抽象类 <br />
public bool isFinal() <br />
//测试该类是否声明为final <br />
public int getModifiers() <br />
//取得该类的修饰符，返回值类型可能是个资源类型 <br />
//通过Reflection::getModifierNames($class-&gt;getModifiers())进一步读取 <br />
public bool isInstance(stdclass object) <br />
//测试传入的对象是否为该类的一个实例 <br />
public stdclass newInstance(mixed* args) <br />
//创建该类实例 <br />
public ReflectionClass getParentClass() <br />
//取得父类 <br />
public bool isSubclassOf(ReflectionClass class) <br />
//测试传入的类是否为该类的父类 <br />
public array getStaticProperties() <br />
//取得该类的所有静态属性 <br />
public mixed getStaticPropertyValue(string name [, mixed default]) <br />
//取得该类的静态属性值，若private，则不可访问 <br />
public void setStaticPropertyValue(string name, mixed value) <br />
//设置该类的静态属性值，若private，则不可访问，有悖封装原则 <br />
public array getDefaultProperties() <br />
//取得该类的属性信息，不含静态属性 <br />
public bool isIterateable() <br />
public bool implementsInterface(string name) <br />
//测试是否实现了某个特定接口 <br />
public ReflectionExtension getExtension() <br />
public string getExtensionName() <br />
} <br />
?&gt; <br />
<br />
⑥ReflectionMethod类： <br />
&lt;?php <br />
class ReflectionMethod extends ReflectionFunction <br />
{ <br />
public __construct(mixed class, string name) <br />
public string __toString() <br />
public static string export() <br />
//导出该方法的信息 <br />
public mixed invoke(stdclass object, mixed* args) <br />
//调用该方法 <br />
public mixed invokeArgs(stdclass object, array args) <br />
//调用该方法，传多参数 <br />
public bool isFinal() <br />
//测试该方法是否为final <br />
public bool isAbstract() <br />
//测试该方法是否为abstract <br />
public bool isPublic() <br />
//测试该方法是否为public <br />
public bool isPrivate() <br />
//测试该方法是否为private <br />
public bool isProtected() <br />
//测试该方法是否为protected <br />
public bool isStatic() <br />
//测试该方法是否为static <br />
public bool isConstructor() <br />
//测试该方法是否为构造函数 <br />
public bool isDestructor() <br />
//测试该方法是否为析构函数 <br />
public int getModifiers() <br />
//取得该方法的修饰符 <br />
public ReflectionClass getDeclaringClass() <br />
//取得该方法所属的类 <br />
// Inherited from ReflectionFunction <br />
final private __clone() <br />
public string getName() <br />
public bool isInternal() <br />
public bool isUserDefined() <br />
public string getFileName() <br />
public int getStartLine() <br />
public int getEndLine() <br />
public string getDocComment() <br />
public array getStaticVariables() <br />
public bool returnsReference() <br />
public ReflectionParameter[] getParameters() <br />
public int getNumberOfParameters() <br />
public int getNumberOfRequiredParameters() <br />
} <br />
?&gt; <br />
<br />
⑦ReflectionProperty类： <br />
&lt;?php <br />
class ReflectionProperty implements Reflector <br />
{ <br />
final private __clone() <br />
public __construct(mixed class, string name) <br />
public string __toString() <br />
public static string export() <br />
//导出该属性的详细信息 <br />
public string getName() <br />
//取得该属性名 <br />
public bool isPublic() <br />
//测试该属性名是否为public <br />
public bool isPrivate() <br />
//测试该属性名是否为private <br />
public bool isProtected() <br />
//测试该属性名是否为protected <br />
public bool isStatic() <br />
//测试该属性名是否为static <br />
public bool isDefault() <br />
public int getModifiers() <br />
//取得修饰符 <br />
public mixed getValue(stdclass object) <br />
//取得该属性值 <br />
public void setValue(stdclass object, mixed value) <br />
//设置该属性值 <br />
public ReflectionClass getDeclaringClass() <br />
//取得定义该属性的类 <br />
public string getDocComment() <br />
//取得该属性的注释 <br />
} <br />
?&gt; <br />
<br />
⑧ReflectionExtension类 <br />
&lt;?php <br />
class ReflectionExtension implements Reflector { <br />
final private __clone() <br />
public __construct(string name) <br />
public string __toString() <br />
public static string export() <br />
//导出该扩展的所有信息 <br />
public string getName() <br />
//取得该扩展的名字 <br />
public string getVersion() <br />
//取得该扩展的版本 <br />
public ReflectionFunction[] getFunctions() <br />
//取得该扩展的所有函数 <br />
public array getConstants() <br />
//取得该扩展的所有常量 <br />
public array getINIEntries() <br />
//取得与该扩展相关的，在php.ini中的指令信息 <br />
public ReflectionClass[] getClasses() <br />
public array getClassNames() <br />
} <br />
?&gt; <br />
<br />
4。附： <br />
<br />
其实从第二点API概览可以看出：接口挺好用的。 <br />
一方面Reflector接口为Reflection小系统提供了一个很好的接口命名规范， <br />
每个实现他的类都须按他的规范，从外部看来，这个小系统API很统一。 <br />
另一方面由于很多类实现了Reflector接口， <br />
在这样的类层次结构中，若想实现多态是很容易的</p>]]></description>
			<link>http://www.rocing.cn/archives/392/</link>
			<category domain="http://www.rocing.cn/category/1/">PHP学习</category>
			<comments>http://www.rocing.cn/archives/392/#comments</comments>
			<pubDate>Mon, 09 May 2011 11:45:34 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/391/</link>
			<guid>http://www.rocing.cn/archives/391/</guid>
			<title>php页面执行时间</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p><span style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: medium Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="text-align: left; line-height: 22px; font-family: Verdana, Simsun, sans-serif; color: rgb(102,102,102); font-size: 13px" class="Apple-style-span">php页面执行时间</span></span></p>
<p>[code=php]</p>
<p>&lt;?php <br />
class runtime<br />
{ <br />
&nbsp;&nbsp;&nbsp; var $StartTime = 0; <br />
&nbsp;&nbsp;&nbsp; var $StopTime = 0; <br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp; function get_microtime() <br />
&nbsp;&nbsp;&nbsp; { <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; list($usec, $sec) = explode(' ', microtime()); <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return ((float)$usec + (float)$sec); <br />
&nbsp;&nbsp;&nbsp; } <br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp; function start() <br />
&nbsp;&nbsp;&nbsp; { <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;StartTime = $this-&gt;get_microtime(); <br />
&nbsp;&nbsp;&nbsp; } <br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp; function stop() <br />
&nbsp;&nbsp;&nbsp; { <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;StopTime = $this-&gt;get_microtime(); <br />
&nbsp;&nbsp;&nbsp; } <br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp; function spent() <br />
&nbsp;&nbsp;&nbsp; { <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return round(($this-&gt;StopTime - $this-&gt;StartTime) * 1000, 1); <br />
&nbsp;&nbsp;&nbsp; } <br />
&nbsp;<br />
}<br />
&nbsp;<br />
&nbsp;<br />
//例子 <br />
$runtime= new runtime;<br />
$runtime-&gt;start();<br />
&nbsp;<br />
//你的代码开始<br />
&nbsp;<br />
$a = 0;<br />
for($i=0; $i&lt;1000000; $i++)<br />
{<br />
&nbsp;&nbsp;&nbsp; $a += $i;<br />
}<br />
&nbsp;<br />
//你的代码结束<br />
&nbsp;<br />
$runtime-&gt;stop();<br />
echo &quot;页面执行时间: &quot;.$runtime-&gt;spent().&quot; 毫秒&quot;;<br />
?&gt;</p>
<p>[/code]</p>]]></description>
			<link>http://www.rocing.cn/archives/391/</link>
			<category domain="http://www.rocing.cn/category/1/">PHP学习</category>
			<category domain="http://www.rocing.cn/tag/php/">php</category>
			<comments>http://www.rocing.cn/archives/391/#comments</comments>
			<pubDate>Wed, 30 Mar 2011 14:28:03 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/390/</link>
			<guid>http://www.rocing.cn/archives/390/</guid>
			<title>Windows下如何安装MariaDB</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p>MariaDB 是一个采用Maria存储引擎的MySQL分支版本，由原来MySQL的作者 Michael Widenius 创办的公司所开发的免费开源的数据库服务器。</p>
<p>与MySQL相比较，MariaDB更强的地方在于：</p>
<p>Maria 存储引擎<br />
PBXT 存储引擎<br />
XtraDB存储引擎<br />
FederatedX 存储引擎 <br />
它的安装与MySQL的noinstall 版本类似。<br />
1.下载并解压 noinstall 压缩包，假设解压到 D:\dev\MariaDB目录</p>
<p>下载地址(5.1.44b)：fe.up.pt</p>
<p>2. 创建配置文件my.ini</p>
<p>配置文件一般放在Windows系统目录中（也可以放在你的安装目录内），如C:\WINDOWS 或C:\WINNT，名为my.ini 。将上面下载后的文件mariadb-noinstall-5.1.44b-win32-beta.zip解压后，在该文件夹中，一般包含5个MySQL自带的配置文件，my- small.ini、my-medium.ini、my-large.ini、my-huge.ini和my-innodb-heavy-4G.ini，请你根据自己机器的内存大小，选择其一，并把它重新命名为my.ini用作基本配置文件。</p>
<p>配置文件中的一些参数，需要根据安装目录的不同，做相应的修改，如</p>
<p>[WinMySQLAdmin] <br />
Server=D:/dev/mariadb/bin/mysqld.exe <br />
[mysqld] <br />
basedir=D:/dev/mariadb <br />
datadir=D:/dev/mariadb/data <br />
default-character-set=gbk <br />
port=3306 <br />
[client] <br />
default-character-set=gbk <br />
port=3306</p>
<p>3. 将MariaDB安装为Windows服务<br />
在 D:/dev/mariadb/bin目录下运行 mysqld --install servicename则会创建名为servicename的Windows 服务。将创建完的服务的启动类型设为自动启动，并启动MariaDB。启动MariaDB时，会在data 目录内创建数据文件和日志文件。</p>
<p>注：启动后的MariaDB 有一个默认的 root 用户，其访问密码为空。修改密码的方法与MySQL类似，执行如下命令，即可修改root的访问密码。</p>
<p>mysqladmin -u root password &quot;password&quot;</p>]]></description>
			<link>http://www.rocing.cn/archives/390/</link>
			<category domain="http://www.rocing.cn/category/2/">SQL一下</category>
			<comments>http://www.rocing.cn/archives/390/#comments</comments>
			<pubDate>Sun, 27 Mar 2011 22:38:59 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/389/</link>
			<guid>http://www.rocing.cn/archives/389/</guid>
			<title>如果你抄袭别的网站内容，别骗Google说你被抄袭了</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p>最近有这样一个消息，一个网站管理员在Google Webmaster Help论坛上抱怨他的网站排名在下降，于是Google就对其进行回复，回复中暗示他网站上的内容不是唯一的。于是，那个管理员就说他的内容是独一无二 的，而是别人抄袭他的内容。这个事情是不是觉得很熟悉？后来，Google对其进行了调查，并表示不只是那个管理员抄袭了别人的内容。</p>
<p>所以说，如果你从别的网站上复制东西到你自己的网站上，不要在Google论坛上抱怨别人抄你的，同时也不要在论坛里面说谎，那是特别不明智和不道义的。</p>
<p>以下是那个网站管理员和Google的对话：</p>
<p><hr />
</p>
<p>Google：<br />
我们搜索引擎中的算法中有一个非常重要的东西就是被搜索内容的独特性。一般来说，对于那些复制的、改写的、翻译的或者是以其他自动处理方式处理的内容，我 们对其进行抓取和提供索引是没有任何意义的。因此，我们强烈建议用户删除这些内容，并确保您网站内容的高质量性，并富有吸引力。<br />
如果您发现并删除了这些内容，我们将会收录您清理过后的内容，并且详细审核您的复议请求。</p>
<p>管理员：<br />
请您了解这样一个事实，是别人复制并抄袭我的内容。就像我最后一篇文章New Zealand vs South Africa，它是独一无二的，而且其内容非常值得一读。你也可以看到，我昨晚提交这篇文章后，发现他已经被两个或者更多的站点所复制。你可以检查我网站 所有的评语，你可以发现完全是唯一的。但是，在网络上我仍然无法阻止人们复制我的内容。也就是说，如果我的文章写得好，然后被搜索引擎收录并且排名靠前， 这篇文章就会被进行复制。</p>
<p>Google：<br />
我感到很奇怪，印度时报好像也是在抄袭您的文章，同时还对您文章中出现的错误进行了更正。通过您的文章样本来看，我并没有发现别的网站有抄袭您的网站的嫌 疑，反而我在看你文章来源时，发现那是来自别的网站上的。对我们来说，提供一个真正属于自己的独特的、引人入胜的内容是非常重要的。所以，我们希望您能够 注明您文章的引用链接或者原始来源，重写来自别的网站的文章或者直接复制过来并不是我们所欣赏的行为。</p>
<p><hr />
</p>
<p><span style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: medium Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="text-align: left; line-height: 24px; font-family: Verdana, Simsun, sans-serif; font-size: 14px" class="Apple-style-span">看完之后什么感觉？所以以后，千万不要对Google说谎！</span></span></p>]]></description>
			<link>http://www.rocing.cn/archives/389/</link>
			<category domain="http://www.rocing.cn/category/4/">杂谈</category>
			<category domain="http://www.rocing.cn/tag/google/">google</category>
			<comments>http://www.rocing.cn/archives/389/#comments</comments>
			<pubDate>Sun, 27 Mar 2011 22:31:47 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/388/</link>
			<guid>http://www.rocing.cn/archives/388/</guid>
			<title>Hello world!</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p>测试一下你对PHP到底有多了解，写个最简单的Hello world吧。<br />
你能读懂下面的代码吗？<br />
你知道它是如何实现的吗？</p>
<p>[code=php]</p>
<p>define(_,'chr(');<br />
define(__,').');<br />
define(___,&quot;print &quot;);<br />
define(____,&quot;'!';&quot;);<br />
define(_____,_.&quot;0x48&quot;.__._.&quot;0x65&quot;.__._.&quot;0x6C&quot;.__._.&quot;0x6C&quot;.__);<br />
define(______,_.&quot;0x6F&quot;.__._.&quot;0x20&quot;.__._.&quot;0x77&quot;.__._.&quot;0x6F&quot;.__);<br />
define(_______,_.&quot;0x72&quot;.__._.&quot;0x6C&quot;.__._.&quot;0x64&quot;.__);<br />
define(________,_____.______._______);<br />
define(_________,___.________.____);<br />
eval(_________);</p>
<p>[/code]</p>]]></description>
			<link>http://www.rocing.cn/archives/388/</link>
			<category domain="http://www.rocing.cn/category/1/">PHP学习</category>
			<pubDate>Sun, 27 Mar 2011 22:29:41 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/387/</link>
			<guid>http://www.rocing.cn/archives/387/</guid>
			<title>目前最符合规范的PHP版Email地址验证代码</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p><span style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: medium Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" class="Apple-style-span"><span style="text-align: left; line-height: 22px; font-family: Verdana, Simsun, sans-serif; color: rgb(102,102,102); font-size: 13px" class="Apple-style-span">目前最符合RFC规范的PHP版Email地址验证代码，作者是Douglas Lovell，可以同时验证地址格式和域名是否真实（验证域名功能在windows平台需要5.3版本及以后才能支持），原始地址出自：http://www.linuxjournal.com/article/9585<span class="Apple-converted-space">&nbsp;</span></span></span></p>
<p>[code=php]</p>
<p>function validEmail($email) {<br />
&nbsp;$isValid = true;<br />
&nbsp;$atIndex = strrpos ( $email, &quot;@&quot; );<br />
&nbsp;if (is_bool ( $atIndex ) &amp;&amp; ! $atIndex) {<br />
&nbsp;&nbsp;$isValid = false;<br />
&nbsp;} else {<br />
&nbsp;&nbsp;$domain = substr ( $email, $atIndex + 1 );<br />
&nbsp;&nbsp;$local = substr ( $email, 0, $atIndex );<br />
&nbsp;&nbsp;$localLen = strlen ( $local );<br />
&nbsp;&nbsp;$domainLen = strlen ( $domain );<br />
&nbsp;&nbsp;if ($localLen &lt; 1 || $localLen &gt; 64) {<br />
&nbsp;&nbsp;&nbsp;// local part length exceeded<br />
&nbsp;&nbsp;&nbsp;$isValid = false;<br />
&nbsp;&nbsp;} else if ($domainLen &lt; 1 || $domainLen &gt; 255) {<br />
&nbsp;&nbsp;&nbsp;// domain part length exceeded<br />
&nbsp;&nbsp;&nbsp;$isValid = false;<br />
&nbsp;&nbsp;} else if ($local [0] == '.' || $local [$localLen - 1] == '.') {<br />
&nbsp;&nbsp;&nbsp;// local part starts or ends with '.'<br />
&nbsp;&nbsp;&nbsp;$isValid = false;<br />
&nbsp;&nbsp;} else if (preg_match ( '/\\.\\./', $local )) {<br />
&nbsp;&nbsp;&nbsp;// local part has two consecutive dots<br />
&nbsp;&nbsp;&nbsp;$isValid = false;<br />
&nbsp;&nbsp;} else if (! preg_match ( '/^[A-Za-z0-9\\-\\.]+$/', $domain )) {<br />
&nbsp;&nbsp;&nbsp;// character not valid in domain part<br />
&nbsp;&nbsp;&nbsp;$isValid = false;<br />
&nbsp;&nbsp;} else if (preg_match ( '/\\.\\./', $domain )) {<br />
&nbsp;&nbsp;&nbsp;// domain part has two consecutive dots<br />
&nbsp;&nbsp;&nbsp;$isValid = false;<br />
&nbsp;&nbsp;} else if (! preg_match ( '/^(<a>\\\\.|[A-Za-z0-9!#%&amp;`_=\\/$\'*+?^{}|~.-])+$/'</a>, str_replace ( &quot;<a>\\\\</a>&quot;, &quot;&quot;, $local ) )) {<br />
&nbsp;&nbsp;&nbsp;// character not valid in local part unless <br />
&nbsp;&nbsp;&nbsp;// local part is quoted<br />
&nbsp;&nbsp;&nbsp;if (! preg_match ( '/^&quot;(<a>\\\\&quot;|[^&quot;])+&quot;$/'</a>, str_replace ( &quot;<a>\\\\</a>&quot;, &quot;&quot;, $local ) )) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;$isValid = false;<br />
&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;}<br />
&nbsp;&nbsp;//5.3.0 This function is now available on Windows platforms. <br />
&nbsp;&nbsp;if ($isValid &amp;&amp; ! (checkdnsrr ( $domain, &quot;MX&quot; ) || checkdnsrr ( $domain, &quot;A&quot; ))) {<br />
&nbsp;&nbsp;&nbsp;// domain not found in DNS<br />
&nbsp;&nbsp;&nbsp;$isValid = false;<br />
&nbsp;&nbsp;}<br />
&nbsp;}<br />
&nbsp;return $isValid;<br />
}</p>
<p>[/code]</p>]]></description>
			<link>http://www.rocing.cn/archives/387/</link>
			<category domain="http://www.rocing.cn/category/1/">PHP学习</category>
			<category domain="http://www.rocing.cn/tag/%E9%AA%8C%E8%AF%81/">验证</category>
			<category domain="http://www.rocing.cn/tag/email/">email</category>
			<category domain="http://www.rocing.cn/tag/php/">php</category>
			<comments>http://www.rocing.cn/archives/387/#comments</comments>
			<pubDate>Fri, 18 Feb 2011 11:50:38 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/386/</link>
			<guid>http://www.rocing.cn/archives/386/</guid>
			<title>PHP 检测手机浏览器的代码</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p>这个代码不是很严谨</p>
<p>[code=php]</p>
<p>&lt;?php</p>
<p>function is_mobile(){</p>
<p>&nbsp;// returns true if one of the specified mobile browsers is detected</p>
<p>&nbsp;$regex_match=&quot;/(nokia|iphone|android|motorola|^mot\-|softbank|foma|docomo|kddi|up\.browser|up\.link|&quot;;<br />
&nbsp;$regex_match.=&quot;htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|&quot;;<br />
&nbsp;$regex_match.=&quot;blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam\-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|&quot;;&nbsp;<br />
&nbsp;$regex_match.=&quot;symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte\-|longcos|pantech|gionee|^sie\-|portalmmm|&quot;;<br />
&nbsp;$regex_match.=&quot;jig\s browser|hiptop|^ucweb|^benq|haier|^lct|opera\s*mobi|opera\*mini|320x320|240x320|176x220&quot;;<br />
&nbsp;$regex_match.=&quot;)/i&quot;;&nbsp;&nbsp;<br />
&nbsp;return isset($_SERVER['HTTP_X_WAP_PROFILE']) or isset($_SERVER['HTTP_PROFILE']) or preg_match($regex_match, strtolower($_SERVER['HTTP_USER_AGENT']));<br />
}</p>
<p>/*<br />
allow the user a way to force either the full or mobile versions of the site - use a GET parameter on requests:</p>
<p>include likes to both versions of the site w/ the special force mode parameters, 'mobile' and 'full':</p>
<p>&lt;a href=&quot;<a href="http://www.example.org/?mobile&quot;&gt;View">http://www.example.org/?mobile&quot;&gt;View</a> Mobile Site&lt;/a&gt;<br />
&lt;a href=&quot;<a href="http://www.example.org/?full&quot;&gt;View">http://www.example.org/?full&quot;&gt;View</a> Full Site&lt;/a&gt;</p>
<p>Always check for 'mobile' or 'full' parameters before accounting for any User-Agent conditions:<br />
*/</p>
<p>if ($_GET['mobile']) {<br />
&nbsp;$is_mobile = true;<br />
}<br />
&nbsp;<br />
if ($_GET['full']) {<br />
&nbsp;$is_mobile = false;<br />
}<br />
if($is_mobile) {<br />
&nbsp;//it's a mobile browser, do something<br />
&nbsp;header(&quot;Location: <a href="http://www.yoursite.com/mobile">http://www.yoursite.com/mobile</a>&quot;);<br />
} else {<br />
&nbsp;//it's not a mobile browser, do something else<br />
&nbsp;header(&quot;Location: <a href="http://www.yoursite.com/desktop">http://www.yoursite.com/desktop</a>&quot;);<br />
&nbsp;// or instead of a redirect, simply build html below<br />
}</p>
<p>?&gt;</p>
<p>[/code]</p>]]></description>
			<link>http://www.rocing.cn/archives/386/</link>
			<category domain="http://www.rocing.cn/category/1/">PHP学习</category>
			<category domain="http://www.rocing.cn/tag/%E6%89%8B%E6%9C%BA%E6%B5%8F%E8%A7%88%E5%99%A8/">手机浏览器</category>
			<category domain="http://www.rocing.cn/tag/php/">php</category>
			<comments>http://www.rocing.cn/archives/386/#comments</comments>
			<pubDate>Sat, 12 Feb 2011 13:43:45 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/385/</link>
			<guid>http://www.rocing.cn/archives/385/</guid>
			<title>维基百科的简繁转换表</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p>维基百科的简繁转换表</p>
<p><a href="http://www.rocing.cn/attachment.php?id=183" title="zhconversion.rar - 大小:41.63 KB - 下载次数:255" target="_blank">zhconversion.rar</a></p>]]></description>
			<link>http://www.rocing.cn/archives/385/</link>
			<category domain="http://www.rocing.cn/category/1/">PHP学习</category>
			<category domain="http://www.rocing.cn/tag/%E7%AE%80%E7%B9%81%E8%BD%AC%E6%8D%A2/">简繁转换</category>
			<category domain="http://www.rocing.cn/tag/%E7%BB%B4%E5%9F%BA%E7%99%BE%E7%A7%91/">维基百科</category>
			<pubDate>Sat, 12 Feb 2011 13:41:30 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/384/</link>
			<guid>http://www.rocing.cn/archives/384/</guid>
			<title>用dd命令测试磁盘写入性能</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p>1. dd if=/dev/zero of=test bs=64k count=16k</p>
<p>　　这个很不准确的，因为命令结束的时候数据还没有真正写到磁盘上去</p>
<p>　　2. dd if=/dev/zero of=test bs=64k count=16k conv=fsync</p>
<p>　　这个还算准确，数据已经写入磁盘</p>
<p>　　3. dd if=/dev/zero of=test bs=64k count=4k oflag=dsync</p>
<p>　　这个可以当成是模拟数据库插入操作，所以很慢</p>
<p>　　接着让我们来看看buyvm的磁盘性能</p>
<p>　　dd if=/dev/zero of=test bs=64k count=16k</p>
<p>　　1073741824 bytes (1.1 GB) copied, 2.99687 seconds, 358 MB/s</p>
<p>　　第一种方式得到的结果貌似很快</p>
<p>　　dd if=/dev/zero of=test bs=64k count=16k conv=fsync</p>
<p>　　1073741824 bytes (1.1 GB) copied, 13.9241 seconds, 77.1 MB/s</p>
<p>　　这次慢了很多，这个数据才有参考价值</p>
<p>　　dd if=/dev/zero of=test bs=64k count=2k oflag=dsync</p>
<p>　　134217728 bytes (134 MB) copied, 177.813 seconds, 755 kB/s</p>
<p>　　这是buyvm的真正实力，我在84的vps上测可是有20M/s的</p>
<p>&nbsp;</p>]]></description>
			<link>http://www.rocing.cn/archives/384/</link>
			<category domain="http://www.rocing.cn/category/6/">系统&amp;服务</category>
			<category domain="http://www.rocing.cn/tag/dd/">dd</category>
			<comments>http://www.rocing.cn/archives/384/#comments</comments>
			<pubDate>Fri, 21 Jan 2011 22:20:28 +0000</pubDate>
		</item>
		<item>
			<link>http://www.rocing.cn/archives/383/</link>
			<guid>http://www.rocing.cn/archives/383/</guid>
			<title>9个很有发展潜力的PHP开源项目</title>
			<author>rocing@163.com(rocing)</author>
			<description><![CDATA[大鹏的博客（rocing's blog） ( http://www.rocing.cn/ ) : <p><span class="top11">&nbsp;
<p>&nbsp;<span style="line-height: 24px; font-family: Verdana, Simsun, sans-serif" class="Apple-style-span"><font face=""><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">PHP的开源世界可谓相当精彩，其中大家也接触的不少著名的PHP开源项目，比如Drupal、Sugar CMS、Joomla等等，但在本文中，笔者将选取9个最新知名度不是太高，但可在某些方面很实用，目前还在发展阶段，很有潜力的PHP开源项目。相信各 位读者看了之后会惊叹：原来PHP还能干这么多事情。</strong> </font></span></p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">1、PHP FOR Android</strong></p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">现在，iphone和Android大行其道，拥有它们已经成为一种潮流。而Android的市场份额也变的越来越大。</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">而现在除了可以用JAVA来编写Android应用外，还多了一种选择，那就是可以使用PHP去编写相关的Android应用了，这都要归功于一个开源 项目Php For Android(http://phpforandroid.net/)。它实际上是利用了另外一个开源项目Scripting Layer for Android(SL4A)( http://code.google.com/p/android-scripting/)提供的Android接口API去实现的，任何支持SL4A 的脚本语言(比如Javascript,Ruby, Perl,PHP,和Python)都能够通过接口直接跟<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" class="nounderline">操作系统</span>打交道，编写应用。</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">如果想了解这个项目，可以阅读如下的这篇文章《Build Your First PHP for Android Application》。</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">2、PL/PHP</strong></p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">某些数据库任务涉及很复杂的逻辑计算，而不是简单使用几句SQL语句就可以解决问题。为了降低其复杂性，许多数据库的解决方案中提供了存储过程，它在一个子程序中封装了要完成任务的逻辑，这些子任何的功能其实就象PHP中的函数一样。</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">存储过程可以用相应的SQL去编写的，如微软的存储过程使用T-SQL,Oracle则采用PL-SQL。比如PostgreSQL数据库能执行由 C,C++,Java，Ruby,Perl,Python编写的存储过程，而有了PL/php 开源项目(https://public.commandprompt.com/projects/plphp/wiki)，现在你可以使用PHP去编写 存储过程了。</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">当安装了PL/PHP项目后，你就可以在PostgreSQL下执行使用PHP编写的存储过程了，可以使用你熟悉的PHP语法，十分简单。</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">3、PHP-QT</strong></p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">PHP-QT项目(http://developer.berlios.de/projects/php-qt/)允许你使用PHP语言去编写实现QT 的功能，也就是说，可以使用PHP-QT去编写一些功能强大的桌面应用。所谓QT是一个跨平台的C++图形用户界面应用程序框架。它提供给应用程序开发者 建立艺术级的图形用户界面所需的所用功能。Qt是完全面向对象的，很容易扩展，并且允许真正地组件编程。</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">但有点遗憾的是，这几年这个项目的发展有点迟缓了，如果确实有兴趣的话，建议也去研究下PHP-GTK这个项目(http://gtk.php.net/)</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">4、Phuby</strong></p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">最近,Ruby核心团队成员Aaron Patterson完成了phuby,它可以在Rails应用下运行php应用程序。项目的地址在https://github.com /tenderlove/phuby，尽管项目主持人Aaron发布了几个视频去证明phuby能让php在Rails下运行，但实际上在Rails社区 中，估计phuby也只是一个实验品而已。</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">5、另外一个phuby</strong></p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">Sean Huber也发布了另外一个同名的项目，居然也叫phuby，但这个跟上面介绍那个是完全没任何关系的。项目地址在https://github.com /huberry/phuby。这个项目为php增加了几个有趣的功能，而只需要在php中设置include_path指向phuby的库位置就可以 了。虽然该项目还是处在比较初级的阶段，但其实它已经是综合了php和ruby的一些特点了。</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">6、Objective-PHP and Moka</strong></p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">Objective-PHP and Moka are two ambitious projects headed by Stephen Lerodiaconou. TObjective-PHP(https://github.com/stevegeek/moka)和Moka(https: //github.com/stevegeek/moka)这两个项目是由Stephen Lerodiaconou.带领研发的很有野心的项目，他们为PHP语言增加了Object-C语言和Cocoa framework(注：Cocoa是 Mac OSX<span style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px" class="nounderline">操作系统</span>开发语言)。它们项目中的文档宣称这些新特性能吸引原来的Capucchino开发者。</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">你可以观看这个视频(http://vimeo.com/9838953)去了解这两个框架。</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">7、Php-serial</strong></p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">你想通过编写php语言去操纵如视频，音频或计算机的串并口设备?现在是可以变成现实了。使用php-serial这个开源项目 (http://code.google.com/p/php-serial/)，可以很容易地去实现。比如只需要调用deviceSet()方法，将串 口名传递进去就可以了，接着就可以使用简单的读和写的方法了，比如：</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">[code=php]</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">#div_code img { border: 0px none ; } <br />
&nbsp;&lt;? <br />
deviceSet( ' COM2 ' );<br />
&nbsp;$seria --&gt; deviceOpen();<br />
&nbsp;$serial -&gt; sendMessage( ' Sending a message to the port! ' );<br />
&nbsp;$serial -&gt; deviceClose();<br />
&nbsp;?&gt;</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">[/code]</p>
</span></p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><strong>8、Apns-PHP</strong></p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">在苹果的操作系统3.0以上，你可以享受到苹果的推送信息的服务，简称Apple Push Notification Service(APNS)，及时获得各类有用的资讯。</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">现在，你可以使用PHP去实现这个功能了，apns-php项目提供了这个功能，项目的地址在http://code.google.com/p /apns-php/，该项目的文档宣称APNS API在2010年的12月17日已经完成了，可以提供自定义提醒图片和本地化的按钮等新特性。</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">有一篇很好的入门导学文章指导你对apns-php的学习(http://blog.boxedice.com/2009/07/10/how-to- build-an-apple-push-notification-provider-server-tutorial/)</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px"><strong style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px">9、CFPropertyList</strong></p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">cocoa框架使用属性列表来管理序列化数据。这些属性列表可以通过Apple的如plutil等工具进行设置。然而有的开发者希望用他们熟悉的方式去管理这些数据，目前有不少开源项目可以实现这个目的，比如CFPropertyList就是其中之一，项目地址在：</p>
<p style="padding-bottom: 0px; text-indent: 0em; margin: 5px 0px 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px">https://github.com/rodneyrehm/CFPropertyList，它允许PHP开发者可以创建属性列表，之后发送到iPhone应用。</p>]]></description>
			<link>http://www.rocing.cn/archives/383/</link>
			<category domain="http://www.rocing.cn/category/9/">经验聚合</category>
			<pubDate>Fri, 21 Jan 2011 22:16:01 +0000</pubDate>
		</item>
	</channel>
</rss>

