<?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>World Wide Web 1st</title>
	<atom:link href="http://w31.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://w31.org</link>
	<description>Enjoy Computer and Internet</description>
	<lastBuildDate>Wed, 15 Sep 2010 16:02:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>我对旅行产品分销商价值的理解</title>
		<link>http://w31.org/2010/09/15/%e6%88%91%e5%af%b9%e6%97%85%e8%a1%8c%e4%ba%a7%e5%93%81%e5%88%86%e9%94%80%e5%95%86%e4%bb%b7%e5%80%bc%e7%9a%84%e7%90%86%e8%a7%a3/</link>
		<comments>http://w31.org/2010/09/15/%e6%88%91%e5%af%b9%e6%97%85%e8%a1%8c%e4%ba%a7%e5%93%81%e5%88%86%e9%94%80%e5%95%86%e4%bb%b7%e5%80%bc%e7%9a%84%e7%90%86%e8%a7%a3/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 16:02:04 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[OTA]]></category>
		<category><![CDATA[Travel Agency]]></category>
		<category><![CDATA[旅游分销]]></category>

		<guid isPermaLink="false">http://w31.org/?p=241</guid>
		<description><![CDATA[1.快速搜索（省时）：帮助最终用户最快的找到最适合的产品； 2.满足用户习惯（省心）：用户不必去学习和适应各个航空公司和各个酒店不同的查询和预订界面； 3.简易操作（省力）：集中式用户信息和预订历史管理使最终用户不必在不同网站注册自己的账户，更不必在一个个陌生的网站填写订单时再次输入自己的个人信息。 所以旅行产品分销商的价值，应该至少满足以下三点： 1.省时；2.省心；3.省力 综上：旅行产品分销商的价值应该在于服务，产品固然是重要的，但服务和产品同样都具有价值。]]></description>
			<content:encoded><![CDATA[<p>1.快速搜索（省时）：帮助最终用户最快的找到最适合的产品；</p>
<p>2.满足用户习惯（省心）：用户不必去学习和适应各个航空公司和各个酒店不同的查询和预订界面；</p>
<p>3.简易操作（省力）：集中式用户信息和预订历史管理使最终用户不必在不同网站注册自己的账户，更不必在一个个陌生的网站填写订单时再次输入自己的个人信息。</p>
<p>所以旅行产品分销商的价值，应该至少满足以下三点： 1.省时；2.省心；3.省力</p>
<p>综上：旅行产品分销商的价值应该在于服务，产品固然是重要的，但服务和产品同样都具有价值。</p>
]]></content:encoded>
			<wfw:commentRss>http://w31.org/2010/09/15/%e6%88%91%e5%af%b9%e6%97%85%e8%a1%8c%e4%ba%a7%e5%93%81%e5%88%86%e9%94%80%e5%95%86%e4%bb%b7%e5%80%bc%e7%9a%84%e7%90%86%e8%a7%a3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google 官方博客发表的声明</title>
		<link>http://w31.org/2010/03/22/google-%e5%ae%98%e6%96%b9%e5%8d%9a%e5%ae%a2%e5%8f%91%e8%a1%a8%e7%9a%84%e5%a3%b0%e6%98%8e/</link>
		<comments>http://w31.org/2010/03/22/google-%e5%ae%98%e6%96%b9%e5%8d%9a%e5%ae%a2%e5%8f%91%e8%a1%a8%e7%9a%84%e5%a3%b0%e6%98%8e/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 19:54:53 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://w31.org/?p=234</guid>
		<description><![CDATA[Google 官方博客发表的声明 http://googleblog.blogspot.com/  A new approach to China: an update 3/22/2010 12:03:00 PM On January 12, we announced on this blog that Google and more than twenty other U.S. companies had been the victims of a sophisticated cyber attack originating from China, and that during our investigation into these attacks we had uncovered evidence to [...]]]></description>
			<content:encoded><![CDATA[<p><span><cite>Google 官方博客发表的声明</cite></span></p>
<p><span><cite><a href="http://googleblog.blogspot.com/">http://googleblog.blogspot.com/</a></cite></span></p>
<p><span> </span><a href="https://ms8.com/ip/index.php?q=uggc%3A%2F%2Ftbbtyroybt.oybtfcbg.pbz%2F2010%2F03%2Farj-nccebnpu-gb-puvan-hcqngr.ugzy">A new approach to China: an update</a> 3/22/2010 12:03:00 PM</p>
<div id="main">
<div id="Blog1">On January 12, we <a href="https://ms8.com/ip/index.php?q=uggc%3A%2F%2Ftbbtyroybt.oybtfcbg.pbz%2F2010%2F01%2Farj-nccebnpu-gb-puvan.ugzy">announced on this blog</a> that Google and more than twenty other U.S. companies had been the victims of a sophisticated cyber attack originating from China, and that during our investigation into these attacks we had uncovered evidence to suggest that the Gmail accounts of dozens of human rights activists connected with China were being routinely accessed by third parties, most likely via phishing scams or malware placed on their computers. We also made clear that these attacks and the surveillance they uncovered—combined with attempts over the last year to further limit free speech on the web in China including the persistent blocking of websites such as Facebook, Twitter, YouTube, Google Docs and Blogger—had led us to conclude that we could no longer continue censoring our results on Google.cn.</div>
<p>So earlier today we stopped censoring our search services—Google Search, Google News, and Google Images—on Google.cn. Users visiting Google.cn are now being redirected to <a href="https://ms8.com/ip/index.php?q=uggc%3A%2F%2Fjjj.tbbtyr.pbz.ux%2F">Google.com.hk</a>, where we are offering uncensored search in simplified Chinese, specifically designed for users in mainland China and delivered via our servers in Hong Kong. Users in Hong Kong will continue to receive their existing uncensored, traditional Chinese service, also from <a href="https://ms8.com/ip/index.php?q=uggc%3A%2F%2Fjjj.tbbtyr.pbz.ux%2F">Google.com.hk</a>. Due to the increased load on our Hong Kong servers and the complicated nature of these changes, users may see some slowdown in service or find some products temporarily inaccessible as we switch everything over.</p>
<p>Figuring out how to make good on our promise to stop censoring search on Google.cn has been hard. We want as many people in the world as possible to have access to our services, including users in mainland China, yet the Chinese government has been crystal clear throughout our discussions that self-censorship is a non-negotiable legal requirement. We believe this new approach of providing uncensored search in simplified Chinese from <a href="https://ms8.com/ip/index.php?q=uggc%3A%2F%2Fjjj.tbbtyr.pbz.ux%2F">Google.com.hk</a> is a sensible solution to the challenges we&#8217;ve faced—it&#8217;s entirely legal and will meaningfully increase access to information for people in China. We very much hope that the Chinese government respects our decision, though we are well aware that it could at any time block access to our services. We will therefore be carefully monitoring access issues, and have created <a href="https://ms8.com/ip/index.php?q=uggc%3A%2F%2Fjjj.tbbtyr.pbz%2Fcep%2Fercbeg.ugzy%23uy%3Dra#ttp://www.google.com/prc/report.html#hl=en">this new web page</a>, which we will update regularly each day, so that everyone can see which Google services are available in China.</p>
<p>In terms of Google&#8217;s wider business operations, we intend to continue R&amp;D work in China and also to maintain a sales presence there, though the size of the sales team will obviously be partially dependent on the ability of mainland Chinese users to access <a href="https://ms8.com/ip/index.php?q=uggc%3A%2F%2Fjjj.tbbtyr.pbz.ux%2F">Google.com.hk</a>. Finally, we would like to make clear that all these decisions have been driven and implemented by our executives in the United States, and that none of our employees in China can, or should, be held responsible for them. Despite all the uncertainty and difficulties they have faced since we made our announcement in January, they have continued to focus on serving our Chinese users and customers. We are immensely proud of them.</p>
<p>Posted by David Drummond, SVP, Corporate Development and Chief Legal Officer</p></div>
]]></content:encoded>
			<wfw:commentRss>http://w31.org/2010/03/22/google-%e5%ae%98%e6%96%b9%e5%8d%9a%e5%ae%a2%e5%8f%91%e8%a1%a8%e7%9a%84%e5%a3%b0%e6%98%8e/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google 已经正式退出中国大陆</title>
		<link>http://w31.org/2010/03/22/google-%e5%b7%b2%e7%bb%8f%e6%ad%a3%e5%bc%8f%e9%80%80%e5%87%ba%e4%b8%ad%e5%9b%bd/</link>
		<comments>http://w31.org/2010/03/22/google-%e5%b7%b2%e7%bb%8f%e6%ad%a3%e5%bc%8f%e9%80%80%e5%87%ba%e4%b8%ad%e5%9b%bd/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 19:33:01 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://w31.org/?p=218</guid>
		<description><![CDATA[北京时间 3月23日凌晨3:00左右 ，当输入 http://g.cn/ 或 http://www.google.com.cn/ , http://www.google.cn 时，浏览器已经已经跳转到 http://www.google.com.hk/ （Google 香港）在 Google 香港网站下方写道“欢迎您来到谷歌搜索在中国的新家”，难道说香港是 Google 的保留地吗？ 经测试 http://ditu.google.com/ 还可以正常提供中文地图搜索服务。Adsense，Adwords ， Analytics 等服务还可以正常访问和使用。 目前还未看到 Google 官方对此事的正式声明。]]></description>
			<content:encoded><![CDATA[<p style="text-align: left">北京时间 3月23日凌晨3:00左右 ，当输入 <a href="http://g.cn/">http://g.cn/</a> 或 <a href="http://www.google.com.cn/">http://www.google.com.cn/</a> , <a href="http://www.google.cn">http://www.google.cn</a> 时，浏览器已经已经跳转到 <a href="http://www.google.com.hk/webhp?source=g_cn">http://www.google.com.hk/</a> （Google 香港）在 Google 香港网站下方写道“欢迎您来到谷歌搜索在中国的新家”，难道说香港是 Google 的保留地吗？</p>
<p style="text-align: left">经测试 <a href="http://ditu.google.com/">http://ditu.google.com/</a> 还可以正常提供中文地图搜索服务。Adsense，Adwords ， Analytics 等服务还可以正常访问和使用。</p>
<p style="text-align: left">目前还未看到 Google 官方对此事的正式声明。</p>
]]></content:encoded>
			<wfw:commentRss>http://w31.org/2010/03/22/google-%e5%b7%b2%e7%bb%8f%e6%ad%a3%e5%bc%8f%e9%80%80%e5%87%ba%e4%b8%ad%e5%9b%bd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>国际单位制词头</title>
		<link>http://w31.org/2009/08/16/%e5%9b%bd%e9%99%85%e5%8d%95%e4%bd%8d%e5%88%b6%e8%af%8d%e5%a4%b4/</link>
		<comments>http://w31.org/2009/08/16/%e5%9b%bd%e9%99%85%e5%8d%95%e4%bd%8d%e5%88%b6%e8%af%8d%e5%a4%b4/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 05:24:04 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Unit]]></category>
		<category><![CDATA[单位]]></category>

		<guid isPermaLink="false">http://w31.org/?p=214</guid>
		<description><![CDATA[10n 大陆词头 台湾词头 英语词头 符号 十进制数值 1024 尧（它） 佑 yotta Y 1 000 000 000 000 000 000 000 000 1021 泽（它） 皆 zetta Z 1 000 000 000 000 000 000 000 1018 艾（可萨） 艾 exa E 1 000 000 000 000 000 000 1015 拍（它） 拍 peta P 1 000 000 000 000 [...]]]></description>
			<content:encoded><![CDATA[<table border="0">
<caption></caption>
<tbody>
<tr>
<th>10<sup>n</sup></th>
<th>大陆词头</th>
<th>台湾词头</th>
<th>英语词头</th>
<th>符号</th>
<th>十进制数值</th>
</tr>
<tr>
<td>10<sup>24</sup></td>
<td>尧（它）</td>
<td>佑</td>
<td>yotta</td>
<td>Y</td>
<td>1 000 000 000 000 000 000 000 000</td>
</tr>
<tr>
<td>10<sup>21</sup></td>
<td>泽（它）</td>
<td>皆</td>
<td>zetta</td>
<td>Z</td>
<td>1 000 000 000 000 000 000 000</td>
</tr>
<tr>
<td>10<sup>18</sup></td>
<td>艾（可萨）</td>
<td>艾</td>
<td>exa</td>
<td>E</td>
<td>1 000 000 000 000 000 000</td>
</tr>
<tr>
<td>10<sup>15</sup></td>
<td>拍（它）</td>
<td>拍</td>
<td>peta</td>
<td>P</td>
<td>1 000 000 000 000 000</td>
</tr>
<tr>
<td>10<sup>12</sup></td>
<td>太（拉）</td>
<td>兆</td>
<td>tera</td>
<td>T</td>
<td>1 000 000 000 000</td>
</tr>
<tr>
<td>10<sup>9</sup></td>
<td>吉（咖）</td>
<td>吉</td>
<td>giga</td>
<td>G</td>
<td>1 000 000 000</td>
</tr>
<tr>
<td>10<sup>6</sup></td>
<td>兆</td>
<td>百万</td>
<td>mega</td>
<td>M</td>
<td>1 000 000</td>
</tr>
<tr>
<td>10<sup>3</sup></td>
<td>千</td>
<td>千</td>
<td>kilo</td>
<td>k</td>
<td>1 000</td>
</tr>
<tr>
<td>10<sup>2</sup></td>
<td>百</td>
<td>百</td>
<td>hecto</td>
<td>h</td>
<td>100</td>
</tr>
<tr>
<td>10<sup>1</sup></td>
<td>十</td>
<td>十</td>
<td>deca, deka</td>
<td>da</td>
<td>10</td>
</tr>
<tr>
<td>10<sup>0</sup></td>
<td>个</td>
<td>个</td>
<td><em><span style="color: gray">－</span></em></td>
<td><em><span style="color: gray">－</span></em></td>
<td>1</td>
</tr>
<tr>
<td>10<sup>−1</sup></td>
<td>分</td>
<td>分</td>
<td>deci</td>
<td>d</td>
<td>0.1</td>
</tr>
<tr>
<td>10<sup>−2</sup></td>
<td>厘</td>
<td>厘</td>
<td>centi</td>
<td>c</td>
<td>0.01</td>
</tr>
<tr>
<td>10<sup>−3</sup></td>
<td>毫</td>
<td>毫</td>
<td>milli</td>
<td>m</td>
<td>0.001</td>
</tr>
<tr>
<td>10<sup>−6</sup></td>
<td>微</td>
<td>微</td>
<td>micro</td>
<td>µ (u)</td>
<td>0.000 001</td>
</tr>
<tr>
<td>10<sup>−9</sup></td>
<td>纳（诺）</td>
<td>奈</td>
<td>nano</td>
<td>n</td>
<td>0.000 000 001</td>
</tr>
<tr>
<td>10<sup>−12</sup></td>
<td>皮（可）</td>
<td>皮</td>
<td>pico</td>
<td>p</td>
<td>0.000 000 000 001</td>
</tr>
<tr>
<td>10<sup>−15</sup></td>
<td>飞（母托）</td>
<td>飞</td>
<td>femto</td>
<td>f</td>
<td>0.000 000 000 000 001</td>
</tr>
<tr>
<td>10<sup>−18</sup></td>
<td>阿（托）</td>
<td>阿</td>
<td>atto</td>
<td>a</td>
<td>0.000 000 000 000 000 001</td>
</tr>
<tr>
<td>10<sup>−21</sup></td>
<td>仄（普托）</td>
<td>介</td>
<td>zepto</td>
<td>z</td>
<td>0.000 000 000 000 000 000 001</td>
</tr>
<tr>
<td>10<sup>−24</sup></td>
<td>幺（科托）</td>
<td>攸</td>
<td>yocto</td>
<td>y</td>
<td>0.000 000 000 000 000 000 000 001</td>
</tr>
</tbody>
</table>
<h2><span> </span></h2>
]]></content:encoded>
			<wfw:commentRss>http://w31.org/2009/08/16/%e5%9b%bd%e9%99%85%e5%8d%95%e4%bd%8d%e5%88%b6%e8%af%8d%e5%a4%b4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VI 命令</title>
		<link>http://w31.org/2009/06/23/vi-%e5%91%bd%e4%bb%a4/</link>
		<comments>http://w31.org/2009/06/23/vi-%e5%91%bd%e4%bb%a4/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 13:28:26 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operation System]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Web Server]]></category>
		<category><![CDATA[Web Site]]></category>
		<category><![CDATA[Webmasters]]></category>
		<category><![CDATA[VI]]></category>

		<guid isPermaLink="false">http://w31.org/2009/06/23/vi-%e5%91%bd%e4%bb%a4/</guid>
		<description><![CDATA[1. 移动光标 要对正文内容进行修改，首先必须把光标移动到指定位置。移动光标的最简单的方式是按键盘的上、下、左、 右箭头键。除了这种最原始的方法之外，用户还可以利用 vi 提供的众多字符组合键，在正文中移动光标，迅 速到达指定的行或列，实现定位。例如： k、j、h、l 功能分别等同于上、下、左、右箭头键 Ctrl+b 在文件中向上移动一页（相当于 PageUp 键） Ctrl+f 在文件中向下移动一页（相当于 PageDown 键） H 将光标移到屏幕的最上行（Highest） nH 将光标移到屏幕的第 n 行 2H 将光标移到屏幕的第 2 行 M 将光标移到屏幕的中间（Middle） L 将光标移到屏幕的最下行（Lowest） nL 将光标移到屏幕的倒数第 n 行 3L 将光标移到屏幕的倒数第 3 行 w 在指定行内右移光标，到下一个字的开头 e 在指定行内右移光标，到一个字的末尾 b 在指定行内左移光标，到前一个字的开头 0 数字0，左移光标，到本行的开头 $ 右移光标，到本行的末尾 ^ 移动光标，到本行的第一个非空字符 2. 替换和删除 将光标定位于文件内指定位置后，可以用其他字符来替换光标所指向的字符，或从当前光标位置删除一个或多 个字符。例如： [...]]]></description>
			<content:encoded><![CDATA[<p>1. 移动光标 <br />要对正文内容进行修改，首先必须把光标移动到指定位置。移动光标的最简单的方式是按键盘的上、下、左、 <br />右箭头键。除了这种最原始的方法之外，用户还可以利用 vi 提供的众多字符组合键，在正文中移动光标，迅 <br />速到达指定的行或列，实现定位。例如： <br />k、j、h、l 功能分别等同于上、下、左、右箭头键 <br />Ctrl+b 在文件中向上移动一页（相当于 PageUp 键） <br />Ctrl+f 在文件中向下移动一页（相当于 PageDown 键） <br />H 将光标移到屏幕的最上行（Highest） <br />nH 将光标移到屏幕的第 n 行 <br />2H 将光标移到屏幕的第 2 行 <br />M 将光标移到屏幕的中间（Middle） <br />L 将光标移到屏幕的最下行（Lowest） <br />nL 将光标移到屏幕的倒数第 n 行 <br />3L 将光标移到屏幕的倒数第 3 行 <br />w 在指定行内右移光标，到下一个字的开头 <br />e 在指定行内右移光标，到一个字的末尾 <br />b 在指定行内左移光标，到前一个字的开头 <br />0 数字0，左移光标，到本行的开头 <br />$ 右移光标，到本行的末尾 <br />^ 移动光标，到本行的第一个非空字符</p>
<p>2. 替换和删除 <br />将光标定位于文件内指定位置后，可以用其他字符来替换光标所指向的字符，或从当前光标位置删除一个或多 <br />个字符。例如： <br />rc 用 c 替换光标所指向的当前字符 <br />nrc 用 c 替换光标所指向的前 n 个字符 <br />5rc 用 c 替换光标所指向的前 5 个字符 <br />x 删除光标所指向的当前字符 <br />nx 删除光标所指向的前 n 个字符 <br />3x 删除光标所指向的前 3 个字符 <br />dw 删除光标右侧的字 <br />ndw 删除光标右侧的 n 个字 <br />3dw 删除光标右侧的 3 个字 <br />db 删除光标左侧的字 <br />ndb 删除光标左侧的 n 个字 <br />5db 删除光标左侧的 5 个字 <br />dd 删除光标所在行，并去除空隙 <br />ndd 删除 n 行内容，并去除空隙 <br />3dd 删除 3 行内容，并去除空隙</p>
<p>3. 粘贴和复制 <br />从正文中删除的内容（如字符、字或行）并没有真正丢失，而是被剪切并复制到了一个内存缓冲区中。用户可 <br />将其粘贴到正文中的指定位置。完成这一操作的命令是： <br />p 小写字母 p，将缓冲区的内容粘贴到光标的后面 <br />P 大写字母 P，将缓冲区的内容粘贴到光标的前面 <br />如果缓冲区的内容是字符或字，直接粘贴在光标的前面或后面；如果缓冲区的内容为整行正文，则粘贴在当前 <br />光标所在行的上一行或下一行。 <br />注意上述两个命令中字母的大小写。vi 编辑器经常以一对大、小写字母（如 p 和 P）来提供一对相似的功能 <br />。通常，小写命令在光标的后面进行操作，大写命令在光标的前面进行操作。 <br />有时需要复制一段正文到新位置，同时保留原有位置的内容。这种情况下，首先应当把指定内容复制（而不是 <br />剪切）到内存缓冲区。完成这一操作的命令是： <br />yy 复制当前行到内存缓冲区 <br />nyy 复制 n 行内容到内存缓冲区 <br />5yy 复制 5 行内容到内存缓冲区</p>
<p>4. 搜索字符串 <br />和许多先进的编辑器一样，vi 提供了强大的字符串搜索功能。要查找文件中指定字或短语出现的位置，可以 <br />用 vi 直接进行搜索，而不必以手工方式进行。搜索方法是：键入字符 / ，后面跟以要搜索的字符串，然后 <br />按回车键。编辑程序执行正向搜索（即朝文件末尾方向），并在找到指定字符串后，将光标停到该字符串的 <br />开头；键入 n 命令可以继续执行搜索，找出这一字符串下次出现的位置。用字符 ? 取代 / ，可以实现反向 <br />搜索（朝文件开头方向）。例如： <br />/str1 正向搜索字符串 str1 <br />n 继续搜索，找出 str1 字符串下次出现的位置 <br />?str2 反向搜索字符串 str2 <br />无论搜索方向如何，当到达文件末尾或开头时，搜索工作会循环到文件的另一端并继续执行。</p>
<p>5. 撤销和重复 <br />在编辑文档的过程中，为消除某个错误的编辑命令造成的后果，可以用撤消命令。另外，如果用户希望在新 <br />的光标位置重复前面执行过的编辑命令，可用重复命令。 <br />u 撤消前一条命令的结果 <br />. 重复最后一条修改正文的命令</p>
<p>6. 文本选中 <br />vi 可进入到一种成为 Visual 的模式，在该模式下，用户可以用光标移动命令可视地选择文本，然后再执行其他编辑操作，例如删除、复制等。 v 字符选中命令 V 行选中命令</p>
<p>#DEMO#</p>
<p>1.6.3 插入模式 <br />1. 进入插入模式 <br />在编辑模式下正确定位光标之后，可用以下命令切换到插入模式： <br />i 在光标左侧输入正文 <br />a 在光标右侧输入正文 <br />o 在光标所在行的下一行增添新行 <br />O 在光标所在行的上一行增添新行 <br />I 在光标所在行的开头输入正文 <br />A 在光标所在行的末尾输入正文 <br />上面介绍了几种切换到插入模式的简单方法。另外还有一些命令，它们允许在进入插入模式之前首先删去一段 <br />正文，从而实现正文的替换。这些命令包括： <br />s 用输入的正文替换光标所指向的字符 <br />ns 用输入的正文替换光标右侧 n 个字符 <br />cw 用输入的正文替换光标右侧的字 <br />ncw 用输入的正文替换光标右侧的 n 个字 <br />cb 用输入的正文替换光标左侧的字 <br />ncb 用输入的正文替换光标左侧的 n 个字 <br />cd 用输入的正文替换光标的所在行 <br />ncd 用输入的正文替换光标下面的 n 行 <br />c$ 用输入的正文替换从光标开始到本行末尾的所有字符 <br />c0 用输入的正文替换从本行开头到光标的所有字符</p>
<p>2. 退出插入模式 <br />退出插入模式的方法是，按 ESC 键或组合键Ctrl+[ 。</p>
<p>#DEMO#</p>
<p>1.6.4 命令模式 <br />在 vi 的命令模式下，可以使用复杂的命令。在编辑模式下键入&#8221;:&#8221;，光标就跳到屏幕最后一行，并在那里显示冒号，此时已进入命令模式。命令模式又称&#8221;末行模式&#8221;，用户输入的内容均显示在屏幕的最后一行，按回车键，vi 执行命令。</p>
<p>1. 退出命令 <br />在编辑模式下可以用 ZZ 命令退出 vi 编辑程序，该命令保存对正文所作的修改，覆盖原始文件。如果只需要 <br />退出编辑程序，而不打算保存编辑的内容，可用下面的命令： <br />: q 在未作修改的情况下退出 <br />: q! 放弃所有修改，退出编辑程序</p>
<p>2. 行号与文件 <br />编辑中的每一行正文都有自己的行号，用下列命令可以移动光标到指定行： <br />: n 将光标移到第 n 行 <br />命令模式下，可以规定命令操作的行号范围。数值用来指定绝对行号；字符&#8221;.&#8221;表示光标所在行的行号；字符 <br />符&#8221;$&#8221;表示正文最后一行的行号；简单的表达式，例如&#8221;.+5&#8243;表示当前行往下的第 5 行。例如： <br />:345 将光标移到第 345 行 <br />:345w file 将第 345 行写入 file 文件 <br />:3,5w file 将第 3 行至第 5 行写入 file 文件 <br />:1,.w file 将第 1 行至当前行写入 file 文件 <br />:.,$w file 将当前行至最后一行写入 file 文件 <br />:.,.+5w file 从当前行开始将 6 行内容写入 file 文件 <br />:1,$w file 将所有内容写入 file 文件，相当于 :w file 命令 <br />在命令模式下，允许从文件中读取正文，或将正文写入文件。例如： <br />:w 将编辑的内容写入原始文件，用来保存编辑的中间结果 <br />:wq 将编辑的内容写入原始文件并退出编辑程序（相当于 ZZ 命令） <br />:w file 将编辑的内容写入 file 文件，保持原有文件的内容不变 <br />:a,bw file 将第 a 行至第 b 行的内容写入 file 文件 <br />:r file 读取 file 文件的内容，插入当前光标所在行的后面 <br />:e file 编辑新文件 file 代替原有内容 <br />:f file 将当前文件重命名为 file <br />:f 打印当前文件名称和状态，如文件的行数、光标所在的行号等</p>
<p>3. 字符串搜索 <br />给出一个字符串，可以通过搜索该字符串到达指定行。如果希望进行正向搜索，将待搜索的字符串置于两个&#8221; <br />/&#8221;之间；如果希望反向搜索，则将字符串放在两个&#8221;?&#8221;之间。例如： <br />:/str/ 正向搜索，将光标移到下一个包含字符串 str 的行 <br />:?str? 反向搜索，将光标移到上一个包含字符串 str 的行 <br />:/str/w file 正向搜索，并将第一个包含字符串 str 的行写入 file 文件 <br />:/str1/,/str2/w file 正向搜索，并将包含字符串 str1 的行至包含字符串 str2 的行写 <br />入 file 文件</p>
<p>4. 正文替换 <br />利用 :s 命令可以实现字符串的替换。具体的用法包括： <br />:s/str1/str2/ 用字符串 str2 替换行中首次出现的字符串 str1 <br />:s/str1/str2/g 用字符串 str2 替换行中所有出现的字符串 str1 <br />:.,$ s/str1/str2/g 用字符串 str2 替换正文当前行到末尾所有出现的字符串 str1 <br />:1,$ s/str1/str2/g 用字符串 str2 替换正文中所有出现的字符串 str1 <br />:g/str1/s//str2/g 功能同上 <br />从上述替换命令可以看到：g 放在命令末尾，表示对搜索字符串的每次出现进行替换；不加 g，表示只对搜索 <br />字符串的首次出现进行替换；g 放在命令开头，表示对正文中所有包含搜索字符串的行进行替换操作。</p>
<p>5. 删除正文 <br />在命令模式下，同样可以删除正文中的内容。例如： <br />:d 删除光标所在行 <br />:3d 删除 3 行 <br />:.,$d 删除当前行至正文的末尾 <br />:/str1/,/str2/d 删除从字符串 str1 到 str2 的所有行</p>
<p>6. 恢复文件 <br />vi 在编辑某个文件时，会另外生成一个临时文件，这个文件的名称通常以 . 开头，并以 .swp 结尾。vi 在 <br />正常退出时，该文件被删除，若意外退出，而没有保存文件的最新修改内容，则可以使用恢复命令： <br />:recover 恢复文件 <br />也可以在启动 vi 时利用 -r 选项。</p>
]]></content:encoded>
			<wfw:commentRss>http://w31.org/2009/06/23/vi-%e5%91%bd%e4%bb%a4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache mod_rewrite 规则</title>
		<link>http://w31.org/2009/06/12/apache-mod_rewrite-%e8%a7%84%e5%88%99/</link>
		<comments>http://w31.org/2009/06/12/apache-mod_rewrite-%e8%a7%84%e5%88%99/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 13:44:49 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web Site]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[mod_rewrite]]></category>

		<guid isPermaLink="false">http://w31.org/2009/06/12/apache-mod_rewrite-%e8%a7%84%e5%88%99/</guid>
		<description><![CDATA[R[=code](force redirect) 强制外部重定向 强制在替代字符串加上http://thishost[:thisport]/前缀重定向到外部的URL.如果code不指定，将用缺省的302 HTTP状态码。 F(force URL to be forbidden)禁用URL,返回403HTTP状态码。 G(force URL to be gone) 强制URL为GONE，返回410HTTP状态码。 P(force proxy) 强制使用代理转发。 L(last rule) 表明当前规则是最后一条规则，停止分析以后规则的重写。 N(next round) 重新从第一条规则开始运行重写过程。 C(chained with next rule) 与下一条规则关联 如果规则匹配则正常处理，该标志无效，如果不匹配，那么下面所有关联的规则都跳过。 T=MIME-type(force MIME type) 强制MIME类型 NS(used only if no internal sub-request) 只用于不是内部子请求 NC(no case) 不区分大小写 QSA(query string append) 追加请求字符串 NE(no URI escaping of output) 不在输出转义特殊字符 [...]]]></description>
			<content:encoded><![CDATA[<p>R[=code](force redirect) 强制外部重定向 <br />强制在替代字符串加上http://thishost[:thisport]/前缀重定向到外部的URL.如果code不指定，将用缺省的302 HTTP状态码。 <br />F(force URL to be forbidden)禁用URL,返回403HTTP状态码。 <br />G(force URL to be gone) 强制URL为GONE，返回410HTTP状态码。 <br />P(force proxy) 强制使用代理转发。 <br />L(last rule) 表明当前规则是最后一条规则，停止分析以后规则的重写。 <br />N(next round) 重新从第一条规则开始运行重写过程。 <br />C(chained with next rule) 与下一条规则关联 <br />如果规则匹配则正常处理，该标志无效，如果不匹配，那么下面所有关联的规则都跳过。 <br />T=MIME-type(force MIME type) 强制MIME类型 <br />NS(used only if no internal sub-request) 只用于不是内部子请求 <br />NC(no case) 不区分大小写 <br />QSA(query string append) 追加请求字符串 <br />NE(no URI escaping of output) 不在输出转义特殊字符 <br />例如：RewriteRule /foo/(.*) /bar?arg=P1\%3d$1 [R,NE] 将能正确的将/foo/zoo转换成/bar?arg=P1=zed <br />PT(pass through to next handler) 传递给下一个处理 <br />例如： <br />RewriteRule ^/abc(.*) /def$1 [PT] # 将会交给/def规则处理 <br />Alias /def /ghi <br />S=num(skip next rule(s)) 跳过num条规则 <br />E=VAR:VAL(set environment variable) 设置环境变量</p>
<p>使用mod_rewrite时常用的服务器变量： <br />HTTP headers:HTTP_USER_AGENT, HTTP_REFERER, HTTP_COOKIE, HTTP_HOST, HTTP_ACCEPT <br />connection &amp; request: REMOTE_ADDR, QUERY_STRING <br />server internals: DOCUMENT_ROOT, SERVER_PORT, SERVER_PROTOCOL <br />system stuff: TIME_YEAR, TIME_MON, TIME_DAY</p>
<p>RewriteRule规则表达式的说明： <br />. 匹配任何单字符 <br />[chars] 匹配字符串:chars <br />[^chars] 不匹配字符串:chars <br />text1|text2 可选择的字符串:text1或text2 <br />? 匹配0到1个字符 <br />* 匹配0到多个字符 <br />+ 匹配1到多个字符 <br />^ 字符串开始标志 <br />$ 字符串结束标志 <br />\n 转义符标志</p>
<p>反向引用 $N 用于 RewriteRule 中匹配的变量调用(0 &lt;= N &lt;= 9) <br />反向引用 %N 用于 RewriteCond 中最后一个匹配的变量调用(1 &lt;= N &lt;= 9)</p>
<p>RewriteCond适用的标志符 <br />&#8216;nocase|NC&#8217; (no case)忽略大小 <br />&#8216;ornext|OR&#8217; (or next condition)逻辑或，可以同时匹配多个RewriteCond条件</p>
<p>RewriteRule适用的标志符 <br />&#8216;redirect|R [=code]&#8216; (force redirect)强迫重写为基于http开头的外部转向(注意URL的变化) 如：[R=301,L] <br />&#8216;forbidden|F&#8217; (force URL to be forbidden)重写为禁止访问 <br />&#8216;proxy|P&#8217; (force proxy)重写为通过代理访问的http路径 <br />&#8216;last|L&#8217; (last rule)最后的重写规则标志，如果匹配，不再执行以后的规则 <br />&#8216;next|N&#8217; (next round)循环同一个规则，直到不能满足匹配 <br />&#8216;chain|C&#8217; (chained with next rule)如果匹配该规则，则继续下面的有Chain标志的规则。 <br />&#8216;type|T=MIME-type&#8217; (force MIME type)指定MIME类型 <br />&#8216;nosubreq|NS&#8217; (used only if no internal sub-request)如果是内部子请求则跳过 <br />&#8216;nocase|NC&#8217; (no case)忽略大小 <br />&#8216;qsappend|QSA&#8217; (query string append)附加查询字符串 <br />&#8216;noescape|NE&#8217; (no URI escaping of output)禁止URL中的字符自动转义成%[0-9]+的形式。 <br />&#8216;passthrough|PT&#8217; (pass through to next handler)将重写结果运用于mod_alias <br />&#8216;skip|S=num&#8217; (skip next rule(s))跳过下面几个规则 <br />&#8216;env|E=VAR:VAL&#8217; (set environment variable)添加环境变量</p>
<p>实战 <br />例子： <br />RewriteEngine on <br />RewriteCond %{HTTP_USER_AGENT} ^MSIE [NC,OR] <br />RewriteCond %{HTTP_USER_AGENT} ^Opera [NC] <br />RewriteRule ^.* &#8211; [F,L] 这里&#8221;-&#8221;表示没有替换，浏览器为IE和Opera的访客将被禁止访问。</p>
<p>例子： <br />RewriteEngine On <br />RewriteBase /test <br />RewriteCond %{REQUEST_FILENAME}.php -f <br />RewriteRule ([^/]+)$ /test/$1.php <br />#for example: /test/admin =&gt; /test/admin.php <br />RewriteRule ([^/]+)\.html$ /test/$1.php [L] <br />#for example: /test/admin.html =&gt; /test/admin.php</p>
<p>限制目录只能显示图片 <br />&lt; IfModule mod_rewrite.c&gt; <br />RewriteEngine on <br />RewriteCond %{REQUEST_FILENAME} !^.*\.(gif|jpg|jpeg|png|swf)$ <br />RewriteRule .*$ &#8211; [F,L] <br />&lt; /IfModule&gt; </p>
]]></content:encoded>
			<wfw:commentRss>http://w31.org/2009/06/12/apache-mod_rewrite-%e8%a7%84%e5%88%99/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Studio 快捷键</title>
		<link>http://w31.org/2009/06/04/zend-studio-%e5%bf%ab%e6%8d%b7%e9%94%ae/</link>
		<comments>http://w31.org/2009/06/04/zend-studio-%e5%bf%ab%e6%8d%b7%e9%94%ae/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 14:26:05 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Developer]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Zned]]></category>

		<guid isPermaLink="false">http://w31.org/2009/06/04/zend-studio-%e5%bf%ab%e6%8d%b7%e9%94%ae/</guid>
		<description><![CDATA[组合键 实现功能 适用条件 Ctrl+/ 单行注释。当前为php代码时，则在光标所在行添加双斜杠行注释，选择多行则每一行都添加双斜杠；而当代码为html时则在行前后添加&#60;!&#8211; &#8211;&#62;注释，选中多行将在选区前后添加&#60;!&#8211; &#8211;&#62;注释，而非每行添加 PHP代码、html代码全部适用，不适用于CSS部分 Ctrl+Shift+/ 块注释，为选择的PHP代码添加块注释，如果没有选择任何代码，则将光标所在行添加块注释 PHP代码适用，对HTML代码其功能与Ctrl+/相同 Ctrl+U 选择的代码片段全部转换为大写 php、html等均适用 Ctrl+L 选择的代码片段全部转换为小写 php、html等均适用 Ctrl+D 复制光标所在行 所有代码均适用 Ctrl+E 删除光标所在行 所有代码均适用 Tab/Shift+Tab 按tab增加代码缩进，默认为4个空格位置，可在首选项中进行设置，Shift+Tab则减少缩进，此操作对多行操作同样有效。即多行同时增加/减少缩进。 所有代码均适用 Ctrl+Alt+F 在文件中查找，打开&#8221;在文件中查找&#8221;对话框 整个ZDE环境适用 Ctrl+BackSpace 删除光标前一个单词，或者一个符号，注意这里的&#8221;一个单词&#8221;是由ZDE自行理解的，与英文中的一个单词有一定出入 所有代码均适用 Ctrl+G 转到行。打开转到行对话框，填写行数字即可转到相应行，此为通用快捷键 整个ZDE环境适用 Alt+ →,← 右箭头是定位到光标的下一个位置，左箭头则是定位到光标的上一个位置。 整个ZDE环境适用 环境切换 组合键 实现功能 适用条件 Esc 隐藏辅助窗口，以便让编辑区域最大，而文件管理器窗口不会隐藏 整个ZDE环境适用 Ctrl+W 切换自动换行，即当代码超长时是否出现横向滚动条 Ctrl+Tab 在各个编辑器标签页之间切换，也可描述为在多个打开的文件窗口间切换 Ctrl+F4 关闭当前标签页，Alt+F4是关闭整个ZDE环境，注意下区别 HTML标记 组合键 实现功能 [...]]]></description>
			<content:encoded><![CDATA[<table cellpadding="0" width="100%" border="1" cellspacing="0">
<tbody>
<tr>
<th width="20%" height="23" scope="col">组合键</th>
<th width="52%" scope="col">实现功能</th>
<th width="28%" scope="col">适用条件</th>
</tr>
<tr>
<td align="middle">Ctrl+/</td>
<td>单行注释。当前为php代码时，则在光标所在行添加双斜杠行注释，选择多行则每一行都添加双斜杠；而当代码为html时则在行前后添加&lt;!&#8211; &#8211;&gt;注释，选中多行将在选区前后添加&lt;!&#8211; &#8211;&gt;注释，而非每行添加</td>
<td>PHP代码、html代码全部适用，不适用于CSS部分</td>
</tr>
<tr>
<td align="middle">Ctrl+Shift+/</td>
<td>块注释，为选择的PHP代码添加块注释，如果没有选择任何代码，则将光标所在行添加块注释</td>
<td>PHP代码适用，对HTML代码其功能与Ctrl+/相同</td>
</tr>
<tr>
<td align="middle">Ctrl+U</td>
<td>选择的代码片段全部转换为大写</td>
<td>php、html等均适用</td>
</tr>
<tr>
<td align="middle">Ctrl+L</td>
<td>选择的代码片段全部转换为小写</td>
<td>php、html等均适用</td>
</tr>
<tr>
<td align="middle">Ctrl+D</td>
<td>复制光标所在行</td>
<td>所有代码均适用</td>
</tr>
<tr>
<td align="middle">Ctrl+E</td>
<td>删除光标所在行</td>
<td>所有代码均适用</td>
</tr>
<tr>
<td align="middle">Tab/Shift+Tab</td>
<td>按tab增加代码缩进，默认为4个空格位置，可在首选项中进行设置，Shift+Tab则减少缩进，此操作对多行操作同样有效。即多行同时增加/减少缩进。</td>
<td>所有代码均适用</td>
</tr>
<tr>
<td align="middle">Ctrl+Alt+F</td>
<td>在文件中查找，打开&#8221;在文件中查找&#8221;对话框</td>
<td>整个ZDE环境适用</td>
</tr>
<tr>
<td align="middle">Ctrl+BackSpace</td>
<td>删除光标前一个单词，或者一个符号，注意这里的&#8221;一个单词&#8221;是由ZDE自行理解的，与英文中的一个单词有一定出入</td>
<td>所有代码均适用</td>
</tr>
<tr>
<td align="middle">Ctrl+G</td>
<td>转到行。打开转到行对话框，填写行数字即可转到相应行，此为通用快捷键</td>
<td>整个ZDE环境适用</td>
</tr>
<tr>
<td align="middle">Alt+ →,←</td>
<td>右箭头是定位到光标的下一个位置，左箭头则是定位到光标的上一个位置。</td>
<td>整个ZDE环境适用</td>
</tr>
</tbody>
</table>
<p></p>
<table cellpadding="0" width="100%" border="1" cellspacing="0">
<caption><strong>环境切换</strong></caption>
<tbody>
<tr>
<th width="20%" scope="col">组合键</th>
<th width="52%" scope="col">实现功能</th>
<th width="28%" scope="col">适用条件</th>
</tr>
<tr>
<td align="middle">Esc</td>
<td>隐藏辅助窗口，以便让编辑区域最大，而文件管理器窗口不会隐藏</td>
<td rowspan="4">整个ZDE环境适用</td>
</tr>
<tr>
<td align="middle">Ctrl+W</td>
<td>切换自动换行，即当代码超长时是否出现横向滚动条</td>
</tr>
<tr>
<td align="middle">Ctrl+Tab</td>
<td>在各个编辑器标签页之间切换，也可描述为在多个打开的文件窗口间切换</td>
</tr>
<tr>
<td align="middle">Ctrl+F4</td>
<td>关闭当前标签页，Alt+F4是关闭整个ZDE环境，注意下区别</td>
</tr>
</tbody>
</table>
<p></p>
<table cellpadding="0" width="100%" border="1" cellspacing="0">
<caption><strong>HTML标记</strong></caption>
<tbody>
<tr>
<th width="20%" scope="col">组合键</th>
<th width="52%" scope="col">实现功能</th>
<th width="28%" scope="col">适用条件</th>
</tr>
<tr>
<td align="middle">Ctrl+1,2,3</td>
<td>分别添加一对&lt;h1&gt;、&lt;h2&gt;、&lt;h3&gt; html标签，</td>
<td rowspan="5">所有代码部分</td>
</tr>
<tr>
<td align="middle">Ctrl+Enter</td>
<td>断行，即产生一个&lt;br /&gt;标签，这里注意ZDE自动产生的为&lt;br&gt;标签，不符合web标准</td>
</tr>
<tr>
<td align="middle">Ctrl+~</td>
<td>空格即一个 注意：~键位于PC键盘数字1左侧，tab键上方</td>
</tr>
<tr>
<td align="middle">Ctrl+B</td>
<td>粗体，产生一对&lt;b&gt;标签，web标准似乎提倡使用&lt;strong&gt;&lt;/strong&gt;</td>
</tr>
<tr>
<td align="middle">Alt+I</td>
<td>斜体，产生一对&lt;i&gt;标签</td>
</tr>
</tbody>
</table>
<p></p>
<table cellpadding="0" width="100%" border="1" cellspacing="0">
<caption><strong>书签操作</strong></caption>
<tbody>
<tr>
<th width="20%" scope="col">组合键</th>
<th width="52%" scope="col">实现功能</th>
<th width="28%" scope="col">适用条件</th>
</tr>
<tr>
<td align="middle">F2</td>
<td>添加/删除书签</td>
<td rowspan="5">所有代码部分</td>
</tr>
<tr>
<td align="middle">Ctrl+F2</td>
<td>跳到当前文件的下一个书签</td>
</tr>
<tr>
<td align="middle">Alt+F2</td>
<td>在当前项目的所有书签间切换</td>
</tr>
<tr>
<td align="middle">Ctrl+Shift+F2</td>
<td>删除所有书签</td>
</tr>
<tr>
<td align="middle">Ctrl+Shift+M</td>
<td>显示书签对话框</td>
</tr>
</tbody>
</table>
<p></p>
<table cellpadding="0" width="100%" border="1" cellspacing="0">
<caption><strong>Zend Studio调试快捷键列表</strong></caption>
<tbody>
<tr>
<th width="20%" scope="col">组合键</th>
<th width="52%" scope="col">实现功能</th>
<th width="28%" scope="col">适用条件</th>
</tr>
<tr>
<td align="middle">F9</td>
<td>添加/删除断点</td>
<td rowspan="12">所有代码部分</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://w31.org/2009/06/04/zend-studio-%e5%bf%ab%e6%8d%b7%e9%94%ae/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL 备忘</title>
		<link>http://w31.org/2009/05/27/sql-%e5%a4%87%e5%bf%98-5/</link>
		<comments>http://w31.org/2009/05/27/sql-%e5%a4%87%e5%bf%98-5/#comments</comments>
		<pubDate>Wed, 27 May 2009 16:58:53 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Data Base]]></category>
		<category><![CDATA[Microsoft SQL Server]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://w31.org/2009/05/27/sql-%e5%a4%87%e5%bf%98-5/</guid>
		<description><![CDATA[用SQL语句添加删除修改字段 1.增加字段 alter table docdsp add dspcode char(200) 2.删除字段 ALTER TABLE table_NAME DROP COLUMN column_NAME 3.修改字段类型 ALTER TABLE table_name ALTER COLUMN column_name new_data_type 4.sp_rename 改名 更改当前数据库中用户创建对象（如表、列或用户定义数据类型）的名称。 语法 sp_rename [ @objname = ] &#8216;object_name&#8217; , [ @newname = ] &#8216;new_name&#8217; [ , [ @objtype = ] &#8216;object_type&#8217; ] 如：EXEC sp_rename &#8216;newname&#8217;,'PartStock&#8217; 5.sp_help 显示表的一些基本情况 sp_help &#8216;object_name&#8217; 如：EXEC [...]]]></description>
			<content:encoded><![CDATA[<p><strong>用SQL语句添加删除修改字段</strong> </p>
<p>1.增加字段 <br />alter table docdsp add dspcode char(200) <br />2.删除字段 <br />ALTER TABLE table_NAME DROP COLUMN column_NAME <br />3.修改字段类型 <br />ALTER TABLE table_name ALTER COLUMN column_name new_data_type <br />4.sp_rename 改名 <br />更改当前数据库中用户创建对象（如表、列或用户定义数据类型）的名称。 <br />语法 <br />sp_rename [ @objname = ] <br />&#8216;object_name&#8217; , <br />[ @newname = ] &#8216;new_name&#8217; <br />[ , [ @objtype = ] &#8216;object_type&#8217; ] <br />如：EXEC sp_rename <br />&#8216;newname&#8217;,'PartStock&#8217; <br />5.sp_help 显示表的一些基本情况 <br />sp_help &#8216;object_name&#8217; <br />如：EXEC sp_help &#8216;PartStock&#8217; <br />6.判断某一表PartStock中字段PartVelocity是否存在 <br />if <br />exists (select * from syscolumns where <br />id=object_id(&#8216;PartStock&#8217;) and name=&#8217;PartVelocity&#8217;) <br />print <br />&#8216;PartVelocity exists&#8217; <br />else print &#8216;PartVelocity not <br />exists&#8217; <br />另法： <br />判断表的存在性： <br />select count(*) from sysobjects where type=&#8217;U&#8217; and name=&#8217;你的表名&#8217; <br />判断字段的存在性： <br />select count(*) from syscolumns where id = (select id from sysobjects where type=&#8217;U&#8217; and name=&#8217;表名&#8217;) and name = &#8216;判断的字段名&#8217; </p>
<p>一个小例子 <br />&#8211;假设要处理的表名为: <br />tb <br />&#8211;判断要添加列的表中是否有主键 <br />if exists(select 1 from sysobjects where parent_obj=object_id(&#8216;tb&#8217;) and xtype=&#8217;PK&#8217;) <br />begin <br />print <br />&#8216;表中已经有主键,列只能做为普通列添加&#8217; <br />&#8211;添加int类型的列,默认值为0 <br />alter table tb add 列名 int default <br />0 <br />end <br />else <br />begin <br />print &#8216;表中无主键,添加主键列&#8217; <br />&#8211;添加int类型的列,默认值为0 <br />alter table tb add 列名 int primary key default 0 <br />end <br />7.随机读取若干条记录 <br />Access语法：SELECT top 10 * From 表名 ORDER BY <br />Rnd(id) <br />Sql server:select top n * from 表名 order by newid() <br />mysql :select * From 表名 Order By rand() Limit n <br />8.说明：日程安排提前五分钟提醒 <br />SQL: <br />select * from 日程安排 where datediff(minute,f开始时间,getdate())&gt;5 <br />9.前10条记录 <br />select top 10 * form table1 where 范围 <br />10.包括所有在 TableA 中但不在 TableB和TableC 中的行并消除所有重复行而派生出一个结果表 <br />(select a <br />from tableA ) except (select a from tableB) except (select a from tableC) <br />11.说明：随机取出10条数据 <br />select top 10 * from tablename order by newid() <br />12.列出数据库里所有的表名 <br />select name from sysobjects where type=U <br />13.列出表里的所有的字段名 <br />select name from syscolumns where <br />id=object_id(TableName) <br />14.说明：列示type、vender、pcs字段，以type字段排列，case可以方便地实现多重选择，类似select <br />中的case。 <br />select type,sum(case vender when A then pcs else 0 <br />end),sum(case vender when C then pcs else 0 end),sum(case vender when B then pcs <br />else 0 end) FROM tablename group by type <br />15.说明：初始化表table1 <br />TRUNCATE <br />TABLE table1 <br />16.说明：几个高级查询运算词 <br />　　A： UNION 运算符 <br />　　UNION 运算符通过组合其他两个结果表（例如 <br />TABLE1 和 TABLE2）并消去表中任何重复行而派生出一个结果表。当 ALL 随 UNION 一起使用时（即 UNION <br />ALL），不消除重复行。两种情况下，派生表的每一行不是来自 TABLE1 就是来自 TABLE2。 <br />　　B： EXCEPT 运算符 <br />　　EXCEPT 运算符通过包括所有在 TABLE1 中但不在 TABLE2 <br />中的行并消除所有重复行而派生出一个结果表。当 ALL 随 EXCEPT 一起使用时 (EXCEPT ALL)，不消除重复行。 <br />　　C： INTERSECT 运算符 <br />　　INTERSECT 运算符通过只包括 TABLE1 和 TABLE2 <br />中都有的行并消除所有重复行而派生出一个结果表。当 ALL 随 INTERSECT 一起使用时 (INTERSECT <br />ALL)，不消除重复行。 <br />　　注：使用运算词的几个查询结果行必须是一致的。 <br />17.说明：在线视图查询(表名1：a ) <br />select * from (SELECT a,b,c FROM a) T where <br />t.a &gt; 1; <br />18.说明：between的用法,between限制查询数据范围时包括了边界值,not between不包括 <br />select * from <br />table1 where time between time1 and time2 <br />select a,b,c, from table1 <br />where a not between 数值1 and 数值2 <br />19.说明：in 的使用方法 <br />select * from table1 where a [not] in <br />(&#8216;值1&#8242;,&#8217;值2&#8242;,&#8217;值4&#8242;,&#8217;值6&#8242;) <br />20.说明：两张关联表，删除主表中已经在副表中没有的信息 <br />delete from table1 where not exists ( <br />select * from table2 where table1.field1=table2.field1 <br />) <br />21.　说明：复制表(只复制结构,源表名：a 新表名：b) (Access可用) <br />　　法一：select * into b from a <br />where 1&lt;&gt;1 <br />　　法二：select top 0 * into b from a <br />22.说明：拷贝表(拷贝数据,源表名：a 目标表名：b) (Access可用) <br />insert into b(a, b, c) <br />select d,e,f from b; <br />23.说明：跨数据库之间表的拷贝(具体数据使用绝对路径) (Access可用) <br />insert into b(a, b, c) <br />select d,e,f from b in &#8216;具体数据库&#8217; where 条件 <br />　　例子：..from b in <br />&#8220;&amp;Server.MapPath(&#8220;.&#8221;)&amp;&#8221;\data.mdb&#8221; &amp;&#8221; where.. <br />24.创建数据库 </p>
<p>CREATE DATABASE database-name <br />25.说明：删除数据库 <br />drop database dbname <br />26.说明：备份sql server <br />　　&#8212; 创建 <br />备份数据的 device <br />USE master <br />EXEC sp_addumpdevice disk, testBack, <br />c:\mssql7backup\MyNwind_1.dat <br />　　&#8212; 开始 备份 <br />BACKUP DATABASE pubs TO testBack <br />27.说明：创建新表 <br />create table tabname(col1 type1 [not null] [primary <br />key],col2 type2 [not null],..) <br />　　根据已有的表创建新表： <br />A：create table tab_new <br />like tab_old (使用旧表创建新表) <br />B：create table tab_new as select col1,col2… <br />from tab_old definition only <br />28.说明： <br />　　删除新表：drop table tabname <br />29.说明： <br />　　增加一个列：Alter table tabname add column col <br />type <br />　　注：列增加后将不能删除。DB2中列加上后数据类型也不能改变，唯一能改变的是增加varchar类型的长度。 <br />30.说明： <br />　　添加主键：Alter table tabname add primary key(col) <br />　　说明： <br />　　删除主键：Alter table tabname drop primary key(col) <br />31.说明： <br />　　创建索引：create [unique] index idxname on tabname(col….) <br />　　删除索引：drop index idxname <br />　　注：索引是不可更改的，想更改必须删除重新建。 <br />32.说明： <br />　　创建视图：create view viewname as select statement <br />　　删除视图：drop view viewname <br />33.说明：几个简单的基本的sql语句 <br />　　选择：select * from table1 where 范围 <br />　　插入：insert into <br />table1(field1,field2) values(value1,value2) <br />　　删除：delete from table1 where <br />范围 <br />　　更新：update table1 set field1=value1 where 范围 <br />　　查找：select * from table1 <br />where field1 like &#8216;%value1%&#8217; &#8212;like的语法很精妙，查资料! <br />　　排序：select * from table1 <br />order by field1,field2 [desc] <br />　　总数：select count * as totalcount from <br />table1 <br />　　求和：select sum(field1) as sumvalue from table1 <br />　　平均：select <br />avg(field1) as avgvalue from table1 <br />　　最大：select max(field1) as maxvalue from <br />table1 <br />　　最小：select min(field1) as minvalue from table1</p>
]]></content:encoded>
			<wfw:commentRss>http://w31.org/2009/05/27/sql-%e5%a4%87%e5%bf%98-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>中国的神仙</title>
		<link>http://w31.org/2009/04/19/%e4%b8%ad%e5%9b%bd%e7%9a%84%e7%a5%9e%e4%bb%99/</link>
		<comments>http://w31.org/2009/04/19/%e4%b8%ad%e5%9b%bd%e7%9a%84%e7%a5%9e%e4%bb%99/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 14:52:12 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Reading]]></category>
		<category><![CDATA[中国]]></category>
		<category><![CDATA[神仙]]></category>

		<guid isPermaLink="false">http://w31.org/2009/04/19/%e4%b8%ad%e5%9b%bd%e7%9a%84%e7%a5%9e%e4%bb%99/</guid>
		<description><![CDATA[重要神仙表 　　盘古氏-又称元始天王，一名，浮黎元始天尊。 三清： 　　元始天尊 　　灵宝天尊 又名太上道君 　　道德天尊 又名太上老君(西游记里也称为太上道祖) 六御 　　中央玉皇大帝 妻：王母娘娘，又称为 西王母 　　北方北极中天紫微大帝 　　南方南极长生大帝,又名玉清真王，为元始天王九子。 　　东方东极青华大帝太乙救苦天尊 　　西方太极天皇大帝 (手下：八大元帅，五极战神(天空战神，大地战神，人中战神, 　　北极战神和南极战神)) 　　大地之母：承天效法后土皇地祗 五方五老： 　　南方南极观音 　　东方崇恩圣帝 　　三岛十洲仙翁东华大帝君（即东王公,名&#8221;金蝉氏&#8221;,号木公） 　北方北极玄灵斗姆元君（佛教中二十诸天的摩利支天） 　　中央黄极黄角大仙 中央天宫仙位表 　　千里眼 &#124; 顺风耳 &#124; 金童 &#124; 玉女 &#124; 雷公 &#124; 电母（金光圣母） &#124; 　　风伯 &#124; 雨师 &#124; 游奕灵官 &#124; 翊圣真君 &#124; 大力鬼王 &#124; 七仙女 &#124; 太白金星 &#124; 　　赤脚大仙 &#124; 广寒仙子（娥仙子）嫦娥 [...]]]></description>
			<content:encoded><![CDATA[<p>重要神仙表</p>
<p>　　盘古氏-又称元始天王，一名，浮黎元始天尊。</p>
<p>三清：</p>
<p>　　元始天尊 <br />　　灵宝天尊 又名太上道君 <br />　　道德天尊 又名太上老君(西游记里也称为太上道祖)</p>
<p>六御</p>
<p>　　中央玉皇大帝 妻：王母娘娘，又称为 西王母 <br />　　北方北极中天紫微大帝 <br />　　南方南极长生大帝,又名玉清真王，为元始天王九子。 <br />　　东方东极青华大帝太乙救苦天尊 <br />　　西方太极天皇大帝 (手下：八大元帅，五极战神(天空战神，大地战神，人中战神, <br />　　北极战神和南极战神)) <br />　　大地之母：承天效法后土皇地祗</p>
<p>五方五老：</p>
<p>　　南方南极观音 <br />　　东方崇恩圣帝 <br />　　三岛十洲仙翁东华大帝君（即东王公,名&#8221;金蝉氏&#8221;,号木公） <br />　北方北极玄灵斗姆元君（佛教中二十诸天的摩利支天） <br />　　中央黄极黄角大仙</p>
<p>中央天宫仙位表</p>
<p>　　千里眼 | 顺风耳 | 金童 | 玉女 | 雷公 | 电母（金光圣母） | <br />　　风伯 | 雨师 | 游奕灵官 | 翊圣真君 | 大力鬼王 | 七仙女 | 太白金星 | <br />　　赤脚大仙 | 广寒仙子（娥仙子）嫦娥 | 玉兔 | 玉蟾 | 吴刚 | 天蓬元帅 | <br />　　天佑元帅 | 九天玄女 | 十二金钗 | 九曜星 | 日游神 | 夜游神 | 太阴星君 | <br />　　太阳星君 | 武德星君 | 佑圣真君</p>
<p>　　托塔天王李靖 | 金吒 | 木吒（行者惠岸） | 三坛海会大神哪吒 | 巨灵神 | <br />　　月老 | 左辅右弼 | 二郎神杨戬 | 太乙雷声应化天尊王善王灵官 | 萨真人 | <br />　　紫阳真人(张伯端) | 文昌帝君 | 天聋 | 地哑</p>
<p>三官大帝： 天官 | 地官 | 水官 <br />　　四大天王： <br />　　增长天王、持国天王、多闻天王与广目天王 <br />　　四值功曹： <br />　　值年神李丙 | 值月神黄承乙 | 值日神周登 | 值时神刘洪 <br />　　四大天师： <br />　　张道陵、许逊（字敬之，号许旌阳）、邱弘济、葛洪 <br />　　四方神 <br />　　青龙孟章神君、白虎监兵神君、朱雀陵光神君、玄武执明神君。 <br />　　四渎龙神 <br />　　黄河 | 长江 | 淮河 | 济水河神</p>
<p>马赵温关四大元帅：</p>
<p>　　马元帅 又名马天君，又称华光天王、华光大帝 <br />　　赵元帅 即武财神赵公明，又名赵玄坛 <br />　　温元帅 温琼，东岳大帝部将 <br />　　关元帅 关羽。</p>
<p>五方谒谛：金光揭谛、银头揭谛、波罗揭谛、波罗僧揭谛、摩诃揭谛</p>
<p>五耪婢：</p>
<p>　　东方岁星木德真君 | 南方荧惑火德真君 | 西方太白金德真君 | <br />　　北方辰星水德真君 | 中央镇星土德真君</p>
<p>五岳</p>
<p>　　东岳泰山天齐仁圣大帝　南岳衡山司天昭圣大帝　中岳嵩山中天崇圣大帝 <br />　　北岳恒山安天玄圣大帝　西岳华山金天愿圣大帝 <br />　　(五岳帝君：东岳帝君，名金虹氏，东华帝君弟。其它四岳帝君为东华帝君的四个 <br />　　儿子。) 及 碧霞元君</p>
<p>五斗星君：</p>
<p>　　东斗星君 | 西斗星君 | 中斗星君 | 南斗星君 | 北斗星君</p>
<p>六丁六甲：</p>
<p>　　六丁为阴神玉女 | 丁卯神司马卿 | 丁已神崔巨卿 | 丁未神石叔通 | <br />　　丁酉神臧文公 丁亥神张文通 | 丁丑神赵子玉 | <br />　　六甲为阳神玉男 | 甲子神王文卿 | 甲戌神展子江 | 甲申神扈文长 | <br />　　甲午神卫玉卿 | 甲辰神孟非卿 | 甲寅神明文章 <br />南斗六星君</p>
<p>　　第一天府宫：司命星君 <br />　　第二天相宫：司禄星君 <br />　　第三天梁宫：延寿星君 <br />　　第四天同宫：益算星君 <br />　　第五天枢宫：度厄星君 <br />　　第六天机宫：上生星君</p>
<p>北斗七星君： <br />(《狮驼国》中的北天七皇) <br />　　北斗第一阳明贪狼星君 <br />　　北斗第二阴精巨门星君 <br />　　北斗第三真人禄存星君 <br />　　北斗第四玄冥文曲星君 <br />　　北斗第五丹元廉贞星君 <br />　　北斗第六北极武曲星君 <br />　　北斗第七天关破军星君 <br />　　(《狮驼国》中的北斗七星君为北斗星君的另一个称号：天枢、天璇、天玑 <br />　　、天权、玉衡、开阳、摇光。 <br />　　&#8221;天枢、天璇、天玑、天权&#8221;合起来又称为&#8221;斗魁&#8221;或&#8221;璇&#8221;，后三星组成斗柄，称&#8221;杓&#8221;)</p>
<p>八仙：</p>
<p>　　铁拐李、汉钟离、吕洞宾、何仙姑、蓝采和、韩湘子、曹国舅、张果老</p>
<p>增长天王手下八将：庞刘荀毕、邓辛张陶，其全名为 <br />　　刘俊、荀雷吉、庞煜、毕宗远； <br />　　邓伯温、辛汉臣、张元伯、陶元信（四目） <br />　　九曜星 <br />　　金星 | 木星 | 水星 | 火星 | 土星 | <br />　　罗T(蚀星) | 计都星 | 紫判 | 月孛星</p>
<p>十二元辰 <br />　　子丑寅卯等 <br />　　二十八星宿</p>
<p>　　亢金龙、女土蝠、房日兔、心月狐、尾火虎、箕水豹、斗木獬、 <br />　　牛金牛、氐土貉、虚日鼠、危月燕、室火猪、壁水、奎木狼、 <br />　　娄金狗、胃土彘、昴日鸡、毕月乌、觜火猴、参水猿、井木犴、 <br />　　鬼金羊、柳土獐、星日马、张月鹿、翼火蛇、轸水蚓。</p>
<p>三十六天将 <br />　 蒋光 | 钟英 | 金游 | 殷郊 | 庞煜 | 刘吉 | 关羽 | <br />　　马胜 | 温琼 | 王善 | 康应 | 朱彦 | 吕魁 <br />　　方角 | 耿通 | 邓伯温 | 辛汉臣 | 张元伯 | 陶元信 | <br />　　荀雷吉 | 毕宗远 | 赵公明 | 吴明远 | 李青天 | 梅天顺 | <br />　　熊光显 | 石远信 | 孔雷结 | 陈元远 | 林大华 | 周青远 | <br />　　纪雷刚 | 崔志旭 | 江飞捷 | 贺天祥 | 高克 </p>
]]></content:encoded>
			<wfw:commentRss>http://w31.org/2009/04/19/%e4%b8%ad%e5%9b%bd%e7%9a%84%e7%a5%9e%e4%bb%99/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>全键盘符号</title>
		<link>http://w31.org/2009/04/14/%e5%85%a8%e9%94%ae%e7%9b%98%e7%ac%a6%e5%8f%b7/</link>
		<comments>http://w31.org/2009/04/14/%e5%85%a8%e9%94%ae%e7%9b%98%e7%ac%a6%e5%8f%b7/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 02:40:12 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Knowledge Base]]></category>
		<category><![CDATA[Keyboard]]></category>
		<category><![CDATA[键盘]]></category>

		<guid isPermaLink="false">http://w31org.ms8.com/?p=201</guid>
		<description><![CDATA[! 叹号 exclamation mark/bang ? 问号 question mark , 逗号 comma . 点号 dot/period/point : 冒号 colon ; 分号 semicolon ” 双引号 quotation marks/double quote ‘ 单引号/撇号 apostrophe/single quote ` 重音号 backquote/grave accent * 星号 asterisk/star + 加号 plus sign - 减号/横线 hyphen/dash/minus sign/ = 等号 equal sign / 斜线 slash \ 反斜线 backslash/escape &#124; [...]]]></description>
			<content:encoded><![CDATA[<p>! 叹号 exclamation mark/bang<br />
? 问号 question mark<br />
, 逗号 comma<br />
. 点号 dot/period/point<br />
: 冒号 colon<br />
; 分号 semicolon<br />
” 双引号 quotation marks/double quote<br />
‘ 单引号/撇号 apostrophe/single quote<br />
` 重音号 backquote/grave accent<br />
* 星号 asterisk/star<br />
+ 加号 plus sign<br />
- 减号/横线 hyphen/dash/minus sign/<br />
= 等号 equal sign<br />
/ 斜线 slash<br />
\ 反斜线 backslash/escape<br />
| 竖线 bar/pipe/vertical bar<br />
_ 下划线 underline/underscore<br />
$ 美元符号 dollar sign<br />
@ at at sign<br />
# 井号 crosshatch/sharp/hash<br />
% 百分号 percent sign/mod<br />
&amp; and/和/兼 and/ampersand<br />
^ 折音号 circumflex/caret<br />
~ 波浪号 tilde<br />
{} （左右）花括号/大括号 (left/right|open/close) braces<br />
[] （左右）方括号/中括号 (left/right|open/close) brackets<br />
() （左右）圆括号/小括号 (left/right|open/close) parentheses<br />
&lt;&gt; 尖括号 angle brackets<br />
&lt; 大于号 less than<br />
&gt; 小于号 greater than</p>
]]></content:encoded>
			<wfw:commentRss>http://w31.org/2009/04/14/%e5%85%a8%e9%94%ae%e7%9b%98%e7%ac%a6%e5%8f%b7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

