<?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>Wang Kai &#187; Tech</title>
	<atom:link href="http://kwang.blogdns.com/category/tech/feed" rel="self" type="application/rss+xml" />
	<link>http://kwang.blogdns.com</link>
	<description>Research, Technology and Education</description>
	<lastBuildDate>Tue, 06 Oct 2009 09:10:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Change/Extend phpmyadmin Authentication Timeout</title>
		<link>http://kwang.blogdns.com/tech/how-to-change-extend-phpmyadmin-authentication-timeout.html</link>
		<comments>http://kwang.blogdns.com/tech/how-to-change-extend-phpmyadmin-authentication-timeout.html#comments</comments>
		<pubDate>Thu, 18 Dec 2008 13:00:20 +0000</pubDate>
		<dc:creator>x=vv=</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://kwang.blogdns.com/?p=219</guid>
		<description><![CDATA[I found it very annoying that phpmyadmin after a quite short amount of time they needed to authenticate again.
If you use cookie authentication method in your phpmyadmin, you might probably find it very annoying as you will automatically be signed out after certain period of idle time. This is because the lifetime of the cookie [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-220" title="phpmyadmin" src="http://kwang.blogdns.com/wp-content/uploads/2008/12/phpmyadmin.png" alt="phpmyadmin" width="120" height="69" />I found it very annoying that <em>phpmyadmin</em> after a quite short amount of time they needed to authenticate again.</p>
<p>If you use <em><strong>cookie authentication</strong> </em>method in your <em>phpmyadmin</em>, you might probably find it very annoying as you will automatically be signed out after certain period of idle time. This is because the lifetime of the cookie  itself is set to 1800 seconds (30 minutes) by default, after which you need to authenticate again to log in.</p>
<p>To remedy this, simply edit the configuration file <strong><em>config.inc.php</em></strong> and add the following line:</p>
<p style="padding-left: 30px;"><strong><em>$cfg['LoginCookieValidity'] = 3600*3;  // 3 hours, or 10800 seconds</em></strong></p>
<p>This sets the cookie timeout to 3 hours, which is usually long enough.</p>
]]></content:encoded>
			<wfw:commentRss>http://kwang.blogdns.com/tech/how-to-change-extend-phpmyadmin-authentication-timeout.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java &#8211; Final vs. Static Variable</title>
		<link>http://kwang.blogdns.com/tech/java-final-vs-static-variable.html</link>
		<comments>http://kwang.blogdns.com/tech/java-final-vs-static-variable.html#comments</comments>
		<pubDate>Thu, 13 Nov 2008 13:57:05 +0000</pubDate>
		<dc:creator>x=vv=</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://kwang.blogdns.com/?p=210</guid>
		<description><![CDATA[The &#8220;static&#8221; and &#8220;final&#8221; modifier in Java are somehow confusing, especially when they interact. Here is a good explanation on how to understand these two modifiers:
You DO NOT have to assign a value to a final variable when you declare it.  The &#8220;final&#8221; keyword just means that you can (and must) assign its value [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-211" title="java" src="http://kwang.blogdns.com/wp-content/uploads/2008/11/java.jpg" alt="" width="120" height="120" />The &#8220;<strong>static&#8221;</strong> and &#8220;<strong>final</strong>&#8221; modifier in Java are somehow confusing, especially when they interact. Here is a good explanation on how to understand these two modifiers:</p>
<p>You <strong>DO NOT </strong>have to assign a value to a final variable when you declare it.  The &#8220;<strong>final</strong>&#8221; keyword just means that you can (and must) assign its value exactly once.  Where you are allowed to assign the value depends on if it is static or not (as well as its access modifier).</p>
<p>private <strong>final </strong>int j;<br />
The value MUST be assigned ONCE, either here in the declaration or in each constructor.  It is NOT automatically assigned a value of 0 (zero).  Also, since it is not static, there is a distinct value for each instance object, so it makes sense that it must be assigned in the constructor.</p>
<p><span id="more-210"></span>private <strong>static </strong>int k;<br />
The value may be assigned from anywhere in this class.  Since it is not final, the value may be assigned any number of times, but since it is static, this value is stored at the class-level and universally available to all instances.  If left unassigned, it is assumed to be 0 (zero).</p>
<p>private <strong>static final </strong>int i;<br />
The value MUST be assigned ONCE, either here in the declaration or in a &#8220;static&#8221; class-level block.  It is NOT automatically assigned a value of 0 (zero).</p>
<p>So, to review:<br />
&#8220;final&#8221;: per-instance value, must be assigned once per instance.<br />
&#8220;final&#8221; + &#8220;static&#8221;: per-class value, must be assigned once per class.<br />
&#8220;static&#8221;: per-class value, can be assigned any number of times per class.<br />
[neither modifier]: per-instance value, can be assigned any number of times per instance.</p>
<p>Before Java can create an instance of a class, it must first load and initialize that class.  One step of class initialization is assigning values to all its static fields.  If they&#8217;re static AND final, those values can&#8217;t change once they&#8217;re assigned.<!--more--></p>
]]></content:encoded>
			<wfw:commentRss>http://kwang.blogdns.com/tech/java-final-vs-static-variable.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How To Disable/Remove Automatic Restart After Windows Updates</title>
		<link>http://kwang.blogdns.com/tech/how-to-disable-remove-automatic-restart-after-windows-updates.html</link>
		<comments>http://kwang.blogdns.com/tech/how-to-disable-remove-automatic-restart-after-windows-updates.html#comments</comments>
		<pubDate>Wed, 12 Nov 2008 06:33:44 +0000</pubDate>
		<dc:creator>x=vv=</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://kwang.blogdns.com/?p=197</guid>
		<description><![CDATA[Most of the time, after Windows Update system update the OS, it will ask you to restart the Windows, either now or later. The restarting dialog will pop up once in a while, which is quite annoying. The most disgusting thing is that it will automatically restart the computer without your consent, if there is [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-thumbnail wp-image-191 alignright" title="windows" src="http://kwang.blogdns.com/wp-content/uploads/2008/11/windows.png" alt="" width="100" height="90" />Most of the time, after Windows Update system update the OS, it will ask you to restart the Windows, either now or later. The restarting dialog will pop up once in a while, which is quite annoying. The most disgusting thing is that <strong>it will automatically restart the computer without your consent</strong>, if there is no user interaction for a certain period.</p>
<p>Although this mechanism might enforce the Windows Operating System to be applied with the latest patch in due course, it is very annoying if I&#8217;m currently working on this computer, or having some programs running. I need to run my program regularly when I&#8217;m conducting research works, where each program is likely to take a few days to finish. This Automatic Restarting mechanism has really screwed me (and my lovely programs) many times. Therefore, finally, I&#8217;d like it to be turned off so that the restarting time would be totally under my control.</p>
<p><span class="note">How To Remove/Disable the Automatic Restart After Windows Updates?</span></p>
<p><span id="more-197"></span></p>
<ol>
<li>Hit the Start button and click the &#8220;<strong>Run</strong>&#8220;.</li>
<li>Type &#8220;<strong>gpedit.msc</strong>&#8221; and press Enter. This will bring up the &#8220;<strong>Group Policy</strong>&#8221; configuration window. (<em>for Windows Vista User, type &#8220;<strong>gpedit.msc</strong>&#8221; directly in the search box of Start menu</em>)</li>
<li>Expand the list by following this path: <strong>Local Group Policy </strong>→ <strong>Computer Configuration </strong>→ <strong>Administrative Template </strong>→ <strong>Windows Component</strong> → <strong>Windows Update</strong></li>
<li>There is a bunch of different variables for you to configure on the right pane of &#8220;Windows Update&#8221; option. Find &#8220;<strong>No auto-restart for scheduled Automatic Updates Installations</strong>&#8220;, double click on it, then click on &#8220;<strong>Enabled</strong>&#8221; and hit Apply/OK.</li>
<li>After modification, a reboot is necessary for the new Group Policy to take effect.</li>
</ol>
<p>The above method need a reboot to take effect. If you want to turn off the automatic restart <strong>IMMEDIATELY</strong>, there is another way of making this happen:</p>
<ul>
<li>Type &#8220;<strong>sc stop wuauserv</strong>&#8221; in the &#8220;<strong>Run</strong>&#8221; dialog . It will turn off the auto update service immediately (the yellow tray icon should be gone after doing this). Don&#8217;t worry about the Automatic Update Service, as it will start again at the next boot (as long as you don&#8217;t disable it).</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://kwang.blogdns.com/tech/how-to-disable-remove-automatic-restart-after-windows-updates.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Disable Directory Listing/Browsing in Apache Web Server</title>
		<link>http://kwang.blogdns.com/tech/how-to-disable-directory-listing-browsing-in-apache-web-server.html</link>
		<comments>http://kwang.blogdns.com/tech/how-to-disable-directory-listing-browsing-in-apache-web-server.html#comments</comments>
		<pubDate>Mon, 10 Nov 2008 05:48:09 +0000</pubDate>
		<dc:creator>x=vv=</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://kwang.blogdns.com/?p=188</guid>
		<description><![CDATA[By default, Apache Web (HTTPD) Server is configured with the &#8220;directory listing&#8221; option enabled, which allows user to see all the files and sub-folders under a particular directory when index files like index.html, index.php etc. are not present in that directory.
This is not advisable on production website as it may expose sensitive information to prying [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://kwang.blogdns.com/wp-content/uploads/2008/11/logo_apache.gif"><img class="alignright size-medium wp-image-189" title="logo_apache" src="http://kwang.blogdns.com/wp-content/uploads/2008/11/logo_apache.gif" alt="" width="173" height="64" /></a>By default, Apache Web (HTTPD) Server is configured with the &#8220;directory listing&#8221; option enabled, which allows user to see all the files and sub-folders under a particular directory when index files like <em>index.html</em>, <em>index.php</em> etc. are not present in that directory.</p>
<p>This is not advisable on production website as it may expose sensitive information to prying eyes, and would probably be indexed by search engines if you do not define entries in robot.txt properly. Therefore, in order to protect your data from being compromised, making all contents under the directory invisible to unintended visitors becomes necessary.</p>
<p><span class="note">How can we disable the Directory Listing in Apache Server?</span></p>
<p>There are two simple ways to achieve this:</p>
<ol>
<li>If you are able to access the Apache configuration file <span style="text-decoration: underline;"><em><strong>httpd.conf</strong></em></span>, you can do this with an <strong>Options </strong>directive inside a <strong>Directory</strong> tag. Either remove the &#8220;<strong>Indexs</strong>&#8221; from line begins with <strong>Options</strong> if it&#8217;s there, or change &#8220;Indexes&#8221; to &#8220;<strong>-Indexes</strong>&#8220;.<br />
<blockquote><p>&lt;Directory &#8220;/www&#8221;&gt;<br />
Options <span style="text-decoration: line-through;">Indexes</span> FollowSymLinks<br />
&lt;/Directory&gt;</p></blockquote>
</li>
<li>If you have no access right to the Apache configuration file <em>httpd.conf</em>, you can obtain the same effect with method 1 by using the <em>.htaccess</em> file: open the <em><span style="text-decoration: underline;"><strong>.htacces</strong></span></em> file (create a new one if it&#8217;s not there) under the target directory, look for <em><strong>Options Indexes</strong></em>. If <em>Options Indexes</em> exists, <span style="text-decoration: underline;"><em>modify it to Options -Indexes</em></span>, or else <span style="text-decoration: underline;"><em>add Options -Indexes as a new line</em></span>.</li>
</ol>
<p>Remember to restart your Apache Web Server, and the Directory Browsing feature should be disabled by now.</p>
]]></content:encoded>
			<wfw:commentRss>http://kwang.blogdns.com/tech/how-to-disable-directory-listing-browsing-in-apache-web-server.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Restart or Shutdown Windows XP/Vista In Remote Desktop Connection</title>
		<link>http://kwang.blogdns.com/tech/how-to-restart-or-shutdown-windows-xpvista-in-remote-desktop-connection.html</link>
		<comments>http://kwang.blogdns.com/tech/how-to-restart-or-shutdown-windows-xpvista-in-remote-desktop-connection.html#comments</comments>
		<pubDate>Sat, 08 Nov 2008 21:00:59 +0000</pubDate>
		<dc:creator>x=vv=</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://kwang.blogdns.com/?p=182</guid>
		<description><![CDATA[If you think you may restart or shutdown the Windows XP or windows Vista  in remote control mode by just clicking the &#8220;Restart&#8221; or &#8220;Shut Down&#8221; option in Windows Start menu, then you are WRONG!
You may check by yourself to see if you are provided with these two options in XP or Vista. Yes, there [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://kwang.blogdns.com/wp-content/uploads/2008/11/windows.png"><img class="alignright size-thumbnail wp-image-191" title="windows" src="http://kwang.blogdns.com/wp-content/uploads/2008/11/windows.png" alt="" width="100" height="90" /></a>If you think you may restart or shutdown the Windows XP or windows Vista  in remote control mode by just clicking the &#8220;Restart&#8221; or &#8220;Shut Down&#8221; option in Windows Start menu, then you are WRONG!</p>
<p>You may check by yourself to see if you are provided with these two options in XP or Vista. Yes, there is actually no &#8220;Shut Down&#8221; or &#8220;Restart&#8221; option in Windows Start menu of the remote computer when you are in the Remote Control mode throught RDP. The only option you get are &#8220;Log Off&#8221; and &#8220;Disconnect&#8221;  in Windows XP, or &#8220;Log Off&#8221; and &#8220;Lock&#8221; in Vista. (In Windows Server 2003 however, we do have an option of &#8220;Shut Down&#8221;)</p>
<p><a href="http://kwang.blogdns.com/wp-content/uploads/2008/11/xp_remote.jpg"><img class="alignnone size-medium wp-image-183" title="xp_remote" src="http://kwang.blogdns.com/wp-content/uploads/2008/11/xp_remote.jpg" alt="" width="300" height="74" /></a></p>
<p><span class="note">How to restart / shutdown Windows in Remote Desktop Connection?</span></p>
<p><span id="more-182"></span>There are many options, and I&#8217;m here giving you three simplest methods in doing this:</p>
<ol>
<li>While you are in the Remote Windows Desktop, press <em><span style="text-decoration: underline;"><strong>CTRL+ALT+END</strong></span></em> hotkey combination to bring up the GUI menu with options for &#8220;Restart&#8221; and &#8220;Shut Down&#8221;. Next? It&#8217;s all in your control.</li>
<li>Type <span style="text-decoration: underline;"><em><strong>shutdown /i</strong></em></span> command in the &#8220;run&#8221; dialog box of Windows XP Start menu, or the <em>Search</em> textbox of Windows Vista Start Menu: This will also bring up the GUI where  &#8220;Restart&#8221; and &#8220;Shut Down&#8221; options are provided.</li>
<li>If you prefer a more straightforward way in reboot or shutdown your PC without interact with GUI (so as to appear to be more professional?), simply type <em><span style="text-decoration: underline;"><strong>shutdown -r -t 0</strong></span></em> for reboot and <em><span style="text-decoration: underline;"><strong>shutdown -s -t 0</strong></span></em> o shutdown.This is for an immediate reboot or shutdown. if you want some delay, change 0 to something else then (say 60 for one minute delay).<br />
<img class="alignnone size-medium wp-image-184" title="xp_reboot" src="http://kwang.blogdns.com/wp-content/uploads/2008/11/xp_reboot.jpg" alt="" width="300" height="154" /> <img class="alignnone size-medium wp-image-185" title="vista-reboot" src="http://kwang.blogdns.com/wp-content/uploads/2008/11/vista-reboot.jpg" alt="" width="300" height="36" /></li>
</ol>
<p>Previous versions of Windows XP also provides &#8220;Restart&#8221; and &#8220;Shut Down&#8221; options in <strong>Windows Task Manager</strong>, and I used to use them to reboot / shutdown Windows. But unfortunately they are somehow removed in the current version of Windows XP with SP2/SP3. I don&#8217;t know why. Probably by the same reason as that they do not provide &#8220;Restart&#8221; or &#8220;Shut Down&#8221; option in Start Menu?</p>
]]></content:encoded>
			<wfw:commentRss>http://kwang.blogdns.com/tech/how-to-restart-or-shutdown-windows-xpvista-in-remote-desktop-connection.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Ways of Sending Excutable File (*.exe) in Gmail as an Attachment</title>
		<link>http://kwang.blogdns.com/tech/simple-ways-of-sending-excutable-file-exe-in-gmail-as-an-attachment.html</link>
		<comments>http://kwang.blogdns.com/tech/simple-ways-of-sending-excutable-file-exe-in-gmail-as-an-attachment.html#comments</comments>
		<pubDate>Fri, 07 Nov 2008 09:50:55 +0000</pubDate>
		<dc:creator>x=vv=</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Gmail]]></category>

		<guid isPermaLink="false">http://kwang.blogdns.com/?p=173</guid>
		<description><![CDATA[
For some security reasons, Gmail does not allow the user to send executable files (for example, exe). When you send an exe file as an attachment, probably following window will pop up:

This error window also pops up even you compress your file into .zip format, prompting you that &#8220;&#60;yourfile&#62;.zip contains an executable file. For security [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://kwang.blogdns.com/wp-content/uploads/2008/11/gmail.png"><img class="alignright size-full wp-image-205" title="gmail" src="http://kwang.blogdns.com/wp-content/uploads/2008/11/gmail.png" alt="" width="100" height="74" /></a></p>
<p>For some security reasons, Gmail does <strong>not allow</strong> the user to send executable files (for example, exe). When you send an exe file as an attachment, probably following window will pop up:</p>
<p><img class="size-medium wp-image-174 alignnone" style="border: 1px solid black;" title="gmail_exe" src="http://kwang.blogdns.com/wp-content/uploads/2008/11/gmail_exe.jpg" alt="" width="385" height="87" /></p>
<p>This error window also pops up even you compress your file into <strong>.zip </strong>format, prompting you that &#8220;&lt;yourfile&gt;.zip contains an executable file. For security reasons, Gmail does not allow you to send this type of file.&#8221;</p>
<p>So, how can we send the executable file in Gmail as an attachment? There are many tricks for this, and I&#8217;m listing two of the simplest here:</p>
<p><span id="more-173"></span><strong>1. Renaming Extention:</strong> rename your file to different extension (for example, change &#8220;file<strong>.exe</strong>&#8221; to something else such as file<strong>.jpg</strong>, file<strong>.dat</strong>, or even file<strong>.abc</strong>. The file with modified extension should be able to get through Gmail and reach your receipent&#8217;s mailbox.</p>
<p><span class="important">After the receipent recieves the file, he would have to rename the extension file back to &#8220;<strong>.exe&#8221;.</strong></span><br />
<strong></strong></p>
<p><strong>2. Compress into .rar:</strong> while compressing the file into <strong>.zip </strong>format doesn&#8217;t help, compressing it into <strong>.rar</strong> format indeed works! Execution file compressed with WinRAR may be send over via Gmail successfully.</p>
<p><span class="important">If your computer is equiped with WinRAR, and the receipent is able to open up the RAR files too, then just do it! </span></p>
<p>Besides above mentioned two easy methods, there are some other ways, but personally I think they are too complicated to be carried out, especially for some normal people who doesn&#8217;t know computer well.</p>
<p class="note">In case you don&#8217;t know <strong>How to rename file with different extension</strong>, follow this (for windows user only):</p>
<ol>
<li>Go to <strong>Folder Options</strong> (Control Panel &gt; Folder Options)</li>
<li>In View tab, uncheck “Hide extensions for known file types</li>
<p><img class="alignnone size-medium wp-image-175" style="border: 1px solid black;" title="extension" src="http://kwang.blogdns.com/wp-content/uploads/2008/11/extension.jpg" alt="" width="300" height="194" /></ol>
<p>If you are a Unix/Linux user,I don&#8217;t think renaming would be a problem for you <img src='http://kwang.blogdns.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . If you have some other better methods in doing this, feel free to leave a comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://kwang.blogdns.com/tech/simple-ways-of-sending-excutable-file-exe-in-gmail-as-an-attachment.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Display Adsense Search Result Within Wordpress Page (with Default Template)</title>
		<link>http://kwang.blogdns.com/tech/how-to-display-adsense-search-result-within-wordpress-page-with-default-template.html</link>
		<comments>http://kwang.blogdns.com/tech/how-to-display-adsense-search-result-within-wordpress-page-with-default-template.html#comments</comments>
		<pubDate>Thu, 06 Nov 2008 09:07:06 +0000</pubDate>
		<dc:creator>x=vv=</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Adsense]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://kwang.blogdns.com/?p=168</guid>
		<description><![CDATA[Google Adsense Search not only offers users site search or the world wide web search, but while brings in web publishers revenue from ads relevant to their search terms.
Initially, the Adsense Search result can only be shown on a google landing page, that is, a new pop up window or on the same window under [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-thumbnail wp-image-177 alignright" title="wordpress" src="http://kwang.blogdns.com/wp-content/uploads/2008/11/wordpress.png" alt="" width="100" height="100" />Google <strong>Adsense Search</strong> not only offers users site search or the world wide web search, but while brings in web publishers revenue from ads relevant to their search terms.</p>
<p>Initially, the Adsense Search result can only be shown on a google landing page, that is, a new pop up window or on the same window under Google.com domain.</p>
<p>There is third option now which allows you to display search result within your own specified landing page. For example, the search result can now be displayed on a user-defined page (e.g. <a href="http://kwang.blogdns.com/services/site-search">site-search</a> page on this site), or even the same window where the search form resides. Of course, you would have to be able to create such dedicated search result page yourself.</p>
<p>Next, I will show:</p>
<p class="note">A step by step tutorial on<strong> How To Embed Adsense Search Result within WordPress page</strong>:</p>
<p><span id="more-168"></span></p>
<ol>
<li>First, login to your adsense account and generate <em>Adsense For Search </em>code as usual. When you get to the section &#8220;<em>Opening of search results page</em>&#8220;, tick the option &#8220;<em>Open results within my own site</em>&#8220;.</li>
<li>Under &#8220;<em>Enter URL where search results will be displayed</em>&#8220;, enter the URL where you&#8217;d like your search result to be displayed, e.g: <span style="text-decoration: underline;">http://&lt;YOURDOMAIN&gt;/<strong>site-search.</strong></span> (You may change the page &#8220;site-search&#8221; to other names, but make sure the &#8220;<strong>Post Slug</strong>&#8221; (in older version of WordPress) or the &#8220;<strong>Permalink&#8221; </strong>for this page is changed accordingly.)<br />
<a href="http://kwang.blogdns.com/wp-content/uploads/2008/11/adsense-search.jpg"><img class="size-medium wp-image-169 aligncenter" style="border: 1px solid black;" title="adsense-search" src="http://kwang.blogdns.com/wp-content/uploads/2008/11/adsense-search.jpg" alt="" width="324" height="110" /></a></li>
<li>Finish the setup wizard until you reach the final page where two blocks of code (<span style="text-decoration: underline;">search box code</span> &amp; <span style="text-decoration: underline;">search results code</span>) are shown.</li>
<li>Open up your WordPress admin portal, and copy the <span style="text-decoration: underline;">search box code</span> to the place where you would like your search form to be (A good option would be a sidebar widget of &#8220;text&#8221; type).<br />
<a href="http://kwang.blogdns.com/wp-content/uploads/2008/11/adsense-searchbox-widget.jpg"><img class="size-medium wp-image-170 aligncenter" style="border: 1px solid black;" title="adsense-searchbox-widget" src="http://kwang.blogdns.com/wp-content/uploads/2008/11/adsense-searchbox-widget.jpg" alt="" width="318" height="301" /></a></li>
<li>Create a new WordPress page (a <em>default </em>template will do). Initial the title as &#8220;<strong>Site Search</strong>&#8221; so that the <strong><strong>Permalink</strong> </strong>for this page would probably be <span style="text-decoration: underline;">http://&lt;YOURDOMAIN&gt;/<strong>site-search</strong></span>. If you happen to have the same name in your previous post, you can simply edit it to something else. If you are using older version of WordPres, probably there is a &#8220;Post Slug&#8221; option on the right column. Set the slug as &#8220;site-search&#8221; then.</li>
<li>In the content field, paste the <span style="text-decoration: underline;">search results code</span> onto it.<br />
<a href="http://kwang.blogdns.com/wp-content/uploads/2008/11/adsense-search-result.jpg"><img class="size-medium wp-image-172 aligncenter" style="border: 1px solid black;" title="adsense-search-result" src="http://kwang.blogdns.com/wp-content/uploads/2008/11/adsense-search-result.jpg" alt="" width="455" height="154" /></a></li>
<li>Save and publish the page. That&#8217;s all. Enjoy it!</li>
</ol>
<p>When you test your on-site Google AdSense Search page, you may find the frame in search result page might appear differently or look ugly for some Wordpress theme. This is because Google uses its own style to render those elements. As far as I know, till this end, Google Adsense doesn&#8217;t support the customization of the style for <span style="text-decoration: underline;">Search Result Frame</span> (such as making the background of search result be <em>transparent</em>). But you might be able to change the CSS style to some corresponding HTML tags that are used in Adsense <span style="text-decoration: underline;">Search Box Code</span>, such as FORM, TABLE, LABEL, INPUT, etc.</p>
<p>There are also many other methods in displaying search result in WordPress Page. A common method among them is to create a new template page, and put the search result code in it. This gives you freedom for controlling (e.g. you may now embed some PHP code in this template), but is <strong>not necessary</strong> if you want the page to merely display the search result. The page <a href="http://kwang.blogdns.com/services/site-search">site-search</a> on this site is created based on <em>Default</em> template only.</p>
]]></content:encoded>
			<wfw:commentRss>http://kwang.blogdns.com/tech/how-to-display-adsense-search-result-within-wordpress-page-with-default-template.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove/Delete Adobe Acrobat 8.0 (Pro/3D) Activation Record</title>
		<link>http://kwang.blogdns.com/tech/removedelete-adobe-acrobat-80-pro3d-activation-record.html</link>
		<comments>http://kwang.blogdns.com/tech/removedelete-adobe-acrobat-80-pro3d-activation-record.html#comments</comments>
		<pubDate>Wed, 29 Oct 2008 04:02:26 +0000</pubDate>
		<dc:creator>x=vv=</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Adobe]]></category>

		<guid isPermaLink="false">http://kwang.blogdns.com/?p=134</guid>
		<description><![CDATA[This is for those who needs to use &#8220;Phone Activation&#8221; option to re-activate your Adobe Acrobat 8.0 product.
If you install the Acrobat 8.0 (Pro/3D) for the first time, you would be lead to the &#8220;normal&#8221; type of activation. If you however, happen to uninstall the Acrobat 8.0 but try to reinstall it again, you would [...]]]></description>
			<content:encoded><![CDATA[<p class="note">This is for those who needs to use &#8220;<strong>Phone Activation</strong>&#8221; option to <strong>re-activate</strong> your Adobe Acrobat 8.0 product.</p>
<p><a href="http://kwang.blogdns.com/wp-content/uploads/2008/11/adobe.png"><img class="alignright size-medium wp-image-206" title="adobe" src="http://kwang.blogdns.com/wp-content/uploads/2008/11/adobe.png" alt="" width="100" height="100" /></a>If you install the Acrobat 8.0 (Pro/3D) for the first time, you would be lead to the &#8220;normal&#8221; type of activation. If you however, happen to uninstall the Acrobat 8.0 but try to reinstall it again, you would probably find the activation interface results in the “repair” mode, where your original activation key doesn&#8217;t work any more.</p>
<p>How to get rid of this &#8220;repair&#8221; mode and kick in the original phone activation interface? Well, here is the only thing you need to do:<strong></strong></p>
<p><strong>For Windows XP user</strong>: delete <em> C:\Documents and Settings\All Users\Application Data\FLEXnet\adobe_00080000_xxx.data</em></p>
<p><strong>For Windows Vista user</strong>: delete <em>C:\ProgramData\FLEXnet\adobe_00080000_xxx.data</em></p>
<p><strong>For Mac user</strong>: delete content under <em>/Library/Preferences/FLEXnet Publisher</em></p>
<p>That&#8217;s all. The &#8220;normal&#8221; activation mode should be back.</p>
]]></content:encoded>
			<wfw:commentRss>http://kwang.blogdns.com/tech/removedelete-adobe-acrobat-80-pro3d-activation-record.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to disable Post Revisions Tracking Feature in WordPress</title>
		<link>http://kwang.blogdns.com/tech/how-to-disable-post-revisions-tracking-feature-in-wordpress.html</link>
		<comments>http://kwang.blogdns.com/tech/how-to-disable-post-revisions-tracking-feature-in-wordpress.html#comments</comments>
		<pubDate>Tue, 28 Oct 2008 06:51:58 +0000</pubDate>
		<dc:creator>x=vv=</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://kwang.blogdns.com/?p=129</guid>
		<description><![CDATA[Personally I don&#8217;t like the &#8220;Post Revision&#8221; feature at all. It just creates tremendous useless post entries in wp_posts table every time I click on “Save” button while writing a post or page. Over time, the database may grows bigger and bigger.This is really not my style.
If you are also using WordPress 2.6 or newer [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://kwang.blogdns.com/wp-content/uploads/2008/11/wordpress.png"><img class="size-thumbnail wp-image-177 alignright" title="wordpress" src="http://kwang.blogdns.com/wp-content/uploads/2008/11/wordpress.png" alt="" width="100" height="100" /></a>Personally I don&#8217;t like the &#8220;Post Revision&#8221; feature at all. It just creates tremendous useless post entries in <em>wp_posts</em> table every time I click on “Save” button while writing a post or page. Over time, the database may grows bigger and bigger.This is really not my style.</p>
<p>If you are also using WordPress 2.6 or newer version, and feel that post revisions feature is not that useful, there are ways to  turn it off. Just follow this simple 3-step way:</p>
<ol>
<li class="important">Open <em>wp-config.php</em> file which is located in the root or home directory of WordPress blog.</li>
<li class="important">Add this line of code in <em>wp-config.php</em>:<em> <strong>define(’WP_POST_REVISIONS’, 0);</strong></em></li>
<li class="important">Issue following clean-up SQL command: <em><strong>delete from wp_posts where post_type=&#8217;revision&#8217;;</strong></em></li>
</ol>
<p>Step 2 sets the constant WP_POST_REVISIONS to 0, indicating the revision feature to be turned off. Step 3 actually purges all post revisions related records in current database. This should give you a relative clean database environment (Wow~).</p>
<p>If you also suffice with AutoSave feature built-in in WordPress editor, then simply add another line in <em>wp-config.php</em> file: <em><strong>define(&#8217;AUTOSAVE_INTERVAL&#8217;, 600); </strong></em>This changes the interval of AutoSave trigger to be one hour, which should be long enough.</p>
]]></content:encoded>
			<wfw:commentRss>http://kwang.blogdns.com/tech/how-to-disable-post-revisions-tracking-feature-in-wordpress.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
