<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;CUMNSHc9eCp7ImA9WhRaFEk.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632</id><updated>2012-02-17T09:51:39.960+08:00</updated><category term="vbproj" /><category term="password prompt" /><category term="garbage" /><category term="windows server 2008" /><category term="subdomain" /><category term="condition" /><category term="javascript" /><category term="visual basic" /><category term="code highlight" /><category term="web" /><category term="symbolic link" /><category term="development" /><category term="blogspot" /><category term="xmldocument" /><category term="syntax highlight" /><category term="tomcat" /><category term="command" /><category term="workspace" /><category term="xmlnode" /><category term="mssql" /><category term="exclude" /><category term="shortcut" /><category term="string" /><category term="c#" /><category term="it" /><category term="firefox" /><category term="xampp" /><category term="archive" /><category term="shell" /><category term=".emacs" /><category term="web service" /><category term="policy management" /><category term="master password" /><category term="ugly characters" /><category term="requestLimits" /><category term=".net" /><category term="thumb drive" /><category term="visual studio .net 2003" /><category term="usb drive" /><category term="404" /><category term="footer" /><category term="windows registry" /><category term="vb.net" /><category term="64 bit" /><category term="compress" /><category term="web.config" /><category term="apache" /><category term="linux" /><category term="scripting" /><category term="debug" /><category term="xml" /><category term="gnome keyring" /><category term="tech" /><category term="emacs" /><category term="java" /><category term="windows service" /><category term="ntfs" /><category term="php" /><category term="iis7" /><category term="security" /><category term="header" /><category term="programming" /><category term="pretty print" /><category term="rants" /><category term="svn properties" /><category term="page not found" /><category term="development ide" /><category term="format" /><category term="revert" /><category term="bash" /><category term="sql server" /><category term="config" /><category term="tar" /><category term="netbeans" /><category term="vhost" /><category term="log4j" /><category term="internet information services" /><category term="repeater" /><category term="blogger" /><category term="virtual host" /><category term="csproj" /><category term="unix" /><category term="hard drive" /><category term="symlink" /><category term="drupal" /><category term="microsoft" /><category term="asp.net" /><category term="web browser" /><category term="version control" /><category term="ubuntu" /><category term="backtrace" /><category term="svn" /><category term="subversion" /><title>khairie [dot] net</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.khairie.net/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.khairie.net/" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>24</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/khairiedotnet" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="khairiedotnet" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">khairiedotnet</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;DEQGQ3oyeyp7ImA9WhRVGEQ.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-8002178026383867914</id><published>2012-01-18T22:18:00.001+08:00</published><updated>2012-01-18T22:18:42.493+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-18T22:18:42.493+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="symlink" /><category scheme="http://www.blogger.com/atom/ns#" term="symbolic link" /><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="bash" /><category scheme="http://www.blogger.com/atom/ns#" term="command" /><category scheme="http://www.blogger.com/atom/ns#" term="unix" /><category scheme="http://www.blogger.com/atom/ns#" term="shell" /><category scheme="http://www.blogger.com/atom/ns#" term="shortcut" /><title>Creating Symbolic Links in Linux</title><content type="html">This one is a pretty easy one, but I always forgot which one comes first - the symlink name or the target file/folder.&lt;br /&gt;
&lt;br /&gt;
So, here's how you create a symlink in Linux:-&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: text"&gt;ln -s [target directory or file] [symlink shortcut]
&lt;/pre&gt;
&lt;br /&gt;
For example:-
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: bash"&gt;ln -s /usr/local/lib/example /example
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-8002178026383867914?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8J3niO6zvtvvXxZNSGpSe6nyuUY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8J3niO6zvtvvXxZNSGpSe6nyuUY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8J3niO6zvtvvXxZNSGpSe6nyuUY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8J3niO6zvtvvXxZNSGpSe6nyuUY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/8002178026383867914/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2012/01/creating-symbolic-links-in-linux.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/8002178026383867914?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/8002178026383867914?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2012/01/creating-symbolic-links-in-linux.html" title="Creating Symbolic Links in Linux" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkQCQnk6eyp7ImA9WhRWF0o.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-4480246936374275184</id><published>2012-01-05T09:17:00.000+08:00</published><updated>2012-01-05T21:32:43.713+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-05T21:32:43.713+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="gnome keyring" /><category scheme="http://www.blogger.com/atom/ns#" term="password prompt" /><category scheme="http://www.blogger.com/atom/ns#" term="netbeans" /><category scheme="http://www.blogger.com/atom/ns#" term="64 bit" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><category scheme="http://www.blogger.com/atom/ns#" term="master password" /><title>Fix the Netbeans Master Password prompt on Ubuntu 64 bit</title><content type="html">Refer: &lt;a href="http://wiki.netbeans.org/FaqMasterPasswordDialog" target="_blank"&gt;http://wiki.netbeans.org/FaqMasterPasswordDialog&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I've been having this prompt for quite a while everytime I run Netbeans, and it's REALLY annoying. Googled a bit, and found out about the wiki above. So, here's what I did to solve it.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note:&lt;/b&gt; for Netbeans 7, you can just disable the master password by using the options below in your &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;netbeans.conf&lt;/span&gt;&amp;nbsp;(this should be in your&amp;nbsp;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;netbeans installation path&amp;gt;/etc/netbeans.conf&lt;/span&gt;):-&lt;br /&gt;
&lt;pre class="brush: plain"&gt;-J-Dnetbeans.keyring.no.master=true&lt;/pre&gt;
&lt;br /&gt;
For Netbeans 6 though, you have to troubleshoot what's causing the problem. First, add this option to &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;netbeans.conf&lt;/span&gt;:-&lt;br /&gt;
&lt;pre class="brush: plain"&gt;-J-Dorg.netbeans.modules.keyring.level=FINE
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Then start Netbeans, and you will STILL get the master password prompt. Check the IDE log (View -&amp;gt; IDE Log). Look for what's causing the error. In my case, I found this in my IDE Log:
&lt;br /&gt;
&lt;pre class="brush: plain"&gt;java.lang.UnsatisfiedLinkError: Unable to load library 'gnome-keyring': libgnome-keyring.so: cannot open shared object file: No such file or directory
        at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:145)
        at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:188)
        at com.sun.jna.Library$Handler.&lt;init&gt;(Library.java:123)
