<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>奋斗足迹&#124;崔玉松</title>
	<atom:link href="http://fendou.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://fendou.org</link>
	<description>为家人，为自己，为生活~~</description>
	<lastBuildDate>Wed, 18 Aug 2010 14:34:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>代码调优法则&#8211;编程珠玑笔记</title>
		<link>http://fendou.org/2010/08/18/programming-pearls/</link>
		<comments>http://fendou.org/2010/08/18/programming-pearls/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 14:34:11 +0000</pubDate>
		<dc:creator>崔玉松</dc:creator>
				<category><![CDATA[Study & Reading]]></category>
		<category><![CDATA[常识]]></category>
		<category><![CDATA[编程技术]]></category>

		<guid isPermaLink="false">http://fendou.org/?p=725</guid>
		<description><![CDATA[1、空间换时间法则 这个东西，稍微有点程序经验的人应该都接触过，比如在设计数据时候冗余了部分数据，避免关联表查询，减少开销，实际上也减少了查询时间，所谓空间换时间。还比如，我们将一个有点开销的计算结果存储起来，避免下次再次运算，减少时间消耗，再如，CPU的设计，设置了高速缓存，一级缓存，二级缓存，主存（通常所说的内存），其实一个硬盘和一个CPU也可以干活，只是干得不怎么样，因为硬盘和CPU之间速度实在是差别太大了，如是就有人想把可能要用到的数据预先加载到高速缓存或者主存中，慢慢形成了今天的个人计算机架构。 2、以时间换空间法则 这个其实也是天天在用的一个法则，只是一般技术人员看到“压缩”二字的时候，没联想到那么多，压缩就是最典型的拿时间换空间的例子，就是不断的重复前面已经存储过的存储地址，用来避免存取真实的数据。 3、循环法则 大部分稍微有点经验的人不会在同一个函数中循环两次同样的变量，但是仅限于同一个函数，假如在一个函数里调用了另外一个函数，那么就不一定了，很多人为了看似解耦的一个操作，在两个函数对同一个变量做了多次的循环。循环法则有几个比较经典细则： 第一、将代码移除循环，这是最容易想到的，当然，可以移除的条件是，每次循环都执行同样的某次操作。 第二、合并测试条件，高效的内循环应该包含尽量少的测试条件，最好只有一个，因此，程序员尽量用一些退出条件来模拟循环的其他退出条件。 第三、哨兵法则，在数据结构边界上放一个哨兵以减少测试是否已经搜索结束的开销。 第四、展开循环，展开循环可以减少修改循环下标的开销，对于避免管道延迟，减少分支以及增加指令级的并行性也有很大帮助。 第五、删除赋值，赋值的开销实际上在整个程序的执行过程中占的开销可以忽略不计，但假如你要在一个循环十万次的循环中赋值，那么开销就不能不计了，尽可能的在循环中减少赋值吧。 第六，消除无条件分支，快速的循环中不应该包含无条件分支，通过旋转循环，在底部加上一个条件分支，能够消除循环结束处的无条件分支。 第七、循环合并，如果你不小心做了傻事，那么合并两个对同一个变量循环操作吧 4、逻辑法则 利用等价的代数表达式。如果逻辑表达式的求值开销太大就将其替换为开销较小的等价代数表达式。 短路单调函数。如果我们想测试几个变量的单调非递减函数是否超过了某个特定的阈值，那么一旦达到这个阈值就不在需要计算任何变量了。 对测试机条件重新排序。在组织逻辑测试的时候，应该是降低开销的，经常成功的测试放在高开销的，很少成功的测试前面。 5、过程法则 打破函数层次。对于（非递归地）调用自身的函数，通常可以通过将其改写为内联版本并固定传入的变量来缩短其运行时间。 并行性。在底层硬件条件下，我们构建的程序应该尽可能多的挖掘并行性。 6、表达式法则 编译时初始化。在程序执行前，应该尽可能多的变量初始化。 利用等价的代数表达式。如果表达式的求值开销过大，就将其替换为开销更小的等价的代数表达式，比如换一种算法 消除公共子表达式。如果两次对同一个表达式求值，其所有变量都没有任何改动，那么我们可以用下面方法避免二次求值：存储第一次的计算结果并用其取代第二次求值。 相关文章 2009年06月8日 &#8212; 开发环境的三大规则 2009年06月6日 &#8212; 数据完整性策略 2010年08月8日 &#8212; UDP hole punching 翻译 2010年04月18日 &#8212; 类设计 2010年03月23日 &#8212; Firefox使用SSH配合autoproxy自动翻山图文教程]]></description>
			<content:encoded><![CDATA[<p>1、空间换时间法则</p>
<p>这个东西，稍微有点程序经验的人应该都接触过，比如在设计数据时候冗余了部分数据，避免关联表查询，减少开销，实际上也减少了查询时间，所谓空间换时间。还比如，我们将一个有点开销的计算结果存储起来，避免下次再次运算，减少时间消耗，再如，CPU的设计，设置了高速缓存，一级缓存，二级缓存，主存（通常所说的内存），其实一个硬盘和一个CPU也可以干活，只是干得不怎么样，因为硬盘和CPU之间速度实在是差别太大了，如是就有人想把可能要用到的数据预先加载到高速缓存或者主存中，慢慢形成了今天的个人计算机架构。</p>
<p>2、以时间换空间法则</p>
<p>这个其实也是天天在用的一个法则，只是一般技术人员看到“压缩”二字的时候，没联想到那么多，压缩就是最典型的拿时间换空间的例子，就是不断的重复前面已经存储过的存储地址，用来避免存取真实的数据。</p>
<p>3、循环法则</p>
<p>大部分稍微有点经验的人不会在同一个函数中循环两次同样的变量，但是仅限于同一个函数，假如在一个函数里调用了另外一个函数，那么就不一定了，很多人为了看似解耦的一个操作，在两个函数对同一个变量做了多次的循环。循环法则有几个比较经典细则：<br />
第一、将代码移除循环，这是最容易想到的，当然，可以移除的条件是，每次循环都执行同样的某次操作。<br />
第二、合并测试条件，高效的内循环应该包含尽量少的测试条件，最好只有一个，因此，程序员尽量用一些退出条件来模拟循环的其他退出条件。<br />
第三、哨兵法则，在数据结构边界上放一个哨兵以减少测试是否已经搜索结束的开销。<br />
第四、展开循环，展开循环可以减少修改循环下标的开销，对于避免管道延迟，减少分支以及增加指令级的并行性也有很大帮助。<br />
第五、删除赋值，赋值的开销实际上在整个程序的执行过程中占的开销可以忽略不计，但假如你要在一个循环十万次的循环中赋值，那么开销就不能不计了，尽可能的在循环中减少赋值吧。<br />
第六，消除无条件分支，快速的循环中不应该包含无条件分支，通过旋转循环，在底部加上一个条件分支，能够消除循环结束处的无条件分支。<br />
第七、循环合并，如果你不小心做了傻事，那么合并两个对同一个变量循环操作吧</p>
<p>4、逻辑法则<br />
利用等价的代数表达式。如果逻辑表达式的求值开销太大就将其替换为开销较小的等价代数表达式。<br />
短路单调函数。如果我们想测试几个变量的单调非递减函数是否超过了某个特定的阈值，那么一旦达到这个阈值就不在需要计算任何变量了。<br />
对测试机条件重新排序。在组织逻辑测试的时候，应该是降低开销的，经常成功的测试放在高开销的，很少成功的测试前面。</p>
<p>5、过程法则<br />
打破函数层次。对于（非递归地）调用自身的函数，通常可以通过将其改写为内联版本并固定传入的变量来缩短其运行时间。<br />
并行性。在底层硬件条件下，我们构建的程序应该尽可能多的挖掘并行性。</p>
<p>6、表达式法则<br />
编译时初始化。在程序执行前，应该尽可能多的变量初始化。<br />
利用等价的代数表达式。如果表达式的求值开销过大，就将其替换为开销更小的等价的代数表达式，比如换一种算法<br />
消除公共子表达式。如果两次对同一个表达式求值，其所有变量都没有任何改动，那么我们可以用下面方法避免二次求值：存储第一次的计算结果并用其取代第二次求值。<br />
<h3>相关文章</h3>
<ul class="related_post">
<li>2009年06月8日 &#8212; <a href="http://fendou.org/2009/06/08/three-rules/" title="开发环境的三大规则">开发环境的三大规则</a></li>
<li>2009年06月6日 &#8212; <a href="http://fendou.org/2009/06/06/dip/" title="数据完整性策略">数据完整性策略</a></li>
<li>2010年08月8日 &#8212; <a href="http://fendou.org/2010/08/08/udp-hole-punching/" title="UDP hole punching 翻译">UDP hole punching 翻译</a></li>
<li>2010年04月18日 &#8212; <a href="http://fendou.org/2010/04/18/class-design/" title="类设计">类设计</a></li>
<li>2010年03月23日 &#8212; <a href="http://fendou.org/2010/03/23/firefox-ssh-autoproxy/" title="Firefox使用SSH配合autoproxy自动翻山图文教程">Firefox使用SSH配合autoproxy自动翻山图文教程</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fendou.org/2010/08/18/programming-pearls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UDP hole punching 翻译</title>
		<link>http://fendou.org/2010/08/08/udp-hole-punching/</link>
		<comments>http://fendou.org/2010/08/08/udp-hole-punching/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 02:30:37 +0000</pubDate>
		<dc:creator>崔玉松</dc:creator>
				<category><![CDATA[Study & Reading]]></category>
		<category><![CDATA[UDP]]></category>
		<category><![CDATA[常识]]></category>
		<category><![CDATA[读书笔记]]></category>

		<guid isPermaLink="false">http://fendou.org/?p=720</guid>
		<description><![CDATA[3.3. UDP hole punching  UDP打洞技术 The third technique, and the one of primary interest in this document, is widely known as &#8220;UDP Hole Punching.&#8221; UDP hole punching relies on the properties of common firewalls and cone NATs to allow appropriately designed peer-to-peer applications to &#8220;punch holes&#8221; through the middlebox and establish direct connectivity with each other, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>3.3. UDP hole punching  UDP打洞技术</strong><br />
The third technique, and the one of primary interest in this document, is widely known as &#8220;UDP Hole Punching.&#8221; UDP hole punching relies on the properties of common firewalls and cone NATs to allow appropriately designed peer-to-peer applications to &#8220;punch holes&#8221; through the middlebox and establish direct connectivity with each other, even when both communicating hosts may lie behind middleboxes. This technique was mentioned briefly in section 5.1 of <a href="http://rfc.net/rfc3027.html" target="_blank"><span style="text-decoration: underline;"><span style="color: #0000ff;">RFC 3027 [NAT-PROT]</span></span></a>, and has been informally described elsewhere on the Internet [KEGEL] and used in some recent protocols [TEREDO, ICE]. As the name implies, unfortunately, this technique works reliably only with UDP.</p>
<p>第三种技术，也是这篇文章主要要研究的，就是非常有名的“UDP打洞技术”，UDP打洞技术依赖于由公共防火墙和cone NAT，允许适当的有计划的端对端应用程序通过NAT“打洞”，即使当双方的主机都处于NAT之后。这种技术在 <a href="http://rfc.net/rfc3027.html" target="_blank"><span style="text-decoration: underline;"><span style="color: #0000ff;">RFC3027</span></span></a><a href="http://rfc.net/rfc3027.html" target="_blank"><span style="text-decoration: underline;"><span style="color: #0000ff;">的5.1节[NAT PROT]</span></span></a> 中进行了重点介绍，并且在Internet[KEGEL]中进行了非正式的描叙，还应用到了最新的一些协议，例如[TEREDO,ICE]协议中。不过，我们要注意的是，“术”如其名，UDP打洞技术的可靠性全都要依赖于UDP。</p>
<p>We will consider two specific scenarios, and how applications can be designed to handle both of them gracefully. In the first situation, representing the common case, two clients desiring direct peer-to- peer communication reside behind two different NATs. In the second, the two clients actually reside behind the same NAT, but do not necessarily know that they do.</p>
<p>这里将考虑两种典型场景，来介绍连接的双方应用程序如何按照计划的进行通信的，第一种场景，我们假设两个客户端都处于不同的NAT之后；第二种场景，我们假设两个客户端都处于同一个NAT之后，但是它们彼此都不知道(他们在同一个NAT中)。</p>
<p><strong>3.3.1</strong><strong>. Peers behind different NATs </strong><strong>处于不同</strong><strong>NAT</strong><strong>之后的客户端通信</strong></p>
<p>Suppose clients A and B both have private IP addresses and lie behind different network address translators. The peer-to-peer application running on clients A and B and on server S each use UDP port 1234.? A and B have each initiated UDP communication sessions with server S, causing NAT A to assign its own public UDP port 62000 for A&#8217;s session with S, and causing NAT B to assign its port 31000 to B&#8217;s session with S, respectively.</p>
<p>我们假设 Client A 和 Client B 都拥有自己的私有IP地址，并且都处在不同的NAT之后，端对端的程序运行于 CLIENT A,CLIENT B,S之间，并且它们都开放了UDP端口1234。 CLIENT A和CLIENT B首先分别与S建立通信会话，这时NAT A把它自己的UDP端口62000分配给CLIENT A与S的会话，NAT B也把自己的UDP端口31000分配给CLIENT B与S的会话。如下图所示：</p>
<p>Now suppose that client A wants to establish a UDP communication session directly with client B.? If A simply starts sending UDP messages to B&#8217;s public address, 138.76.29.7:31000, then NAT B will typically discard these incoming messages (unless it is a full cone NAT), because the source address and port number does not match those of S, with which the original outgoing session was established. Similarly, if B simply starts sending UDP messages to A&#8217;s public address, then NAT A will typically discard these messages.</p>
<p>假如这个时候 CLIENT A 想与 CLIENT B建立一条UDP通信直连，如果 CLIENT A只是简单的发送一个UDP信息到CLIENT B的公网地址138.76.29.7:31000的话，NAT B会不加考虑的将这个信息丢弃（除非NAT B是一个 full cone NAT），因为 这个UDP信息中所包含的地址信息，与CLIENT B和服务器S建立连接时存储在NAT B中的服务器S的地址信息不符。同样的，CLIENT B如果做同样的事情，发送的UDP信息也会被 NAT A 丢弃。</p>
<p>Suppose A starts sending UDP messages to B&#8217;s public address, however, and simultaneously relays a request through server S to B, asking B to start sending UDP messages to A&#8217;s public address.? A&#8217;s outgoing messages directed to B&#8217;s public address (138.76.29.7:31000) cause NAT A to open up a new communication session between A&#8217;s private address and B&#8217;s public address. At the same time, B&#8217;s messages to A&#8217;s public address (155.99.25.11:62000) cause NAT B to open up a new communication session between B&#8217;s private address and A&#8217;s public address. Once the new UDP sessions have been opened up in each direction, client A and B can communicate with each other directly without further burden on the &#8220;introduction&#8221; server S.</p>
<p>假如 CLIENT A 开始发送一个 UDP 信息到 CLIENT B 的公网地址上，与此同时，他又通过S中转发送了一个邀请信息给CLIENT B，请求CLIENT B也给CLIENT A发送一个UDP信息到 CLIENT A的公网地址上。这时CLIENT A向CLIENT B的公网IP(138.76.29.7:31000)发送的信息导致 NAT A 打开一个处于 CLIENT A的私有地址和CLIENT B的公网地址之间的新的通信会话，与此同时，NAT B 也打开了一个处于CLIENT B的私有地址和CLIENT A的公网地址(155.99.25.11:62000)之间的新的通信会话。一旦这个新的UDP会话各自向对方打开了，CLIENT A和CLIENT B之间就可以直接通信，而无需S来牵线搭桥了。(这就是所谓的打洞技术)！</p>
<p>The UDP hole punching technique has several useful properties. Once a direct peer-to-peer UDP connection has been established between two clients behind middleboxes, either party on that connection can in turn take over the role of &#8220;introducer&#8221; and help the other party establish peer-to-peer connections with additional peers, minimizing the load on the initial introduction server S. The application does not need to attempt to detect explicitly what kind of middlebox it is behind, if any [STUN], since the procedure above will establish peer- to-peer communication channels equally well if either or both clients do not happen to be behind a middlebox.? The hole punching technique even works automatically with multiple NATs, where one or both clients are removed from the public Internet via two or more levels of address translation.</p>
<p>UDP打洞技术有很多实用的地方：第一，一旦这种处于NAT之后的端对端的直连建立之后，连接的双方可以轮流担任 对方的“媒人”，把对方介绍给其他的客户端，这样就极大的降低了服务器S的工作量；第二，应用程序不用关心这个NAT是属于cone还是symmetric，即便要，如果连接的双方有一方或者双方都恰好不处于NAT之后，基于上叙的步骤，他们之间还是可以建立很好的通信通道；第三，打洞技术能够自动运作在多重NAT之后，不论连接的双方经过多少层NAT才到达Internet，都可以进行通信。<br />
<h3>相关文章</h3>
<ul class="related_post">
<li>2010年02月8日 &#8212; <a href="http://fendou.org/2010/02/08/code-block-format-list/" title="代码格式规范的List">代码格式规范的List</a></li>
<li>2010年08月18日 &#8212; <a href="http://fendou.org/2010/08/18/programming-pearls/" title="代码调优法则&#8211;编程珠玑笔记">代码调优法则&#8211;编程珠玑笔记</a></li>
<li>2010年03月23日 &#8212; <a href="http://fendou.org/2010/03/23/firefox-ssh-autoproxy/" title="Firefox使用SSH配合autoproxy自动翻山图文教程">Firefox使用SSH配合autoproxy自动翻山图文教程</a></li>
<li>2010年03月15日 &#8212; <a href="http://fendou.org/2010/03/15/database-hierarchy-structures/" title="数据库的层次结构">数据库的层次结构</a></li>
<li>2010年01月31日 &#8212; <a href="http://fendou.org/2010/01/31/shanghai-think-in-lamp-camp/" title="上海Think In Lamp 聚会记">上海Think In Lamp 聚会记</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fendou.org/2010/08/08/udp-hole-punching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>超级简单Python Socket Server一例</title>
		<link>http://fendou.org/2010/08/05/python-socket-server-simple-example/</link>
		<comments>http://fendou.org/2010/08/05/python-socket-server-simple-example/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 05:23:56 +0000</pubDate>
		<dc:creator>崔玉松</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://fendou.org/?p=711</guid>
		<description><![CDATA[中午，公司太吵，闲着无聊，用python自己跟自己说话，算是YY吧，hoho server端代码： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 # -*- coding: utf-8 -*- from socket import * import sys, time, encodings &#160; if __name__ == '__main__': if len&#40;sys.argv&#41; &#60; 2: print u'请输入端口号' else: sockobj = socket&#40;AF_INET, SOCK_STREAM&#41; sockobj.bind&#40; &#40;'', [...]]]></description>
			<content:encoded><![CDATA[<p>中午，公司太吵，闲着无聊，用python自己跟自己说话，算是YY吧，hoho</p>
<p>server端代码：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;"># -*- coding: utf-8 -*-</span>
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">socket</span> <span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #66cc66;">*</span> 
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>, <span style="color: #dc143c;">time</span>, <span style="color: #dc143c;">encodings</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">'__main__'</span>:
	<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">&lt;</span> <span style="color: #ff4500;">2</span>:
		<span style="color: #ff7700;font-weight:bold;">print</span> u<span style="color: #483d8b;">'请输入端口号'</span>
	<span style="color: #ff7700;font-weight:bold;">else</span>:
		sockobj = <span style="color: #dc143c;">socket</span><span style="color: black;">&#40;</span>AF_INET, SOCK_STREAM<span style="color: black;">&#41;</span>
		sockobj.<span style="color: black;">bind</span><span style="color: black;">&#40;</span> <span style="color: black;">&#40;</span><span style="color: #483d8b;">''</span>, <span style="color: #008000;">int</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>
		sockobj.<span style="color: black;">listen</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>
		<span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: #008000;">True</span>:
			connection,address = sockobj.<span style="color: black;">accept</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
			rcvd = connection.<span style="color: black;">recv</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1024</span><span style="color: black;">&#41;</span>
			<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> rcvd :
				<span style="color: #ff7700;font-weight:bold;">pass</span>
			<span style="color: #ff7700;font-weight:bold;">else</span>:
				<span style="color: #ff7700;font-weight:bold;">print</span> u<span style="color: #483d8b;">'收到:'</span>, rcvd.<span style="color: black;">decode</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'utf-8'</span><span style="color: black;">&#41;</span>.<span style="color: black;">encode</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'gb2312'</span><span style="color: black;">&#41;</span>
				<span style="color: #ff7700;font-weight:bold;">print</span> u<span style="color: #483d8b;">'发送：能'</span>
				connection.<span style="color: black;">send</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;能&quot;</span><span style="color: black;">&#41;</span>
				<span style="color: #ff7700;font-weight:bold;">break</span>
			connection.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>Client端代码:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#coding: utf-8</span>
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">socket</span> <span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #66cc66;">*</span> 
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">time</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">'__main__'</span>:
	sockobj = <span style="color: #dc143c;">socket</span><span style="color: black;">&#40;</span>AF_INET, SOCK_STREAM<span style="color: black;">&#41;</span>
	sockobj.<span style="color: black;">connect</span><span style="color: black;">&#40;</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'localhost'</span>, <span style="color: #ff4500;">2828</span><span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span>
	send_info = <span style="color: #483d8b;">&quot;能收到信息吗？&quot;</span>
	<span style="color: #dc143c;">time</span>.<span style="color: black;">sleep</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">print</span> u<span style="color: #483d8b;">&quot;发送:&quot;</span>, send_info.<span style="color: black;">decode</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;utf-8&quot;</span><span style="color: black;">&#41;</span>.<span style="color: black;">encode</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;gbk&quot;</span><span style="color: black;">&#41;</span>
	sockobj.<span style="color: black;">send</span><span style="color: black;">&#40;</span>send_info<span style="color: black;">&#41;</span>
	rcvd = sockobj.<span style="color: black;">recv</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1024</span><span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">print</span> u<span style="color: #483d8b;">&quot;收到：&quot;</span>, rcvd.<span style="color: black;">decode</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'utf-8'</span><span style="color: black;">&#41;</span>.<span style="color: black;">encode</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'gb2312'</span><span style="color: black;">&#41;</span>
	sockobj.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">print</span> u<span style="color: #483d8b;">&quot;完成&quot;</span></pre></td></tr></table></div>

<p><img class="alignnone" src="http://pic.yupoo.com/cuimuxi/003709bdc0a2/medium.jpg" alt="" width="500" height="89" /></p>
<p>特别说明一下，我是在Windows下面搞的，CMD默认只能显示GBK编码，所以在print的时候转来转去，如果在Linux终端，直接显示就行了<br />
<h3>相关文章</h3>
<ul class="related_post">
<li>2010年06月20日 &#8212; <a href="http://fendou.org/2010/06/20/django-1-2-1-csrf-verification-failed-request-aborted/" title="Django 1.2.1  CSRF verification failed. Request aborted.">Django 1.2.1  CSRF verification failed. Request aborted.</a></li>
<li>2010年06月17日 &#8212; <a href="http://fendou.org/2010/06/17/install-python26-mysql-python-on-windows/" title="Windows平台安装Python2.6 和 MySQL-Python">Windows平台安装Python2.6 和 MySQL-Python</a></li>
<li>2010年03月5日 &#8212; <a href="http://fendou.org/2010/03/05/django-settings-cannot-be-imported/" title="django Settings cannot be imported 错误解决">django Settings cannot be imported 错误解决</a></li>
<li>2009年12月15日 &#8212; <a href="http://fendou.org/2009/12/15/google-appengine-launcher-problem/" title="Google AppEngine Launcher不能启动的解决方法">Google AppEngine Launcher不能启动的解决方法</a></li>
<li>2009年03月30日 &#8212; <a href="http://fendou.org/2009/03/30/install-mod-wsgi-in-linux-two/" title="在Linux上安装mod_wsgi文档中文翻译（二）">在Linux上安装mod_wsgi文档中文翻译（二）</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fendou.org/2010/08/05/python-socket-server-simple-example/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>N-Gram学习笔记</title>
		<link>http://fendou.org/2010/07/23/n-gram-study-case/</link>
		<comments>http://fendou.org/2010/07/23/n-gram-study-case/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 02:24:06 +0000</pubDate>
		<dc:creator>崔玉松</dc:creator>
				<category><![CDATA[Study & Reading]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[算法]]></category>

		<guid isPermaLink="false">http://fendou.org/?p=706</guid>
		<description><![CDATA[统计语言模型 假设一个句子S可以表示为一个序列S=w1w2…wn，语言模型就是要求句子S的概率P(S)： 这个概率的计算量太大，解决问题的方法是将所有历史w1w2…wi-1按照某个规则映射到等价类S(w1w2…wi-1)，等价类的数目远远小于不同历史的数目，即假定： N-Gram模型 当两个历史的最近的N-1个词（或字）相同时，映射两个历史到同一个等价类，在此情况下的模型称之为N-Gram模型。 N-Gram模型被称为一阶马尔科夫链。 N的值不能太大，否则计算仍然太大。 根据最大似然估计，语言模型的参数： 其中，C(w1w2…wi)表示w1w2…wi在训练数据中出现的次数 平滑技术的引入 传统的估计方法对于随机变量£的N次独立观察的样本容量N有如下要求： N&#62;&#62;K 其中K为随机变量能够取到的值的个数。 实际语言模型中往往无法满足这个要求。 例如：词性标注问题，共有140个可能的标记，考虑当前词前后两个词的影响的三阶模型。 K=140*140*140=2,744,000 给定一个10万词左右的人工标注训练集，即 N=100,00，可见训练数据显得非常不足。 假设k泛指某一事件，N(k)表示事件k观察到的频数，极大似然法使用相对频数作为对事件k的概率估计： p(k)=N(k)/N 在语言模型中，训练语料中大量的事件N(k)=0，这显然没有反映真实情况。我们把这个问题称为数据稀疏问题。 这种零值的概率估计会导致语言模型算法的失败，例如：概率值作为乘数会使结果为0，而且不能做log运算。 计数等价类 根据对称性原理，事件除了出现次数之外不应具有细节特征，即所有具有相同计数r=N(k)的事件k（事件出现的次数称为事件的计数）应当具有相同的概率估计值，这些计数相同的事件称为计数等价，将它们组成的一个等价类记为计数等价类Gr。 对于计数为r的计数等价类，定义nr为等价类中成员的个数，pr为等价类中事件的概率，R是最大可能出现的计数次数，则 交叉检验 交叉检验就是把训练样本分为m份，其中一份作为保留部分，其余m-1份作为训练部分。训练部分作为训练集估计概率pr，保留部分作为测试集进行测试。 我们使用Cr表示保留部分中计数为r的计数等价类的观察个数。对于保留部分使用最大似然法对进行概率pr进行估计，即使对数似然函数最大化： 使用拉格朗日乘子解决约束条件下的最大值问题，即： 对pr求偏导，得到交叉检验估计： 如果测试部分也作为保留部分的话，就是典型的极大似然估计： 留一估计 留一方法是交叉检验方法的扩展，基本思想是将给定N个样本分为N-1个样本作为训练部分，另外一个样本作为保留部分。这个过程持续N次，使每个样本都被用作过保留样本。 优点：充分利用了给定样本，对于N中的每个观察，留一法都模拟了一遍没有被观察到的情形。 对于留一方法，pr的极大似然估计为： Turing-Good公式 因为nRpR与1相比一般可以忽略，留一估计公式可以近似为： 留一估计可以利用计数r=1的事件来模拟未现事件，对于未现事件有如下估计： 这个公式就是著名的Turing-Good公式。 空等价类 留一估计中要求么个nr均不为0，在实际问题中当r=5时，这个要求通常都不能满足，即计数等价类G1,…,GR中存在空的等价类。这时按照出现次数进行排序： 对应的出现r(l)次的事件的个数记为nr(l)，在进行留一估计时，使用下一个非空的等价类Gr(l+1)代替可能为空的等价类Gr(l)+1，留一估计公式变为： 式中对空的等价类没有估计概率，因为空等价类并没有对应任何有效事件。 Turing-Good估计的优缺点和适用范围 缺点：( 1 )无法保证概率估计的“有序性”，即出现次数多的事件的概率大于出现次数少的事件的概率。(2)pr与r/N不能很好地近似，好的估计应当保证pr&#60;=r/N。 优点：其它平滑技术的基础。 适用范围：对0&#60;r&#60;6的小计数事件进行估计。 约束留一估计 单调性约束：pr-1&#60;=pr；折扣约束：p&#60;=r/N。 约束留一估计：让计数估计r*=pr•N处于距其最近的绝对频数之间： 在这个约束下，单调性约束自然满足。 计算方法：计算m时检查每个pr是否满足约束，不然就用约束的上下界进行裁剪，然后重新计算m，一直迭代下去直到所有pr满足约束。 折扣模型 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>统计语言模型</strong></p>
<p>假设一个句子S可以表示为一个序列S=w1w2…wn，语言模型就是要求句子S的概率P(S)：<br />
<img class="alignnone" title="字句" src="http://pic.yupoo.com/cuimuxi/554529ac6496/small.jpg" alt="" width="240" height="50" /></p>
<p>这个概率的计算量太大，解决问题的方法是将所有历史w1w2…wi-1按照某个规则映射到等价类S(w1w2…wi-1)，等价类的数目远远小于不同历史的数目，即假定：<br />
<img class="alignnone" title="等价类公式" src="http://pic.yupoo.com/cuimuxi/602409ac6496/small.jpg" alt="" width="240" height="19" /><br />
N-Gram模型</p>
<div>当两个历史的最近的N-1个词（或字）相同时，映射两个历史到同一个等价类，在此情况下的模型称之为N-Gram模型。</div>
<div>N-Gram模型被称为一阶马尔科夫链。 N的值不能太大，否则计算仍然太大。</div>
<div>根据最大似然估计，语言模型的参数：</div>
<div><img class="alignnone" title="n-gram" src="http://pic.yupoo.com/cuimuxi/706369ac6496/small.jpg" alt="" width="240" height="38" /></div>
<p>其中，C(w1w2…wi)表示w1w2…wi在训练数据中出现的次数</p>
<p><strong>平滑技术的引入</strong></p>
<div>传统的估计方法对于随机变量£的N次独立观察的样本容量N有如下要求：</div>
<p>N&gt;&gt;K</p>
<p>其中K为随机变量能够取到的值的个数。</p>
<div>实际语言模型中往往无法满足这个要求。</div>
<div>例如：词性标注问题，共有140个可能的标记，考虑当前词前后两个词的影响的三阶模型。</div>
<p>K=140*140*140=2,744,000</p>
<p>给定一个10万词左右的人工标注训练集，即</p>
<p>N=100,00，可见训练数据显得非常不足。</p>
<div>假设k泛指某一事件，N(k)表示事件k观察到的频数，极大似然法使用相对频数作为对事件k的概率估计：</div>
<p>p(k)=N(k)/N</p>
<div>在语言模型中，训练语料中大量的事件N(k)=0，这显然没有反映真实情况。我们把这个问题称为<span style="text-decoration: underline;">数据稀疏</span>问题。</div>
<div>这种零值的概率估计会导致语言模型算法的失败，例如：概率值作为乘数会使结果为0，而且不能做log运算。</div>
<div><strong>计数等价类</strong></div>
<div><strong><br />
</strong></div>
<div>
<div>根据对称性原理，事件除了出现次数之外不应具有细节特征，即所有具有相同计数r=N(k)的事件k（事件出现的次数称为事件的计数）应当具有相同的概率估计值，这些计数相同的事件称为<span style="text-decoration: underline;">计数等价</span>，将它们组成的一个等价类记为<span style="text-decoration: underline;">计数等价类</span>Gr。</div>
</div>
<div>对于计数为r的计数等价类，定义nr为等价类中成员的个数，pr为等价类中事件的概率，R是最大可能出现的计数次数，则<br />
<img class="alignnone" title="计数等价类" src="http://pic.yupoo.com/cuimuxi/414059ac6496/small.jpg" alt="" width="240" height="45" /></div>
<div><strong>交叉检验</strong></div>
<div><strong><br />
</strong></div>
<div>
<div><span style="text-decoration: underline;">交叉检验</span>就是把训练样本分为m份，其中一份作为保留部分，其余m-1份作为训练部分。训练部分作为训练集估计概率pr，保留部分作为测试集进行测试。</div>
</div>
<div>我们使用Cr表示保留部分中计数为r的计数等价类的观察个数。对于保留部分使用最大似然法对进行概率pr进行估计，即使对数似然函数最大化：<br />
<img class="alignnone" title="交叉等价" src="http://pic.yupoo.com/cuimuxi/539939ac6497/small.jpg" alt="" width="240" height="35" /></div>
<div>使用拉格朗日乘子解决约束条件下的最大值问题，即：</div>
<div><img title="拉格朗日乘子" src="http://pic.yupoo.com/cuimuxi/342769ac6497/small.jpg" alt="" width="240" height="32" /></div>
<div>对pr求偏导，得到交叉检验估计：</div>
<div><img class="alignnone" title="语料部分大小" src="http://pic.yupoo.com/cuimuxi/303439ac6497/small.jpg" alt="" width="240" height="29" /></div>
<div>如果测试部分也作为保留部分的话，就是典型的极大似然估计：<br />
<img class="alignnone" title="极大似然估计" src="http://pic.yupoo.com/cuimuxi/931339ac6497/small.jpg" alt="" width="240" height="32" /></div>
<div><strong>留一估计</strong></div>
<div><strong><br />
</strong></div>
<div>
<div>留一方法是交叉检验方法的扩展，基本思想是将给定N个样本分为N-1个样本作为训练部分，另外一个样本作为保留部分。这个过程持续N次，使每个样本都被用作过保留样本。</div>
<div><span style="text-decoration: underline;">优点：</span>充分利用了给定样本，对于N中的每个观察，留一法都模拟了一遍没有被观察到的情形。</div>
</div>
<div>对于留一方法，pr的极大似然估计为：<br />
<img class="alignnone" title="留一估计" src="http://pic.yupoo.com/cuimuxi/139929ac6498/small.jpg" alt="" width="240" height="28" /></div>
<div><strong>Turing-Good公式</strong></div>
<div><strong><br />
</strong></div>
<div>
<div>因为nRpR与1相比一般可以忽略，留一估计公式可以近似为：</div>
<div><img class="alignnone" title="留一估计公式可以近似" src="http://pic.yupoo.com/cuimuxi/864729ac6498/small.jpg" alt="" width="240" height="42" /></div>
<div>留一估计可以利用计数r=1的事件来模拟未现事件，对于未现事件有如下估计：</div>
<div><img class="alignnone" title="Turing-Good公式" src="http://pic.yupoo.com/cuimuxi/679389ac6498/thumb.jpg" alt="" width="100" height="54" /></div>
<p>这个公式就是著名的Turing-Good公式。</p>
<p><strong>空等价类</strong></p>
<div>留一估计中要求么个nr均不为0，在实际问题中当r=5时，这个要求通常都不能满足，即计数等价类G1,…,GR中存在空的等价类。这时按照出现次数进行排序：</div>
<div><img class="alignnone" title="空的等价类" src="http://pic.yupoo.com/cuimuxi/292789ac6499/medium.jpg" alt="" width="500" height="30" /></div>
<div>对应的出现r(l)次的事件的个数记为nr(l)，在进行留一估计时，使用下一个非空的等价类Gr(l+1)代替可能为空的等价类Gr(l)+1，留一估计公式变为：<br />
<img class="alignnone" title="留一公式变形" src="http://pic.yupoo.com/cuimuxi/421729ac6499/small.jpg" alt="" width="240" height="56" /><br />
式中对空的等价类没有估计概率，因为空等价类并没有对应任何有效事件。</div>
<div><strong>Turing-Good估计的优缺点和适用范围</strong></div>
<div>
<div>缺点：( 1 )无法保证概率估计的“有序性”，即出现次数多的事件的概率大于出现次数少的事件的概率。(2)pr与r/N不能很好地近似，好的估计应当保证pr&lt;=r/N。</div>
<div>优点：其它平滑技术的基础。</div>
<div>适用范围：对0&lt;r&lt;6的小计数事件进行估计。</div>
<div><strong>约束留一估计</strong></div>
<div>
<div>单调性约束：pr-1&lt;=pr；折扣约束：p&lt;=r/N。</div>
<div>约束留一估计：让计数估计r*=pr•N处于距其最近的绝对频数之间：</div>
<div><img class="alignnone" title="约束留一估计" src="http://pic.yupoo.com/cuimuxi/553009ac6499/small.jpg" alt="" width="240" height="55" /><br />
在这个约束下，单调性约束自然满足。</div>
<div>计算方法：计算m时检查每个pr是否满足约束，不然就用约束的上下界进行裁剪，然后重新计算m，一直迭代下去直到所有pr满足约束。</div>
</div>
</div>
</div>
<div><strong>折扣模型</strong></div>
<div>
<div>Katz指出Turing-Good公式实质是对模型中观察到的事件进行折扣，将折扣得来的概率摊到所n0个未现事件中。在这个思想的指导下，估计公式可以下成如下形式：</div>
<div><img title="折扣函数" src="http://pic.yupoo.com/cuimuxi/468889ac6499/small.jpg" alt="" width="240" height="100" /></div>
<div>其中，dr是对计数为r的事件的计数的一个折扣函数。</div>
</div>
<div><strong>绝对折扣模型</strong></div>
<div>
<div>若折扣函数定义为：dr=b，其中b为一个大于0的常数。那么未现事件的总概率为：</div>
<div><img class="alignnone" src="http://pic.yupoo.com/cuimuxi/710789ac6499/medium.jpg" alt="" width="500" height="59" /></div>
<div>对应绝对折扣模型的估计公式为：</div>
<div><img class="alignnone" title="绝对折扣模型" src="http://pic.yupoo.com/cuimuxi/358379ac6499/small.jpg" alt="" width="240" height="124" /></div>
<div><strong>线性折扣模型</strong></div>
<div>
<div>若折扣函数定义为：dr=a·r，其中a为一个大于0的常数。那么未现事件的总概率为：</div>
<div><img class="alignnone" title="未现事件的总概率" src="http://pic.yupoo.com/cuimuxi/474649ac649a/small.jpg" alt="" width="240" height="41" /></div>
<div>对应线性折扣模型的估计公式为：</div>
<div><img class="alignnone" title="线性折扣模型的估计公式" src="http://pic.yupoo.com/cuimuxi/801729ac649a/small.jpg" alt="" width="240" height="107" /></div>
<div>若a=n1/N，则n0p0=n1/N，与Turing-Good估计相同。</div>
<div><strong><br />
</strong></div>
<div><strong>删除插值法（Deleted Interpolation）</strong></div>
<div>
<div>其基本思想是，由于N-Gram比N+1-Gram出现的可能性大的多，所以使用N-Gram估计N+1-Gram的概率，例如trigram的计算公式如下：</div>
<div><img class="alignnone" title="trigram的计算公式" src="http://pic.yupoo.com/cuimuxi/149039ac649a/medium.jpg" alt="" width="500" height="31" /></div>
<p>其中，<img class="alignnone" title="语言模型" src="http://pic.yupoo.com/cuimuxi/996879ac649a/small.jpg" alt="" width="240" height="53" /></p>
<div>参数l的确定：将训练数据分为两部分，一部分用于估计f(wi| w1w2…wi-1)，一部分用于计算参数l，求使语言模型的困惑度最小的l。</div>
</div>
</div>
</div>
<h3>相关文章</h3>
<ul class="related_post">
<li>2010年05月20日 &#8212; <a href="http://fendou.org/2010/05/20/amqp-instruction/" title="AMQP协议介绍">AMQP协议介绍</a></li>
<li>2010年04月11日 &#8212; <a href="http://fendou.org/2010/04/11/linux-network-manage-tools/" title="Linux网络管理中的几个小工具">Linux网络管理中的几个小工具</a></li>
<li>2010年01月7日 &#8212; <a href="http://fendou.org/2010/01/07/varnish-install/" title="varnish安装记录">varnish安装记录</a></li>
<li>2009年10月10日 &#8212; <a href="http://fendou.org/2009/10/10/install-centos-on-vps/" title="VPS上安装Centos的几个错误解决">VPS上安装Centos的几个错误解决</a></li>
<li>2009年08月29日 &#8212; <a href="http://fendou.org/2009/08/29/linux-process-created/" title="Linux进程创建">Linux进程创建</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fendou.org/2010/07/23/n-gram-study-case/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Django 1.2.1  CSRF verification failed. Request aborted.</title>
		<link>http://fendou.org/2010/06/20/django-1-2-1-csrf-verification-failed-request-aborted/</link>
		<comments>http://fendou.org/2010/06/20/django-1-2-1-csrf-verification-failed-request-aborted/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 16:24:14 +0000</pubDate>
		<dc:creator>崔玉松</dc:creator>
				<category><![CDATA[Excellence Article]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://fendou.org/?p=704</guid>
		<description><![CDATA[I was getting this 403 error today while attempting to make a POST request to a view: 403 Forbidden CSRF verification failed. Request aborted. Help Reason given for failure: CSRF cookie not set. Hopefully this saves you some time because I sure wasted a lot of mine solving it.  I ended up having to add [...]]]></description>
			<content:encoded><![CDATA[<p>I was getting this 403 error today while attempting to make a POST request to a view:<br />
<code>403 Forbidden</code></p>
<p><code>CSRF verification failed. Request aborted.<br />
Help</code></p>
<p><code>Reason given for failure:</code></p>
<p><code>CSRF cookie not set.<br />
</code><br />
Hopefully this saves you some time because I sure wasted a lot of mine solving it.  I ended up having to add ‘django.middleware.csrf.CsrfViewMiddleware’, and  ‘django.middleware.csrf.CsrfResponseMiddleware’ to my MIDDLEWARE_CLASSES in settings.py and my problems were solved.  All I had to say was mutha eff.  Django also was no help with their debug.  My MIDDLEWARE_CLASSES now looks like:</p>
<p><code>MIDDLEWARE_CLASSES = (<br />
'django.middleware.common.CommonMiddleware',<br />
'django.contrib.sessions.middleware.SessionMiddleware',<br />
<span style="color: #ff0000;">'django.middleware.csrf.CsrfViewMiddleware',<br />
'django.middleware.csrf.CsrfResponseMiddleware',</span><br />
'django.contrib.auth.middleware.AuthenticationMiddleware',<br />
'django.contrib.messages.middleware.MessageMiddleware',<br />
)</code></p>
<p>Hope this helps.<br />
<h3>相关文章</h3>
<ul class="related_post">
<li>2010年08月5日 &#8212; <a href="http://fendou.org/2010/08/05/python-socket-server-simple-example/" title="超级简单Python Socket Server一例">超级简单Python Socket Server一例</a></li>
<li>2010年06月17日 &#8212; <a href="http://fendou.org/2010/06/17/install-python26-mysql-python-on-windows/" title="Windows平台安装Python2.6 和 MySQL-Python">Windows平台安装Python2.6 和 MySQL-Python</a></li>
<li>2010年03月5日 &#8212; <a href="http://fendou.org/2010/03/05/django-settings-cannot-be-imported/" title="django Settings cannot be imported 错误解决">django Settings cannot be imported 错误解决</a></li>
<li>2009年12月15日 &#8212; <a href="http://fendou.org/2009/12/15/google-appengine-launcher-problem/" title="Google AppEngine Launcher不能启动的解决方法">Google AppEngine Launcher不能启动的解决方法</a></li>
<li>2009年03月30日 &#8212; <a href="http://fendou.org/2009/03/30/install-mod-wsgi-in-linux-two/" title="在Linux上安装mod_wsgi文档中文翻译（二）">在Linux上安装mod_wsgi文档中文翻译（二）</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fendou.org/2010/06/20/django-1-2-1-csrf-verification-failed-request-aborted/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
