<?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>轶侠的网上小窝 &#187; 电脑</title>
	<atom:link href="http://e-xia.com/category/it/feed/" rel="self" type="application/rss+xml" />
	<link>http://e-xia.com</link>
	<description>写给家人和朋友，记录生活</description>
	<lastBuildDate>Tue, 11 Oct 2011 02:16:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>wordpress用户注册成功后的页面跳转</title>
		<link>http://e-xia.com/2010/03/wordpress-redirect-on-success-register-users/</link>
		<comments>http://e-xia.com/2010/03/wordpress-redirect-on-success-register-users/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 04:52:39 +0000</pubDate>
		<dc:creator>轶侠</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://e-xia.com/?p=712</guid>
		<description><![CDATA[并非完美解决，大概就这么个意思，凑合看吧。 function register_success_login_redirect&#40;$errors&#41; &#123; $pos = strpos&#40;$errors,'Registration complete'&#41;; if&#40;$pos === false&#41; return $errors; else return $errors.'&#60;script type=&#34;text/javascript&#34;&#62;window.location.href = &#34;/?p=251&#34;;&#60;/script&#62;'; &#125; add_filter&#40;'login_messages', 'register_success_login_redirect'&#41;;]]></description>
			<content:encoded><![CDATA[<p>并非完美解决，大概就这么个意思，凑合看吧。</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor php" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;"><span style="color: #000000; font-weight: bold;">function</span> register_success_login_redirect<span style="color: #009900;">&#40;</span><span style="color: #000033;">$errors</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000033;">$pos</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$errors</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Registration complete'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$pos</span> <span style="color: #339933;">===</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #000033;">$errors</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">return</span> <span style="color: #000033;">$errors</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;script type=&quot;text/javascript&quot;&gt;window.location.href = &quot;/?p=251&quot;;&lt;/script&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'login_messages'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'register_success_login_redirect'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div>
]]></content:encoded>
			<wfw:commentRss>http://e-xia.com/2010/03/wordpress-redirect-on-success-register-users/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iTune使用记录</title>
		<link>http://e-xia.com/2010/03/itune-usage/</link>
		<comments>http://e-xia.com/2010/03/itune-usage/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 00:56:23 +0000</pubDate>
		<dc:creator>轶侠</dc:creator>
				<category><![CDATA[电脑]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[itune]]></category>

		<guid isPermaLink="false">http://e-xia.com/?p=697</guid>
		<description><![CDATA[昨天连了一下itune，下午出门发现itune里面的歌竟然都没有了，更增加了我对itune的深恶痛绝，用户体验太差。对iphone也更郁闷了一些。不过看了一下对“俺觉得”的评价，决定还是继续iphone吧，至少游戏还是不错滴。不能让环境适应我，那就只好我去适应环境了。 在Device - Summary - Options - Manually manage music and videos这个要选一下。不然不能从Library直接拖音乐。剩下的各个tab里面的什么“Sync Music”、“Sync Movies”一律不选。 Store - Authorize Computer 这个要处理一下。 还有个问题就是一开始Sync就没完没了的backup，每次叉掉，感觉很烦。后来找到解决办法："defaults write com.apple.iTunes DeviceBackupsDisabled -bool true" - mac的方法 甚至还有个做这个事情的小软件：iPhone/iPod Backup Switch。希望有帮助。 p.s. 软件原理： 找到iTunesPrefs.xml文件，搜索"User Preferences"然后添加（同文件名的文件可能有两个，要编辑那个有"User Preferences"的） &#60;key&#62;DeviceBackupsDisabled&#60;/key&#62; &#60;data&#62; dHJ1ZQ== &#60;/data&#62; 文件位置： C:\Documents and Settings\[User Name]\Application Data\Apple Computer\iTunes C:\Documents and Settings\[User Name]\Local Settings\Application Data\Apple Computer\iTunes vista/Windows7 - [...]]]></description>
			<content:encoded><![CDATA[<p>昨天连了一下itune，下午出门发现itune里面的歌竟然都没有了，更增加了我对itune的深恶痛绝，用户体验太差。对iphone也更郁闷了一些。不过看了一下对“俺觉得”的评价，决定还是继续iphone吧，至少游戏还是不错滴。不能让环境适应我，那就只好我去适应环境了。</p>
<p>在Device - Summary - Options - Manually manage music and videos这个要选一下。不然不能从Library直接拖音乐。剩下的各个tab里面的什么“Sync Music”、“Sync Movies”一律不选。</p>
<p>Store - Authorize Computer 这个要处理一下。</p>
<p>还有个问题就是一开始Sync就没完没了的backup，每次叉掉，感觉很烦。后来找到解决办法：<del datetime="2010-03-05T00:56:24+00:00">"defaults write com.apple.iTunes DeviceBackupsDisabled -bool true" - mac的方法</del> 甚至还有个做这个事情的小软件：<a href="http://microseconds.com/?page_id=395">iPhone/iPod Backup Switch</a>。希望有帮助。</p>
<p>p.s. 软件原理：<br />
找到iTunesPrefs.xml文件，搜索"User Preferences"然后添加（同文件名的文件可能有两个，要编辑那个有"User Preferences"的）</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor xml" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;key<span style="font-weight: bold; color: black;">&gt;</span></span></span>DeviceBackupsDisabled<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/key<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;data<span style="font-weight: bold; color: black;">&gt;</span></span></span>
dHJ1ZQ==
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/data<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div>
<p>文件位置：<br />
C:\Documents and Settings\[User Name]\Application Data\Apple Computer\iTunes<br />
C:\Documents and Settings\[User Name]\Local Settings\Application Data\Apple Computer\iTunes<br />
vista/Windows7 - C:\Users\[User Name]\AppData\Roaming\Apple Computer\iTunes</p>
]]></content:encoded>
			<wfw:commentRss>http://e-xia.com/2010/03/itune-usage/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iphone</title>
		<link>http://e-xia.com/2010/02/iphone/</link>
		<comments>http://e-xia.com/2010/02/iphone/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 06:40:51 +0000</pubDate>
		<dc:creator>轶侠</dc:creator>
				<category><![CDATA[电脑]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://e-xia.com/?p=695</guid>
		<description><![CDATA[老爸送给我一个iphone 3G 8Gb版本的，型号是MB489B。查了一下是英版没解锁的。 入手了当然是要“调教”一下。先开了wifi，跑跑google，开开自己的blog，感觉还不错。发现手机里装了些自己不熟悉的软件，强迫症发作，要删掉几个程序。Google一下挑weiphone.com补充一下知识。看了几个帖子以后，装了91电话助手，卸载了几个游戏。然后就发现机器拼命死机。最想避免的事还是避免不了，重刷系统…… 大概步骤： 1. 3.1.2刷自制固件越狱固件详细图文教程+测试报告 2. 下了个：黑雨 RC3 （windows） 3. 在Cydia里面加了weiphone的源：http://app.weiphone.com/cydia（Cydia - Manage - Sources - Edit - Add） 4. 点了威锋以后，装了sbsettings那个最大的包，好像是48个合集的，⊙﹏⊙b汗 5. 最后还是用了91手机助手装了几个游戏 基本运行稳定。死机一次，估计原因是无线开的时间太长。]]></description>
			<content:encoded><![CDATA[<p>老爸送给我一个iphone 3G 8Gb版本的，型号是MB489B。查了一下是英版没解锁的。</p>
<p>入手了当然是要“调教”一下。先开了wifi，跑跑google，开开自己的blog，感觉还不错。发现手机里装了些自己不熟悉的软件，强迫症发作，要删掉几个程序。Google一下挑weiphone.com补充一下知识。看了几个帖子以后，装了91电话助手，卸载了几个游戏。然后就发现机器拼命死机。最想避免的事还是避免不了，重刷系统……</p>
<p>大概步骤：<br />
1. <a href="http://bbs.weiphone.com/read-htm-tid-527029-page-1.html">3.1.2刷自制固件越狱固件详细图文教程+测试报告</a><br />
2. 下了个：黑雨 RC3 （windows）<br />
3. 在Cydia里面加了weiphone的源：http://app.weiphone.com/cydia（Cydia - Manage - Sources - Edit - Add）<br />
4. 点了威锋以后，装了sbsettings那个最大的包，好像是48个合集的，⊙﹏⊙b汗<br />
5. 最后还是用了91手机助手装了几个游戏</p>
<p>基本运行稳定。死机一次，估计原因是无线开的时间太长。</p>
]]></content:encoded>
			<wfw:commentRss>http://e-xia.com/2010/02/iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MU搬家以及和WP合并</title>
		<link>http://e-xia.com/2009/11/change-mu-domain-and-merge-with-wordpres/</link>
		<comments>http://e-xia.com/2009/11/change-mu-domain-and-merge-with-wordpres/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 12:36:45 +0000</pubDate>
		<dc:creator>轶侠</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[301]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[mu]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://e-xia.com/?p=647</guid>
		<description><![CDATA[因为365memo.com域名到期，又不想花钱了，决定把mu整站搬到utmemory.com，并且把utmemory.com原来的wp直接并到mu里面作为主站。 准备数据 首先是mu改域名，如果在数据库里一个一个改，难倒是不难，就是太烦。几个外国哥们儿挺聪明的，提供方法如下，用mysql dump（可以用phpmyadmin或者其他客户端）把sql弄下来，然后查找旧域名，换成新的域名。在另一边的server建数据库，导入数据。 然后倒入wp数据。故技重施，直接备份wp_comments，wp_links，wp_postmeta，wp_posts，wp_terms，wp_term_relationships，wp_term_taxonomy这7个table，把wp_替换成wp_1_。然后把mu数据库里的wp_1_开头的这7个table删除。运行替换过的sql，重新生成这7个表。 到这里数据初步准备完毕。 准备文件 建一个index.html告知网站正在维护。 把所有wp的文件copy到备份目录，然后释放mu的文件，域名/index.php开始安装，没啥花头。 在cpanel里面建*的subdomain，不然没法做二级域名的mu。 把原站的wp-content目录，和wp的wp-content目录都搬到mu的wp-content，ok，准备工作基本就绪。 登陆后台启动正确的插件，theme，widget等，新站基本完成。 最后是把mu主站blog的作者id改成相对应的mu userid。如果mu里没有这个用户，先新建一个，然后用update wp_1_posts set post_author=x，如果多作者跟where。 测试一下新站是否全部正常，不正常的google。正常就删掉index.html。 做重定向 在原先域名的根目录下建.htaccess，内容如下 &#60;IfModule mod_rewrite.c&#62; RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^(.*)\.old\.com [nc] RewriteRule ^(.*)$ http://%1.new.com/$1 [R=301,L] &#60;/IfModule&#62; 注意%和$的位置，这里卡了挺久。刚开始最好不要加R=301，万一写错了浏览器cache有些烦，成功了再加301]]></description>
			<content:encoded><![CDATA[<p>因为365memo.com域名到期，又不想花钱了，决定把mu整站搬到utmemory.com，并且把utmemory.com原来的wp直接并到mu里面作为主站。</p>
<h3>准备数据</h3>
<p>首先是mu改域名，如果在数据库里一个一个改，难倒是不难，就是太烦。几个外国哥们儿挺聪明的，提供方法如下，用mysql dump（可以用phpmyadmin或者其他客户端）把sql弄下来，然后查找旧域名，换成新的域名。在另一边的server建数据库，导入数据。</p>
<p>然后倒入wp数据。故技重施，直接备份wp_comments，wp_links，wp_postmeta，wp_posts，wp_terms，wp_term_relationships，wp_term_taxonomy这7个table，把wp_替换成wp_1_。然后把mu数据库里的wp_1_开头的这7个table删除。运行替换过的sql，重新生成这7个表。</p>
<p>到这里数据初步准备完毕。</p>
<h3>准备文件</h3>
<p>建一个index.html告知网站正在维护。</p>
<p>把所有wp的文件copy到备份目录，然后释放mu的文件，域名/index.php开始安装，没啥花头。</p>
<p>在cpanel里面建*的subdomain，不然没法做二级域名的mu。</p>
<p>把原站的wp-content目录，和wp的wp-content目录都搬到mu的wp-content，ok，准备工作基本就绪。</p>
<p>登陆后台启动正确的插件，theme，widget等，新站基本完成。</p>
<p>最后是把mu主站blog的作者id改成相对应的mu userid。如果mu里没有这个用户，先新建一个，然后用<code>update wp_1_posts set post_author=x</code>，如果多作者跟where。</p>
<p>测试一下新站是否全部正常，不正常的google。正常就删掉index.html。</p>
<h3>做重定向</h3>
<p>在原先域名的根目录下建.htaccess，内容如下</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor txt" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;">&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(.*)\.old\.com [nc]
RewriteRule ^(.*)$ http://%1.new.com/$1 [R=301,L]
&lt;/IfModule&gt;</pre></div>
<p>注意%和$的位置，这里卡了挺久。刚开始最好不要加R=301，万一写错了浏览器cache有些烦，成功了再加301</p>
]]></content:encoded>
			<wfw:commentRss>http://e-xia.com/2009/11/change-mu-domain-and-merge-with-wordpres/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Windows下安装mysqldb</title>
		<link>http://e-xia.com/2009/11/install-mysqldb-in-windows/</link>
		<comments>http://e-xia.com/2009/11/install-mysqldb-in-windows/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 01:42:28 +0000</pubDate>
		<dc:creator>轶侠</dc:creator>
				<category><![CDATA[电脑]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://e-xia.com/?p=631</guid>
		<description><![CDATA[环境:windows7+python2.6+xampplite自带的mysql。 从官方网站下载了，一会儿这个不好，一会儿那个缺少，最后还一定要个Microsoft Visual Studio 2008做compiler，绝对昏倒。 最后找到了好心人MySQL-python Windows 64bit and 32bit distributions提供了各个版本的windows的编译版本，双击，2秒搞定了。]]></description>
			<content:encoded><![CDATA[<p>环境:windows7+python2.6+xampplite自带的mysql。<br />
从官方网站下载了，一会儿这个不好，一会儿那个缺少，最后还一定要个Microsoft Visual Studio 2008做compiler，绝对昏倒。<br />
最后找到了好心人<a href="http://www.codegood.com/archives/4">MySQL-python Windows 64bit and 32bit distributions</a>提供了各个版本的windows的编译版本，双击，2秒搞定了。</p>
]]></content:encoded>
			<wfw:commentRss>http://e-xia.com/2009/11/install-mysqldb-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>x200换xp</title>
		<link>http://e-xia.com/2009/10/install-xp-on-x200/</link>
		<comments>http://e-xia.com/2009/10/install-xp-on-x200/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 08:00:05 +0000</pubDate>
		<dc:creator>轶侠</dc:creator>
				<category><![CDATA[电脑]]></category>
		<category><![CDATA[install xp]]></category>
		<category><![CDATA[x200]]></category>

		<guid isPermaLink="false">http://e-xia.com/?p=626</guid>
		<description><![CDATA[新上手了x200，老公要求改xp，心想这实在太简单了，结果熬了3天 。 首先x200没有光驱，这难不倒我们，pe时代了嘛。上手拿常用的iso，结果——失败。vista和那个pe的启动模式不同，诅咒vista一千遍。 研究一下，下了个深山红叶PE工具箱V32.rar，这东西日新月异，就不给下载链接了。用UltraISO装到u盘上，然后我终于看到了非vista的操作系统。万里长征第一步。这个pe还不错，连sata硬盘都认，各种工具全面。重新分区。然后用虚拟光驱加载xp安装盘，setup后开始copy，都还不错的。问题来了，1：重启后报错： PXE-E61: Media test failure, check cable PXE-M0f: Exiting Intel PXE ROM. 再第n次重启后发现是c盘没有设为活动（active） 再setup又报错：NTLDR is missing，郁闷了好久在硬盘工具里发现系统默认我的u盘是hdd0，硬盘是hdd1。于是重启进入pe，加载好iso，然后不管u盘还在闪，直接拔掉，再setup，一路正常。 在试验中也曾尝试安装了win7，安装就一切正常。可见xp也老啦，跟不上u盘+pe的潮流了。]]></description>
			<content:encoded><![CDATA[<p>新上手了x200，老公要求改xp，心想这实在太简单了，结果熬了3天 <img src='http://e-xia.com/blog/wp-includes/images/smilies/icon_evil.gif' alt=':evil:' class='wp-smiley' />  。</p>
<p>首先x200没有光驱，这难不倒我们，pe时代了嘛。上手拿常用的iso，结果——失败。vista和那个pe的启动模式不同，诅咒vista一千遍。</p>
<p>研究一下，下了个深山红叶PE工具箱V32.rar，这东西日新月异，就不给下载链接了。用UltraISO装到u盘上，然后我终于看到了非vista的操作系统。万里长征第一步。这个pe还不错，连sata硬盘都认，各种工具全面。重新分区。然后用虚拟光驱加载xp安装盘，setup后开始copy，都还不错的。问题来了，1：重启后报错：<br />
PXE-E61: Media test failure, check cable<br />
PXE-M0f: Exiting Intel PXE ROM.<br />
再第n次重启后发现是c盘没有设为活动（active）<br />
再setup又报错：NTLDR is missing，郁闷了好久在硬盘工具里发现系统默认我的u盘是hdd0，硬盘是hdd1。于是重启进入pe，加载好iso，然后不管u盘还在闪，直接拔掉，再setup，一路正常。</p>
<p>在试验中也曾尝试安装了win7，安装就一切正常。可见xp也老啦，跟不上u盘+pe的潮流了。</p>
]]></content:encoded>
			<wfw:commentRss>http://e-xia.com/2009/10/install-xp-on-x200/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>jQuery tr.toggle() 在ie8中有bug</title>
		<link>http://e-xia.com/2009/08/jquery-tr-toggle-bug-in-ie8/</link>
		<comments>http://e-xia.com/2009/08/jquery-tr-toggle-bug-in-ie8/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 00:45:11 +0000</pubDate>
		<dc:creator>轶侠</dc:creator>
				<category><![CDATA[电脑]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://e-xia.com/?p=612</guid>
		<description><![CDATA[为啥我老能碰到那么郁闷的bug 对tr用了toggle，firefox里表现良好，给老板demo，在他机器上也没有问题，结果今天早上自己的ie一跑没反应。那个郁闷，结果搜了一下，是jq1.3.2在ie8里的一个bug，怎么就那么那么巧嗫。 找到个绕行方法 jQuery&#40;document&#41;.ready&#40; function&#40;$&#41; &#123; $&#40;'#rowtoggler'&#41;.click&#40;function&#40;&#41; &#123; $&#40;'tr'&#41;.each&#40;function&#40;i, elem&#41; &#123; $&#40;elem&#41;.toggle&#40;$&#40;elem&#41;.css&#40;'display'&#41; == 'none'&#41;; &#125;&#41;; return false; &#125;&#41;; &#125;&#41;; 或者更简单的是用toggleClass() 详细参见：jQuery 1.3.2 causes problems at IE 8]]></description>
			<content:encoded><![CDATA[<p>为啥我老能碰到那么郁闷的bug</p>
<p>对tr用了toggle，firefox里表现良好，给老板demo，在他机器上也没有问题，结果今天早上自己的ie一跑没反应。那个郁闷，结果搜了一下，是jq1.3.2在ie8里的一个bug，怎么就那么那么巧嗫。</p>
<p>找到个绕行方法</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor javascript" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;">jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #006600;">ready</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#rowtoggler'</span><span style="color: #009900;">&#41;</span>.<span style="color: #006600;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'tr'</span><span style="color: #009900;">&#41;</span>.<span style="color: #006600;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span> elem<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span>elem<span style="color: #009900;">&#41;</span>.<span style="color: #006600;">toggle</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span>elem<span style="color: #009900;">&#41;</span>.<span style="color: #006600;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'display'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'none'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div>
<p>或者更简单的是用<code>toggleClass()</code></p>
<p>详细参见：<a href="http://www.code-styling.de/english/jquery-132-causes-problems-at-ie-8">jQuery 1.3.2 causes problems at IE 8</a></p>
]]></content:encoded>
			<wfw:commentRss>http://e-xia.com/2009/08/jquery-tr-toggle-bug-in-ie8/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>关于模板路径</title>
		<link>http://e-xia.com/2009/07/parent-child-theme-path/</link>
		<comments>http://e-xia.com/2009/07/parent-child-theme-path/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 05:31:18 +0000</pubDate>
		<dc:creator>轶侠</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://e-xia.com/?p=604</guid>
		<description><![CDATA[更新了wp和PageNavi后，我突然PageNavi的样式丢失了，花了几分钟看了下代码，作者是这样写的： function pagenavi_stylesheets&#40;&#41; &#123; if&#40;@file_exists&#40;TEMPLATEPATH.'/pagenavi-css.css'&#41;&#41; &#123; wp_enqueue_style&#40;'wp-pagenavi', get_stylesheet_directory_uri&#40;&#41;.'/pagenavi-css.css', false, '2.50', 'all'&#41;; &#125; else &#123; wp_enqueue_style&#40;'wp-pagenavi', plugins_url&#40;'wp-pagenavi/pagenavi-css.css'&#41;, false, '2.50', 'all'&#41;; &#125; &#125; TEMPLATEPATH指向了父模板的路径，但是get_stylesheet_directory_uri给的是子模板的链接。查了一下api，理了一下思路，应该先查看子目录下pagenavi-css.css，再看父模板下pagenavi-css.css，最后采用默认css，改代码如下： function pagenavi_stylesheets&#40;&#41; &#123; if&#40;@file_exists&#40;STYLESHEETPATH.'/pagenavi-css.css'&#41;&#41; &#123; wp_enqueue_style&#40;'wp-pagenavi', get_stylesheet_directory_uri&#40;&#41;.'/pagenavi-css.css', false, '2.50', 'all'&#41;; &#125; else if&#40;@file_exists&#40;TEMPLATEPATH.'/pagenavi-css.css'&#41;&#41; &#123; wp_enqueue_style&#40;'wp-pagenavi', get_template_directory_uri&#40;&#41;.'/pagenavi-css.css', false, '2.50', 'all'&#41;; &#125; else &#123; wp_enqueue_style&#40;'wp-pagenavi', plugins_url&#40;'wp-pagenavi/pagenavi-css.css'&#41;, false, '2.50', 'all'&#41;; &#125; &#125; 总结： STYLESHEETPATH 和 get_stylesheet_directory_uri [...]]]></description>
			<content:encoded><![CDATA[<p>更新了wp和PageNavi后，我突然PageNavi的样式丢失了，花了几分钟看了下代码，作者是这样写的：</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor php" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;"><span style="color: #000000; font-weight: bold;">function</span> pagenavi_stylesheets<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span>TEMPLATEPATH<span style="color: #339933;">.</span><span style="color: #0000ff;">'/pagenavi-css.css'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      wp_enqueue_style<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp-pagenavi'</span><span style="color: #339933;">,</span> get_stylesheet_directory_uri<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/pagenavi-css.css'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'2.50'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'all'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
      wp_enqueue_style<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp-pagenavi'</span><span style="color: #339933;">,</span> plugins_url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp-pagenavi/pagenavi-css.css'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'2.50'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'all'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>   
<span style="color: #009900;">&#125;</span></pre></div>
<p><code>TEMPLATEPATH</code>指向了父模板的路径，但是<code>get_stylesheet_directory_uri</code>给的是子模板的链接。查了一下api，理了一下思路，应该先查看子目录下<code>pagenavi-css.css</code>，再看父模板下<code>pagenavi-css.css</code>，最后采用默认css，改代码如下：</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor php" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;"><span style="color: #000000; font-weight: bold;">function</span> pagenavi_stylesheets<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span>STYLESHEETPATH<span style="color: #339933;">.</span><span style="color: #0000ff;">'/pagenavi-css.css'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      wp_enqueue_style<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp-pagenavi'</span><span style="color: #339933;">,</span> get_stylesheet_directory_uri<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/pagenavi-css.css'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'2.50'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'all'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span>TEMPLATEPATH<span style="color: #339933;">.</span><span style="color: #0000ff;">'/pagenavi-css.css'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      wp_enqueue_style<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp-pagenavi'</span><span style="color: #339933;">,</span> get_template_directory_uri<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/pagenavi-css.css'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'2.50'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'all'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
      wp_enqueue_style<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp-pagenavi'</span><span style="color: #339933;">,</span> plugins_url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp-pagenavi/pagenavi-css.css'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'2.50'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'all'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>   
<span style="color: #009900;">&#125;</span></pre></div>
<p>总结：</p>
<ul>
<li>STYLESHEETPATH 和 get_stylesheet_directory_uri 指向子模板</li>
<li>TEMPLATEPATH 和 get_template_directory_uri 指向父模板</li>
</ul>
<p>给作者发了贴，不知道他会不会改。</p>
]]></content:encoded>
			<wfw:commentRss>http://e-xia.com/2009/07/parent-child-theme-path/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>也谈MySQL中实现ROWNUM</title>
		<link>http://e-xia.com/2009/06/rownum-in-mysql/</link>
		<comments>http://e-xia.com/2009/06/rownum-in-mysql/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 02:15:43 +0000</pubDate>
		<dc:creator>轶侠</dc:creator>
				<category><![CDATA[电脑]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://e-xia.com/?p=583</guid>
		<description><![CDATA[在工作中碰到这样的问题，在生成报表时第一列要输出top 1, top 2, ... , top 10。而mysql并不自带这样的功能。假设我们有这样的一个表： mysql> create table tbl ( -> id int primary key, -> col int -> ); Query OK, 0 rows affected (0.08 sec) mysql> insert into tbl values -> (1,26), -> (2,46), -> (3,35), -> (4,68), -> (5,93), -> (6,92); Query OK, 6 rows affected (0.05 sec) Records: [...]]]></description>
			<content:encoded><![CDATA[<p>在工作中碰到这样的问题，在生成报表时第一列要输出top 1, top 2, ... , top 10。而mysql并不自带这样的功能。<span id="more-583"></span>假设我们有这样的一个表：</p>
<pre>
mysql> create table tbl (
    ->  id      int primary key,
    ->  col     int
    -> );
Query OK, 0 rows affected (0.08 sec)

mysql> insert into tbl values
    -> (1,26),
    -> (2,46),
    -> (3,35),
    -> (4,68),
    -> (5,93),
    -> (6,92);
Query OK, 6 rows affected (0.05 sec)
Records: 6  Duplicates: 0  Warnings: 0

mysql> select * from tbl order by col;
+----+------+
| id | col  |
+----+------+
|  1 |   26 |
|  3 |   35 |
|  2 |   46 |
|  4 |   68 |
|  6 |   92 |
|  5 |   93 |
+----+------+
6 rows in set (0.00 sec)
</pre>
<p>中规中矩的做法是：</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor sql" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;"><span style="color: #993333; font-weight: bold;">SET</span> @x<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">0</span>;
<span style="color: #993333; font-weight: bold;">SELECT</span> @x:<span style="color: #66cc66;">=</span>@x <span style="color: #993333; font-weight: bold;">AS</span> rownum<span style="color: #66cc66;">,</span>id<span style="color: #66cc66;">,</span>col
<span style="color: #993333; font-weight: bold;">FROM</span> tbl
<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> col;</pre></div>
<p>但是这样就变成了两个query，在java里面用executeQuery会有问题。</p>
<p>当时自己想到的是这样：</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor sql" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;"><span style="color: #993333; font-weight: bold;">SELECT</span> @x :<span style="color: #66cc66;">=</span> IFNULL<span style="color: #66cc66;">&#40;</span>@x<span style="color: #66cc66;">,</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">+</span> <span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">AS</span> rownum<span style="color: #66cc66;">,</span>id<span style="color: #66cc66;">,</span>col
<span style="color: #993333; font-weight: bold;">FROM</span> tbl
<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> col;</pre></div>
<p>但是第一次运行的时候rownum都是1，第二次运行rownum变成2-11，第三次为12-21。</p>
<p>后来又看到一些很悬，而且看上去很没有效率的方法，例如：</p>
<p>使用联接查询（笛卡尔积）</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor sql" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span> a<span style="color: #66cc66;">.</span>col<span style="color: #66cc66;">,</span> COUNT<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> rownum
<span style="color: #993333; font-weight: bold;">FROM</span> tbl a<span style="color: #66cc66;">,</span>tbl b
<span style="color: #993333; font-weight: bold;">WHERE</span> a<span style="color: #66cc66;">.</span>col<span style="color: #66cc66;">&gt;=</span>b<span style="color: #66cc66;">.</span>col
<span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> a<span style="color: #66cc66;">.</span>id<span style="color: #66cc66;">,</span>a<span style="color: #66cc66;">.</span>col;</pre></div>
<p>子查询</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor sql" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;"><span style="color: #993333; font-weight: bold;">SELECT</span> a<span style="color: #66cc66;">.*,</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> count<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">FROM</span> tbl <span style="color: #993333; font-weight: bold;">WHERE</span> col<span style="color: #66cc66;">&lt;=</span>a<span style="color: #66cc66;">.</span>col<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">AS</span> rownum
<span style="color: #993333; font-weight: bold;">FROM</span> tbl a;</pre></div>
<p style="font-size:20px;color:red;">这些都不是我要的！！</p>
<p>最后我找到了第一种方法的改良思路，做了一些改动，虽然还是绕了一个小弯，但是已经很好用了：</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor sql" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;"><span style="color: #993333; font-weight: bold;">SELECT</span> @rownum:<span style="color: #66cc66;">=</span>@rownum<span style="color: #cc66cc;">+1</span> rownum<span style="color: #66cc66;">,</span> id<span style="color: #66cc66;">,</span> col 
<span style="color: #993333; font-weight: bold;">FROM</span> 
<span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> @rownum:<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">,</span> <span style="color: #66cc66;">*</span> 
<span style="color: #993333; font-weight: bold;">FROM</span> tbl 
<span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> col <span style="color: #993333; font-weight: bold;">DESC</span>
<span style="color: #66cc66;">&#41;</span> t;</pre></div>
<p>更进一步的应用是，当有两个table要并排放在一起，例如一个order by id，另一个order by col，原先的做法是写两个query，然后在页面里并排放，不过有了rownum以后就可以用join直接输出完全符合要求的table了。</p>
<p>参考材料：</p>
<ul>
<li><a href="http://blog.csdn.net/ACMAIN_CHM/archive/2009/04/20/4095531.aspx">MySQL中的ROWNUM的实现</a></li>
<li><a href="http://www.xaprb.com/blog/2006/12/02/how-to-number-rows-in-mysql/">How to number rows in MySQL</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://e-xia.com/2009/06/rownum-in-mysql/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>批量删除目录下.class文件</title>
		<link>http://e-xia.com/2009/05/delete-class-files-recusively/</link>
		<comments>http://e-xia.com/2009/05/delete-class-files-recusively/#comments</comments>
		<pubDate>Thu, 28 May 2009 02:12:34 +0000</pubDate>
		<dc:creator>轶侠</dc:creator>
				<category><![CDATA[电脑]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[reg]]></category>

		<guid isPermaLink="false">http://e-xia.com/?p=545</guid>
		<description><![CDATA[同事给过来的java源码总是混杂着.class文件，每次覆盖都手动删除，不胜其烦，决定一次性解决一下。请教后知道del有参数/s相当的好用，打开命令行窗口后，直接del *.class /s。 奈何我实在懒，命令行窗口都不想开，决定写个注册表文件，以后可以右键解决。把下面代码存为文件delclass.reg，双击导入就可以了，以后在目录上右键就会有“Delete .class Files”选项了。 Windows Registry Editor Version 5.00 &#160; &#91;HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteCLASS&#93; @=&#34;Delete .class Files&#34; &#160; &#91;HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteCLASS\command&#93; @=&#34;cmd.exe /c \&#34;TITLE Deleting .class Files in %1 &#38;&#38; COLOR 80 &#38;&#38; cd %L &#38;&#38; del *.class /s\&#34;&#34;]]></description>
			<content:encoded><![CDATA[<p>同事给过来的java源码总是混杂着.class文件，每次覆盖都手动删除，不胜其烦，决定一次性解决一下。请教后知道del有参数/s相当的好用，打开命令行窗口后，直接<code>del *.class /s</code>。</p>
<p>奈何我实在懒，命令行窗口都不想开，决定写个注册表文件，以后可以右键解决。把下面代码存为文件delclass.reg，双击导入就可以了，以后在目录上右键就会有“Delete .class Files”选项了。</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor reg" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;"><span style="color: #0000FF;">Windows Registry Editor Version 5.00</span>
&nbsp;
<span style="color: #000000;">&#91;</span>HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteCLASS<span style="color: #000000;">&#93;</span>
<span style="">@</span><span style="color: #000000;">=</span><span style="">&quot;Delete .class Files&quot;</span>
&nbsp;
<span style="color: #000000;">&#91;</span>HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteCLASS\command<span style="color: #000000;">&#93;</span>
<span style="">@</span><span style="color: #000000;">=</span><span style="">&quot;cmd.exe /c \&quot;TITLE Deleting .class Files in %1 &amp;&amp; COLOR 80 &amp;&amp; cd %L &amp;&amp; del *.class /s\&quot;&quot;</span></pre></div>
]]></content:encoded>
			<wfw:commentRss>http://e-xia.com/2009/05/delete-class-files-recusively/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Netbeans使用心得（1）</title>
		<link>http://e-xia.com/2009/05/copy-jar-to-specific-dir-after-compile-in-netbeans/</link>
		<comments>http://e-xia.com/2009/05/copy-jar-to-specific-dir-after-compile-in-netbeans/#comments</comments>
		<pubDate>Thu, 21 May 2009 01:05:03 +0000</pubDate>
		<dc:creator>轶侠</dc:creator>
				<category><![CDATA[电脑]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://e-xia.com/?p=540</guid>
		<description><![CDATA[开始使用netbeans，感觉还不错，其实有很多功能没有完全在界面里体现出来，要自己改配置文件。 今天碰到的问题是，我希望生成jar文件以后能复制到我指定的目录，方便我上传，不然每次都要翻目录，麻烦。 搜索的结果就是：NetBeans IDE 5.0 Hacks (part 2) ，根据介绍在build.xml里面加上了上面的代码，每次生成jar文件后就会复制一份到指定目录，真的很人性化啊。 &#60;target name=&#34;-post-jar&#34;&#62; &#60;copy file=&#34;${dist.jar}&#34; todir=&#34;[jsp folder]\WEB-INF\lib&#34;/&#62; &#60;/target&#62;]]></description>
			<content:encoded><![CDATA[<p>开始使用netbeans，感觉还不错，其实有很多功能没有完全在界面里体现出来，要自己改配置文件。</p>
<p>今天碰到的问题是，我希望生成jar文件以后能复制到我指定的目录，方便我上传，不然每次都要翻目录，麻烦。</p>
<p>搜索的结果就是：<a href="http://www.netbeans.org/kb/articles/netbeans-hacks-2.html">NetBeans IDE 5.0 Hacks (part 2) </a>，根据介绍在build.xml里面加上了上面的代码，每次生成jar文件后就会复制一份到指定目录，真的很人性化啊。</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor xml" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;">    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;-post-jar&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
       <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;copy</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${dist.jar}&quot;</span>
             <span style="color: #000066;">todir</span>=<span style="color: #ff0000;">&quot;[jsp folder]\WEB-INF\lib&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/target<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre></div>
]]></content:encoded>
			<wfw:commentRss>http://e-xia.com/2009/05/copy-jar-to-specific-dir-after-compile-in-netbeans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>定时备份mu数据库</title>
		<link>http://e-xia.com/2009/04/auto-backup-mu-db/</link>
		<comments>http://e-xia.com/2009/04/auto-backup-mu-db/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 06:53:07 +0000</pubDate>
		<dc:creator>轶侠</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[电脑]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[google app]]></category>
		<category><![CDATA[mu]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://e-xia.com/?p=488</guid>
		<description><![CDATA[一直没有找到好用的mu数据库备份插件，mu官方给的方法是这样滴： DATE=`date &#124; tr &#34; &#34; _` echo $DATE mysqldump wordpress --add-drop-table -h localhost -u wpdbuser -pyourpasswd &#124; gzip &#62; db.$DATE.gz tar cvfz code.$DATE.gz 不过这只有备份打包，没有发送到email得功能，最近我找到了这个：AutoMySQLBackup，一个shellscript，可以自动备份数据库，并发送到email，和WP-DB-Backup的功能一样了哦，不过怎样能定时运行嗫？在询问了site5客服后，得到的回复是——建个cron job。 先根据提示修改automysqlbackup.sh.2.5，写入数据库信息，上传到服务器合适的目录，例如：~/etc 修改权限：chmod +x ~/etc/automysqlbackup.sh运行一下看看有没有收到备份email，如果有问题，继续修改automysqlbackup.sh ssh到服务器，输入crontab -e开始编辑，0 2 * * * ~/etc/automysqlbackup.sh（每天晚上2点运行），保存，退出，第二天看看有没有收到email。 关于cron的命令： crontab -l #显示当前的cron job crontab -e #编辑 关于cron的定时问题： * * * * * /home/milch/tmpmail #每分钟执行这个命令（分 小时 日 [...]]]></description>
			<content:encoded><![CDATA[<p>一直没有找到好用的mu数据库备份插件，<a href="http://codex.wordpress.org/Backup_WPMU">mu官方给的方法是这样滴</a>：</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor bash" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;"><span style="color: #007800;">DATE=</span><span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tr</span> <span style="color: #ff0000;">&quot; &quot;</span> _<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$DATE</span>
mysqldump wordpress --add-drop-table -h localhost -u wpdbuser -pyourpasswd <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">gzip</span> <span style="color: #000000; font-weight: bold;">&gt;</span> db.<span style="color: #007800;">$DATE</span>.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> cvfz code.<span style="color: #007800;">$DATE</span>.gz</pre></div>
<p>不过这只有备份打包，没有发送到email得功能，最近我找到了这个：<a href="http://sourceforge.net/projects/automysqlbackup/">AutoMySQLBackup</a>，一个shellscript，可以自动备份数据库，并发送到email，和<a href="http://wordpress.org/extend/plugins/wp-db-backup/">WP-DB-Backup</a>的功能一样了哦，不过怎样能定时运行嗫？在询问了site5客服后，得到的回复是——建个cron job。</p>
<ul>
<li>先根据提示修改automysqlbackup.sh.2.5，写入数据库信息，上传到服务器合适的目录，例如：<code>~/etc</code></li>
<li>修改权限：<code>chmod +x ~/etc/automysqlbackup.sh</code>运行一下看看有没有收到备份email，如果有问题，继续修改automysqlbackup.sh</li>
<li>ssh到服务器，输入<code>crontab -e</code>开始编辑，<code>0 2 * * * ~/etc/automysqlbackup.sh</code>（每天晚上2点运行），保存，退出，第二天看看有没有收到email。</li>
</ul>
<p><span id="more-488"></span><br />
关于cron的命令：</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor bash" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;">crontab -l <span style="color: #666666; font-style: italic;">#显示当前的cron job</span>
crontab -e <span style="color: #666666; font-style: italic;">#编辑</span></pre></div>
<p>关于cron的定时问题：</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor txt" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;">* * * * * /home/milch/tmpmail #每分钟执行这个命令（分 小时 日 月 周 [用户] 命令）
其中的星号（*）是通配符，表示cron将忽略这个字段。
12 3 * * * #每天的凌晨3点12分（03:12）
30 15 13 6 1 * #6月13日周一的15:30运行
30 15 13 Jun Mon * #6月13日周一的15:30运行
15 * * * * #每小时的第15分钟
#每两小时就运行某个程序，可以在小时字段里使用 */2。
0 */2 * * * #在2点，4点，6点……22点，24点运行。
#cron语句中还可以使用逗号（,）来指定多个时间。
15,30 * * * * #每小时的15分和30分
15,30 */2 1-7 * * #每月的第1-7日每两小时的15分和30分（02:15，02:30……22: 15，22:30等）。
#如果你想在每天的16:18执行一个脚本集合，把所有要执行的脚本放到一个目录中（如 /home/username/cron），可以使用：
18 16 * * * root run-parts /home/username/cron &gt;&gt; /dev/null 2&gt;&amp;1</pre></div>
]]></content:encoded>
			<wfw:commentRss>http://e-xia.com/2009/04/auto-backup-mu-db/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>针对非IE的代码</title>
		<link>http://e-xia.com/2009/03/standalone-code-for-none-ie/</link>
		<comments>http://e-xia.com/2009/03/standalone-code-for-none-ie/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 00:47:23 +0000</pubDate>
		<dc:creator>轶侠</dc:creator>
				<category><![CDATA[电脑]]></category>
		<category><![CDATA[ie]]></category>

		<guid isPermaLink="false">http://e-xia.com/?p=456</guid>
		<description><![CDATA[上次说了针对ie的代码，那么非ie的代码嗫？ &#60;!--[if !IE]&#62; &#60;--&#62;&#60;link href=&#34;no-ie.css&#34; rel=&#34;stylesheet&#34; type=&#34;text/css&#34;&#62;&#60;!--&#62; &#60;!&#91;endif&#93;--&#62; ie6,7不执行以下代码 &#60;!--[if gt IE 7]&#62; &#60;--&#62;&#60;link href=&#34;cool-browser.css&#34; rel=&#34;stylesheet&#34; type=&#34;text/css&#34;&#62;&#60;!--&#62; &#60;!&#91;endif&#93;--&#62;]]></description>
			<content:encoded><![CDATA[<p>上次说了<a href="http://e-xia.com/2008/02/standalone-code-for-different-ie-version/">针对ie的代码</a>，那么非ie的代码嗫？</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor html" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;"><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!--[if !IE]&gt;</span></span> <span style="color: #009900;">&lt;--<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;link</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;no-ie.css&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!--&gt;</span></span> <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span>!<span style="color: #66cc66;">&#91;</span>endif<span style="color: #66cc66;">&#93;</span>--<span style="color: #000000; font-weight: bold;">&gt;</span></span></pre></div>
<p>ie6,7不执行以下代码</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor html" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;"><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!--[if gt IE 7]&gt;</span></span> <span style="color: #009900;">&lt;--<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;link</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;cool-browser.css&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!--&gt;</span></span> <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span>!<span style="color: #66cc66;">&#91;</span>endif<span style="color: #66cc66;">&#93;</span>--<span style="color: #000000; font-weight: bold;">&gt;</span></span></pre></div>
]]></content:encoded>
			<wfw:commentRss>http://e-xia.com/2009/03/standalone-code-for-none-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE再次被歧视</title>
		<link>http://e-xia.com/2009/02/browser-discrimination/</link>
		<comments>http://e-xia.com/2009/02/browser-discrimination/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 12:34:40 +0000</pubDate>
		<dc:creator>轶侠</dc:creator>
				<category><![CDATA[电脑]]></category>

		<guid isPermaLink="false">http://e-xia.com/?p=453</guid>
		<description><![CDATA[今天在唐唐的带领下参加了个推广下载 NetBeans 活动，大概就是有3个人点email里的链接下载了NetBeans，他们就送个2G的U盘给你。通过实验证实了，IE再次被歧视。通过Firefox点击的链接，立刻就收到了有人下载的通知。可是IE下载10次都没有通知。回头谁给朋友发了通知记得在信里写一定要提醒Firefox下载。]]></description>
			<content:encoded><![CDATA[<p>今天在<a href="http://sexywp.com/">唐唐</a>的带领下参加了个<a href="http://www.netbeans.org/competition/refer-a-friend/index_zh_CN.html">推广下载 NetBeans 活动</a>，大概就是有3个人点email里的链接下载了NetBeans，他们就送个2G的U盘给你。通过实验证实了，IE再次被歧视。通过Firefox点击的链接，立刻就收到了有人下载的通知。可是IE下载10次都没有通知。回头谁给朋友发了通知记得在信里写一定要提醒Firefox下载。</p>
]]></content:encoded>
			<wfw:commentRss>http://e-xia.com/2009/02/browser-discrimination/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>给WP加上Google广告代码</title>
		<link>http://e-xia.com/2009/02/add-google-adsense-to-wordpress/</link>
		<comments>http://e-xia.com/2009/02/add-google-adsense-to-wordpress/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 03:59:28 +0000</pubDate>
		<dc:creator>轶侠</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[电脑]]></category>

		<guid isPermaLink="false">http://e-xia.com/?p=448</guid>
		<description><![CDATA[刚给自己的blog加了Google广告，第一天就收入了1分美金，开心啊，照这样一个月3毛，一年3块6，Google 100美金给寄支票，那么30年左右我就能拿到我的第一张Google支票啦！ 要给每篇post加上Google广告其实蛮容易的，代码如下： &#60;?php add_filter&#40;'the_content', 'google_ads'&#41;; function google_ads&#40;$content&#41;&#123; if&#40;is_page&#40;&#41;&#124;&#124;is_single&#40;&#41;&#41;&#123; ob_start&#40;&#41;; ?&#62; &#60;div class=&#34;google center&#34;&#62; &#60;!--Google AdSense Code HERE--&#62; &#60;/div&#62; &#60;?php $content = ob_get_contents&#40;&#41;.$content; ob_end_clean&#40;&#41;; &#125; return $content; &#125; ?&#62; 明天有空接着讲对直接访问和搜索引擎来的用户显示不同尺寸广告的代码。]]></description>
			<content:encoded><![CDATA[<p>刚给自己的blog加了Google广告，第一天就收入了1分美金，开心啊，照这样一个月3毛，一年3块6，Google 100美金给寄支票，那么30年左右我就能拿到我的第一张Google支票啦！</p>
<p>要给每篇post加上Google广告其实蛮容易的，代码如下：</p>
<div class="justcolor" style="border:1px solid #ccc;background:#fcffff;padding:15px 0;margin:5px 0;overflow:auto;overflow-x:auto;overflow-y:hidden;"><pre class="justcolor php" style="margin: 0 10px; font-family: 'Courier New', Courier, Fixed;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_content'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'google_ads'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> google_ads<span style="color: #009900;">&#40;</span><span style="color: #000033;">$content</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>is_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">||</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">ob_start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #339933;">&lt;</span>div <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;google center&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;!--</span>Google AdSense Code HERE<span style="color: #339933;">--&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
    <span style="color: #000033;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">ob_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #000033;">$content</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">ob_end_clean</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #000033;">$content</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div>
<p>明天有空接着讲对直接访问和搜索引擎来的用户显示不同尺寸广告的代码。</p>
]]></content:encoded>
			<wfw:commentRss>http://e-xia.com/2009/02/add-google-adsense-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>去掉域名里的www（.htaccess）</title>
		<link>http://e-xia.com/2009/02/no-www-through-htaccess/</link>
		<comments>http://e-xia.com/2009/02/no-www-through-htaccess/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 06:28:37 +0000</pubDate>
		<dc:creator>轶侠</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[电脑]]></category>
		<category><![CDATA[301]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://e-xia.com/?p=421</guid>
		<description><![CDATA[前段时间偷偷去掉了域名里的www，看了ma.tt的文章，修改了WP的index.php（后来才发现ma.tt写了个插件WordPress no-www）。头几天挺好，PR也过来了，不过再后来PR就消失了，Leo说是PR没刷新，我晕，等等吧，怎么等也不见好，这时候唐唐说他转的域名PR恢复了，我突然反应过来升级WP该不是把我改的index.php覆盖了吧，一看果然是。重新Google .htaccess的解决方式吧。 # 301 redirect to domain without 'www.' RewriteCond %{HTTP_HOST} ^www.example.com$ [NC] RewriteRule ^(.*)$ http://example.com/$1 [R=301,L] 参见《301 Redirect With No WWW Using Htaccess》 也不知道有用没用。]]></description>
			<content:encoded><![CDATA[<p>前段时间偷偷去掉了域名里的www，看了ma.tt的文章，修改了WP的index.php（后来才发现ma.tt写了个插件<a href="http://ma.tt/2006/06/wordpress-no-www/" target="_blank">WordPress no-www</a>）。头几天挺好，PR也过来了，不过再后来PR就消失了，Leo说是PR没刷新，我晕，等等吧，怎么等也不见好，这时候唐唐说他转的域名PR恢复了，我突然反应过来升级WP该不是把我改的index.php覆盖了吧，一看果然是。重新Google .htaccess的解决方式吧。</p>
<pre>
  # 301 redirect to domain without 'www.'
  RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
  RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
</pre>
<p>参见<a href="http://vision-media.ca/resources/seo/301-redirect-with-no-www-using-htaccess" target="_blank">《301 Redirect With No WWW Using Htaccess》</a></p>
<p>也不知道有用没用。</p>
]]></content:encoded>
			<wfw:commentRss>http://e-xia.com/2009/02/no-www-through-htaccess/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

