<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>SODEVE</title>
	
	<link>http://sodeve.net</link>
	<description>is a software developer&lt;br&gt;in a pursuit of happyness</description>
	<lastBuildDate>Tue, 19 Jan 2010 07:40:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/sodeve" /><feedburner:info uri="sodeve" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by/2.0/</creativeCommons:license><feedburner:emailServiceId>sodeve</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/sodeve" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://my.feedlounge.com/external/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://static.feedlounge.com/buttons/subscribe_0.gif">Subscribe with FeedLounge</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsalloy.com/?rss=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://www.yourminis.com/subscribe.aspx?u=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://www.yourminis.com/images/addtoyourminisbadge.gif">Subscribe with Yourminis.com</feedburner:feedFlare><feedburner:feedFlare href="http://download.attensa.com/app/get_attensa.html?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://www.attensa.com/blogs/attensa/WindowsLiveWriter/BadgeredintoBadges_10C02/attensa_feed_button5.gif">Subscribe with Attensa for Outlook</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://hub.netomat.net/account/account.autoSubscribe.jspa?urls=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://www.netomat.net/blogger/images/icon_netomat_feedbutton.gif">Subscribe with netomat Hub</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fsodeve" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:browserFriendly>Dear Reader, Thank You for subscribing to SODEVE.NET Warm Regards, Hardono Arifanto</feedburner:browserFriendly><item>
		<title>How to Burn Offline NT Password &amp; Registry Editor to USB Thumbdrive</title>
		<link>http://sodeve.net/how-to-burn-offline-nt-password-registry-editor-to-usb-thumbdrive/</link>
		<comments>http://sodeve.net/how-to-burn-offline-nt-password-registry-editor-to-usb-thumbdrive/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 10:05:10 +0000</pubDate>
		<dc:creator>Hardono Arifanto</dc:creator>
				<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://sodeve.net/?p=886</guid>
		<description><![CDATA[Forgot your Windows Administrator password? Try this amazing tool: Offline NT Password &#038; Registry Editor. You can download the ISO CD image and burn it to a CD as an emergency CD.
No blank CD? No problem. You can also use thumbdrive and make it bootable. How? read README.TXT inside the ISO CD Image file.
Too lazy [...]]]></description>
			<content:encoded><![CDATA[<p>Forgot your Windows Administrator password? Try this amazing tool: <a href="http://pogostick.net/~pnh/ntpasswd/">Offline NT Password &#038; Registry Editor</a>. You can download the ISO CD image and burn it to a CD as an emergency CD.</p>
<p>No blank CD? No problem. You can also use thumbdrive and make it bootable. How? read README.TXT inside the ISO CD Image file.</p>
<p>Too lazy to read? Well basically it consist of two steps:</p>
<ol>
<li>Copy all files from the ISO CD Image to the thumbdrive</li>
<li>Assuming that your thumbdrive is mounted as drive <strong>F:</strong>, open console/command-prompt and execute this command: <strong>F:\syslinux.exe -ma F:</strong></li>
</ol>
<p>Thank You <a href="mailto:pnh@pogostick.net">pnh@pogostick.net</a>, you saved me today <img src='http://sodeve.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sodeve?a=coD2P-YI5Wk:Df2xREAEyJI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sodeve?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=coD2P-YI5Wk:Df2xREAEyJI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/sodeve?i=coD2P-YI5Wk:Df2xREAEyJI:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=coD2P-YI5Wk:Df2xREAEyJI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/sodeve?i=coD2P-YI5Wk:Df2xREAEyJI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=coD2P-YI5Wk:Df2xREAEyJI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/sodeve?i=coD2P-YI5Wk:Df2xREAEyJI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=coD2P-YI5Wk:Df2xREAEyJI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/sodeve?i=coD2P-YI5Wk:Df2xREAEyJI:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sodeve.net/how-to-burn-offline-nt-password-registry-editor-to-usb-thumbdrive/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Use Jasper Report with ASP.NET</title>
		<link>http://sodeve.net/how-to-use-jasper-report-with-asp-net/</link>
		<comments>http://sodeve.net/how-to-use-jasper-report-with-asp-net/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 09:44:06 +0000</pubDate>
		<dc:creator>Hardono Arifanto</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[jasper-report]]></category>

		<guid isPermaLink="false">http://sodeve.net/?p=884</guid>
		<description><![CDATA[I searched the &#8220;Internets&#8221; (with a grin to GWB), but found nothing. So this post is a placeholder for whatever findings in my future research. 
Bear with me please  
Update: 11-Jan-2009
There&#8217;s a glimmer hope by using direct HTTP post to the Jasper Report&#8217;s web service using techniques described here:

Programmatically generating web service calls
Making raw [...]]]></description>
			<content:encoded><![CDATA[<p>I searched the &#8220;Internets&#8221; (with a grin to GWB), but found nothing. So this post is a placeholder for whatever findings in my future research. </p>
<p>Bear with me please <img src='http://sodeve.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Update: 11-Jan-2009</strong></p>
<p>There&#8217;s a glimmer hope by using direct HTTP post to the Jasper Report&#8217;s web service using techniques described here:</p>
<ul>
<li><a href="http://romiller.com/Default.aspx?tabid=36&#038;EntryID=9">Programmatically generating web service calls</a></li>
<li><a href="http://mikehadlow.blogspot.com/2006/05/making-raw-web-service-calls-with.html">Making raw web service calls with the HttpWebRequest class</a></li>
<li><a href="http://geekswithblogs.net/marcel/archive/2007/03/26/109886.aspx">Invoking Web Service dynamically using HttpWebRequest</a></li>
</ul>
<p>By using above method, we will get the full stream of the response. Now the problem is how to separate the binary data and the text data.</p>
<p><strong>Update: 12-Jan-2009</strong></p>
<p>Found a clue on how to read mixed binary data and text: <a href="http://stackoverflow.com/questions/504500/whats-the-best-way-to-read-mixed-i-e-text-and-binary-data">What’s the best way to read mixed (i.e. text and binary) data</a></p>
<p><strong>Update: 19-Jan-2009</strong><br />
I have successfully use ASP.NET to invoke Jasper Report web service, and obtain the PDF/XLS/CSV file. The solution is now still very crude, I&#8217;m gonna need sometime to clean it up.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sodeve?a=zzlL5-WBsXw:oXiQYkMKg-M:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sodeve?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=zzlL5-WBsXw:oXiQYkMKg-M:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/sodeve?i=zzlL5-WBsXw:oXiQYkMKg-M:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=zzlL5-WBsXw:oXiQYkMKg-M:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/sodeve?i=zzlL5-WBsXw:oXiQYkMKg-M:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=zzlL5-WBsXw:oXiQYkMKg-M:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/sodeve?i=zzlL5-WBsXw:oXiQYkMKg-M:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=zzlL5-WBsXw:oXiQYkMKg-M:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/sodeve?i=zzlL5-WBsXw:oXiQYkMKg-M:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sodeve.net/how-to-use-jasper-report-with-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Generate Relative Path</title>
		<link>http://sodeve.net/how-to-generate-relative-path/</link>
		<comments>http://sodeve.net/how-to-generate-relative-path/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 16:35:37 +0000</pubDate>
		<dc:creator>Hardono Arifanto</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[vb.net]]></category>

		<guid isPermaLink="false">http://sodeve.net/?p=879</guid>
		<description><![CDATA[A few months ago I was given a project to maintain a corporate website. This website was previously hosted in a CMS in remote site. When I received the CD containing the project files, it was already in &#8216;offline&#8217; website format. It means all files are now static HTML. I suspect that it generated using [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://sodeve.net/wp-content/uploads/2009/10/console.png" alt="console" title="console" width="200" height="150" class="alignleft size-full wp-image-880" />A few months ago I was given a project to maintain a corporate website. This website was previously hosted in a CMS in remote site. When I received the CD containing the project files, it was already in &#8216;offline&#8217; website format. It means all files are now static HTML. I suspect that it generated using those website downloaders (Offline Explorer, etc.). </p>
<p>The problem with static HTML website is there are many duplicates of information. One news article will show up as many files that located in different folders. It could be under News folder, News Archive folder, Tags folder, etc.</p>
<p>It means my task will become a boring headache, since I will need to add content, add it to the respective folders, and manually update all the linkage regularly. </p>
<p>So I came out with a simple program to help me generating the content, upload the attachment and to update the linkage. This is when I hit the problem. Because most of the time, a news article will contain attachments. The attachments will be stored under Attachments folder, but the pages that linked to that attachment are scattered all over the place. I also need to update the ‘index’ files of each category (Archive by Year, Archive by Tag, Archive by Category, etc.)</p>
<h3>Solution</h3>
<p>Instead of reinventing the wheel, I asked Google to find me the wheel <img src='http://sodeve.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  <a href="http://www.devx.com/tips/Tip/13737" target="_blank">David M. Howard</a> has solved this problem 9 years ago <img src='http://sodeve.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Thank You David!</p>
<p>His solution was written in Java, I just need to convert it to .NET and tweaked it a little without any difficulties.</p>
<h3>Result</h3>
<p>The output of the test program are as follows:</p>
<div style="border:#FFF thin solid; font:'Lucida Console', Monaco, monospace; font-size:14px; padding:10px; background:#000; color:#090">
Home: C:\boot.ini<br />
Remote: C:\WINDOWS\system32\drivers\etc\hosts<br />
Relative Path: WINDOWS\system32\drivers\etc\hosts<br />
<br/><br />
Home: C:\WINDOWS\system32\drivers\etc\hosts<br />
Remote: C:\boot.ini<br />
Relative Path: ..\..\..\..\boot.ini<br />
<br/><br />
Home: C:\WINDOWS\system32\drivers\etc\hosts<br />
Remote: I:\PVSW.LOG<br />
Relative Path: I:\PVSW.LOG
</div>
<p><br/></p>
<h3>Source Code</h3>
<pre name="code" class="vb">
'Filename: MyPath.vb
Imports System.IO
Imports System.Collections

Public Class MyPath
    Public Shared Function getRelativePath(ByVal home As String, ByVal remote As String) As String
        Return getRelativePath(New FileInfo(home), New FileInfo(remote))
    End Function
    Public Shared Function getRelativepath(ByVal home As String, ByRef remote As FileInfo) As String
        Return getRelativepath(New FileInfo(home), remote)
    End Function
    Public Shared Function getRelativePath(ByRef home As FileInfo, ByVal remote As String) As String
        Return getRelativePath(home, New FileInfo(remote))
    End Function

    Public Shared Function getRelativePath(ByRef home As FileInfo, ByRef remote As FileInfo) As String
        Dim homepathList As New ArrayList
        Dim remotePathList As New ArrayList
        Dim result As String = ""

        If ((home.Exists And remote.Exists) Or home.Directory.Exists Or remote.Directory.Exists) Then
            'initialize the paths
            initPathList(home.Directory, homepathList)

            If remote.Attributes = FileAttributes.Directory Then
                initPathList(remote.Directory, remotePathList)
            Else
                initPathList(remote, remotePathList)
            End If

            Dim ihome As Integer = homepathList.Count - 1
            Dim iremote As Integer = remotePathList.Count - 1

            'Do we have common parent
            If Not homepathList(ihome).Equals(remotePathList(iremote)) Then
                Return remote.FullName
            End If

            'remove common parent
            While (ihome >= 0 And iremote >= 0)
                If homepathList(ihome).Equals(remotePathList(iremote)) Then
                    ihome -= 1
                    iremote -= 1
                Else
                    Exit While
                End If
            End While

            'Add relative path
            While ihome >= 0
                result &#038;= ".." &#038; System.IO.Path.DirectorySeparatorChar.ToString()
                ihome -= 1
            End While

            'Combine relative path result with the remote 

            While iremote > 0
                result &#038;= remotePathList(iremote).ToString() &#038; System.IO.Path.DirectorySeparatorChar.ToString()
                iremote -= 1
            End While
            result &#038;= remotePathList(iremote).ToString()
        Else
            If Not home.Exists Then
                Throw New Exception(home.FullName &#038; " is not exist!")
            End If
            If Not remote.Exists Then
                Throw New Exception(remote.FullName &#038; " is not exist!")
            End If
        End If
        Return result
    End Function
    Public Shared Sub initPathList(ByRef f As FileInfo, ByRef ar As ArrayList)
        ar.Add(f.Name)
        initPathList(f.Directory, ar)
    End Sub
    Public Shared Sub initPathList(ByRef dir As DirectoryInfo, ByRef ar As ArrayList)
        ar.Add(dir.Name)
        While Not dir.Parent Is Nothing
            dir = dir.Parent
            ar.Add(dir.Name)
        End While
    End Sub
End Class
</pre>
<pre name="code" class="vb">
'Filename: testMyPath.vb
Imports System.IO

Module Module1

    Sub Main()
        While True
            Console.Write("Home: ")
            Dim homePath As String = Console.ReadLine()
            Console.Write("Remote: ")
            Dim remotePath As String = Console.ReadLine()
            Try
                Console.WriteLine("Relative Path: " &#038; MyIO.MyPath.getRelativePath(homePath, remotePath))
            Catch ex As Exception
                Console.WriteLine("ERROR: " &#038; ex.ToString())
            End Try
            Console.WriteLine()
        End While
    End Sub

End Module
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sodeve?a=c0B1p12PtWA:szw9iI6Qyrk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sodeve?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=c0B1p12PtWA:szw9iI6Qyrk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/sodeve?i=c0B1p12PtWA:szw9iI6Qyrk:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=c0B1p12PtWA:szw9iI6Qyrk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/sodeve?i=c0B1p12PtWA:szw9iI6Qyrk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=c0B1p12PtWA:szw9iI6Qyrk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/sodeve?i=c0B1p12PtWA:szw9iI6Qyrk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=c0B1p12PtWA:szw9iI6Qyrk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/sodeve?i=c0B1p12PtWA:szw9iI6Qyrk:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sodeve.net/how-to-generate-relative-path/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is Kelli Garner spamming or was it someone else?</title>
		<link>http://sodeve.net/is-kelli-garner-spamming-or-was-it-someone-else/</link>
		<comments>http://sodeve.net/is-kelli-garner-spamming-or-was-it-someone-else/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 16:30:07 +0000</pubDate>
		<dc:creator>Hardono Arifanto</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[movie]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://sodeve.net/?p=881</guid>
		<description><![CDATA[An interesting entry show up in Akismet&#8217;s spam list:

It is interesting that it end-up blocked by Akismet, even though it doesn&#8217;t mention any product, or linking to a questionable website, it simply links to Kelli&#8217;s Wikipedia page. Earlier discussion mentioned that it was the email address that causing the block.
Who will benefit from such action? [...]]]></description>
			<content:encoded><![CDATA[<p>An interesting entry show up in Akismet&#8217;s spam list:</p>
<p><img src="http://sodeve.net/wp-content/uploads/2009/10/kelly.png" alt="kelly" title="kelly" width="547" height="106" class="aligncenter size-full wp-image-882" /></p>
<p>It is interesting that it end-up blocked by Akismet, even though it doesn&#8217;t mention any product, or linking to a questionable website, it simply links to Kelli&#8217;s Wikipedia page. <a href="http://morsdei.wordpress.com/2009/09/30/puzzling-spam/">Earlier discussion</a> mentioned that it was the email address that causing the block.</p>
<p>Who will benefit from such action? Will Kelli Garner became more famous by gaining notoriety as a spammer? One could not forget how Paris Hilton become everyday conversations because of her sex tape leaked. So yeah, you can become famous by gaining notoriety. The more notorious you are, the more publicity you&#8217;ll get. Bad publicity, good publicity, all kinds of publicity, <a href="http://www.lazyowner.com/there-is-no-such-thing-as-bad-publicity/">there is no such thing as bad publicity</a>.</p>
<p>Or could it be someone else profited? If yes, in what way? Or is it just someone who is trying to be her biggest fan by dedicating her/his life promoting Kelli?</p>
<p>Another possible explanation is someone actually have planted something malicious at her Wiki page, which will be triggered whenever a person visit that page? Which is to me, a very likely explanation. Is this a <a href="http://en.wikipedia.org/wiki/Zero_day_attack">Zero Day attack</a>?</p>
<p>Anyway, the spam origin was from server which is apparently located at Prague, Czech Republic.</p>
<p><a href="http://whois.domaintools.com/217.31.51.77"><img src="http://sodeve.net/wp-content/uploads/2009/10/217.31.51.77.png" alt="217.31.51.77" title="217.31.51.77" width="419" height="451" class="aligncenter size-full wp-image-883" /></a></p>
<p>PS: This post is now <del>officially</del> unintentionally became part of the publicity machine.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sodeve?a=I08kA4dzXbQ:FIfYTn_rS5U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sodeve?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=I08kA4dzXbQ:FIfYTn_rS5U:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/sodeve?i=I08kA4dzXbQ:FIfYTn_rS5U:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=I08kA4dzXbQ:FIfYTn_rS5U:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/sodeve?i=I08kA4dzXbQ:FIfYTn_rS5U:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=I08kA4dzXbQ:FIfYTn_rS5U:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/sodeve?i=I08kA4dzXbQ:FIfYTn_rS5U:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=I08kA4dzXbQ:FIfYTn_rS5U:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/sodeve?i=I08kA4dzXbQ:FIfYTn_rS5U:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sodeve.net/is-kelli-garner-spamming-or-was-it-someone-else/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Meaning of Barokah</title>
		<link>http://sodeve.net/the-meaning-of-barokah/</link>
		<comments>http://sodeve.net/the-meaning-of-barokah/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 01:58:49 +0000</pubDate>
		<dc:creator>Hardono Arifanto</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[religion]]></category>

		<guid isPermaLink="false">http://sodeve.net/?p=876</guid>
		<description><![CDATA[Yesterday, I visited Ainun&#8217;s wedding party at An-Nahdah Mosque. It was my first time attending a wedding party  that is held in a Mosque (apology to Rahman and Ratih for missing your wedding party, I was with my family in Bali that time  ).
The atmosphere was great, the food was delicious, but one [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I visited <a href="http://www.ainunnajib.com/">Ainun&#8217;s</a> wedding party at An-Nahdah Mosque. It was my first time attending a wedding party  that is held in a Mosque (apology to Rahman and Ratih for missing your wedding party, I was with my family in Bali that time <img src='http://sodeve.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).</p>
<p>The atmosphere was great, the food was delicious, but one thing that struck my mind that day was the prayer that was given by the Habib (I didn&#8217;t get his full name) to Ainun and his Wife. He prayed that Ainun and Yanti will have a barokah life. Barokah as in:</p>
<ol>
<li>Even when your money is not much, you still found it enough</li>
<li>Even when what you have is not many, you still found it sufficient</li>
<li>Even when you have a little time, you can do many things</li>
<li>Even when you are given a short life, you can achieve so many things</li>
</ol>
<p>&#8220;Houston, we have a problem!&#8221;</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sodeve?a=h-F7PLdmb0M:RIhcd1JBFWo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sodeve?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=h-F7PLdmb0M:RIhcd1JBFWo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/sodeve?i=h-F7PLdmb0M:RIhcd1JBFWo:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=h-F7PLdmb0M:RIhcd1JBFWo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/sodeve?i=h-F7PLdmb0M:RIhcd1JBFWo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=h-F7PLdmb0M:RIhcd1JBFWo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/sodeve?i=h-F7PLdmb0M:RIhcd1JBFWo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=h-F7PLdmb0M:RIhcd1JBFWo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/sodeve?i=h-F7PLdmb0M:RIhcd1JBFWo:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sodeve.net/the-meaning-of-barokah/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Prevent Wordpress Loads jQuery Twice</title>
		<link>http://sodeve.net/how-to-prevent-wordpress-loads-jquery-twice/</link>
		<comments>http://sodeve.net/how-to-prevent-wordpress-loads-jquery-twice/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 15:53:28 +0000</pubDate>
		<dc:creator>Hardono Arifanto</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://sodeve.net/?p=864</guid>
		<description><![CDATA[When I was working on recent posts, I noticed that jQuery script was loaded twice. I investigated and found out that my current theme is also load jQuery. 
My current theme is Pyrmont V2. I look at the header.php, I found out this:


&#60;script src=&#34;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;
&#60;script src=&#34;&#60;?php bloginfo('stylesheet_directory'); ?&#62;/scripts/basic.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;


So this is the reason why I [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://sodeve.net/wp-content/uploads/2009/09/jquery3.png" alt="jquery" title="jquery" width="255" height="93" class="alignleft size-full wp-image-870" />When I was working on recent posts, I noticed that jQuery script was loaded twice. I investigated and found out that my current theme is also load jQuery. </p>
<p>My current theme is <a target ="_blank" href="http://imotta.cn/">Pyrmont V2</a>. I look at the <strong>header.php</strong>, I found out this:</p>
<pre name="code" class="html">
<!-- .....  -->
&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/scripts/basic.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
<!-- .....  -->
</pre>
<p>So this is the reason why I found two jQuery source code being loaded (shown below).</p>
<p>
<div class="ngg-galleryoverview" id="ngg-gallery-8-864">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-129" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://sodeve.net/wp-content/gallery/jquery/jquery.png" title=" " class="shutterset_set_8" >
								<img title="jquery" alt="jquery" src="http://sodeve.net/wp-content/gallery/jquery/thumbs/thumbs_jquery.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

</p>
<p>But what about Wordpress? In which file does the jQuery listed to be automatically loaded? After asked Windows to scour Wordpress&#8217;<strong>wp-includes</strong> folder, I found the answer:<br />
<strong>script-loader.php</strong></p>
<pre name="code" class="php">
   //...
   $scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop'), '20070118');
   $scripts->add( 'jquery', '/wp-includes/js/jquery/jquery.js', false, '1.3.2');
   $scripts->add( 'jquery-ui-core', '/wp-includes/js/jquery/ui.core.js', array('jquery'), '1.7.1' );
   //...
</pre>
<p>I found it interesting that Wordpress is loading jQuery from localhost (sodeve.net), but Pyrmont is loading it from Google. There must be a reason for this. <a target ="_blank" href="http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/">Dave Ward at Encosia</a> teaches us that the reasons are:</p>
<ol>
<li><strong>Decreased Latency</strong>. Because Google is using Content Delivery Network (CDN). Therefore, it is much faster than your server</li>
<li><strong>Increased Parallelism</strong>. Because it reduces the number of connections made to a single server. Browser usually has limit on the number of connection to a single server</li>
<li><strong>Better Caching</strong>. Since the script is obtained from Google, it is very likely the script is already cached when visited any Google&#8217;s website that uses jQuery</li>
</ol>
<p>Anyway, I&#8217;m sold to Dave&#8217;s idea. I replaced the line in <strong>script-loader.php</strong>, using <strong>http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js</strong> instead of <strong>/wp-includes/js/jquery/jquery.js</strong>. Then I observed the performance using Firebug.</p>
<p><img src="http://sodeve.net/wp-content/uploads/2009/09/firebug-net-js.png" alt="Before disabling Wordpress load script with ver parameter" title="Before disabling Wordpress load script with ver parameter" width="494" height="56" class="alignnone size-full wp-image-872" /></p>
<p>Hmm.. Wordpress added the &#8220;ver&#8221; parameter in the script request. This invalidated Dave&#8217;s point no. 3. What can we do to make Wordpress not to add &#8220;ver&#8221; parameter in the script request?</p>
<h3>How to Make Wordpress Load Script without Ver Parameter</h3>
<p>Open <strong>class.wp-script.php</strong> inside folder wp-includes of Wordpress</p>
<pre name="code" class="php">
//.....

$src = add_query_arg('ver', $ver, $src);

//.....
</pre>
<p>Comment the line shown above (line 117).</p>
<p>I believe things load faster now <img src='http://sodeve.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  (At least for Google, sodeve.net server is a shared hosting, so its performance is difficult to expect <img src='http://sodeve.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> )<br />
<img src="http://sodeve.net/wp-content/uploads/2009/09/firebug-net-js-after.png" alt="After disabling Wordpress load script with ver parameter" title="After disabling Wordpress load script with ver parameter" width="510" height="87" class="alignnone size-full wp-image-873" /></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sodeve?a=Gp13e7m54U4:-zzcFYCErx4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sodeve?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=Gp13e7m54U4:-zzcFYCErx4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/sodeve?i=Gp13e7m54U4:-zzcFYCErx4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=Gp13e7m54U4:-zzcFYCErx4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/sodeve?i=Gp13e7m54U4:-zzcFYCErx4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=Gp13e7m54U4:-zzcFYCErx4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/sodeve?i=Gp13e7m54U4:-zzcFYCErx4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=Gp13e7m54U4:-zzcFYCErx4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/sodeve?i=Gp13e7m54U4:-zzcFYCErx4:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sodeve.net/how-to-prevent-wordpress-loads-jquery-twice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using jQuery to Enhance Google Syntax Highligher Wordpress Plugin</title>
		<link>http://sodeve.net/using-jquery-to-enhance-google-syntax-highligher-wordpress-plugin/</link>
		<comments>http://sodeve.net/using-jquery-to-enhance-google-syntax-highligher-wordpress-plugin/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 16:24:22 +0000</pubDate>
		<dc:creator>Hardono Arifanto</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://sodeve.net/?p=867</guid>
		<description><![CDATA[Are you using Google Syntax Highlighter plugin for Wordpress?
If you do, you might want to use my enhancement. First let&#8217;s display the original:

&#60;?php
/*
Plugin Name: Google Syntax Highlighter for WordPress
Plugin URI: http://wordpress.org/extend/plugins/google-syntax-highlighter
Description: 100% JavaScript syntax highlighter This plugin makes using the &#60;a href=&#34;http://code.google.com/p/syntaxhighlighter&#34;&#62;Google Syntax highlighter&#60;/a&#62; to highlight code snippets within WordPress simple. Supports C++, C#, CSS, [...]]]></description>
			<content:encoded><![CDATA[<p>Are you using <a target ="_blank" href="http://wordpress.org/extend/plugins/google-syntax-highlighter/">Google Syntax Highlighter</a> plugin for Wordpress?</p>
<p>If you do, you might want to use my enhancement. First let&#8217;s display the original:</p>
<pre name="code" class="php">
&lt;?php
/*
Plugin Name: Google Syntax Highlighter for WordPress
Plugin URI: http://wordpress.org/extend/plugins/google-syntax-highlighter
Description: 100% JavaScript syntax highlighter This plugin makes using the &lt;a href=&quot;http://code.google.com/p/syntaxhighlighter&quot;&gt;Google Syntax highlighter&lt;/a&gt; to highlight code snippets within WordPress simple. Supports C++, C#, CSS, Delphi, Java, JavaScript, PHP, Python, Ruby, SQL, VB, XML, and HTML. Read  &lt;a href=&quot;http://code.google.com/p/syntaxhighlighter/wiki/Usage&quot;&gt;usage directions.&lt;/a&gt;
Version: 1.5.1
Author: Peter Ryan
Author URI: http://www.peterryan.net
*/

function insert_header() {
	$current_path = get_option('siteurl') .'/wp-content/plugins/' . basename(dirname(__FILE__)) .'/';
	?&gt;
	&lt;link href=&quot;&lt;?php echo $current_path; ?&gt;Styles/SyntaxHighlighter.css&quot; type=&quot;text/css&quot; rel=&quot;stylesheet&quot; /&gt;
	&lt;?php
}

function insert_footer(){
$current_path = get_option('siteurl') .'/wp-content/plugins/' . basename(dirname(__FILE__)) .'/';
	?&gt;
&lt;script class=&quot;javascript&quot; src=&quot;&lt;?php echo $current_path; ?&gt;Scripts/shCore.js&quot;&gt;&lt;/script&gt;
&lt;script class=&quot;javascript&quot; src=&quot;&lt;?php echo $current_path; ?&gt;Scripts/shLegacy.js&quot;&gt;&lt;/script&gt;
&lt;script class=&quot;javascript&quot; src=&quot;&lt;?php echo $current_path; ?&gt;Scripts/shBrushCSharp.js&quot;&gt;&lt;/script&gt;
&lt;script class=&quot;javascript&quot; src=&quot;&lt;?php echo $current_path; ?&gt;Scripts/shBrushPhp.js&quot;&gt;&lt;/script&gt;
&lt;script class=&quot;javascript&quot; src=&quot;&lt;?php echo $current_path; ?&gt;Scripts/shBrushJScript.js&quot;&gt;&lt;/script&gt;
&lt;script class=&quot;javascript&quot; src=&quot;&lt;?php echo $current_path; ?&gt;Scripts/shBrushJava.js&quot;&gt;&lt;/script&gt;
&lt;script class=&quot;javascript&quot; src=&quot;&lt;?php echo $current_path; ?&gt;Scripts/shBrushVb.js&quot;&gt;&lt;/script&gt;
&lt;script class=&quot;javascript&quot; src=&quot;&lt;?php echo $current_path; ?&gt;Scripts/shBrushSql.js&quot;&gt;&lt;/script&gt;
&lt;script class=&quot;javascript&quot; src=&quot;&lt;?php echo $current_path; ?&gt;Scripts/shBrushXml.js&quot;&gt;&lt;/script&gt;
&lt;script class=&quot;javascript&quot; src=&quot;&lt;?php echo $current_path; ?&gt;Scripts/shBrushDelphi.js&quot;&gt;&lt;/script&gt;
&lt;script class=&quot;javascript&quot; src=&quot;&lt;?php echo $current_path; ?&gt;Scripts/shBrushPython.js&quot;&gt;&lt;/script&gt;
&lt;script class=&quot;javascript&quot; src=&quot;&lt;?php echo $current_path; ?&gt;Scripts/shBrushRuby.js&quot;&gt;&lt;/script&gt;
&lt;script class=&quot;javascript&quot; src=&quot;&lt;?php echo $current_path; ?&gt;Scripts/shBrushCss.js&quot;&gt;&lt;/script&gt;
&lt;script class=&quot;javascript&quot; src=&quot;&lt;?php echo $current_path; ?&gt;Scripts/shBrushCpp.js&quot;&gt;&lt;/script&gt;
&lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;&lt;?php echo $current_path; ?&gt;Styles/shCore.css&quot;/&gt;
&lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;&lt;?php echo $current_path; ?&gt;Styles/shThemeDefault.css&quot;/&gt;
&lt;script class=&quot;javascript&quot;&gt;
SyntaxHighlighter.defaults['wrap-lines'] = false;
dp.SyntaxHighlighter.ClipboardSwf = '&lt;?php echo $current_path; ?&gt;Scripts/clipboard.swf';
SyntaxHighlighter.all();
dp.SyntaxHighlighter.HighlightAll('code');
&lt;/script&gt;
&lt;?php
}
add_action('wp_head','insert_header');
add_action('wp_footer','insert_footer');
?&gt;
</pre>
<p>And now the enhanced version:<br />
<strong>ENHANCED</strong></p>
<pre name="code" class="php">
&lt;?php
/*
Plugin Name: Google Syntax Highlighter for WordPress
Plugin URI: http://wordpress.org/extend/plugins/google-syntax-highlighter
Description: 100% JavaScript syntax highlighter This plugin makes using the &lt;a href=&quot;http://code.google.com/p/syntaxhighlighter&quot;&gt;Google Syntax highlighter&lt;/a&gt; to highlight code snippets within WordPress simple. Supports C++, C#, CSS, Delphi, Java, JavaScript, PHP, Python, Ruby, SQL, VB, XML, and HTML. Read  &lt;a href=&quot;http://code.google.com/p/syntaxhighlighter/wiki/Usage&quot;&gt;usage directions.&lt;/a&gt;
Version: 1.5.1
Author: Peter Ryan
Author URI: http://www.peterryan.net
*/
function insert_header() {
	$current_path = get_option('siteurl') .'/wp-content/plugins/' . basename(dirname(__FILE__)) .'/';
	?&gt;
	&lt;link href=&quot;&lt;?php echo $current_path; ?&gt;Styles/SyntaxHighlighter.css&quot; type=&quot;text/css&quot; rel=&quot;stylesheet&quot; /&gt;
	&lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;&lt;?php echo $current_path; ?&gt;Styles/shCore.css&quot;/&gt;
	&lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;&lt;?php echo $current_path; ?&gt;Styles/shThemeDefault.css&quot;/&gt;
	&lt;?php
}
function insert_footer(){
$current_path = get_option('siteurl') .'/wp-content/plugins/' . basename(dirname(__FILE__)) .'/';
	?&gt;

&lt;script class=&quot;javascript&quot; src=&quot;&lt;?php echo $current_path; ?&gt;Scripts/shCore.js&quot;&gt;&lt;/script&gt;
&lt;script class=&quot;javascript&quot; src=&quot;&lt;?php echo $current_path; ?&gt;Scripts/shLegacy.js&quot;&gt;&lt;/script&gt;
&lt;script class=&quot;javascript&quot;&gt;
var arLanguages = new Array();
var arLangCounts = 0;
var arAliases = [
	{key:'shBrushCSharp.js', val:['c#','c-sharp','csharp']}
	,{key:'shBrushCpp.js', val:['cpp','c']}
	,{key:'shBrushBash.js', val:['bash','shell']}
	,{key:'shBrushAS3.js', val:['actionscript3','as3']}
	,{key:'shBrushXml.js', val:['xml','xhtml','html','xslt']}
	,{key:'shBrushVb.js', val:['vb','vbnet']}
	,{key:'shBrushSql.js', val:['sql']}
	,{key:'shBrushScala.js', val:['scala']}
	,{key:'shBrushRuby.js', val:['ruby','rails','ror']}
	,{key:'shBrushPython.js', val:['py','python']}
	,{key:'shBrushPowerShell.js', val:['powershell','ps']}
	,{key:'shBrushPlain.js', val:['text','plain']}
	,{key:'shBrushPhp.js', val:['php']}
	,{key:'shBrushJScript.js', val:['js','jscript','javascript']}
	,{key:'shBrushJavaFX.js', val:['jfx','javafx']}
	,{key:'shBrushJava.js', val:['java']}
	,{key:'shBrushGroovy.js', val:['groovy']}
	,{key:'shBrushDiff.js', val:['diff','patch']}
	,{key:'shBrushDelphi.js', val:['delphi','pascal']}
	,{key:'shBrushCss.js', val:['css']}
	,{key:'shBrushPerl.js', val:['pl','perl','Perl']}
				];
function getScriptName(alias){
	var i = 0;
	for (i=0; i &lt; arAliases.length; i++)
	{
		if (arLanguages.indexOf(arAliases[i].key)&lt;0)
		{
			if (arAliases[i].val.indexOf(alias)&gt;=0)
				arLanguages.push(arAliases[i].key);
		}
	}
}
if (jQuery)
{
	$sdv = jQuery.noConflict();
	$sdv(document).ready(function(){
		$sdv(&quot;pre&quot;).each(function(i){
			getScriptName(this.className);
		});
		$sdv.each(arLanguages, function(){
			var scrName = '&lt;?php echo $current_path; ?&gt;Scripts/' + this;
			$sdv.ajax({
			  type: 'GET',
			  url: scrName,
			  cache: true,
			  success: function(){
					++arLangCounts;
					if (arLangCounts == arLanguages.length)
					{
						SyntaxHighlighter.defaults['wrap-lines'] = false;
						dp.SyntaxHighlighter.ClipboardSwf = '&lt;?php echo $current_path; ?&gt;Scripts/clipboard.swf';
						SyntaxHighlighter.all();
						dp.SyntaxHighlighter.HighlightAll('code');
					}
				},
			  dataType: 'script',
			  data: null
			});
		});
	});
}
&lt;/script&gt;
&lt;?php
}
add_action('wp_head','insert_header');
add_action('wp_footer','insert_footer');
?&gt;
</pre>
<p>So instead of loading all the brushes, we will dynamically load it using jQuery. I hope it&#8217;s useful for you <img src='http://sodeve.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sodeve?a=AZJ4u8Yl0q4:b21mhrwM6Vk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sodeve?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=AZJ4u8Yl0q4:b21mhrwM6Vk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/sodeve?i=AZJ4u8Yl0q4:b21mhrwM6Vk:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=AZJ4u8Yl0q4:b21mhrwM6Vk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/sodeve?i=AZJ4u8Yl0q4:b21mhrwM6Vk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=AZJ4u8Yl0q4:b21mhrwM6Vk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/sodeve?i=AZJ4u8Yl0q4:b21mhrwM6Vk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=AZJ4u8Yl0q4:b21mhrwM6Vk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/sodeve?i=AZJ4u8Yl0q4:b21mhrwM6Vk:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sodeve.net/using-jquery-to-enhance-google-syntax-highligher-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to use jQuery in Your Wordpress Post</title>
		<link>http://sodeve.net/how-to-use-jquery-in-your-wordpress-post/</link>
		<comments>http://sodeve.net/how-to-use-jquery-in-your-wordpress-post/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 08:06:21 +0000</pubDate>
		<dc:creator>Hardono Arifanto</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://sodeve.net/?p=844</guid>
		<description><![CDATA[What is jQuery?
jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.
What should I do to install jQuery?
Since Wordpress ver. 2.2, jQuery was automatically added into your Wordpress installation. And it [...]]]></description>
			<content:encoded><![CDATA[<h3>What is jQuery?</h3>
<p><a target ="_blank" href="http://jquery.com/">jQuery</a> is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed<strong> to change the way that you write JavaScript</strong>.</p>
<h3>What should I do to install jQuery?</h3>
<p>Since <a target ="_blank" href="http://codex.wordpress.org/Version_2.2">Wordpress ver. 2.2</a>, jQuery was automatically added into your Wordpress installation. And it was released on May 2007, that&#8217;s like more than 2 years ago. So there is a high chance that you already have jQuery in your Wordpress without you realizing it. <img src='http://sodeve.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>How to check whether jQuery is loaded by Wordpress?</h3>
<p>Install <a href="http://getfirebug.com/" target ="_blank">Firebug</a>. Firebug is a plugin for Firefox browser. Browse the Wordpress blog using Firefox, then enable the firebug by clicking the firebug icon at the bottom-right corner. The icon will change color from gray to something orange-ish. Open the Net tab, then refresh Firefox. You should have something like this:<br />

<div class="ngg-galleryoverview" id="ngg-gallery-8-844">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-129" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://sodeve.net/wp-content/gallery/jquery/jquery.png" title=" " class="shutterset_set_8" >
								<img title="jquery" alt="jquery" src="http://sodeve.net/wp-content/gallery/jquery/thumbs/thumbs_jquery.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

<br />
If you see jquery.js there, it means jQuery is now available for your usage.</p>
<p>You can also check inside your code:</p>
<pre name="code" class="javascript">
<!--
if (jQuery)
{
     //jQuery is loaded, do something
     $j = jQuery.noConflict();
     $j(document).ready(function() {
           // do stuff when DOM is ready
           alert('jQuery wants to say hi!');
     });
}
-->
</pre>
<p>Of course your code must be put into <a href="http://sodeve.net/how-to-use-javascript-in-your-wordpress-blog-post/">separate .js file</a>. </p>
<h3>Can jQuery conflict with other library?</h3>
<p>Yes, <a target ="_blank" href="http://digwp.com/2009/06/including-jquery-in-wordpress-the-right-way/">it might conflict with Prototype Framework.</a>.</p>
<p>Have fun with jQuery!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sodeve?a=gbYFkHtK6W0:JVCaAub7fAs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sodeve?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=gbYFkHtK6W0:JVCaAub7fAs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/sodeve?i=gbYFkHtK6W0:JVCaAub7fAs:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=gbYFkHtK6W0:JVCaAub7fAs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/sodeve?i=gbYFkHtK6W0:JVCaAub7fAs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=gbYFkHtK6W0:JVCaAub7fAs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/sodeve?i=gbYFkHtK6W0:JVCaAub7fAs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=gbYFkHtK6W0:JVCaAub7fAs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/sodeve?i=gbYFkHtK6W0:JVCaAub7fAs:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sodeve.net/how-to-use-jquery-in-your-wordpress-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Use Javascript in Your Wordpress Blog Post</title>
		<link>http://sodeve.net/how-to-use-javascript-in-your-wordpress-blog-post/</link>
		<comments>http://sodeve.net/how-to-use-javascript-in-your-wordpress-blog-post/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 15:10:50 +0000</pubDate>
		<dc:creator>Hardono Arifanto</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://sodeve.net/?p=859</guid>
		<description><![CDATA[I&#8217;ve been adding JavaScript code many times in my earlier blog posts. I know I struggled to do that. But I was too stubborn to google for clues because somehow what I did is working *GRIN*
Anyway, recently I struggled again, but this time I don&#8217;t have the energy to be stubborn, I googled for solution.
According [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been adding JavaScript code many times in my earlier <a href="http://sodeve.net/tag/javascript/">blog posts</a>. I know I struggled to do that. But I was too stubborn to google for clues because somehow what I did is working *GRIN*</p>
<p>Anyway, recently I <a href="http://sodeve.net/a-slightly-better-north-east-line-nel-travel-time-table/">struggled again</a>, but this time I don&#8217;t have the energy to be stubborn, I googled for solution.</p>
<p>According to this <a href="http://codex.wordpress.org/Using_Javascript">article</a>, this is the best way to incorporate JavaScript into Wordpress blog post:
<ol>
<li>Save your JavaScript code in a .js file</li>
<li>Use SCRIPT tag to load the .js file</li>
<li>Add another SCRIPT tag to execute any initiation functions</li>
</ol>
<p>It will be something like this</p>
<pre name="code" class="html">
&lt;script type=&quot;text/javascript&quot; src=&quot;/scripts/myscript.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
	Initialize(); // With assumption that this function is defined inside myscript.js
--&gt;
&lt;/script&gt;
</pre>
<p>That&#8217;s all, very simple and straighforward indeed. So now looking back, what&#8217;s wrong with my earlier method anyway? Chronologically speaking, it would be as follows:</p>
<ol>
<li>I put the code directly inside a SCRIPT tag</li>
<li>Then I realized that Wordpress added &lt;br/&gt; to replace the newline, which basically prevent my JavaScript code running</li>
<li>I removed the newline from my JavaScript code</li>
</ol>
<p>Which is really horrible, considering that:</p>
<ol>
<li>my code is now unreadable to human <img src='http://sodeve.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  </li>
<li>I must tirelessly replace all single line comments (// &#8230;. ) into multiple line style ( /* &#8230;. */ )</li>
<li>It makes debugging with Firebug really difficult</li>
</ol>
<p>Hmmpffhh&#8230; I learned my lesson, so let&#8217;s move on <img src='http://sodeve.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Did you ever make similar mistake because of your stubbornness?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sodeve?a=EfOVF6W4gBQ:211_hV6kxqA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sodeve?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=EfOVF6W4gBQ:211_hV6kxqA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/sodeve?i=EfOVF6W4gBQ:211_hV6kxqA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=EfOVF6W4gBQ:211_hV6kxqA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/sodeve?i=EfOVF6W4gBQ:211_hV6kxqA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=EfOVF6W4gBQ:211_hV6kxqA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/sodeve?i=EfOVF6W4gBQ:211_hV6kxqA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=EfOVF6W4gBQ:211_hV6kxqA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/sodeve?i=EfOVF6W4gBQ:211_hV6kxqA:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sodeve.net/how-to-use-javascript-in-your-wordpress-blog-post/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A (slightly better) North-East-Line (NEL) Travel Time Table</title>
		<link>http://sodeve.net/a-slightly-better-north-east-line-nel-travel-time-table/</link>
		<comments>http://sodeve.net/a-slightly-better-north-east-line-nel-travel-time-table/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 15:24:04 +0000</pubDate>
		<dc:creator>Hardono Arifanto</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[singapore]]></category>

		<guid isPermaLink="false">http://sodeve.net/?p=837</guid>
		<description><![CDATA[The original Travel Time table is located here. Originally it is just a static table, two static tables to be exact.
I decided to make it a little more &#8216;fun&#8217; to use. Click anywhere inside the table to view the action.




[CLEAR]
HBF
OTP
CNT
CQY
DBG 
 LTI 
 FRP 
 BNK 
 PTP 
 SER 
 KVN 
 HGN 
 [...]]]></description>
			<content:encoded><![CDATA[<p>The original Travel Time table is located <a href="http://www.sbstransit.com.sg/transport/trpt_nel_travel.aspx" target = "_blank">here</a>. Originally it is just a static table, two static tables to be exact.</p>
<p>I decided to make it a little more &#8216;fun&#8217; to use. Click anywhere inside the table to view the action.</p>
<link rel="stylesheet" href="http://sodeve.net/wp-content/uploads/2009/09/sdvneldemo.css" type="text/css" media="screen" />
<table id="sdvNELDemoTable" width="600" cellspacing="1" cellpadding="2" border="0" class="tableBody">
<tbody>
<tr class="tableHead">
<td>[CLEAR]</td>
<td><abbr title="Harbourfront">HBF</abbr></td>
<td><abbr title="Outram Park">OTP</abbr></td>
<td><abbr title="Chinatown">CNT</abbr></td>
<td><abbr title="Clarke Quay">CQY</abbr></td>
<td><abbr title= " Dhoby Ghaut " >DBG </abbr></td>
<td><abbr title= " Little India "> LTI </abbr></td>
<td><abbr title= " Farrer Park "> FRP </abbr></td>
<td><abbr title= " Boon Keng "> BNK </abbr></td>
<td><abbr title= " Potong Pasir "> PTP </abbr></td>
<td><abbr title= " Serangoon "> SER </abbr></td>
<td><abbr title= " Kovan "> KVN </abbr></td>
<td><abbr title= " Hougang "> HGN </abbr></td>
<td><abbr title= " Buangkok "> BGK </abbr></td>
<td><abbr title= " Sengkang "> SKG </abbr></td>
<td><abbr title= " Punggol "> PGL </abbr></td>
</tr>
<tr>
<td height="20" class="tableHead"><abbr title="Harbourfront">HBF</abbr></td>
<td height="20" class="tableHead">&nbsp;</td>
<td height="20">3</td>
<td height="20">5</td>
<td height="20">7</td>
<td height="20">9</td>
<td height="20">11</td>
<td height="20">13</td>
<td>15</td>
<td height="20">17</td>
<td height="20">20</td>
<td height="20">23</td>
<td height="20">25</td>
<td height="20">27</td>
<td height="20">29</td>
<td height="20">31</td>
</tr>
<tr>
<td height="20" class="tableHead"><abbr title="Outram Park">OTP</abbr></td>
<td height="20">3</td>
<td height="20" class="tableHead">&nbsp;</td>
<td height="20">1</td>
<td height="20">3</td>
<td height="20">5</td>
<td height="20">7</td>
<td height="20">9</td>
<td>11</td>
<td height="20">14</td>
<td height="20">17</td>
<td height="20">19</td>
<td height="20">22</td>
<td height="20">24</td>
<td height="20">26</td>
<td height="20">28</td>
</tr>
<tr>
<td height="20" class="tableHead"><abbr title="Chinatown">CNT</abbr></td>
<td height="20">5</td>
<td height="20">1</td>
<td height="20" class="tableHead">&nbsp;</td>
<td height="20">1</td>
<td height="20">3</td>
<td height="20">6</td>
<td height="20">7</td>
<td>9</td>
<td height="20">12</td>
<td height="20">15</td>
<td height="20">17</td>
<td height="20">20</td>
<td height="20">22</td>
<td height="20">24</td>
<td height="20">26</td>
</tr>
<tr>
<td height="20" class="tableHead"><abbr title="Clarke Quay">CQY</abbr></td>
<td height="20">7</td>
<td height="20">3</td>
<td height="20">1</td>
<td height="20" class="tableHead">&nbsp;</td>
<td height="20">2</td>
<td height="20">4</td>
<td height="20">6</td>
<td>8</td>
<td height="20">10</td>
<td height="20">13</td>
<td height="20">16</td>
<td height="20">18</td>
<td height="20">20</td>
<td height="20">22</td>
<td height="20">25</td>
</tr>
<tr>
<td height="20" class="tableHead"><abbr title= " Dhoby Ghaut " >DBG </abbr></td>
<td height="20">9</td>
<td height="20">5</td>
<td height="20">3</td>
<td height="20">2</td>
<td height="20" class="tableHead">&nbsp;</td>
<td height="20">1</td>
<td height="20">3</td>
<td>5</td>
<td height="20">8</td>
<td height="20">11</td>
<td height="20">13</td>
<td height="20">16</td>
<td height="20">18</td>
<td height="20">20</td>
<td height="20">22</td>
</tr>
<tr>
<td height="20" class="tableHead"><abbr title= " Little India "> LTI </abbr></td>
<td height="20">11</td>
<td height="20">7</td>
<td height="20">6</td>
<td height="20">4</td>
<td height="20">1</td>
<td height="20" class="tableHead">&nbsp;</td>
<td height="20">1</td>
<td>3</td>
<td height="20">6</td>
<td height="20">9</td>
<td height="20">11</td>
<td height="20">14</td>
<td height="20">16</td>
<td height="20">18</td>
<td height="20">20</td>
</tr>
<tr>
<td height="20" class="tableHead"><abbr title= " Farrer Park "> FRP </abbr></td>
<td height="20">13</td>
<td height="20">9</td>
<td height="20">7</td>
<td height="20">6</td>
<td height="20">3</td>
<td>1</td>
<td height="20" class="tableHead">&nbsp;</td>
<td>2</td>
<td height="20">4</td>
<td height="20">7</td>
<td height="20">9</td>
<td height="20">12</td>
<td height="20">14</td>
<td>16</td>
<td height="20">18</td>
</tr>
<tr>
<td height="20" class="tableHead"><abbr title= " Boon Keng "> BNK </abbr></td>
<td height="20">15</td>
<td height="20">11</td>
<td height="20">9</td>
<td height="20">8</td>
<td height="20">5</td>
<td>3</td>
<td height="20">2</td>
<td height="20" class="tableHead">&nbsp;</td>
<td height="20">2</td>
<td height="20">5</td>
<td height="20">7</td>
<td height="20">10</td>
<td height="20">12</td>
<td>14</td>
<td height="20">16</td>
</tr>
<tr>
<td height="20" class="tableHead"><abbr title= " Potong Pasir "> PTP </abbr></td>
<td height="20">17</td>
<td height="20">14</td>
<td height="20">12</td>
<td height="20">10</td>
<td height="20">8</td>
<td>6</td>
<td height="20">4</td>
<td>2</td>
<td height="20" class="tableHead">&nbsp;</td>
<td height="20">2</td>
<td height="20">5</td>
<td height="20">7</td>
<td height="20">9</td>
<td>11</td>
<td height="20">13</td>
</tr>
<tr>
<td height="20" class="tableHead"><abbr title= " Serangoon "> SER </abbr></td>
<td height="20">20</td>
<td height="20">17</td>
<td height="20">15</td>
<td height="20">13</td>
<td height="20">11</td>
<td>9</td>
<td height="20">7</td>
<td>5</td>
<td height="20">2</td>
<td height="20" class="tableHead">&nbsp;</td>
<td height="20">2</td>
<td height="20">4</td>
<td height="20">7</td>
<td>9</td>
<td height="20">11</td>
</tr>
<tr>
<td height="20" class="tableHead"><abbr title= " Kovan "> KVN </abbr></td>
<td height="20">23</td>
<td height="20">19</td>
<td height="20">17</td>
<td height="20">16</td>
<td height="20">13</td>
<td>11</td>
<td height="20">9</td>
<td>7</td>
<td height="20">5</td>
<td height="20">2</td>
<td height="20" class="tableHead">&nbsp;</td>
<td height="20">2</td>
<td height="20">4</td>
<td>6</td>
<td height="20">8</td>
</tr>
<tr>
<td height="20" class="tableHead"><abbr title= " Hougang "> HGN </abbr></td>
<td height="20">25</td>
<td height="20">22</td>
<td height="20">20</td>
<td height="20">18</td>
<td height="20">16</td>
<td>14</td>
<td height="20">12</td>
<td>10</td>
<td height="20">7</td>
<td height="20">4</td>
<td height="20">2</td>
<td height="20" class="tableHead">&nbsp;</td>
<td height="20">2</td>
<td>4</td>
<td height="20">6</td>
</tr>
<tr>
<td height="20" class="tableHead"><abbr title= " Buangkok "> BGK </abbr></td>
<td height="20">27</td>
<td height="20">24</td>
<td height="20">22</td>
<td height="20">20</td>
<td height="20">18</td>
<td>16</td>
<td height="20">14</td>
<td>12</td>
<td height="20">9</td>
<td height="20">7</td>
<td height="20">4</td>
<td height="20">2</td>
<td height="20" class="tableHead">&nbsp;</td>
<td>2</td>
<td height="20">4</td>
</tr>
<tr>
<td height="20" class="tableHead"><abbr title= " Sengkang "> SKG </abbr></td>
<td height="20" style2="">29</td>
<td height="20" style3="">26</td>
<td height="20" style3="">24</td>
<td height="20" style3="">22</td>
<td height="20" style3="">20</td>
<td style3="">18</td>
<td height="20" style3="">16</td>
<td style3="">14</td>
<td height="20" style2="">11</td>
<td height="20" style3="">9</td>
<td height="20" style3="">6</td>
<td height="20" style3="">4</td>
<td height="20" style3="">2</td>
<td style3="" class="tableHead">&nbsp;</td>
<td height="20" style3="">2</td>
</tr>
<tr>
<td height="20" class="tableHead"><abbr title= " Punggol "> PGL </abbr></td>
<td height="20">31</td>
<td height="20">28</td>
<td height="20">26</td>
<td height="20">25</td>
<td height="20">22</td>
<td>20</td>
<td height="20">18</td>
<td>16</td>
<td height="20">13</td>
<td height="20">11</td>
<td height="20">8</td>
<td height="20">6</td>
<td height="20">4</td>
<td>2</td>
<td height="20" class="tableHead">&nbsp;</td>
</tr>
</tbody>
</table>
<p><script type="text/javascript" src="http://sodeve.net/wp-content/uploads/2009/09/sdvneldemo.js"></script><script type="text/javascript">initTable();</script></p>
<p>No fancy tricks used here. Just the basic DOM Table traversal and DOM attribute get/set. </p>
<pre name="code" class="javascript">
<!--
var sdvtableName = "sdvNELDemoTable";
function Select(row, col, clear)
{
	var myTable = document.getElementById(sdvtableName);
	var i = 0;
	var j = 0;

	if (clear)
	{
		for (i=1; i< myTable.rows.length; i++)
		{
			for (j=1; j<myTable.rows[i].cells.length; j++)
			{
				var csName = myTable.rows[i].cells[j].getAttribute("class");
				if (csName != "tableHead") {
					myTable.rows[i].cells[j].setAttribute("class", "tableBody");
				}
			}
		}
	}	

	if (row == 0)
	{
		//hightlight column only
		for (i=1; i<myTable.rows.length;i++)
		{
			//get style
			var csName = myTable.rows[i].cells[col].getAttribute("class");
			if (csName != "tableHead") {
				if (csName == "highlighted")
					myTable.rows[i].cells[col].setAttribute("class", "tableBody");
				else
					myTable.rows[i].cells[col].setAttribute("class", "highlighted");
			}
		}
	}
	else if (col == 0)
	{
		//highlight row only
		for (i=1; i<myTable.rows[row].cells.length;i++)
		{
			//get style
			var csName = myTable.rows[row].cells[i].getAttribute("class");
			if (csName != "tableHead") {
				if (csName == "highlighted")
					myTable.rows[row].cells[i].setAttribute("class", "tableBody");
				else
					myTable.rows[row].cells[i].setAttribute("class", "highlighted");
			}
		}
	}
	else
	{
		//highlight both based on row and column
		Select(row, 0, false);
		Select(0, col, false)
		var csName = table.rows[row].cells[col].getAttribute("class");
		if (csName != "tableHead") {
			table.rows[row].cells[col].setAttribute("class", "highlighted-twice");
		}
	}
}

function initTable()
{
	var myTable = document.getElementById(sdvtableName);
	var i = 0;
	var j = 0;
	for (i=0; i< myTable.rows.length; i++)
	{
		for (j=0; j<myTable.rows[i].cells.length; j++)
		{
			var c = j.toString();
			var r = i.toString();
			if (i==0 &amp;&amp; j == 0 )
				myTable.rows[i].cells[j].setAttribute("onclick", "Select(" + r + ", " + c +", true)");
			else
				myTable.rows[i].cells[j].setAttribute("onclick", "Select(" + r + ", " + c +", true)");
		}
	}
}
//-->
</pre>
<p>And the CSS used</p>
<pre name="code" class="css">
.tableBody
{
	font-family: Arial, Helvetica, sans-serif;
	font-size: small;
	text-align:center;
	color: #FFF;
	background-color: #000;
	cursor:pointer;
}
.tableHead
{
	font-weight: bold;
	color: #FFF;
	background-color: #665A4A;
}
.highlighted
{
	color: #000;
	background-color: #AAA;
}
.highlighted-twice
{
	color: #FFF;
	background-color: #666;
}
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/sodeve?a=OCyTZM_QJb4:XT6yozxExys:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/sodeve?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=OCyTZM_QJb4:XT6yozxExys:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/sodeve?i=OCyTZM_QJb4:XT6yozxExys:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=OCyTZM_QJb4:XT6yozxExys:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/sodeve?i=OCyTZM_QJb4:XT6yozxExys:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=OCyTZM_QJb4:XT6yozxExys:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/sodeve?i=OCyTZM_QJb4:XT6yozxExys:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/sodeve?a=OCyTZM_QJb4:XT6yozxExys:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/sodeve?i=OCyTZM_QJb4:XT6yozxExys:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sodeve.net/a-slightly-better-north-east-line-nel-travel-time-table/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss><!-- Dynamic page generated in 0.981 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-03-17 00:14:38 -->