...
&lt;/init&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
I tried to search fo that &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;libgnome-keyring.so&lt;/span&gt; file in my Ubuntu installation:-
&lt;br /&gt;
&lt;pre class="brush: bash"&gt;khairi@ubuntu:~$ locate libgnome-keyring.so
/usr/lib/libgnome-keyring.so.0
/usr/lib/libgnome-keyring.so.0.1.1
/usr/lib32/libgnome-keyring.so
/usr/lib32/libgnome-keyring.so.0
/usr/lib32/libgnome-keyring.so.0.1.1
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Ahah! I'm missing that &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;libgnome-keyring.so&lt;/span&gt; file in my 64 bit library. That's why Netbeans is prompting me for the master password, coz it can't find my Gnome Keyring.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This is an easy fix. Just create a soft symlink to the actual file. Here's how:-
&lt;br /&gt;
&lt;pre class="brush: bash"&gt;khairi@ubuntu:~$ cd /usr/lib
khairi@ubuntu:/usr/lib$ sudo ln -s libgnome-keyring.so.0 libgnome-keyring.so
khairi@ubuntu:/usr/lib$ ls -l libgnome-keyring*
lrwxrwxrwx 1 root root     21 2012-01-05 09:06 libgnome-keyring.so -&amp;gt; libgnome-keyring.so.0
lrwxrwxrwx 1 root root     25 2011-10-19 09:05 libgnome-keyring.so.0 -&amp;gt; libgnome-keyring.so.0.1.1
-rw-r--r-- 1 root root 139144 2011-09-26 21:45 libgnome-keyring.so.0.1.1
khairi@ubuntu:/usr/lib$ ls -l ../lib32/libgnome-keyring*
lrwxrwxrwx 1 root root     21 2011-10-19 09:06 ../lib32/libgnome-keyring.so -&amp;gt; libgnome-keyring.so.0
lrwxrwxrwx 1 root root     25 2011-10-19 09:06 ../lib32/libgnome-keyring.so.0 -&amp;gt; libgnome-keyring.so.0.1.1
-rw-r--r-- 1 root root 133412 2011-09-26 21:44 ../lib32/libgnome-keyring.so.0.1.1
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
That should fix it.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Cheers!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-4480246936374275184?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6pRdeNPCz2FVUS-_n4p0WegpSII/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6pRdeNPCz2FVUS-_n4p0WegpSII/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6pRdeNPCz2FVUS-_n4p0WegpSII/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6pRdeNPCz2FVUS-_n4p0WegpSII/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/4480246936374275184/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2012/01/fix-netbeans-master-password-prompt-on.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/4480246936374275184?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/4480246936374275184?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2012/01/fix-netbeans-master-password-prompt-on.html" title="Fix the Netbeans Master Password prompt on Ubuntu 64 bit" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUQFR386eCp7ImA9WhdbGUU.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-7104913088577038097</id><published>2011-10-19T08:15:00.000+08:00</published><updated>2011-10-19T08:15:16.110+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-19T08:15:16.110+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="development" /><category scheme="http://www.blogger.com/atom/ns#" term="bash" /><category scheme="http://www.blogger.com/atom/ns#" term="version control" /><category scheme="http://www.blogger.com/atom/ns#" term="revert" /><category scheme="http://www.blogger.com/atom/ns#" term="subversion" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="svn properties" /><category scheme="http://www.blogger.com/atom/ns#" term="shell" /><category scheme="http://www.blogger.com/atom/ns#" term="svn" /><title>SVN revert all other properties changes after an SVN merge</title><content type="html">Usually after doing an SVN merge, there will be a lot of SVN properties changes to our local copy. If we committed these changes to our repo, we will have headache later on to resolve the issues (at least that's what my colleague told me).
&lt;br /&gt;
&lt;br /&gt;
Thus, in order to revert all other properties changes (except for the things that we really change) after doing an SVN merge, type the following in shell prompt:-
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: bash"&gt;svn status | grep "^ M" | awk '{print $2}' | xargs svn revert
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-7104913088577038097?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6wA2GQvR8QGB1FJiLn-36G2fpq8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6wA2GQvR8QGB1FJiLn-36G2fpq8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6wA2GQvR8QGB1FJiLn-36G2fpq8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6wA2GQvR8QGB1FJiLn-36G2fpq8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/7104913088577038097/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2011/10/svn-revert-all-other-properties-changes.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/7104913088577038097?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/7104913088577038097?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2011/10/svn-revert-all-other-properties-changes.html" title="SVN revert all other properties changes after an SVN merge" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkcCR3g_fip7ImA9WhdbEU4.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-3612689272217381129</id><published>2011-10-09T13:19:00.000+08:00</published><updated>2011-10-09T13:27:46.646+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-09T13:27:46.646+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="debug" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><category scheme="http://www.blogger.com/atom/ns#" term="backtrace" /><title>PHP Pretty Backtrace</title><content type="html">Sometimes during development, you want to look at the execution stack to see what's being passed around, and from where it's being called. That's when PHP's &lt;a href="http://php.net/manual/en/function.debug-backtrace.php" target="_blank"&gt;debug_backtrace&lt;/a&gt; function becomes useful. At other times, you probably only want a few of those information for debugging. Here's how I filtered those info to get what I really want:-&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: php"&gt;$log = debug_backtrace();
for ($i=0; $i &amp;lt; sizeof($log); $i++) {
  $dump[$i]['file'] = $log[$i]['file'];
  $dump[$i]['function'] = $log[$i]['function'];
  $dump[$i]['line'] = $log[$i]['line'];
}
error_log(__METHOD__.":".__LINE__.print_r($dump,true));
&lt;/pre&gt;
&lt;br /&gt;
I've also found &lt;a href="http://www.freshblurbs.com/sane-backtrace-php" target="_blank"&gt;this blog post&lt;/a&gt;, which does similar, but only takes out the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;args&lt;/span&gt; argument.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: php"&gt;$trace = debug_backtrace();
foreach ($trace as &amp;amp;$t) {
  unset($t['args']);
}
echo "&amp;lt;pre&amp;gt;".print_r ($trace,true)."&amp;lt;/pre&amp;gt;";
exit();
&lt;/pre&gt;
&lt;br /&gt;
Happy debugging!
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-3612689272217381129?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/pZyuzOLhCLEJPS3D1o4aLK0iI2A/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pZyuzOLhCLEJPS3D1o4aLK0iI2A/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/pZyuzOLhCLEJPS3D1o4aLK0iI2A/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/pZyuzOLhCLEJPS3D1o4aLK0iI2A/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/3612689272217381129/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2011/10/php-pretty-backtrace.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/3612689272217381129?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/3612689272217381129?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2011/10/php-pretty-backtrace.html" title="PHP Pretty Backtrace" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0ECSHczeip7ImA9WhdbEk0.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-5320635418040018517</id><published>2011-09-09T16:29:00.002+08:00</published><updated>2011-10-10T09:21:09.982+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-10T09:21:09.982+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="development ide" /><category scheme="http://www.blogger.com/atom/ns#" term="netbeans" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><category scheme="http://www.blogger.com/atom/ns#" term="workspace" /><title>How to change workspace in Netbeans</title><content type="html">By default, Netbeans' workspace is located at&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: bash"&gt;/home/&amp;lt;username&amp;gt;/.netbeans/&amp;lt;version&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
or (for Windows users):-&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: powershell"&gt;C:\Users\&amp;lt;username&amp;gt;\.netbeans\&amp;lt;version&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
If you want to work with different workspace, then you'll need to use the &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;--userdir&lt;/span&gt; switch when executing Netbeans' shortcut.&lt;br /&gt;
&lt;br /&gt;
In Linux, right click on your Netbeans' shortcut, and edit the &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;command&lt;/span&gt; to be something like this:-&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: bash"&gt;/bin/sh "/path/to/NetBeans x.x/bin/netbeans" --userdir /path/to/your/new/workspace&lt;/pre&gt;
&lt;br /&gt;
For Windows users, right click on your Netbeans' shortcut, and select &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Properties&lt;/span&gt;.&lt;br /&gt;
In the Target textbox, add the &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;--userdir&lt;/span&gt; parameter to the very end. It should look something like this:-&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: ps"&gt;"C:\Program Files\NetBeans x.x\bin\netbeans.exe" --userdir C:\path\to\new_workspace&lt;/pre&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Tips&lt;/b&gt;&lt;/i&gt;: You can create multiple shortcuts for different workspaces ;-)
&lt;br /&gt;
&lt;br /&gt;
References:-&lt;br /&gt;
&lt;a href="http://stackoverflow.com/questions/973557/is-there-a-netbeans-equivalent-to-eclipses-workspace" target="_blank"&gt;http://stackoverflow.com/questions/973557/is-there-a-netbeans-equivalent-to-eclipses-workspace&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://mangstacular.blogspot.com/2009/03/netbeans-and-workspaces.html" target="_blank"&gt;http://mangstacular.blogspot.com/2009/03/netbeans-and-workspaces.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-5320635418040018517?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OGFMPlGGTgI92wTmPTN89vbgLlQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OGFMPlGGTgI92wTmPTN89vbgLlQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OGFMPlGGTgI92wTmPTN89vbgLlQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OGFMPlGGTgI92wTmPTN89vbgLlQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/5320635418040018517/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2011/09/how-to-change-workspace-in-netbeans.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/5320635418040018517?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/5320635418040018517?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2011/09/how-to-change-workspace-in-netbeans.html" title="How to change workspace in Netbeans" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUcDSH84eCp7ImA9WhdWE0s.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-6084584467058944284</id><published>2011-08-25T22:40:00.010+08:00</published><updated>2011-09-07T10:37:59.130+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-07T10:37:59.130+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="blogger" /><category scheme="http://www.blogger.com/atom/ns#" term="pretty print" /><category scheme="http://www.blogger.com/atom/ns#" term="blogspot" /><category scheme="http://www.blogger.com/atom/ns#" term="syntax highlight" /><category scheme="http://www.blogger.com/atom/ns#" term="code highlight" /><title>Syntax Highlighting in Blogger/Blogspot</title><content type="html">One of the challenges I faced when moving to Blogger's platform is to get syntax highlighting work correctly for all my previous posts. After digging around Google for a while, I found out about Alex Gorbatchev's &lt;a href="http://alexgorbatchev.com/SyntaxHighlighter/" target="_blank"&gt;SyntaxHighlighter&lt;/a&gt;. Here's how I did it for my blog here (remember to replace&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: monospace; white-space: pre;"&gt;&lt;b&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&amp;nbsp;with the appropriate version):&lt;br /&gt;
&lt;br /&gt;
1) Go to Blogger's &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;Design&amp;gt;Edit Html&lt;/b&gt;&lt;/span&gt; page.&lt;br /&gt;
2) In the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&amp;lt;head&amp;gt;&lt;/b&gt;&lt;/span&gt; section, include the style sheets and&amp;nbsp;related scripts.&lt;br /&gt;
&lt;pre class="brush: html"&gt;&amp;lt;link href='http://alexgorbatchev.com/pub/sh/&amp;lt;version&amp;gt;/styles/shCore.css' rel='stylesheet' type='text/css'/&amp;gt; 
&amp;lt;link href='http://alexgorbatchev.com/pub/sh/&amp;lt;version&amp;gt;/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/&amp;gt; 
&amp;lt;script src='http://alexgorbatchev.com/pub/sh/&amp;lt;version&amp;gt;/scripts/shCore.js' type='text/javascript'&amp;gt;&amp;lt;/script&amp;gt; 
&amp;lt;script src='http://alexgorbatchev.com/pub/sh/&amp;lt;version&amp;gt;/scripts/shAutoloader.js' type='text/javascript'&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;br /&gt;
3) Right before &lt;b&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/b&gt;, add this snippet so that autoloader works.&lt;br /&gt;
&lt;pre class="brush: html"&gt;&amp;lt;script language='javascript' type='text/javascript'&amp;gt;
function path() {
&amp;nbsp; var args = arguments, result = [];

&amp;nbsp; for(var i = 0; i &amp;amp;lt; args.length; i++)
&amp;nbsp; &amp;nbsp; &amp;nbsp; result.push(args[i].replace('@', 'http://alexgorbatchev.com/pub/sh/&amp;lt;version&amp;gt;/scripts/'));
&amp;nbsp; return result
};

