<?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; IDE</title>
	<atom:link href="http://teguheko.echodess.com/category/programming/ide/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>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>
	</channel>
</rss>

