<?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>Fising&#039;s Blog</title>
	<atom:link href="http://www.fising.cn/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.fising.cn</link>
	<description>all about web application development</description>
	<lastBuildDate>Thu, 29 Jul 2010 09:04:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>一道有意思的Python小题目</title>
		<link>http://www.fising.cn/?p=53</link>
		<comments>http://www.fising.cn/?p=53#comments</comments>
		<pubDate>Thu, 15 Jul 2010 07:55:31 +0000</pubDate>
		<dc:creator>Fising</dc:creator>
				<category><![CDATA[ActionScript]]></category>

		<guid isPermaLink="false">http://www.fising.cn/?p=53</guid>
		<description><![CDATA[最近刚学python，所以想加个群和大家一起讨论，也利于自己进步。结果进群时候，群主出了个题目： 用一行代码求两列表[5,7,9]和[2,8,3]下标对应项乘积之和。 刚开始我使用迭代计算的: &#62;&#62;&#62; num = 0 &#62;&#62;&#62; for a, b in zip([5, 7, 9], [2, 8, 3]):               num += a * b &#62;&#62;&#62; num 但是显然不是群主想要的答案，人家不给开门，郁闷~~ 于是继续钻研，终于写出来啦: &#62;&#62;&#62; sum([a * [2, 8, 3][[5, 7, 9].index(a)] for a in [5, 7, 9]]) 结果: 93 群主指点: sum(x*y for x,y in zip([5,7,9],[2,8,3])) 好强悍的Python !~]]></description>
			<content:encoded><![CDATA[<p>最近刚学python，所以想加个群和大家一起讨论，也利于自己进步。结果进群时候，群主出了个题目：</p>
<p>用一行代码求两列表[5,7,9]和[2,8,3]下标对应项乘积之和。</p>
<p>刚开始我使用迭代计算的:</p>
<p>&gt;&gt;&gt; num = 0<br />
&gt;&gt;&gt; for a, b in zip([5, 7, 9], [2, 8, 3]):<br />
              num += a * b<br />
&gt;&gt;&gt; num</p>
<p>但是显然不是群主想要的答案，人家不给开门，郁闷~~</p>
<p>于是继续钻研，终于写出来啦:</p>
<p>&gt;&gt;&gt; sum([a * [2, 8, 3][[5, 7, 9].index(a)] for a in [5, 7, 9]])</p>
<p>结果: 93</p>
<p>群主指点:</p>
<p>sum(x*y for x,y in zip([5,7,9],[2,8,3]))</p>
<p>好强悍的Python !~</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fising.cn/?feed=rss2&amp;p=53</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
		<item>
		<title>Apache ab工具进行压力测试</title>
		<link>http://www.fising.cn/?p=49</link>
		<comments>http://www.fising.cn/?p=49#comments</comments>
		<pubDate>Wed, 14 Jul 2010 12:11:40 +0000</pubDate>
		<dc:creator>Fising</dc:creator>
				<category><![CDATA[ActionScript]]></category>

		<guid isPermaLink="false">http://www.fising.cn/?p=49</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fising.cn/wp-content/uploads/2010/07/apache-ab.png"><img class="alignnone size-medium wp-image-50" title="apache-ab" src="http://www.fising.cn/wp-content/uploads/2010/07/apache-ab-300x292.png" alt="" width="300" height="292" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fising.cn/?feed=rss2&amp;p=49</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web开发中常用的工具</title>
		<link>http://www.fising.cn/?p=47</link>
		<comments>http://www.fising.cn/?p=47#comments</comments>
		<pubDate>Wed, 14 Jul 2010 08:45:28 +0000</pubDate>
		<dc:creator>Fising</dc:creator>
				<category><![CDATA[Resource]]></category>

		<guid isPermaLink="false">http://www.fising.cn/?p=47</guid>
		<description><![CDATA[HTML: Adobe Dreamweaver, Editplus Javascript: Adobe Dreamweaver PHP: Zend Studio 5.5, Editplus Actionscript: Flash Develop, Adobe Flash Professional, Adobe Flash Builder Version Control: Subversion, TortoiseSVN, WebSvn HTTP Monitor: HTTPWatch, Firebug, Charles Mysql Management: PHPMyAdmin, Navicat For MySQL Pressure Test: LoadRunner, Jmeter, Apache ab, Siege]]></description>
			<content:encoded><![CDATA[<p>HTML: Adobe Dreamweaver, Editplus<br />
Javascript: Adobe Dreamweaver<br />
PHP: Zend Studio 5.5, Editplus<br />
Actionscript: Flash Develop, Adobe Flash Professional, Adobe Flash Builder<br />
Version Control: Subversion, TortoiseSVN, WebSvn<br />
HTTP Monitor: HTTPWatch, Firebug, Charles<br />
Mysql Management: PHPMyAdmin, Navicat For MySQL<br />
Pressure Test: LoadRunner, Jmeter, Apache ab, Siege</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fising.cn/?feed=rss2&amp;p=47</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>刚刚在卓越网买了一本《Python基础教程》</title>
		<link>http://www.fising.cn/?p=40</link>
		<comments>http://www.fising.cn/?p=40#comments</comments>
		<pubDate>Tue, 13 Jul 2010 05:12:57 +0000</pubDate>
		<dc:creator>Fising</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.fising.cn/?p=40</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fising.cn/wp-content/uploads/2010/07/QQ截图未命名.png"><img class="alignnone size-full wp-image-43" title="Python基础教程" src="http://www.fising.cn/wp-content/uploads/2010/07/QQ截图未命名.png" alt="Python基础教程" width="187" height="240" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fising.cn/?feed=rss2&amp;p=40</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>[转] 在生产环境中使用php性能测试工具xhprof</title>
		<link>http://www.fising.cn/?p=35</link>
		<comments>http://www.fising.cn/?p=35#comments</comments>
		<pubDate>Tue, 13 Jul 2010 02:39:51 +0000</pubDate>
		<dc:creator>Fising</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.fising.cn/?p=35</guid>
		<description><![CDATA[xhprof 是facebook 开源出来的一个 php 性能测试工具，也可以称之为 profile 工具，这个词不知道怎么翻译才比较达意。跟之前一直使用的 xdebug 相比，有很多类似之处。以前对 xdebug 有一些记录还可以供参考，但是它的缺点是对性能影响太大，即便是开启了 profiler_enable_trigger 参数，用在生产环境中也是惨不忍睹，cpu 立刻就飙到 high。 而 xhprof 就显得很轻量，是否记录 profile 可以由程序控制，因此，用在生产环境中也就成为一种可能。在它的文档上可以看到这样一种用法： 以万分之一的几率启用 xhprof，平时悄悄的不打枪。 if (mt_rand(1, 10000) == 1) {     xhprof_enable(XHPROF_FLAGS_MEMORY);     $xhprof_on = true; } 在程序结尾处调用方法保存profile if ($xhprof_on) { // stop profiler $xhprof_data = xhprof_disable(); // save $xhprof_data somewhere (say a central DB) &#8230; } ]]></description>
			<content:encoded><![CDATA[<p>xhprof 是facebook 开源出来的一个 php 性能测试工具，也可以称之为 profile 工具，这个词不知道怎么翻译才比较达意。跟之前一直使用的 xdebug 相比，有很多类似之处。以前对 xdebug 有一些记录还可以供参考，但是它的缺点是对性能影响太大，即便是开启了 profiler_enable_trigger 参数，用在生产环境中也是惨不忍睹，cpu 立刻就飙到 high。</p>
<p>而 xhprof 就显得很轻量，是否记录 profile 可以由程序控制，因此，用在生产环境中也就成为一种可能。在它的文档上可以看到这样一种用法：</p>
<p>以万分之一的几率启用 xhprof，平时悄悄的不打枪。</p>
<p>if (mt_rand(1, 10000) == 1) {<br />
    xhprof_enable(XHPROF_FLAGS_MEMORY);<br />
    $xhprof_on = true;<br />
}</p>
<p>在程序结尾处调用方法保存profile</p>
<p>if ($xhprof_on) {<br />
// stop profiler<br />
$xhprof_data = xhprof_disable();</p>
<p>// save $xhprof_data somewhere (say a central DB)<br />
&#8230;<br />
}</p>
<p>也可以用 register_shutdown_function 方法指定在程序结束时保存 xhprof 信息，这样就免去了结尾处判断，给个改写的不完整例子：</p>
<p>if (mt_rand(1, 10000) == 1) {<br />
    xhprof_enable(XHPROF_FLAGS_MEMORY);<br />
    register_shutdown_function(create_funcion(&#8221;, &#8220;$xhprof_data = xhprof_disable(); save $xhprof_data;&#8221;));<br />
}</p>
<p>至于日志，我暂时用的是最土的文件形式保存，定期清除即可。</p>
<p>BTW:  xhprof  生成的图形方式 profile 真是酷毙了，哪段代码成为瓶颈，一目了然。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fising.cn/?feed=rss2&amp;p=35</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>发现一个很漂亮的Linux发行版Mandriva</title>
		<link>http://www.fising.cn/?p=30</link>
		<comments>http://www.fising.cn/?p=30#comments</comments>
		<pubDate>Tue, 13 Jul 2010 02:29:43 +0000</pubDate>
		<dc:creator>Fising</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.fising.cn/?p=30</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fising.cn/wp-content/uploads/2010/07/APERU_1.png"><img class="alignnone size-full wp-image-31" title="Mandriva" src="http://www.fising.cn/wp-content/uploads/2010/07/APERU_1.png" alt="Mandriva 操作系统界面" width="427" height="267" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fising.cn/?feed=rss2&amp;p=30</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[转] MySQL密码忘记的解决方法</title>
		<link>http://www.fising.cn/?p=26</link>
		<comments>http://www.fising.cn/?p=26#comments</comments>
		<pubDate>Tue, 13 Jul 2010 02:22:24 +0000</pubDate>
		<dc:creator>Fising</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.fising.cn/?p=26</guid>
		<description><![CDATA[最好用的mysql密码忘记的解决方法。经过测试，如果不能成功一般是你的mysql运行的不正常。 在Windows下: 打开命令行窗口，停止mysql服务： Net stop mysql 启动mysql，一般到mysql的安装路径，找到 mysqld-nt.exe 执行：mysqld-nt &#8211;skip-grant-tables 当前窗口将会停止。 另外打开一个命令行窗口，执行mysql 如果提示没有这个命令，先进入MYSQL的安装位置下BIN目录再运行mysql &#62;use mysql &#62;update user set password=password(&#8220;new_password&#8221;) where user=&#8221;root&#8221;; &#62;flush privileges; &#62;exit 用Ctrl+Alt+Del，找到mysqld-nt的进程杀掉它，在重新启动mysql-nt服务，就可以用新密码登录了 在Linux下: 如果 MySQL 正在运行，首先杀之： killall -TERM mysqld。 启动 MySQL ：bin/safe_mysqld &#8211;skip-grant-tables &#38; 就可以不需要密码就进入 MySQL 了。 然后就是 &#62;use mysql &#62;update user set password=password(&#8220;new_pass&#8221;) where user=&#8221;root&#8221;; &#62;flush privileges; 重新杀 MySQL ，用正常方法启动]]></description>
			<content:encoded><![CDATA[<p>最好用的mysql密码忘记的解决方法。经过测试，如果不能成功一般是你的mysql运行的不正常。</p>
<p>在Windows下:</p>
<p>打开命令行窗口，停止mysql服务：<br />
Net stop mysql<br />
启动mysql，一般到mysql的安装路径，找到 mysqld-nt.exe<br />
执行：mysqld-nt &#8211;skip-grant-tables 当前窗口将会停止。<br />
另外打开一个命令行窗口，执行mysql 如果提示没有这个命令，先进入MYSQL的安装位置下BIN目录再运行mysql<br />
&gt;use mysql<br />
&gt;update user set password=password(&#8220;new_password&#8221;) where user=&#8221;root&#8221;;<br />
&gt;flush privileges;<br />
&gt;exit<br />
用Ctrl+Alt+Del，找到mysqld-nt的进程杀掉它，在重新启动mysql-nt服务，就可以用新密码登录了</p>
<p>在Linux下:</p>
<p>如果 MySQL 正在运行，首先杀之： killall -TERM mysqld。<br />
启动 MySQL ：bin/safe_mysqld &#8211;skip-grant-tables &amp;<br />
就可以不需要密码就进入 MySQL 了。<br />
然后就是<br />
&gt;use mysql<br />
&gt;update user set password=password(&#8220;new_pass&#8221;) where user=&#8221;root&#8221;;<br />
&gt;flush privileges;<br />
重新杀 MySQL ，用正常方法启动</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fising.cn/?feed=rss2&amp;p=26</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>浏览器对象模型BOM结构图</title>
		<link>http://www.fising.cn/?p=22</link>
		<comments>http://www.fising.cn/?p=22#comments</comments>
		<pubDate>Tue, 13 Jul 2010 02:17:31 +0000</pubDate>
		<dc:creator>Fising</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.fising.cn/?p=22</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fising.cn/wp-content/uploads/2010/07/6686cb80f0bb0ae79023d9c8.jpg"><img class="alignnone size-full wp-image-23" title="浏览器对象模型 BOM 结构图" src="http://www.fising.cn/wp-content/uploads/2010/07/6686cb80f0bb0ae79023d9c8.jpg" alt="浏览器对象模型 BOM 结构图" width="344" height="229" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fising.cn/?feed=rss2&amp;p=22</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HTMLEncode</title>
		<link>http://www.fising.cn/?p=18</link>
		<comments>http://www.fising.cn/?p=18#comments</comments>
		<pubDate>Tue, 13 Jul 2010 02:13:56 +0000</pubDate>
		<dc:creator>Fising</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.fising.cn/?p=18</guid>
		<description><![CDATA[function HTMLEncode(text) {       return  text.replace(/\&#8221;/g, &#8216;&#38;quot;&#8217;).replace(/&#60;/g, &#8216;&#38;lt;&#8217;).replace(/&#62;/g, &#8216;&#38;gt;&#8217;).replace(/\&#8217;/g, &#8216;&#38;#039;&#8217;); }]]></description>
			<content:encoded><![CDATA[<p>function HTMLEncode(text) {  <br />
    return  text.replace(/\&#8221;/g, &#8216;&amp;quot;&#8217;).replace(/&lt;/g, &#8216;&amp;lt;&#8217;).replace(/&gt;/g, &#8216;&amp;gt;&#8217;).replace(/\&#8217;/g, &#8216;&amp;#039;&#8217;);<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fising.cn/?feed=rss2&amp;p=18</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>提升WEB性能的14条规则</title>
		<link>http://www.fising.cn/?p=11</link>
		<comments>http://www.fising.cn/?p=11#comments</comments>
		<pubDate>Tue, 13 Jul 2010 02:00:22 +0000</pubDate>
		<dc:creator>Fising</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.fising.cn/?p=11</guid>
		<description><![CDATA[1. 尽量减少 HTTP 请求 2. 使用 CDN (内容分发网络) 3. 添加 Expires 头 4. 启用 Gzip 压缩组件 5. 将样式表放在页面头部 6. 将脚本放在页面的尾部 7. 避免使用 CSS 表达式 8. 使用外部 CSS 和 JavaScript 9. 减少 DNS 查询 10. 精简 JavaScript 11. 避免重定向 12. 删除重复脚本 13. 配置 ETag 14. 使 Ajax 可缓存]]></description>
			<content:encoded><![CDATA[<p>1. 尽量减少 HTTP 请求<br />
2. 使用 CDN (内容分发网络)<br />
3. 添加 Expires 头<br />
4. 启用 Gzip 压缩组件<br />
5. 将样式表放在页面头部<br />
6. 将脚本放在页面的尾部<br />
7. 避免使用 CSS 表达式<br />
8. 使用外部 CSS 和 JavaScript<br />
9. 减少 DNS 查询<br />
10. 精简 JavaScript<br />
11. 避免重定向<br />
12. 删除重复脚本<br />
13. 配置 ETag<br />
14. 使 Ajax 可缓存</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fising.cn/?feed=rss2&amp;p=11</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