SyntaxHighlighter.autoloader.apply(null, path(
&amp;nbsp; 'applescript &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@shBrushAppleScript.js',
&amp;nbsp; 'actionscript3 as3 &amp;nbsp; &amp;nbsp; &amp;nbsp;@shBrushAS3.js',
&amp;nbsp; 'bash shell &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @shBrushBash.js',
&amp;nbsp; 'coldfusion cf &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@shBrushColdFusion.js',
&amp;nbsp; 'cpp c &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@shBrushCpp.js',
&amp;nbsp; 'c# c-sharp csharp &amp;nbsp; &amp;nbsp; &amp;nbsp;@shBrushCSharp.js',
&amp;nbsp; 'css &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@shBrushCss.js',
&amp;nbsp; 'delphi pascal &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@shBrushDelphi.js',
&amp;nbsp; 'diff patch pas &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @shBrushDiff.js',
&amp;nbsp; 'erl erlang &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @shBrushErlang.js',
&amp;nbsp; 'groovy &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @shBrushGroovy.js',
&amp;nbsp; 'java &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @shBrushJava.js',
&amp;nbsp; 'jfx javafx &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @shBrushJavaFX.js',
&amp;nbsp; 'js jscript javascript &amp;nbsp;@shBrushJScript.js',
&amp;nbsp; 'perl pl &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@shBrushPerl.js',
&amp;nbsp; 'php &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@shBrushPhp.js',
&amp;nbsp; 'text plain &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @shBrushPlain.js',
&amp;nbsp; 'ps powershell &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@shBrushPowerShell.js',
&amp;nbsp; 'py python &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@shBrushPython.js',
&amp;nbsp; 'ruby rails ror rb &amp;nbsp; &amp;nbsp; &amp;nbsp;@shBrushRuby.js',
&amp;nbsp; 'sass scss &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@shBrushSass.js',
&amp;nbsp; 'scala &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@shBrushScala.js',
&amp;nbsp; 'sql &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@shBrushSql.js',
&amp;nbsp; 'vb vbnet &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @shBrushVb.js',
&amp;nbsp; 'xml xhtml xslt html &amp;nbsp; &amp;nbsp;@shBrushXml.js'
));

