<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Teguh Eko Budiarto &#187; Programming</title>
	<atom:link href="http://teguheko.echodess.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://teguheko.echodess.com</link>
	<description>Web Programming and Sharing Experience</description>
	<lastBuildDate>Tue, 23 Aug 2011 03:58:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Netbeans Java Font not smooth issue in Ubuntu</title>
		<link>http://teguheko.echodess.com/2011/08/netbeans-java-font-not-smooth-issue-in-ubuntu/</link>
		<comments>http://teguheko.echodess.com/2011/08/netbeans-java-font-not-smooth-issue-in-ubuntu/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 03:57:08 +0000</pubDate>
		<dc:creator>Teguh Eko Budiarto</dc:creator>
				<category><![CDATA[IDE]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://teguheko.echodess.com/?p=133</guid>
		<description><![CDATA[If you use netbeans and somehow, the IDE&#8217;s fonts are not smooth enough comparing to gnome display you can fix it with below steps. Go into your Netbeans install directory. For me, it was in /usr/local/netbeans-7.0/. Look for the etc directory and open the file named netbeans.conf in your favorite text editor. Add the following [...]]]></description>
			<content:encoded><![CDATA[<p>If you use netbeans and somehow, the IDE&#8217;s fonts are not smooth enough comparing to gnome display you can fix it with below steps.<br />
Go into your Netbeans install directory. For me, it was in /usr/local/netbeans-7.0/.<br />
Look for the etc directory and open the file named netbeans.conf in your favorite text editor. </p>
<p>Add the following to your netbeans_default_options:</p>
<p><code>-J-Dawt.useSystemAAFontSettings=lcd</code></p>
<p>Start netbeans, and your font will be as smooth as ever. </p>
]]></content:encoded>
			<wfw:commentRss>http://teguheko.echodess.com/2011/08/netbeans-java-font-not-smooth-issue-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 gradient patch for csstidy1.3  c++ source code</title>
		<link>http://teguheko.echodess.com/2010/10/css3-gradient-patch-for-csstidy1-3-c-source-code/</link>
		<comments>http://teguheko.echodess.com/2010/10/css3-gradient-patch-for-csstidy1-3-c-source-code/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 13:27:52 +0000</pubDate>
		<dc:creator>Teguh Eko Budiarto</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://teguheko.echodess.com/?p=114</guid>
		<description><![CDATA[CSSTidy is the best tool to optimize your css code. However, due to development of CSS3 nowadays, there are already some property are not being converted properly. One of them is the gradient feature. Timothée Carry-Caignon had a patch already for the PHP code, but I am using the executable files to generate it on [...]]]></description>
			<content:encoded><![CDATA[<p>CSSTidy is the best tool to optimize your css code. However, due to development of CSS3 nowadays, there are already some property are not being converted properly. One of them is the gradient feature.</p>
<p><a href="http://www.pixelastic.com/blog/188:css3-gradients-with-csstidy">Timothée Carry-Caignon</a> had a patch already for the PHP code, but I am using the executable files to generate it on the fly with django-compress extension. Therefore, I tried to give it a shot on the C++ source code.</p>
<p>To make it short, here you can find the <a href='http://teguheko.echodess.com/wp-content/uploads/2010/10/csstidy1.3.patch.txt'>csstidy1.3.patch file</a>. Apply it against the original source code by <a href="http://csstidy.sourceforge.net">Florian Schmitz</a> (the original CSSTidy author) from <a href="http://sourceforge.net/projects/csstidy/files/CSSTidy%20%28C%2B%2B%2C%20stable%29/1.3/csstidy-source-1.4.zip/download">sourceforge</a>.</p>
<p>After that, you can compile it using below command:<br />
<code>g++ *.cpp -o csstidy</code></p>
<p>I hope you guys find it useful, cheers! </p>
]]></content:encoded>
			<wfw:commentRss>http://teguheko.echodess.com/2010/10/css3-gradient-patch-for-csstidy1-3-c-source-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Z-Index problem with IE</title>
		<link>http://teguheko.echodess.com/2010/08/z-index-problem-with-ie/</link>
		<comments>http://teguheko.echodess.com/2010/08/z-index-problem-with-ie/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 07:44:56 +0000</pubDate>
		<dc:creator>Teguh Eko Budiarto</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[User Interface]]></category>

		<guid isPermaLink="false">http://teguheko.echodess.com/?p=107</guid>
		<description><![CDATA[I spent couple of hours to find the solution of this bug, so I just post it here hope it can help somebody else. Btw, the IE version was 8 in windows XP environment. The problem is introduced here http://www.quirksmode.org/bugreports/archives/2006/01/Explorer_z_index_bug.html and here http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html Some of the solutions proposed are here: http://brenelz.com/blog/squish-the-internet-explorer-z-index-bug/ http://systembash.com/content/css-z-index-internet-explorer/ (try to open [...]]]></description>
			<content:encoded><![CDATA[<p>I spent couple of hours to find the solution of this bug, so I just post it here hope it can help somebody else. Btw, the IE version was 8 in windows XP environment.</p>
<p>The problem is introduced here <a href="http://www.quirksmode.org/bugreports/archives/2006/01/Explorer_z_index_bug.html">http://www.quirksmode.org/bugreports/archives/2006/01/Explorer_z_index_bug.html</a></p>
<p>and here<br />
<a href="http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html">http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html</a></p>
<p>Some of the solutions proposed are here:<br />
<a href="http://brenelz.com/blog/squish-the-internet-explorer-z-index-bug/"> http://brenelz.com/blog/squish-the-internet-explorer-z-index-bug/</a><br />
<a href="http://systembash.com/content/css-z-index-internet-explorer/">http://systembash.com/content/css-z-index-internet-explorer/</a></p>
<p>(try to open those pages in IE and FF / Chrome to compare)</p>
<p>What really worked for me was the combination of two solution above, set position:relative to the containing divs and give each containing div higher value of z-index of the contained one.</p>
<p>Case example :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;z-index:5; position:relative&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;z-index:4&quot;</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;z-index:3&quot;</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;z-index:2; position:relative&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;z-index:1&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></td></tr></table></div>

<p>For the code above, we should be able to see the div with z-index 3 on top of the divs positioned after it (z-index 2 and 1).</p>
]]></content:encoded>
			<wfw:commentRss>http://teguheko.echodess.com/2010/08/z-index-problem-with-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN::Notify::HTML::ColorDiff Inline CSS</title>
		<link>http://teguheko.echodess.com/2009/11/svn-notify-html-colordiff-inline-cs/</link>
		<comments>http://teguheko.echodess.com/2009/11/svn-notify-html-colordiff-inline-cs/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 07:47:03 +0000</pubDate>
		<dc:creator>Teguh Eko Budiarto</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://teguheko.echodess.com/?p=92</guid>
		<description><![CDATA[We are using SVN to save our works and hooking a post-commit script which one of the function is to send e-mail regarding the changes that had just made. We are using the wonderful SVN::Notify, a perl application to do the job. It already have the functionality to produce a beautifully diff colored HTML email [...]]]></description>
			<content:encoded><![CDATA[<p>We are using SVN to save our works and hooking a post-commit script which one of the function is to send e-mail regarding the changes that had just made. We are using the wonderful <a href="http://search.cpan.org/dist/SVN-Notify/">SVN::Notify</a>, a <a href="http://www.perl.org/">perl</a> application to do the job. It already have the functionality to produce a beautifully diff colored HTML email using the SVN::Notify::HTML::ColorDiff module as the handler.</p>
<p>However, since we are using web based Google Apps Gmail interface as our email client, the HTML was not rendered nicely because the CSS is not applied inside the interface. We need to change the CSS to the inline style. And then I found a patch done <a href="http://www.jaim.at/2008/09/06/jack-moffitt-power-up-your-commit-e-mails/">here</a>. Because it is a direct hack, I want it to be more generic that the user can choose the inline style or not, then I modified a little bit more. I added optional parameter &#8211;css-inline to generate CSS style directly inline with the HTML tags. I had submitted the changes to the original author hoping he will include this option in the next revision. Just in case, I also put it here.</p>
<p>Snippets to add the additional parameter:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000066;">package</span> SVN<span style="color: #339933;">::</span><span style="color: #006600;">Notify</span><span style="color: #339933;">::</span><span style="color: #006600;">HTML</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># $Id: HTML.pm 4617 2009-03-19 17:04:53Z david $</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> HTML<span style="color: #339933;">::</span><span style="color: #006600;">Entities</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> SVN<span style="color: #339933;">::</span><span style="color: #006600;">Notify</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">$SVN</span><span style="color: #339933;">::</span><span style="color: #006600;">Notify</span><span style="color: #339933;">::</span><span style="color: #006600;">HTML</span><span style="color: #339933;">::</span><span style="color: #006600;">VERSION</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'2.79'</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">@SVN</span><span style="color: #339933;">::</span><span style="color: #006600;">Notify</span><span style="color: #339933;">::</span><span style="color: #006600;">HTML</span><span style="color: #339933;">::</span><span style="color: #006600;">ISA</span> <span style="color: #339933;">=</span> <span style="color: #000066;">qw</span><span style="color: #009900;">&#40;</span>SVN<span style="color: #339933;">::</span><span style="color: #006600;">Notify</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
__PACKAGE__<span style="color: #339933;">-&gt;</span><span style="color: #006600;">register_attributes</span><span style="color: #009900;">&#40;</span>
    linkize   <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'linkize'</span><span style="color: #339933;">,</span>
    css_url   <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'css-url=s'</span><span style="color: #339933;">,</span>
    wrap_log  <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'wrap-log'</span><span style="color: #339933;">,</span>
    css_inline <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'css-inline'</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>You may download the full source below:</p>
<ul>
<li><a href="http://sites.google.com/site/teguheko/home/files-place-holder/HTML.pm?attredirects=0&amp;d=1">HTML.pm</a></li>
<li><a href="http://sites.google.com/site/teguheko/home/files-place-holder/ColorDiff.pm?attredirects=0&amp;d=1">ColorDiff.pm</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://teguheko.echodess.com/2009/11/svn-notify-html-colordiff-inline-cs/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Netbeans Python Intellisense</title>
		<link>http://teguheko.echodess.com/2009/10/netbeans-python-intellisense/</link>
		<comments>http://teguheko.echodess.com/2009/10/netbeans-python-intellisense/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 02:07:11 +0000</pubDate>
		<dc:creator>Teguh Eko Budiarto</dc:creator>
				<category><![CDATA[IDE]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://teguheko.echodess.com/?p=81</guid>
		<description><![CDATA[Since Python is not a strongly typed programming language, you do not have to specify your variable type. This is nice but have some drawback for Netbeans, which it can not recognize the type easily so you can not have good suggestion for the intellisense feature. To fix that you have to specify the type [...]]]></description>
			<content:encoded><![CDATA[<p>Since Python is not a strongly typed programming language, you do not have to specify your variable type. This is nice but have some drawback for Netbeans, which it can not recognize the type easily so you can not have good suggestion for the intellisense feature. To fix that you have to specify the type of your variable and make sure you already import the correct module.</p>
<p>For example, when you have this kind of code (below code are for example purpose only)</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">datetime</span> <span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">datetime</span>
<span style="color: #ff7700;font-weight:bold;">from</span> django.<span style="color: black;">db</span> <span style="color: #ff7700;font-weight:bold;">import</span> models
<span style="color: #ff7700;font-weight:bold;">from</span> django.<span style="color: black;">utils</span>.<span style="color: black;">translation</span> <span style="color: #ff7700;font-weight:bold;">import</span> gettext_lazy <span style="color: #ff7700;font-weight:bold;">as</span> _
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> Poll<span style="color: black;">&#40;</span>models.<span style="color: black;">Model</span><span style="color: black;">&#41;</span>:
    question = models.<span style="color: black;">CharField</span><span style="color: black;">&#40;</span>max_length=<span style="color: #ff4500;">200</span><span style="color: black;">&#41;</span>
    password = models.<span style="color: black;">CharField</span><span style="color: black;">&#40;</span>max_length=<span style="color: #ff4500;">200</span><span style="color: black;">&#41;</span>
    pub_date = models.<span style="color: black;">DateTimeField</span><span style="color: black;">&#40;</span>_<span style="color: black;">&#40;</span><span style="color: #483d8b;">'date published'</span><span style="color: black;">&#41;</span>, 
                          default=<span style="color: #dc143c;">datetime</span>.<span style="color: black;">now</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">class</span> Admin:
        <span style="color: #ff7700;font-weight:bold;">pass</span>
    <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__str__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">self</span>.<span style="color: black;">question</span>
    <span style="color: #ff7700;font-weight:bold;">def</span> get_choice_list<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">list</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">choice_set</span>.<span style="color: black;">order_by</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'id'</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">def</span> get_choice_from_num<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, choice_num<span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">try</span>:
            <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">self</span>.<span style="color: black;">get_choice_list</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span><span style="color: #008000;">int</span><span style="color: black;">&#40;</span>choice_num<span style="color: black;">&#41;</span>-<span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>
        <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">IndexError</span>:
            <span style="color: #ff7700;font-weight:bold;">raise</span> Choice.<span style="color: black;">DoesNotExist</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> Choice<span style="color: black;">&#40;</span>models.<span style="color: black;">Model</span><span style="color: black;">&#41;</span>:
    poll = models.<span style="color: black;">ForeignKey</span><span style="color: black;">&#40;</span>Poll<span style="color: black;">&#41;</span>    
    choice = models.<span style="color: black;">CharField</span><span style="color: black;">&#40;</span>max_length=<span style="color: #ff4500;">200</span><span style="color: black;">&#41;</span>
    votes = models.<span style="color: black;">IntegerField</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">class</span> Admin:
        <span style="color: #ff7700;font-weight:bold;">pass</span>
    <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__str__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">self</span>.<span style="color: black;">choice</span>
    <span style="color: #ff7700;font-weight:bold;">def</span> get_num<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #ff7700;font-weight:bold;">try</span>:
            <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">self</span>.<span style="color: black;">poll</span>.<span style="color: black;">get_choice_list</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">index</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>+<span style="color: #ff4500;">1</span>
        <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">ValueError</span>:
            <span style="color: #ff7700;font-weight:bold;">raise</span> Choice.<span style="color: black;">DoesNotExist</span></pre></td></tr></table></div>

<p>For people like me, usually the first thing I do when want to use a defined variable is to hit the ctrl-space button to display the Intellisense suggestion. But in this case, when I want to use functions or variables defined in the attribute <strong>poll</strong> in <strong>Choice</strong> class, it displays :<br />
<a href="http://teguheko.echodess.com/wp-content/uploads/2009/10/specify-type-netbeans-python.jpg" title="specify type netbeans python"><img src="http://teguheko.echodess.com/wp-content/uploads/2009/10/specify-type-netbeans-python-1024x346.jpg" alt="specify type netbeans python" title="specify type netbeans python" width="600" height="202" class="aligncenter size-large wp-image-82" /></a></p>
<p>Which means Netbeans does&#8217;nt understand the type and the intellisense just throw all the types available to you and it become garbage, instead of suggestion. To teach Netbeans the type of the variable, just click the <strong>Specify type of [the variable name]</strong> menu, and then type your variable&#8217;s type. After that the intellisense will give you nice result, like this picture below:<br />
<a href="http://teguheko.echodess.com/wp-content/uploads/2009/10/specified-type-netbeans-python.jpg" title="specified type netbeans python"><img src="http://teguheko.echodess.com/wp-content/uploads/2009/10/specified-type-netbeans-python.jpg" alt="specified type netbeans python" title="specified type netbeans python" width="685" height="346" class="aligncenter size-full wp-image-83" /></a></p>
<p>Other thing is to make sure you have imported your class in your file so Netbeans will recognized it properly. Hope it helps, Cheers! <img src='http://teguheko.echodess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://teguheko.echodess.com/2009/10/netbeans-python-intellisense/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to make Python enable to download package from internet</title>
		<link>http://teguheko.echodess.com/2009/10/how-to-make-python-enable-to-download-package-from-internet/</link>
		<comments>http://teguheko.echodess.com/2009/10/how-to-make-python-enable-to-download-package-from-internet/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 01:25:41 +0000</pubDate>
		<dc:creator>Teguh Eko Budiarto</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[setuptools]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://teguheko.echodess.com/?p=68</guid>
		<description><![CDATA[This tip is for windows XP user ( some other windows version will also have similar procedure). If you are using an automatic configuration script for your internet setting, most probably, Python will not be able to connect to internet. This is troublesome if you want to install some packages which has dependencies which need [...]]]></description>
			<content:encoded><![CDATA[<p>This tip is for windows XP user ( some other windows version will also have similar procedure).</p>
<p>If you are using an automatic configuration script for your internet setting, most probably, Python will not be able to connect to internet. This is troublesome if you want to install some packages which has dependencies which need to be fetched from the net. You need to change your internet options setting to use the proxy address directly.</p>
<p>Below is how to do that:</p>
<ul>
<li>Go to Control Panel</li>
<li>Open Internet Options</li>
<li>Open Connection Tab</li>
<li>Click on <strong>LAN Settings</strong> button</li>
<li>Check the <em>Use a proxy server for your LAN&#8230;</em></li>
<li>Enter the <strong>proxy IP Address </strong>and its <strong>port</strong>. If you do not know where it is, ask your network administrator or just open the configuration script to find out where is the IP you need to use.</li>
<li>Press OK until all the setting windows are closed.</li>
</ul>
<p>Below is the screen shot of the internet options screen.</p>
<div id="attachment_69" class="wp-caption aligncenter" style="width: 544px"><img class="size-full wp-image-69" title="Internet Options Setting" src="http://teguheko.echodess.com/wp-content/uploads/2009/10/internetoptions.jpg" alt="Windows XP Professional Internet Options Screen" width="534" height="539" /><p class="wp-caption-text">Windows XP Professional Internet Options Screen</p></div>
]]></content:encoded>
			<wfw:commentRss>http://teguheko.echodess.com/2009/10/how-to-make-python-enable-to-download-package-from-internet/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Building Python installer from package source</title>
		<link>http://teguheko.echodess.com/2009/10/building-python-installer-from-package-source/</link>
		<comments>http://teguheko.echodess.com/2009/10/building-python-installer-from-package-source/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 01:04:42 +0000</pubDate>
		<dc:creator>Teguh Eko Budiarto</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[python package]]></category>
		<category><![CDATA[setuptools]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://teguheko.echodess.com/?p=65</guid>
		<description><![CDATA[I wrote this post in my journey to adapt Python with Django framework as my tool in the next project. A little bit skeptical and some holding back since I had background in PHP and C# .Net. But, I have no choice because Python is already team&#8217;s decision for new projects. So, here I go [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote this post in my journey to adapt Python with Django framework as my tool in the next project. A little bit skeptical and some holding back since I had background in PHP and C# .Net. But, I have no choice because Python is already team&#8217;s decision for new projects. So, here I go with learning new language and framework again.</p>
<p>In the way, sometimes I can not find a distributable package for your Python version. In one case, I would like to install <a href="http://pypi.python.org/pypi/setuptools">setuptools</a> to install other packages, <a href="http://pypi.python.org/pypi/soaplib/0.8.1">soaplib</a> which I need to build a SOAP web service. This is because most of our legacy applications are using C# which using SOAP to interface with web services, otherwise, I prefer to create REST based web service. Anyway, this is just my beginner way of thinking.</p>
<p>So, enough with the mumbling, below is how it is:</p>
<ul>
<li>Unpack the source into a folder.</li>
<li>Using command prompt, go to the folder and run command below ( I assume that you already set your python PATH and can run Python command from command prompt).<strong></strong></li>
<blockquote>
<li><strong>python setup.py bdist_wininst</strong></li>
</blockquote>
<li>Voila! An executable installer for your installed Python version will be available in <strong>dist </strong>sub folder.</li>
</ul>
<p>Very easy isn&#8217;t it? Yeah, if it is that easy for me to find how in the first place, I would&#8217;nt write this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://teguheko.echodess.com/2009/10/building-python-installer-from-package-source/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Netbeans locale setting</title>
		<link>http://teguheko.echodess.com/2009/09/netbeans-locale-setting/</link>
		<comments>http://teguheko.echodess.com/2009/09/netbeans-locale-setting/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 03:57:45 +0000</pubDate>
		<dc:creator>Teguh Eko Budiarto</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Programming IDE]]></category>

		<guid isPermaLink="false">http://teguheko.echodess.com/?p=60</guid>
		<description><![CDATA[I just upgraded my laptop harddisk. It is not that I need more space, but the old harddisk was failed several times, in a very critical moment when having tele-screen-sharing-conference with my client . Anyway, that was a different story. The story here is that I have to re-install my computer, and unfortunately, I haven&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I just upgraded my laptop harddisk. It is not that I need more space, but the old harddisk was failed several times, in a very critical moment when having tele-screen-sharing-conference with my client <img src='http://teguheko.echodess.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> . Anyway, that was a different story. The story here is that I have to re-install my computer, and unfortunately, I haven&#8217;t got image backup of my HDD yet&#8230;another big mistake. However, I managed in a single, almost sleepless night to make it ready for to code again, and now already create the image for clean backup <img src='http://teguheko.echodess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>One of the main application I used to code is <a href="http://www.netbeans.org">Netbeans</a>. I love this editor. However, I am using Japanese as my windows locale, so as default, Netbeans will use that setting and display japanese menu. Even though until now, I am already living in Japan for 5 years, I still prefer English as my application menu language, so I don&#8217;t have to bother searching difficult kanji which can waste my productive time. </p>
<p>I did the setting before to change the locale to English after some time searching the web for the correct setting. And now, I have to do it again, but I don&#8217;t know where to find it anymore since I did not write about it anywhere. So, here it is. You may change the configuration of Netbeans, following instructions from this <a href="http://wiki.netbeans.org/FaqNetbeansConf">Netbeans Wiki</a>.</p>
<p>To change the locale, you need to add text below after the last configuration in netbeans_default_options.</p>
<p><code>-J-Duser.language=en -J-Duser.region=US -J-Dfile.encoding=UTF-8 </code></p>
<p>This is valid for Netbeans 6.5, and 6.71 when this post is written. I hope this can be useful for somebody besides me <img src='http://teguheko.echodess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://teguheko.echodess.com/2009/09/netbeans-locale-setting/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>JQuery AutoComplete Search per Word</title>
		<link>http://teguheko.echodess.com/2009/09/jquery-autocomplete-search-per-word/</link>
		<comments>http://teguheko.echodess.com/2009/09/jquery-autocomplete-search-per-word/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 08:42:17 +0000</pubDate>
		<dc:creator>Teguh Eko Budiarto</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[User Interface]]></category>

		<guid isPermaLink="false">http://teguheko.echodess.com/?p=35</guid>
		<description><![CDATA[I was using JQuery autocomplete from Jörn Zaefferer to finish a small project for Computer Telephony &#8211; IPX PBX user interface. I think this is an awesome plugin ad it is suited very well for my project. For the project, I need the autocomplete to be able to search all data containing words which begins [...]]]></description>
			<content:encoded><![CDATA[<p>I was using JQuery autocomplete from <a href="http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/">Jörn Zaefferer</a> to finish a small project for Computer Telephony &#8211; IPX PBX user interface. I think this is an awesome plugin ad it is suited very well for my project. </p>
<p>For the project, I need the autocomplete to be able to search all data containing words which begins with the text being typed in the input textbox. However, after browsing through the documentation and try the possible combination of <strong>matchContains</strong> and <strong>matchSubset</strong> options of the plugin, it seems that it was not able to do what I want it to do. So, I decided to debug the javascript and go into the code to modify the search algorithm. </p>
<p>When I look into the code, I found this part of code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> matchSubset<span style="color: #009900;">&#40;</span>s<span style="color: #339933;">,</span> sub<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>options.<span style="color: #660066;">matchCase</span><span style="color: #009900;">&#41;</span> 
        s <span style="color: #339933;">=</span> s.<span style="color: #660066;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> s.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span>sub<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>options.<span style="color: #660066;">matchContains</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;word&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        i <span style="color: #339933;">=</span> s.<span style="color: #660066;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">search</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>b&quot;</span> <span style="color: #339933;">+</span> sub.<span style="color: #660066;">toLowerCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">==</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">return</span> i <span style="color: #339933;">==</span> <span style="color: #CC0000;">0</span> <span style="color: #339933;">||</span> options.<span style="color: #660066;">matchContains</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>In the fifth line of the function, there is a value check for <strong>matchContains</strong> option which implies that it received &#8220;word&#8221; value besides boolean true or false. The code uses the javascript search function with regex using <strong>\b</strong> tag which means word boundary. This means that it already have the functionality to search for subset contained in each word of the search data.<br />
I immediately changed my code to try to use the option by adding this line:</p>
<p><code>matchContains:"word"</code></p>
<p>So, the whole code to activate the autocomplete textbox is as below:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#searchInput&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">autocomplete</span><span style="color: #009900;">&#40;</span>json.<span style="color: #660066;">Data</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
    cacheLength<span style="color: #339933;">:</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span>
    delay<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
    formatItem<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>row<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> sShow <span style="color: #339933;">=</span> row.<span style="color: #000066;">Name</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; - (&quot;</span> <span style="color: #339933;">+</span> row.<span style="color: #660066;">TypePhone</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;) &quot;</span> <span style="color: #339933;">+</span> row.<span style="color: #660066;">Phone</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">return</span> sShow<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    matchContains<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;word&quot;</span><span style="color: #339933;">,</span>
    matchSubset<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
    max<span style="color: #339933;">:</span><span style="color: #CC0000;">100</span><span style="color: #339933;">,</span>
    minChars<span style="color: #339933;">:</span><span style="color: #CC0000;">1</span><span style="color: #339933;">,</span>
    width<span style="color: #339933;">:</span><span style="color: #CC0000;">285</span><span style="color: #339933;">,</span>
    selectFirst<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
    scrollHeight<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;100px&quot;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>After that, I try to find in the author&#8217;s website and <a href="http://docs.jquery.com/Plugins/Autocomplete">JQuery documentation </a>where in the world that option is being documented. At last I found it in the <a href="http://jquery.bassistance.de/autocomplete/changelog.txt">change log</a> for the latest version 1.1 (per this post date). It should be also written in the JQuery plugin documentation, since it is a very useful feature, at least for me at the time <img src='http://teguheko.echodess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I hope the author would update the documentation accordingly soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://teguheko.echodess.com/2009/09/jquery-autocomplete-search-per-word/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Joomla problem with incorrect SQL export</title>
		<link>http://teguheko.echodess.com/2007/12/joomla-problem-with-incorrect-sql-export/</link>
		<comments>http://teguheko.echodess.com/2007/12/joomla-problem-with-incorrect-sql-export/#comments</comments>
		<pubDate>Sat, 22 Dec 2007 11:32:00 +0000</pubDate>
		<dc:creator>Teguh Eko Budiarto</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://teguheko.wordpress.com/2007/12/22/joomla-problem-with-incorrect-sql-export</guid>
		<description><![CDATA[Today I had experienced a weird problem with my Joomla upload. After uploading to live server, my mod_smoothgallery from OsCandy was not displaying and StopPress Module that should be appear on top all other content was not displaying but was blocking all other so they can not be clicked. When I enter administration site, the [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had experienced a weird problem with my <a href="http://www.joomla.org">Joomla </a>upload. After uploading to live server, my <span class="bold">mod_smoothgallery from OsCandy was not displaying and StopPress Module that should be appear on top all other content was not displaying but was blocking all other so they can not be clicked. When I enter administration site, the menu was not displaying either. Because of that, I thought the problem was only effecting JavaScript related components and also related to files/folder permission mode. I tried to change mode the files and folders, but still there was no effect. And then I installed another instance of Joomla using Elefante Installer, an automated script installer provided by the hosting provider.</p>
<p>After installing fresh copy of Joomla, I check the administration menu bar, and there it was. And when I check the files permission are the same with the one I had. So, I tried to copy all the files to overwrite my site with no good result. Finally I found the problem was with the SQL export-import. I export SQL from my localhost development server by using HeidiSQL and apparently it gives incompatible format so when I import to the live server it was not importing properly. Thank goodness I was using Apace2Triad which comes with PhpMyAdmin so I just re-export from there and re-import from the live server&#8217;s PhpMyAdmin. Voila! it worked perfectly again. So, the site can run smoothly from now.<br />Please visit the site at <a href="http://www.chinese-studies.org">www.chinese-studies.org</a>. We will updating more content in the future, so please visit often for you guys who interested in chinese cultures <img src='http://teguheko.echodess.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> <br /></span></p>
]]></content:encoded>
			<wfw:commentRss>http://teguheko.echodess.com/2007/12/joomla-problem-with-incorrect-sql-export/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