&amp;nbsp; SyntaxHighlighter.config.bloggerMode = true;
&amp;nbsp; SyntaxHighlighter.all();
&amp;lt;/script&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
4) Start adding code snippets with &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;pre&amp;gt;&lt;/span&gt; tags. Example:-&lt;br /&gt;
&lt;pre class="brush: html"&gt;&amp;lt;pre class="brush: js"&amp;gt;
alert('This is an example!');
&amp;lt;/pre&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
5) The result of the above code would be:-&lt;br /&gt;
&lt;pre class="brush: js"&gt;alert('This is an example!');
&lt;/pre&gt;
&lt;br /&gt;
That's it! You should now have syntax highlighting in your blog ;-)&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;p/s: You can also view the source of this blog to see what I have included here.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-6084584467058944284?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vP6NDsghvGt36q3i-4I14yRoECA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vP6NDsghvGt36q3i-4I14yRoECA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vP6NDsghvGt36q3i-4I14yRoECA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vP6NDsghvGt36q3i-4I14yRoECA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/6084584467058944284/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2011/08/syntax-highlighting-in-bloggerblogspot.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/6084584467058944284?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/6084584467058944284?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2011/08/syntax-highlighting-in-bloggerblogspot.html" title="Syntax Highlighting in Blogger/Blogspot" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DU8FSHkzeyp7ImA9WhdREkg.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-1781433627447641665</id><published>2011-07-29T15:50:00.003+08:00</published><updated>2011-08-02T12:03:39.783+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-02T12:03:39.783+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ugly characters" /><category scheme="http://www.blogger.com/atom/ns#" term="emacs" /><category scheme="http://www.blogger.com/atom/ns#" term="config" /><category scheme="http://www.blogger.com/atom/ns#" term="garbage" /><category scheme="http://www.blogger.com/atom/ns#" term="shell" /><category scheme="http://www.blogger.com/atom/ns#" term=".emacs" /><title>Fix ugly characters in emacs shell buffer</title><content type="html">After installing Emacs on a fresh installation of Ubuntu (maybe even other linux distros), I encountered this ugly-looking characters filling up my emacs shell buffer:-&lt;br /&gt;
&lt;pre class="brush: plain"&gt;khairie@khairi-ubuntu:~$ ls
^[[01;34mDesktop^[[0m   ^[[01;34mDownloads^[[0m  examples.desktop  ^[[01;34mPictures^[[0m  ^[[01;34mVideos^[[0m
^[[01;34mDocuments^[[0m  ^[[01;34mMusic^[[0m  ^[[01;34mPublic^[[0m    ^[[01;34mUbuntu One^[[0m     
khairie@khairi-ubuntu:~$ 
&lt;/pre&gt;This is caused by the coloring being enabled in Ubuntu shell. Referring to &lt;a href="http://www.joshstaiger.org/archives/2005/07/fixing_garbage.html" target="_blank"&gt;this post&lt;/a&gt;, you can actually turn on the coloring inside emacs as well. Type the following command in emacs.&lt;br /&gt;
&lt;pre class="brush: plain"&gt;M-x ansi-color-for-comint-mode-on
&lt;/pre&gt;Or even better, edit your &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;.emacs&lt;/span&gt; file, and add in the following line:-&lt;br /&gt;
&lt;pre class="brush: plain"&gt;(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
&lt;/pre&gt;That should fix it. Cheers ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-1781433627447641665?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ig0ep-zyH0PBDo5TTyKxSn5_brM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ig0ep-zyH0PBDo5TTyKxSn5_brM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ig0ep-zyH0PBDo5TTyKxSn5_brM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ig0ep-zyH0PBDo5TTyKxSn5_brM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/1781433627447641665/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2011/07/fix-ugly-characters-in-emacs-shell.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/1781433627447641665?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/1781433627447641665?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2011/07/fix-ugly-characters-in-emacs-shell.html" title="Fix ugly characters in emacs shell buffer" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUYNQnk-eSp7ImA9WhdSGEw.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-1096667520630087371</id><published>2011-07-28T09:39:00.000+08:00</published><updated>2011-07-28T09:39:53.751+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-28T09:39:53.751+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rants" /><title>Finished migrating to blogger...</title><content type="html">Yup, finally finished migrating all my posts to blogger.&lt;br /&gt;
&lt;br /&gt;
Why switch? Just because I don't have the time to maintain my own blogging platform. Drupal is good. Excellent in fact. But I just don't have the time to keep updating and upgrading them, especially when there are security releases (unless if I can get paid to do it :-p).&lt;br /&gt;
&lt;br /&gt;
Anyhow, hope I can continue blogging after taking a whole year 'timeout'. Hehe..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-1096667520630087371?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/HePtP0Nn7i2VOCDlhDKXnuyO4PU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HePtP0Nn7i2VOCDlhDKXnuyO4PU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/HePtP0Nn7i2VOCDlhDKXnuyO4PU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HePtP0Nn7i2VOCDlhDKXnuyO4PU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/1096667520630087371/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2011/07/finished-migrating-to-blogger.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/1096667520630087371?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/1096667520630087371?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2011/07/finished-migrating-to-blogger.html" title="Finished migrating to blogger..." /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUUARnc_eSp7ImA9WhdSF0o.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-1148746388041439625</id><published>2010-06-21T17:47:00.001+08:00</published><updated>2011-07-27T21:27:27.941+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-27T21:27:27.941+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="bash" /><category scheme="http://www.blogger.com/atom/ns#" term="unix" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="condition" /><category scheme="http://www.blogger.com/atom/ns#" term="scripting" /><title>Bash : Compound condition using &amp;&amp; (AND) and || (OR) operators</title><content type="html">To have compound conditions in bash using &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;amp;&amp;amp;&lt;/span&gt; or &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;||&lt;/span&gt;:-&lt;br /&gt;
&lt;pre class="brush:bash"&gt;if [ $VAR1 -eq 1 ] &amp;amp;&amp;amp; [ "$VAR2" == "true" ]
then
  # do something
fi

if [ "$VAR1" == "String 1" ] || [ "$VAR2" == "String 2" ]
then
  # do something
fi
&lt;/pre&gt;&lt;br /&gt;
Reference: &lt;a href="http://www.museum.state.il.us/ismdepts/library/linuxguides/abs-guide/ops.html#ANDOR" target="_blank"&gt;http://www.museum.state.il.us/ismdepts/library/linuxguides/abs-guide/ops.html#ANDOR&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-1148746388041439625?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/QOmn9lYbXDj_yta24-qkX8zMmIc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QOmn9lYbXDj_yta24-qkX8zMmIc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/QOmn9lYbXDj_yta24-qkX8zMmIc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QOmn9lYbXDj_yta24-qkX8zMmIc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/1148746388041439625/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2010/06/bash-compound-condition-using-and-and.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/1148746388041439625?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/1148746388041439625?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2010/06/bash-compound-condition-using-and-and.html" title="Bash : Compound condition using &amp;&amp; (AND) and || (OR) operators" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkYHQX8_cSp7ImA9WhdSF0o.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-3712034958580599354</id><published>2010-06-15T13:01:00.009+08:00</published><updated>2011-07-27T20:35:30.149+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-27T20:35:30.149+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="bash" /><category scheme="http://www.blogger.com/atom/ns#" term="unix" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="string" /><category scheme="http://www.blogger.com/atom/ns#" term="shell" /><category scheme="http://www.blogger.com/atom/ns#" term="scripting" /><title>Bash : Compare Strings With Spaces</title><content type="html">To compare two strings that contain spaces in bash, enclose them with a double quote (e.g.  &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;"$VAR"&lt;/span&gt; ). Example below:-&lt;br /&gt;
&lt;pre class="brush:shell"&gt;if [ "$VAR" == "this is a string with spaces" ]
then
  # do something
fi
&lt;/pre&gt;Reference: &lt;a href="http://hacktux.com/bash/string" target="_blank"&gt;http://hacktux.com/bash/string&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-3712034958580599354?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/hfcU6P6ti3YKGity0I30dIywLss/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hfcU6P6ti3YKGity0I30dIywLss/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/hfcU6P6ti3YKGity0I30dIywLss/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hfcU6P6ti3YKGity0I30dIywLss/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/3712034958580599354/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2010/06/bash-compare-strings-with-spaces.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/3712034958580599354?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/3712034958580599354?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2010/06/bash-compare-strings-with-spaces.html" title="Bash : Compare Strings With Spaces" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUcGRnk9fSp7ImA9WhdSF0s.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-4912914886455018732</id><published>2010-03-02T01:06:00.003+08:00</published><updated>2011-07-27T19:43:47.765+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-27T19:43:47.765+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tar" /><category scheme="http://www.blogger.com/atom/ns#" term="exclude" /><category scheme="http://www.blogger.com/atom/ns#" term="archive" /><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="compress" /><category scheme="http://www.blogger.com/atom/ns#" term="command" /><title>Exclude files/directories when using linux tar command</title><content type="html">To exclude files/folders when archiving using tar in linux, use the following command:-&lt;br /&gt;
&lt;pre class="brush:shell"&gt;tar -czvf filename.tar.gz --exclude 'path1/*' --exclude 'path2/*' --exclude 'path3/*' folder_or_files_to_be_archived
&lt;/pre&gt;References:-&lt;br /&gt;
&lt;a href="http://www.wallpaperama.com/forums/how-to-exclude-a-directory-in-a-tar-linux-command-t6486.html" target="_blank"&gt;http://www.wallpaperama.com/forums/how-to-exclude-a-directory-in-a-tar-linux-command-t6486.html&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.cyberciti.biz/faq/exclude-certain-files-when-creating-a-tarball-using-tar-command/" target="_blank"&gt;http://www.cyberciti.biz/faq/exclude-certain-files-when-creating-a-tarball-using-tar-command/&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.linuxtopia.org/online_books/linux_tool_guides/tar_user_guide/problems-with-exclude.html" target="_blank"&gt;http://www.linuxtopia.org/online_books/linux_tool_guides/tar_user_guide/problems-with-exclude.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-4912914886455018732?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/E96p5m7PxOSBDwsHyvyT92pcj2I/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/E96p5m7PxOSBDwsHyvyT92pcj2I/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/E96p5m7PxOSBDwsHyvyT92pcj2I/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/E96p5m7PxOSBDwsHyvyT92pcj2I/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/4912914886455018732/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2010/03/exclude-filesdirectories-when-using.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/4912914886455018732?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/4912914886455018732?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2010/03/exclude-filesdirectories-when-using.html" title="Exclude files/directories when using linux tar command" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEABSXc9fSp7ImA9WhdSF0s.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-5967587519270092318</id><published>2010-02-25T23:15:00.020+08:00</published><updated>2011-07-27T19:39:18.965+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-27T19:39:18.965+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="tech" /><category scheme="http://www.blogger.com/atom/ns#" term="log4j" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="tomcat" /><title>Configure multiple log4j instances in different contexts</title><content type="html">&lt;b&gt;The problem:&lt;/b&gt;&lt;br /&gt;
We needed to use different &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;log4j.properties&lt;/span&gt; file for each context.&lt;br /&gt;
&lt;br /&gt;
We have one library (&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;directory.jar&lt;/span&gt;) which resides in tomcat's shared lib that uses log4j. We also have three contexts (core, admin &amp;amp; user contexts) that will be using log4j for logging too.&lt;br /&gt;
&lt;br /&gt;
Initially, we put the log4j library in tomcat's shared lib, and specify &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;log4j.properties&lt;/span&gt; for each context's &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;web.xml&lt;/span&gt;. But we found out that only one context is able to initialize the log4j properly. The other two contexts doesn't seem to be able to use log4j properly.&lt;br /&gt;
&lt;br /&gt;
After googling around for quite some time, I found out &lt;a href="http://devgrok.blogspot.com/2009/07/multiple-log4j-instances-in-webapp.html" target="_blank"&gt;this post&lt;/a&gt; that suggests a fix for my problem. It uses &lt;a href="http://code.google.com/p/log4j-contrib/" target="_blank"&gt;log4j-contrib&lt;/a&gt; so that log4j can properly select the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;log4j.properties&lt;/span&gt; file based on it's own context.&lt;br /&gt;
&lt;br /&gt;
So, here's the quick run-down on how to do it:-&lt;br /&gt;
&lt;br /&gt;
1) Place &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;log4j.jar&lt;/span&gt; in tomcat's shared lib.&lt;br /&gt;
2) Download &lt;a href="http://code.google.com/p/log4j-contrib/" target="_blank"&gt;log4j-contrib&lt;/a&gt; and place it in tomcat's shared lib as well.&lt;br /&gt;
3) For each context that needed to use log4j, edit their &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;web.xml&lt;/span&gt; and add the following entries as first entry of their appropriate sections. First, add this &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;context-param&lt;/span&gt; entry:-&lt;br /&gt;
&lt;pre class="brush:xml"&gt;&amp;lt;context-param&amp;gt;
&amp;nbsp; &amp;nbsp;&amp;lt;param-name&amp;gt;log4jConfigLocations&amp;lt;/param-name&amp;gt;
&amp;nbsp; &amp;nbsp;&amp;lt;param-value&amp;gt;log4j.properties&amp;lt;/param-value&amp;gt;
&amp;lt;/context-param&amp;gt;
&lt;/pre&gt;Then, add the listener (make it the first listener):-&lt;br /&gt;
&lt;pre class="brush:xml"&gt;&amp;lt;listener&amp;gt;
&amp;nbsp; &amp;nbsp;&amp;lt;listener-class&amp;gt;com.mathieucarbou.log4j.web.ContextLoggingListener&amp;lt;/listener-class&amp;gt;
&amp;lt;/listener&amp;gt;
&lt;/pre&gt;4) Edit the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;log4j.properties&lt;/span&gt; for each context as you wish. They should be under &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/WEB-INF/classes/log4j.properties&lt;/span&gt; for each context.&lt;br /&gt;
&lt;br /&gt;
Walla! Now log4j is working happily like it should =)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-5967587519270092318?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vHjZ_vQ97JUwgjdX0brEbQ-lUro/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vHjZ_vQ97JUwgjdX0brEbQ-lUro/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vHjZ_vQ97JUwgjdX0brEbQ-lUro/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vHjZ_vQ97JUwgjdX0brEbQ-lUro/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/5967587519270092318/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2010/02/configure-multiple-log4j-instances-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/5967587519270092318?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/5967587519270092318?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2010/02/configure-multiple-log4j-instances-in.html" title="Configure multiple log4j instances in different contexts" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0ECSXw6eyp7ImA9WhdSF0o.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-4327166829099111837</id><published>2009-09-29T16:29:00.010+08:00</published><updated>2011-07-27T22:07:48.213+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-27T22:07:48.213+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="page not found" /><category scheme="http://www.blogger.com/atom/ns#" term="drupal" /><category scheme="http://www.blogger.com/atom/ns#" term="404" /><category scheme="http://www.blogger.com/atom/ns#" term="subdomain" /><title>Drupal Blog Page Not Found</title><content type="html">If you have the problem of not being able to see the Blog Module page after enabling it, and you are using Clean URL for your site, then it's *probably* because you have accidentally created a subdomain with the name 'blog' (e.g. &lt;a href="http://blog.example.com/"&gt;http://blog.example.com&lt;/a&gt;), or you have a subdirectory named 'blog' on your website's root folder (www, htdocs or public_html). You should be able to see Drupal's Blog Module after you remove the subdomain / subdirectory with that same name.&lt;br /&gt;
&lt;br /&gt;
The reason you cannot view the Blog Module at your website's URL (e.g. &lt;a href="http://www.example.com/blog"&gt;http://www.example.com/blog&lt;/a&gt;) when you have a subdomain / subdirectory with the same name is because when using Clean URL, Drupal rewrites the Blog Module address (&lt;a href="http://www.example.com/?q=blog"&gt;http://www.example.com/?q=blog&lt;/a&gt; to &lt;a href="http://www.example.com/blog"&gt;http://www.example.com/blog&lt;/a&gt;) using &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;.htaccess&lt;/span&gt; file. This causes confusion on the webserver, because when we try to access &lt;a href="http://www.example.com/blog"&gt;http://www.example.com/blog&lt;/a&gt;, it doesn't know which URL it is suppose to display. It could be the URL that Drupal has rewritten, or it could also be the subdirectory that you have in your web root folder.&lt;br /&gt;
&lt;br /&gt;
The same concept also apply with all the URL Aliases that you have created with your Drupal. Make sure you don't have a folder with the same name as your aliases, or else you will get a Page Not Found error.&lt;br /&gt;
&lt;br /&gt;
Hope this helps&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-4327166829099111837?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1S2nPq4UERiQnajX8j2ToaIy2S4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1S2nPq4UERiQnajX8j2ToaIy2S4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1S2nPq4UERiQnajX8j2ToaIy2S4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1S2nPq4UERiQnajX8j2ToaIy2S4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/4327166829099111837/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2009/09/drupal-blog-page-not-found.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/4327166829099111837?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/4327166829099111837?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2009/09/drupal-blog-page-not-found.html" title="Drupal Blog Page Not Found" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEYBQ3w7fSp7ImA9WhdSF0s.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-4563072409693585800</id><published>2009-08-15T16:16:00.017+08:00</published><updated>2011-07-27T19:29:12.205+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-27T19:29:12.205+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="vhost" /><category scheme="http://www.blogger.com/atom/ns#" term="virtual host" /><category scheme="http://www.blogger.com/atom/ns#" term="xampp" /><category scheme="http://www.blogger.com/atom/ns#" term="apache" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>XAMPP Virtual Hosts in Ubuntu</title><content type="html">Quick HOWTO to enable Virtual Hosts with XAMPP on Ubuntu (or any *nix distribution).&lt;br /&gt;
&lt;pre class="brush:shell"&gt;sudo gedit /opt/lampp/etc/httpd.conf
&lt;/pre&gt;Uncomment the line below (it should be towards the end of the file):&lt;br /&gt;
&lt;pre class="brush:plain"&gt;Include etc/extra/httpd-vhosts.conf
&lt;/pre&gt;Save &amp;amp; Close the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;httpd.conf&lt;/span&gt; file.&lt;br /&gt;
&lt;pre class="brush:shell"&gt;sudo gedit /opt/lampp/etc/extra/httpd-vhosts.conf
&lt;/pre&gt;Make sure the line below is uncommented:&lt;br /&gt;
&lt;pre class="brush:plain"&gt;NameVirtualHost *:80
&lt;/pre&gt;Add/Edit the following piece of code:&lt;br /&gt;
&lt;pre class="brush:plain"&gt;&amp;lt;VirtualHost *:80&amp;gt;
&amp;nbsp; &amp;nbsp; ServerAdmin admin@localhost
&amp;nbsp; &amp;nbsp; DocumentRoot /path/to/vhosts/folder/site.local
&amp;nbsp; &amp;nbsp; ServerName site.local
&amp;nbsp; &amp;nbsp; ErrorLog /path/to/vhosts/logs/site.local-error_log
&amp;nbsp; &amp;nbsp; CustomLog /path/to/vhosts/logs/site.local-access_log common
&amp;lt;/VirtualHost&amp;gt;
&lt;/pre&gt;Save &amp;amp; Close the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;httpd-vhosts.conf&lt;/span&gt; file.&lt;br /&gt;
&lt;pre class="brush:shell"&gt;sudo gedit /etc/hosts
&lt;/pre&gt;Add the following line to the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;hosts&lt;/span&gt; file:&lt;br /&gt;
&lt;pre class="brush:plain"&gt;127.0.0.1 site.local
&lt;/pre&gt;Save &amp;amp; Close the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;hosts&lt;/span&gt; file.&lt;br /&gt;
&lt;pre class="brush:shell"&gt;sudo /opt/lampp/lampp restart
&lt;/pre&gt;Open up web browser, and go to &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;http://site.local&lt;/span&gt; to see if it's working.&lt;br /&gt;
&lt;br /&gt;
Cheers.&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
&lt;a href="http://www.dimitritaghon.be/2008/07/xampp-and-virtual-hosts/" target="_blank"&gt;http://www.dimitritaghon.be/2008/07/xampp-and-virtual-hosts/&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://mintarticles.com/read/articles_about_software/multiple_virtual_hosts_in_xampplampp_in_ubuntu,977/" target="_blank"&gt;http://mintarticles.com/read/articles_about_software/multiple_virtual_hosts_in_xampplampp_in_ubuntu,977/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-4563072409693585800?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BWm8rOurF5f0cdNg7wwqEgo888w/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BWm8rOurF5f0cdNg7wwqEgo888w/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/BWm8rOurF5f0cdNg7wwqEgo888w/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BWm8rOurF5f0cdNg7wwqEgo888w/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/4563072409693585800/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2009/08/xampp-virtual-hosts-in-ubuntu.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/4563072409693585800?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/4563072409693585800?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2009/08/xampp-virtual-hosts-in-ubuntu.html" title="XAMPP Virtual Hosts in Ubuntu" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0AHRX0-fCp7ImA9WhdSF0s.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-1417668847385810436</id><published>2009-06-03T09:07:00.006+08:00</published><updated>2011-07-27T19:22:14.354+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-27T19:22:14.354+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="format" /><category scheme="http://www.blogger.com/atom/ns#" term="thumb drive" /><category scheme="http://www.blogger.com/atom/ns#" term="ntfs" /><category scheme="http://www.blogger.com/atom/ns#" term="windows registry" /><category scheme="http://www.blogger.com/atom/ns#" term="usb drive" /><title>Format USB Thumb drive with NTFS filesystem</title><content type="html">In Windows, we all know that we can't format our thumb drive to NTFS by default. There are no options for NTFS when we're trying to format our thumb drive. But that doesn't mean that we can't have NTFS filesystem on our thumb drive. All we have to do is use the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Convert&lt;/span&gt; utility to change the thumb drive's filesystem to NTFS. Here's how:&lt;br /&gt;
&lt;br /&gt;
1) Open your Command Prompt&lt;br /&gt;
2) Assuming the drive for your thumb drive is "X", type the following line in command prompt:-&lt;br /&gt;
&lt;pre class="brush:powershell"&gt;CONVERT X: /fs:ntfs
&lt;/pre&gt;That's all to it. You don't even have to format your thumb drive to have an NTFS filesystem on it. Your data will still remains even after converting to NTFS. Note that this is a one way process, you will NOT be able to convert back to FAT32 once you have convert your thumb drive to NTFS. If you want to go back to FAT32, you will have to format your thumb drive (make sure you back up all your data first).&lt;br /&gt;
&lt;br /&gt;
Have fun!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;Note: I will NOT be responsible if something goes wrong with your thumb drive, or your Windows for that matter. This post is for reference only.&lt;/span&gt;&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-1417668847385810436?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_fykbdaFAzfiVYJKcuoUULB_Snk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_fykbdaFAzfiVYJKcuoUULB_Snk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_fykbdaFAzfiVYJKcuoUULB_Snk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_fykbdaFAzfiVYJKcuoUULB_Snk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/1417668847385810436/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2009/06/format-usb-thumb-drive-with-ntfs.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/1417668847385810436?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/1417668847385810436?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2009/06/format-usb-thumb-drive-with-ntfs.html" title="Format USB Thumb drive with NTFS filesystem" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0QFQXc7cSp7ImA9WhdSF0s.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-5663222906335224884</id><published>2009-05-22T15:38:00.018+08:00</published><updated>2011-07-27T19:15:10.909+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-27T19:15:10.909+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term=".net" /><category scheme="http://www.blogger.com/atom/ns#" term="asp.net" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="web" /><category scheme="http://www.blogger.com/atom/ns#" term="microsoft" /><title>ASP.NET Client-side Validation &amp; Confirmation Popup</title><content type="html">The other day I was working on a project for our client. They wanted some client-side validation to be done on the page to avoid postbacks, since postbacks could take REALLY long on a slow connection. They also wanted a javascript confirmation popup before processing the form.&lt;br /&gt;
&lt;br /&gt;
In the page, I had a few &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;RequiredFieldValidators&lt;/span&gt;, as well as some &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;RegularExpressionValidators&lt;/span&gt;. Initially, I modified the submit button to include the confirmation message, and check whether the page is valid or not. Below is a snippet of the ASP.NET button that I had in my page.&lt;br /&gt;
&lt;pre class="brush:xml"&gt;&amp;lt;asp:button text="Submit" onclientclick="return (Page_IsValid &amp;amp;&amp;amp; confirm('Are you sure?'));" onclick="Button1_Click" runat="server" id="Button1"&amp;gt;&amp;lt;/asp:button&amp;gt;
&lt;/pre&gt;Note: &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Page_IsValid&lt;/span&gt; is the client-side version of &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Page.IsValid&lt;/span&gt; that we are used to in codebehind.&lt;br /&gt;
&lt;br /&gt;
Now, here's the problem I was facing the other day. After the page had loaded successfully, I immediately clicked on the submit button to test the validation on the page. Supposedly, error messages should be displayed because the form was not completed, and I have &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;RequiredFieldValidators&lt;/span&gt; and &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;RegularExpressionValidators&lt;/span&gt; all over the page. But instead, the javascript confirmation popped up. After I clicked OK, then only the error messages came out. Subsequent clicks on the Submit button did not pop up the confirmation message anymore.&lt;br /&gt;
&lt;br /&gt;
From my observation, it seems that &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Page_IsValid&lt;/span&gt; is returning true the first time the page loads, and holds true until we click the submit button the first time. This means that the client-side validation is only being done after our javascript snippet that we have in the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;OnClientClick&lt;/span&gt; event.&lt;br /&gt;
&lt;br /&gt;
A few Google searches showed me that I have to manually call a javascript function &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Page_ClientValidate()&lt;/span&gt; to validate the form. This function is included with the .NET Framework. By calling this function, it will force to update the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Page_IsValid&lt;/span&gt; variable. The working code in my aspx now is:&lt;br /&gt;
&lt;pre class="brush:xml"&gt;&amp;lt;asp:button text="Submit" onclientclick="Page_ClientValidate(); return (Page_IsValid &amp;amp;&amp;amp; confirm('Are you sure?'));" onclick="Button1_Click" runat="server" id="Button1"&amp;gt;&amp;lt;/asp:button&amp;gt;
&lt;/pre&gt;Hope that helps someone out there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-5663222906335224884?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KI4ga5qNoIgxES5M_C4XUZTgAF0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KI4ga5qNoIgxES5M_C4XUZTgAF0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KI4ga5qNoIgxES5M_C4XUZTgAF0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KI4ga5qNoIgxES5M_C4XUZTgAF0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/5663222906335224884/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2009/05/aspnet-client-side-validation.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/5663222906335224884?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/5663222906335224884?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2009/05/aspnet-client-side-validation.html" title="ASP.NET Client-side Validation &amp; Confirmation Popup" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkIGQ3oyfip7ImA9WhdVF0s.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-1684168942558367300</id><published>2009-04-10T13:01:00.000+08:00</published><updated>2011-09-23T14:48:42.496+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-23T14:48:42.496+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="vb.net" /><category scheme="http://www.blogger.com/atom/ns#" term=".net" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="c#" /><title>VB.NET vs C# : The Differences</title><content type="html">For those who are switching from VB.Net to C#, or just switching between the two of them back and forth (that's what I do at work LOL. Had to know both of them 'coz some of our projects are in VB.Net, but we're in the transition to move to C# with new projects), here's a basic summary of the differences between the two languages that you need to know. Note that this list is far from complete, but they will definitely useful for basic operations at the very least. This list was given to me a long time ago by one of my lecturer.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note&lt;/b&gt;: You can scroll the table below left-right to be able to fully view them.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="overflow: auto; word-wrap: normal;"&gt;
&lt;table border="1" style="width: 650px;"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Features&lt;/th&gt;
&lt;th&gt;VB.NET&lt;/th&gt;
&lt;th&gt;C#&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Case Sensitivity&lt;/td&gt;
&lt;td&gt;Not case-sensitive. Example:&lt;br /&gt;
&lt;pre class="brush: vbnet"&gt;response.write("Hello") ' OK&lt;/pre&gt;
&lt;/td&gt;
&lt;td&gt;Case-sensitive. Example:&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;response.write("Hello"); // Error
Response.Write("Hello"); // OK&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Functional Blocks&lt;/td&gt;
&lt;td&gt;Use beginning and ending statements to declare functional blocks of code. Example:
&lt;br /&gt;
&lt;pre class="brush: vbnet"&gt;Sub Show(ByVal str As String)
  Response.Write(str)
End Sub&lt;/pre&gt;
&lt;/td&gt;
&lt;td&gt;Use curly braces to declare functional blocks
of code. Example:
&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;void Show(string str) {
  Response.Write(str);
}&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Type Conversion&lt;/td&gt;
&lt;td&gt;Implicit type conversions are permitted by default. Example:
&lt;br /&gt;
&lt;pre class="brush: vbnet"&gt;Dim x As Integer
x = 3.15 ' OK&lt;/pre&gt;
&lt;/td&gt;
&lt;td&gt;Implicit type conversions are limited to operation that are guaranteed not to lose information, such as converting from int to float. Example:
&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;int x = 0;
float y = x; // OK&lt;/pre&gt;
Other type conversions are performed explicitly by casting. Example:
&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;float y = 3.14;
int x = (int)y; // Cast OK&lt;/pre&gt;
or by using type conversion methods. Example:
&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;string z = y.ToString();&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Comments&lt;/td&gt;
&lt;td&gt;Always start with an apostrophe (').
Example:
&lt;br /&gt;
&lt;pre class="brush: vbnet"&gt;' This is a comment&lt;/pre&gt;
&lt;/td&gt;
&lt;td&gt;Three types:
1) Block comment. Example:&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;/* This is a comment. */&lt;/pre&gt;
2) Inline comment. Example:&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;// This is a comment.&lt;/pre&gt;
3) Documentation. Example:&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;/// &lt;summary&gt;
/// This is a comment.
/// &lt;/summary&gt;&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Arrays&lt;/td&gt;
&lt;td&gt;Array elements are specified using
parentheses. Example:&lt;br /&gt;
&lt;pre class="brush: vbnet"&gt;arrFruit(0) = "Apple"&lt;/pre&gt;
&lt;/td&gt;
&lt;td&gt;Array elements are specified using square
brackets. Example:&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;arrFruit[0] = "Apple";&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Methods&lt;/td&gt;
&lt;td&gt;You can omit parenthesis after method names if arguments are omitted. Example:&lt;br /&gt;
&lt;pre class="brush: vbnet"&gt;str = objX.ToString&lt;/pre&gt;
&lt;/td&gt;
&lt;td&gt;You must include parenthesis after all methods. Example:&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;str = objX.ToString();&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Statement Termination&lt;/td&gt;
&lt;td&gt;Terminated by using carriage return. Example:&lt;br /&gt;
&lt;pre class="brush: vbnet"&gt;Response.Write("Hello")&lt;/pre&gt;
&lt;/td&gt;
&lt;td&gt;Terminated by a semicolon(;). Example:&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;Response.Write("Hello");&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Statement Continuation&lt;/td&gt;
&lt;td&gt;Continued using underscore (_). Example:&lt;br /&gt;
&lt;pre class="brush: vbnet"&gt;int x = System.Math.PI * _
intRadius
&lt;/pre&gt;
&lt;/td&gt;
&lt;td&gt;Continued until semicolon (;), and can span multiple lines if needed. Example:&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;int x = System.Math.PI *
intRadius;&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;String Operator&lt;/td&gt;
&lt;td&gt;Use the ampersand (&amp;amp;) or plus (+) to join strings. Example:&lt;br /&gt;
&lt;pre class="brush: vbnet"&gt;strFruit = "Apples " &amp;amp; _
"Oranges"&lt;/pre&gt;
&lt;/td&gt;
&lt;td&gt;Use plus (+) sign to join strings. Example:&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;strFruit = "Apples " +
"Oranges";&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Comparison Operators&lt;/td&gt;
&lt;td&gt;Use =, &amp;gt;, &amp;lt;, &amp;gt;=, &amp;lt;=, &amp;lt;&amp;gt; to compare values. Example:&lt;br /&gt;
&lt;pre class="brush: vbnet"&gt;If intX &amp;gt;= 5 Then&lt;/pre&gt;
&lt;/td&gt;
&lt;td&gt;Use ==, &amp;gt;, &amp;lt;, &amp;gt;=, &amp;lt;=, != to compare values. Example:&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;if (intX &amp;gt;= 5)&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Negation&lt;/td&gt;
&lt;td&gt;Use the Not keyword to express logical
negation. Example:&lt;br /&gt;
&lt;pre class="brush: vbnet"&gt;If Not IsPostBack Then&lt;/pre&gt;
&lt;/td&gt;
&lt;td&gt;Use the ! operator. Example:&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;if (!IsPostBack)&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Object Comparison&lt;/td&gt;
&lt;td&gt;Use the Is keyword to compare object variables. Example:&lt;br /&gt;
&lt;pre class="brush: vbnet"&gt;If objX Is objY Then&lt;/pre&gt;
&lt;/td&gt;
&lt;td&gt;Use == to compare object variables. Example:
&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;if (objX == objY)&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Object Existence&lt;/td&gt;
&lt;td&gt;Use the Nothing keyword or the IsNothing() function to check whether an object exists. Example:&lt;br /&gt;
&lt;pre class="brush: vbnet"&gt;If IsNothing(objX) Then&lt;/pre&gt;
&lt;/td&gt;
&lt;td&gt;Use the null keyword to check whether an object exists. Example:&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;if (objX == null)&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-1684168942558367300?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/yNEz0F2aGAsNFrgf-cW9GpOLnf4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yNEz0F2aGAsNFrgf-cW9GpOLnf4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/yNEz0F2aGAsNFrgf-cW9GpOLnf4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yNEz0F2aGAsNFrgf-cW9GpOLnf4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/1684168942558367300/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2009/04/vbnet-vs-c-differences.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/1684168942558367300?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/1684168942558367300?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2009/04/vbnet-vs-c-differences.html" title="VB.NET vs C# : The Differences" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEENRXg6fip7ImA9WhdVF0g.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-9070636785259908623</id><published>2009-03-17T12:27:00.000+08:00</published><updated>2011-09-23T12:38:14.616+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-23T12:38:14.616+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".net" /><category scheme="http://www.blogger.com/atom/ns#" term="tech" /><category scheme="http://www.blogger.com/atom/ns#" term="xml" /><category scheme="http://www.blogger.com/atom/ns#" term="it" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="c#" /><category scheme="http://www.blogger.com/atom/ns#" term="xmlnode" /><category scheme="http://www.blogger.com/atom/ns#" term="microsoft" /><category scheme="http://www.blogger.com/atom/ns#" term="xmldocument" /><title>How to remove/delete XmlNode from an XmlDocument in C#</title><content type="html">&lt;br /&gt;
Suppose we have an XML like below:-&lt;br /&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;parent&amp;gt;
&amp;nbsp; &amp;lt;children&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;childnode1&amp;gt;some text 1&amp;lt;/childnode1&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;childnode2&amp;gt;some text 2&amp;lt;/childnode2&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;childnode3&amp;gt;some text 3&amp;lt;/childnode3&amp;gt;
&amp;nbsp; &amp;lt;/children&amp;gt;
&amp;nbsp; &amp;lt;children&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;childnode1&amp;gt;some text 1&amp;lt;/childnode1&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;childnode2&amp;gt;some text 2&amp;lt;/childnode2&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;childnode3&amp;gt;some text 3&amp;lt;/childnode3&amp;gt;
&amp;nbsp; &amp;lt;/children&amp;gt;
&amp;nbsp; &amp;lt;children&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;childnode1&amp;gt;some text 1&amp;lt;/childnode1&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;childnode2&amp;gt;some text 2&amp;lt;/childnode2&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;childnode3&amp;gt;some text 3&amp;lt;/childnode3&amp;gt;
&amp;nbsp; &amp;lt;/children&amp;gt;
&amp;lt;/parent&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
Now, for some reason (whatever the reason is), we want our application to remove the node childnode3 from all&amp;nbsp;children nodes. Here’s one method to accomplish this task:-
&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;XmlNode nodeList = xmldoc.SelectSingleNode("//parent");

foreach (XmlNode node in nodeList) {
  XmlNode tempNode = node.SelectSingleNode(”//children/childnode3″);

  if (tempNode != null)
    tempNode.ParentNode.RemoveChild(tempNode);
}
&lt;/pre&gt;
&lt;br /&gt;
The resulting XML would be like this:&lt;br /&gt;
&lt;pre class="brush: xml"&gt;&amp;lt;parent&amp;gt;
  &amp;lt;children&amp;gt;
    &amp;lt;childnode1&amp;gt;some text 1&amp;lt;/childnode1&amp;gt;
    &amp;lt;childnode2&amp;gt;some text 2&amp;lt;/childnode2&amp;gt;
  &amp;lt;/children&amp;gt;
  &amp;lt;children&amp;gt;
    &amp;lt;childnode1&amp;gt;some text 1&amp;lt;/childnode1&amp;gt;
    &amp;lt;childnode2&amp;gt;some text 2&amp;lt;/childnode2&amp;gt;
  &amp;lt;/children&amp;gt;
  &amp;lt;children&amp;gt;
    &amp;lt;childnode1&amp;gt;some text 1&amp;lt;/childnode1&amp;gt;
    &amp;lt;childnode2&amp;gt;some text 2&amp;lt;/childnode2&amp;gt;
  &amp;lt;/children&amp;gt;
&amp;lt;/parent&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
Reference: &lt;a href="http://channel9.msdn.com/forums/TechOff/77233-Deleting-an-XML-node-in-C/?CommentID=77236" target="_blank"&gt;http://channel9.msdn.com/forums/TechOff/77233-Deleting-an-XML-node-in-C/?CommentID=77236&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-9070636785259908623?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5Rs9XmfD2Qejj5D_po0SnALFIzA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5Rs9XmfD2Qejj5D_po0SnALFIzA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5Rs9XmfD2Qejj5D_po0SnALFIzA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5Rs9XmfD2Qejj5D_po0SnALFIzA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/9070636785259908623/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2009/03/how-to-removedelete-xmlnode-from.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/9070636785259908623?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/9070636785259908623?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2009/03/how-to-removedelete-xmlnode-from.html" title="How to remove/delete XmlNode from an XmlDocument in C#" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUAERX0yfCp7ImA9WhdVF0g.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-2855321938257949560</id><published>2009-03-16T12:52:00.000+08:00</published><updated>2011-09-23T12:55:04.394+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-23T12:55:04.394+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="footer" /><category scheme="http://www.blogger.com/atom/ns#" term=".net" /><category scheme="http://www.blogger.com/atom/ns#" term="tech" /><category scheme="http://www.blogger.com/atom/ns#" term="asp.net" /><category scheme="http://www.blogger.com/atom/ns#" term="it" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="header" /><category scheme="http://www.blogger.com/atom/ns#" term="c#" /><category scheme="http://www.blogger.com/atom/ns#" term="repeater" /><title>How to find controls in Repeater header/footer template in C#</title><content type="html">Here's one method to find controls in Repeater header/footer template in ASP.NET. The codes below are in C#.&lt;br /&gt;
&lt;br /&gt;
To find a control in Repeater header template:-&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;Literal litControl = (Literal)repeater1.Controls[0].Controls[0].FindControl("litControl");
&lt;/pre&gt;
&lt;br /&gt;
To find a control in Repeater footer template:-&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;Literal litControl = (Literal)repeater1.Controls[repeater1.Controls.Count - 1].Controls[0].FindControl("litControl");

&lt;/pre&gt;
&lt;br /&gt;
Reference: &lt;a href="http://forums.asp.net/t/1193229.aspx#2494827" target="_blank"&gt;http://forums.asp.net/t/1193229.aspx#2494827&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-2855321938257949560?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8jVALoyJ6WWIZxITEDqt81DEJvY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8jVALoyJ6WWIZxITEDqt81DEJvY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8jVALoyJ6WWIZxITEDqt81DEJvY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8jVALoyJ6WWIZxITEDqt81DEJvY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/2855321938257949560/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2009/03/how-to-find-controls-in-repeater.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/2855321938257949560?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/2855321938257949560?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2009/03/how-to-find-controls-in-repeater.html" title="How to find controls in Repeater header/footer template in C#" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUQMRXk5fyp7ImA9WhdVF0g.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-4942338983323995767</id><published>2009-01-13T12:45:00.000+08:00</published><updated>2011-09-23T12:49:44.727+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-23T12:49:44.727+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="policy management" /><category scheme="http://www.blogger.com/atom/ns#" term="visual studio .net 2003" /><category scheme="http://www.blogger.com/atom/ns#" term="vbproj" /><category scheme="http://www.blogger.com/atom/ns#" term=".net" /><category scheme="http://www.blogger.com/atom/ns#" term="tech" /><category scheme="http://www.blogger.com/atom/ns#" term="it" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="c#" /><category scheme="http://www.blogger.com/atom/ns#" term="visual basic" /><category scheme="http://www.blogger.com/atom/ns#" term="microsoft" /><category scheme="http://www.blogger.com/atom/ns#" term="csproj" /><title>vbproj / csproj requires Policy Management</title><content type="html">&lt;br /&gt;
Last Friday, my colleague was having this problem opening our VB Project at client’s site. We brought the source code from our development server in the office. The error message says:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: plain"&gt;The project 'http://localhost/myproj.vbproj‘ requires Policy Management. Open this project in Visual Studio .NET Enterprise Developer or Visual Studio.NET Enterprise Architect.
&lt;/pre&gt;
&lt;br /&gt;
Googling gave us so many method of trying to solve this issue. Some even say that we can’t open a project that was created using Visual Studio.NET Enterprise Edition from a Visual Studio.NET Standard Edition. But I think that's not entirely true. Here’s what I did to be able to re-open our project:-&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: plain"&gt;1) Make a backup of your myproj.vbproj (or myproj.csproj if it's a C# Project).
2) Open myproj.vbproj in Notepad (or any of your favourite text editor).
3) Remove the line with "OwnerKey".
4) Save that myproj.vbproj, and try to open it in Visual Studio.NET again.
&lt;/pre&gt;
&lt;br /&gt;
Hope that helps.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-4942338983323995767?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5F2MfZ97d5T1aEGELLvDYVpOHqs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5F2MfZ97d5T1aEGELLvDYVpOHqs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5F2MfZ97d5T1aEGELLvDYVpOHqs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5F2MfZ97d5T1aEGELLvDYVpOHqs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/4942338983323995767/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2009/01/vbproj-csproj-requires-policy.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/4942338983323995767?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/4942338983323995767?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2009/01/vbproj-csproj-requires-policy.html" title="vbproj / csproj requires Policy Management" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0IAQX89cSp7ImA9WhdSF0g.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-1918433724810418613</id><published>2008-12-28T14:09:00.035+08:00</published><updated>2011-07-27T17:39:00.169+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-27T17:39:00.169+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="web.config" /><category scheme="http://www.blogger.com/atom/ns#" term="windows server 2008" /><category scheme="http://www.blogger.com/atom/ns#" term="requestLimits" /><category scheme="http://www.blogger.com/atom/ns#" term="iis7" /><category scheme="http://www.blogger.com/atom/ns#" term=".net" /><category scheme="http://www.blogger.com/atom/ns#" term="tech" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="internet information services" /><title>Request Filtering module is configured to deny a request that exceeds request content length</title><content type="html">It's been a while since I last wrote on this blog. Been busy with work + real life. Anyway, here's what I encountered a couple of days ago.&lt;br /&gt;
&lt;br /&gt;
We were working on a module that would allow users to upload files to the server (the file is stored in SQL Server as &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;VARBINARY&lt;/span&gt;). The maximum allowed file size to be uploaded was made configurable through &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;web.config&lt;/span&gt; file. We set those to be 50mb. When we tried to upload a 36mb file, IIS7 gave us this error:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Xvf6Su_hblk/Ti_YvX_S-KI/AAAAAAAABmc/XDj7vAGzrys/s1600/requestlimits.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-Xvf6Su_hblk/Ti_YvX_S-KI/AAAAAAAABmc/XDj7vAGzrys/s640/requestlimits.jpg" width="580" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Most google search results says that we have to add the following entry to our &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;web.config&lt;/span&gt; file (the value for &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;maxAllowedContentLength&lt;/span&gt; could be different from below):-&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush:xml"&gt;&amp;lt;system.webServer&amp;gt;
&amp;nbsp; &amp;lt;security&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;requestFiltering&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;requestLimits maxAllowedContentLength="2000000000"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/requestFiltering&amp;gt;
&amp;nbsp; &amp;lt;/security&amp;gt;
&amp;lt;/system.webServer&amp;gt; 
&lt;/pre&gt;&lt;br /&gt;
The problem is, this setting will NOT work with .NET 1.1 (oh yeah, you read that right! I was working on .NET 1.1... **sigh**) on IIS7 because it does not know the &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;system.webServer&amp;gt;&lt;/span&gt; property. Further searching yield us with the solution. Here's the solution:-&lt;br /&gt;
&lt;br /&gt;
1) Open notepad (as Administrator)&lt;br /&gt;
2) Open the file:&lt;br /&gt;
&lt;pre class="brush:xml"&gt;%windir%\system32\inetsrv\config\applicationHost.config
&lt;/pre&gt;&lt;br /&gt;
3) Find:&lt;br /&gt;
&lt;pre class="brush:xml"&gt;&amp;lt;/requestFiltering&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
4) Add before that &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;/requestFiltering&amp;gt;&lt;/span&gt; line.&lt;br /&gt;
&lt;pre class="brush:xml"&gt;&amp;lt;requestLimits maxAllowedContentLength="2000000000" /&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
5) Final &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;applicationHost.config&lt;/span&gt; file should be (only related part shown):&lt;br /&gt;
&lt;pre class="brush:xml"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;requestLimits maxAllowedContentLength="2000000000" /&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/requestFiltering&amp;gt;
&amp;nbsp; &amp;lt;/security&amp;gt;
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-1918433724810418613?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/C7MVuCD-nS5zDy5JcFsfA400zdc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/C7MVuCD-nS5zDy5JcFsfA400zdc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/C7MVuCD-nS5zDy5JcFsfA400zdc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/C7MVuCD-nS5zDy5JcFsfA400zdc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/1918433724810418613/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2008/12/request-filtering-module-is-configured.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/1918433724810418613?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/1918433724810418613?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2008/12/request-filtering-module-is-configured.html" title="Request Filtering module is configured to deny a request that exceeds request content length" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-Xvf6Su_hblk/Ti_YvX_S-KI/AAAAAAAABmc/XDj7vAGzrys/s72-c/requestlimits.jpg" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUcCRHs4eip7ImA9WhdSF04.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-6170608472675456203</id><published>2008-12-11T23:17:00.007+08:00</published><updated>2011-07-27T11:24:25.532+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-27T11:24:25.532+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql server" /><category scheme="http://www.blogger.com/atom/ns#" term=".net" /><category scheme="http://www.blogger.com/atom/ns#" term="tech" /><category scheme="http://www.blogger.com/atom/ns#" term="xml" /><category scheme="http://www.blogger.com/atom/ns#" term="web service" /><category scheme="http://www.blogger.com/atom/ns#" term="programming" /><category scheme="http://www.blogger.com/atom/ns#" term="mssql" /><category scheme="http://www.blogger.com/atom/ns#" term="windows service" /><title>An error occurred while parsing EntityName. Line X, position Y.</title><content type="html">So today I was at client's site providing Technical Support and  finalizing Enhancement Project that was done for the past few months.  One of the task was for me to develop a Windows Service, which will grab  the user's updated profile from a table in SQL Server 2000 and submit  them to a Web Service developed by another vendor. I am using SOAP in my  Windows Service to communicate with the Web Service on the other side.  Since SOAP is using an XML format in their request and response, I had  to grab the data from the SQL Server and build a SOAP Request XML before  sending it to the Web Service. Previously it ran just fine, until it  hit an error that says:-&lt;br /&gt;
&lt;blockquote style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;An error occurred while parsing EntityName. Line X, position Y.&lt;/blockquote&gt;No matter how many retries, it keeps on hitting the same error and bail  out of my Windows Service. After googling around for a bit, it turns out  that one of the content in the user's profile column (address field)  contains an ampersand (&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;amp;&lt;/span&gt;). The content of the column looks something like this:-&lt;br /&gt;
&lt;blockquote style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Mailbox 3 &amp;amp; 4&lt;/blockquote&gt;Referring to &lt;a href="http://www.sharepointblogs.com/dustin/archive/2005/09/14/3503.aspx" target="_blank"&gt;this website&lt;/a&gt;, I found out that I have to replace the ampersand (&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;amp;&lt;/span&gt;) sign into an equivalent HTML entity (&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;amp;amp;&lt;/span&gt;). The reason? I'm not so sure, but I think it has something to do on how .NET interprets the XML string that was built.&lt;br /&gt;
&lt;br /&gt;
I was so lazy to go and recompile my Windows Service just to fix that  tiny bug. So, what I did was to change my Stored Procedure in SQL  Server 2000 so that it returns the data with '&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;amp;&lt;/span&gt;' replaced with '&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;amp;amp;&lt;/span&gt;'. This is how I did it in my Stored Procedure (this is just an example):-&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: sql"&gt;SELECT REPLACE(column_name, '&amp;amp;', '&amp;amp;amp;') AS column_name FROM table_name WHERE some_conditions
&lt;/pre&gt;&lt;br /&gt;
That fixed my problem without having to recompile my Windows Service again. If I were to recompile again, then my code (in C#) would be something like this (&lt;a href="http://www.experts-exchange.com/Web/Web_Languages/XML/Q_21362293.html" target="_blank"&gt;refer to this website&lt;/a&gt;):-&lt;br /&gt;
&lt;pre class="brush: csharp"&gt;public string EscapeXml (string input) {
  string output = string.Empty;
 
  output = input.Replace("&amp;amp;", "&amp;amp;amp;");
  output = output.Replace("'", "&amp;amp;apos;");
  output = output.Replace("\"", "&amp;amp;quot;");
  output = output.Replace("&amp;gt;", "&amp;amp;gt;");
  output = output.Replace("&amp;lt;", "&amp;amp;lt;");
 
  return output;
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-6170608472675456203?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Leffvy3kvbUoaLzczWnYFlrln4U/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Leffvy3kvbUoaLzczWnYFlrln4U/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Leffvy3kvbUoaLzczWnYFlrln4U/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Leffvy3kvbUoaLzczWnYFlrln4U/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/6170608472675456203/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2008/12/error-occurred-while-parsing-entityname.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/6170608472675456203?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/6170608472675456203?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2008/12/error-occurred-while-parsing-entityname.html" title="An error occurred while parsing EntityName. Line X, position Y." /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A08DQHo5eip7ImA9WhdSFko.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-5258940139917763580</id><published>2008-11-27T10:25:00.012+08:00</published><updated>2011-07-26T19:31:11.422+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-26T19:31:11.422+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="firefox" /><category scheme="http://www.blogger.com/atom/ns#" term="tech" /><category scheme="http://www.blogger.com/atom/ns#" term="windows registry" /><category scheme="http://www.blogger.com/atom/ns#" term="web browser" /><title>Remove Java Quick Starter from Firefox</title><content type="html">This problem has actually happen quite a while for me. Everytime I plug  in FirefoxPortable in my office PC, it will automatically install Java  Quick Starter 1.0 extension on the first run. What annoy me the most is,  this extension CANNOT be uninstalled from Firefox Extension menu, and  it is NOT located in the extensions folder in Firefox Profile.&lt;br /&gt;
&lt;br /&gt;
After googling around, I found out &lt;a href="http://forums.mozillazine.org/viewtopic.php?f=38&amp;amp;t=921325" target="_blank"&gt;this post&lt;/a&gt;  at MozillaZine forum. It seems that this situation happens after I  updated my JRE to Version 6 Update 10 a while back. By default, after  installing JRE6u10, Java will install the Java Quick Starter extension  to your Firefox through Windows Registry. So, if you want to get rid of  this extension, follow this steps:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: red; font-size: large;"&gt;&lt;b&gt;WARNING!!! Do NOT perform these steps, unless you REALLY know what you are doing!!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="font-family: monospace;"&gt;1) Open up Windows Registry.
2) Navigate to "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Firefox\extensions".
3) Remove the entry named "jqs" (or something similar).
4) Restart your Firefox.&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-5258940139917763580?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/90Gc8TYx9IejZQBLiJRA3txQpAU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/90Gc8TYx9IejZQBLiJRA3txQpAU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/90Gc8TYx9IejZQBLiJRA3txQpAU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/90Gc8TYx9IejZQBLiJRA3txQpAU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/5258940139917763580/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2008/11/remove-java-quick-starter-from-firefox.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/5258940139917763580?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/5258940139917763580?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2008/11/remove-java-quick-starter-from-firefox.html" title="Remove Java Quick Starter from Firefox" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0UEQHg_eSp7ImA9WhdVF0s.&quot;"><id>tag:blogger.com,1999:blog-8773652700598320632.post-1917478764646259961</id><published>2006-04-04T16:04:00.000+08:00</published><updated>2011-09-23T16:06:41.641+08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-23T16:06:41.641+08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="tech" /><category scheme="http://www.blogger.com/atom/ns#" term="hard drive" /><category scheme="http://www.blogger.com/atom/ns#" term="security" /><title>Beware of your old hard drives…</title><content type="html">I was so bored when I encountered this page at &lt;a href="http://www.pcworld.com/" target="blank"&gt;PC World&lt;/a&gt;. It started with a quiz to find out whether something you know about computer is a fact of a fiction. I read until the last question:-&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
&lt;strong&gt;True or false?&lt;/strong&gt; I’m ready to give away my old computer after I’ve deleted all the files.&lt;br /&gt;
&lt;br /&gt;
False. Deleting files isn't good enough. You'd be amazed what people can pull from the hard drives of secondhand or donated computers if the hard drive hasn't been completely reformatted and Windows reinstalled. (And if you pass along the PC to a family member, you're probably not going to do this.)&lt;br /&gt;
&lt;br /&gt;
PC World did a story where we found Social Security numbers, income tax returns, and other personal and important information on old, discarded hard drives. Once you pass along your old PC, you have no idea where it will travel down the line. To erase your info, try a free utility program, such as Eraser, to zap documents into oblivion. There's also Webroot's Window Washer for cleaning up the many little nuggets that lurk elsewhere.&lt;/blockquote&gt;
&lt;br /&gt;
After reading that part of the &lt;a href="http://www.pcworld.com/news/article/0,aid,124807,00.asp" target="blank"&gt;quiz&lt;/a&gt;, it leads me to &lt;a href="http://www.pcworld.com/news/article/0,aid,110012,00.asp" target="blank"&gt;this page&lt;/a&gt;. I realized something crucial regarding security and personal data. Even after formatting the hard drives, people can still access the data of previous owner of the hard drive if it is not proplerly destroyed. Go ahead and read the page, you’ll probably end up surprised like I did.&lt;br /&gt;
&lt;br /&gt;
Here’s the page — &lt;a href="http://www.pcworld.com/news/article/0,aid,110012,00.asp" target="blank"&gt;PC World - Hard Drives Exposed&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8773652700598320632-1917478764646259961?l=www.khairie.net' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/bKkH2HOxPvLjLi6nGSpgTKqKl3Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bKkH2HOxPvLjLi6nGSpgTKqKl3Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/bKkH2HOxPvLjLi6nGSpgTKqKl3Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bKkH2HOxPvLjLi6nGSpgTKqKl3Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.khairie.net/feeds/1917478764646259961/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.khairie.net/2006/04/beware-of-your-old-hard-drives.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/1917478764646259961?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8773652700598320632/posts/default/1917478764646259961?v=2" /><link rel="alternate" type="text/html" href="http://www.khairie.net/2006/04/beware-of-your-old-hard-drives.html" title="Beware of your old hard drives…" /><author><name>Khairi Mohamed</name><uri>https://profiles.google.com/100969324047403450459</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh4.googleusercontent.com/-_w1JjsK-eQw/AAAAAAAAAAI/AAAAAAAABpc/yEEzHoPgYwg/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry></feed>

