<?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/" version="2.0">

<channel>
	<title>The Geek @ amellie.net</title>
	
	<link>http://geek.amellie.net</link>
	<description>Just another amellie.net network site</description>
	<lastBuildDate>Tue, 10 Aug 2010 15:38:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/thegeek" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="thegeek" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>WordPress 3.0: Subdomains in Bluehost</title>
		<link>http://geek.amellie.net/2010/08/wordpress-3-0-subdomains-in-bluehost/</link>
		<comments>http://geek.amellie.net/2010/08/wordpress-3-0-subdomains-in-bluehost/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 15:38:02 +0000</pubDate>
		<dc:creator>amellie</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[bluehost]]></category>
		<category><![CDATA[domains]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://geek.amellie.net/?p=68</guid>
		<description><![CDATA[Many people, including me have troubles using a multisite feature of the recently released WordPress 3.0. I wanted to merge all my sites and to use subdomains (directories) for the address of each site (e.g. my.blog.com instead of blog.com/my). In order to create subdomains, WordPress requires us to create a wildcard subdomain. However, wildcard subdomains [...]]]></description>
			<content:encoded><![CDATA[<p>Many people, including me have troubles using a multisite feature of the recently released WordPress 3.0. I wanted to merge all my sites and to use subdomains (directories) for the address of each site (e.g. <code>my.blog.com</code> instead of <code>blog.com/my</code>). In order to create subdomains, WordPress requires us to <a href="http://codex.wordpress.org/Migrating_Multiple_Blogs_into_WordPress_3.0_Multisite#3._Create_a_wildcard_subdomain" target="_blank">create a wildcard subdomain</a>. However, <a href="http://helpdesk.bluehost.com/index.php/kb/article/000527" target="_blank">wildcard subdomains are not supported on Bluehost</a>, where my site is currently hosted at. So, after searching for information on the net, I found that there are two workarounds that we can do in order to get our WordPress 3.0 multisite working:</p>
<h2>Option 1</h2>
<p><a href="http://geek.amellie.net/files/2010/08/subdomain1.gif" rel="lightbox[68]"><img src="http://geek.amellie.net/files/2010/08/subdomain1.gif" alt="Subdomain Option 1" title="Subdomain Option 1" width="492" height="166" class="aligncenter size-full wp-image-69" /></a><br />
Create a subdomain on Bluehost&#8217;s CPanel, and point the document root to <code>/public_html/</code>. Then create a new site on WordPress with the same subdomain name as the one you create on the CPanel. Simple!</p>
<h2>Option 2</h2>
<p><a href="http://geek.amellie.net/files/2010/08/subdomain2.gif" rel="lightbox[68]"><img src="http://geek.amellie.net/files/2010/08/subdomain2.gif" alt="Subdomain Option 2" title="Subdomain Option 2" width="482" height="162" class="aligncenter size-full wp-image-70" /></a><br />
Create a wildcard subdomain (*) on Bluehost&#8217;s CPanel, and point the document root to <code>/public_html/</code>. <a href="http://www.bluehostforum.com/showthread.php?15639-Wildcard-domains-on-Bluehost-(yes-it-s-possible)" target="_blank">Some people</a> reported that this indeed worked! By creating this wildcard domain, you are allowed to use any domain names you like (visitors can still type in any random subdomains and they will still end up in your main site! Awesome, huh?). But one thing to be aware of is that, you need to set up redirects through ModRewrite or scripting if you don&#8217;t want some subdomains to link to your WordPress files.</p>
<p>I personally prefer the first option (and I have tested this, and it works!), since I only use this website for myself and I don&#8217;t add new sites on WordPress very often. Well, it&#8217;s up to you <img src='http://geek.amellie.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thegeek?a=0LX4iqYHQ9M:lMGFcZdJRsw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/thegeek?i=0LX4iqYHQ9M:lMGFcZdJRsw:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=0LX4iqYHQ9M:lMGFcZdJRsw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thegeek?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=0LX4iqYHQ9M:lMGFcZdJRsw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/thegeek?i=0LX4iqYHQ9M:lMGFcZdJRsw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=0LX4iqYHQ9M:lMGFcZdJRsw:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/thegeek?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thegeek/~4/0LX4iqYHQ9M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://geek.amellie.net/2010/08/wordpress-3-0-subdomains-in-bluehost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Character Encoding Problems</title>
		<link>http://geek.amellie.net/2010/08/character-encoding-problems/</link>
		<comments>http://geek.amellie.net/2010/08/character-encoding-problems/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 15:21:58 +0000</pubDate>
		<dc:creator>amellie</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[character]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://geek.amellie.net/?p=63</guid>
		<description><![CDATA[After performing an upgrade to an earlier version of WordPress, I saw some weird characters (e.g. â€œ for &#8220;&#8221;) shown on my posts. It turned out that many people had the same problem as mine. So, if you encounter some character encoding problems which prevent WordPress from showing &#8220;normal&#8221; characters, there are some fixes that [...]]]></description>
			<content:encoded><![CDATA[<p>After performing an upgrade to an earlier version of WordPress, I saw some weird characters (e.g. â€œ for &#8220;&#8221;) shown on my posts. It turned out that <a href="http://trevinchow.com/blog/2007/09/19/strange-characters-after-wordpress-upgrade/" target="_blank">many</a> <a href="http://elliottback.com/wp/wordpress-20-upgrade-problems-character-encoding-transformation/" target="_blank">people</a> had the same problem as mine. So, if you encounter some character encoding problems which prevent WordPress from showing &#8220;normal&#8221; characters, there are some fixes that you can try:</p>
<h2>Changing Config Files</h2>
<p>One thing you can do is to change the <strong><code>wp-config.php</code></strong> file by adding or replacing these codes:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_CHARSET'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_COLLATE'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>It worked for me only once. When the next time I did an upgrade and the problem occurred again, it didn&#8217;t work anymore. So I tried the next fix.</p>
<h2>Executing SQL codes</h2>
<p>This fix is for advance users only who are quite familiar with the SQL codes. Please backup your database first before proceeding! <img src='http://geek.amellie.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Once you&#8217;ve done that, execute these SQL codes:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> wp_posts <span style="color: #993333; font-weight: bold;">SET</span> post_content <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span> <span style="color: #66cc66;">&#40;</span>post_content<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'â€“'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'---'</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_posts <span style="color: #993333; font-weight: bold;">SET</span> post_content <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span> <span style="color: #66cc66;">&#40;</span>post_content<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'â€™'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'&amp;#39;'</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_posts <span style="color: #993333; font-weight: bold;">SET</span> post_content <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span> <span style="color: #66cc66;">&#40;</span>post_content<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'â€œ'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'&amp;quot;'</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_posts <span style="color: #993333; font-weight: bold;">SET</span> post_content <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span> <span style="color: #66cc66;">&#40;</span>post_content<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'â€'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'&amp;quot;'</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>What these codes do is to replace the strange characters in your post content into the ones that are readable by WordPress. The codes use <code>wp_posts</code> table, so make sure you change these table names if you use different table names for your WordPress blog.</p>
<p>Hope it works!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thegeek?a=tvV6w3msAZA:97osKefkz_0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/thegeek?i=tvV6w3msAZA:97osKefkz_0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=tvV6w3msAZA:97osKefkz_0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thegeek?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=tvV6w3msAZA:97osKefkz_0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/thegeek?i=tvV6w3msAZA:97osKefkz_0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=tvV6w3msAZA:97osKefkz_0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/thegeek?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thegeek/~4/tvV6w3msAZA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://geek.amellie.net/2010/08/character-encoding-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto-Increment in SQL</title>
		<link>http://geek.amellie.net/2007/06/auto-increment-in-sql/</link>
		<comments>http://geek.amellie.net/2007/06/auto-increment-in-sql/#comments</comments>
		<pubDate>Thu, 07 Jun 2007 16:38:39 +0000</pubDate>
		<dc:creator>amellie</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://geek.amellie.net/2007/06/auto-increment-in-sql/</guid>
		<description><![CDATA[Auto-increment is a very useful feature that allows a unique number to be generated when a new record is inserted into a table. The DBMS will automatically increment the last number of the table and add it to the auto-incremented column. Unfortunately, different DBMSs use different ways or syntax to do this. In this post, [...]]]></description>
			<content:encoded><![CDATA[<p>Auto-increment is a very useful feature that allows a unique number to be generated when a new record is inserted into a table. The <span class="abbr" title="Database Management System">DBMS</span> will automatically increment the last number of the table and add it to the auto-incremented column. Unfortunately, different DBMSs use different ways or syntax to do this. In this post, I will show you how to include the auto-increment feature in MySQL, Microsoft SQL Server, and Oracle.</p>
<h2 class="section-title">Auto-Increment in MySQL</h2>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> Students <span style="color: #66cc66;">&#40;</span>
id <span style="color: #993333; font-weight: bold;">INT</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span> <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">,</span>
fullname <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">80</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span>
<span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>As you can see from the above code, the auto-increment feature is very simple when it&#8217;s applied in MySQL. You only need to add <code>auto_increment</code> as shown in line 2.  By default, the <code>auto_increment</code> value starts at 1. If you want the <code>auto_increment</code> to start with value other than 1, you have to set that value using <code>ALTER TABLE</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">ALTER</span> <span style="color: #993333; font-weight: bold;">TABLE</span> Students <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span><span style="color: #66cc66;">=</span><span style="color: #cc66cc;">2000</span></pre></div></div>

<p><span id="more-29"></span></p>
<h2 class="section-title">Auto-Increment in MS SQL Server</h2>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> Students <span style="color: #66cc66;">&#40;</span>
id <span style="color: #993333; font-weight: bold;">INT</span> <span style="color: #993333; font-weight: bold;">IDENTITY</span> <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">,</span>
fullname <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">80</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span>
<span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>Similar to MySQL, MS SQL Server uses a simple syntax to perform auto-increment feature; i.e. using <code>identity</code> keyword. By default, the starting value for <code>identity</code> is 1. If you want the <code>id</code> column to start at value 2000 and increment by 10, then you need to change the <code>IDENTITY</code> property to <code>IDENTITY(2000,10)</code>. Simple, eh?</p>
<h2 class="section-title">Auto-Increment in Oracle</h2>
<p>In Oracle, the auto-increment feature can be quite tricky, as it requires us to write more lines of code using PL/SQL. Take a look at this:</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
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> Students
<span style="color: #66cc66;">&#40;</span>
  id <span style="color: #993333; font-weight: bold;">INT</span><span style="color: #66cc66;">,</span>
  fullname VARCHAR2<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">80</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span><span style="color: #66cc66;">,</span>
  <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">SEQUENCE</span> seq_students
<span style="color: #993333; font-weight: bold;">START</span> <span style="color: #993333; font-weight: bold;">WITH</span> <span style="color: #cc66cc;">1</span>
<span style="color: #993333; font-weight: bold;">INCREMENT</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #cc66cc;">1</span>
nomaxvalue;
&nbsp;
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #993333; font-weight: bold;">REPLACE</span> <span style="color: #993333; font-weight: bold;">TRIGGER</span> trig_students
<span style="color: #993333; font-weight: bold;">BEFORE</span> <span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">ON</span> Students
<span style="color: #993333; font-weight: bold;">FOR</span> EACH <span style="color: #993333; font-weight: bold;">ROW</span>
<span style="color: #993333; font-weight: bold;">BEGIN</span>
  <span style="color: #993333; font-weight: bold;">SELECT</span> seq_students<span style="color: #66cc66;">.</span><span style="color: #993333; font-weight: bold;">NEXTVAL</span> <span style="color: #993333; font-weight: bold;">INTO</span> :<span style="color: #993333; font-weight: bold;">NEW</span><span style="color: #66cc66;">.</span>id <span style="color: #993333; font-weight: bold;">FROM</span> dual;
<span style="color: #993333; font-weight: bold;">END</span>;
<span style="color: #66cc66;">/</span></pre></td></tr></table></div>

<p>To perform the auto-increment feature, Oracle uses both <code>sequence</code> to generate the numbers and <code>trigger</code> to add the incremented number to the destination column. Line 14 to 17 shows how trigger <code>trig_students</code> adds the next available number (that is given by <code>seq_students</code>) into the column <code>id</code> in table <code>Students</code>, before the insertion of a new record on <code>Students</code> table occurs.</p>
<p>If you want the <code>id</code> column to start at value 2000 and increment by 10, you need to change the sequence <code>seq_students</code> to:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">SEQUENCE</span> seq_students
<span style="color: #993333; font-weight: bold;">START</span> <span style="color: #993333; font-weight: bold;">WITH</span> <span style="color: #cc66cc;">2000</span>
<span style="color: #993333; font-weight: bold;">INCREMENT</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #cc66cc;">10</span>
nomaxvalue;</pre></td></tr></table></div>

<p>You can also set a maximum value for that particular column by changing the <code>nomaxvalue</code> property to <code>maxvalue 5000</code>, for example.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thegeek?a=ftqUEa32izk:klSGZ18xYB8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/thegeek?i=ftqUEa32izk:klSGZ18xYB8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=ftqUEa32izk:klSGZ18xYB8:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thegeek?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=ftqUEa32izk:klSGZ18xYB8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/thegeek?i=ftqUEa32izk:klSGZ18xYB8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=ftqUEa32izk:klSGZ18xYB8:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/thegeek?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thegeek/~4/ftqUEa32izk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://geek.amellie.net/2007/06/auto-increment-in-sql/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SQL: if exists</title>
		<link>http://geek.amellie.net/2007/03/sql-if-exists/</link>
		<comments>http://geek.amellie.net/2007/03/sql-if-exists/#comments</comments>
		<pubDate>Mon, 19 Mar 2007 00:03:24 +0000</pubDate>
		<dc:creator>amellie</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://geek.amellie.net/2007/03/sql-if-exists/</guid>
		<description><![CDATA[I collected these SQL scripts so that whenever I want to check the existency of a table, view, stored procedure, or function in a database, all I have to do is to copy and paste them to the Query Analyzer. FYI, These scripts are only used for SQL Server . Hope it&#8217;s useful! Check if [...]]]></description>
			<content:encoded><![CDATA[<p>I collected these SQL scripts so that whenever I want to check the existency of a table, view, stored procedure, or function in a database, all I have to do is to copy and paste them to the Query Analyzer. FYI, These scripts are only used for SQL Server <img src='http://geek.amellie.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  . Hope it&#8217;s useful!</p>
<p>Check if the table exists in a database:</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="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">EXISTS</span>
<span style="color: #66cc66;">&#40;</span>
  <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> dbo<span style="color: #66cc66;">.</span>sysobjects
  <span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> object_id<span style="color: #66cc66;">&#40;</span>N<span style="color: #ff0000;">'[dbo].[enterTableNameHere]'</span><span style="color: #66cc66;">&#41;</span>
         <span style="color: #993333; font-weight: bold;">AND</span> OBJECTPROPERTY<span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">,</span> N<span style="color: #ff0000;">'IsUserTable'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span>
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">DROP</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #66cc66;">&#91;</span>dbo<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">.</span><span style="color: #66cc66;">&#91;</span>enterTableNameHere<span style="color: #66cc66;">&#93;</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">GO</span></pre></td></tr></table></div>

<p><span id="more-26"></span></p>
<p>Check if the view exists in a database:</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="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">EXISTS</span>
<span style="color: #66cc66;">&#40;</span>
  <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span>
  <span style="color: #993333; font-weight: bold;">FROM</span> INFORMATION_SCHEMA<span style="color: #66cc66;">.</span>VIEWS
  <span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #993333; font-weight: bold;">TABLE_NAME</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'enterViewNameHere'</span>
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">DROP</span> <span style="color: #993333; font-weight: bold;">VIEW</span> <span style="color: #66cc66;">&#91;</span>dbo<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">.</span><span style="color: #66cc66;">&#91;</span>enterViewNameHere<span style="color: #66cc66;">&#93;</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">GO</span></pre></td></tr></table></div>

<p>Check if the stored procedure exists in a database:</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="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">EXISTS</span>
<span style="color: #66cc66;">&#40;</span>
  <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold;">FROM</span> dbo<span style="color: #66cc66;">.</span>sysobjects
  <span style="color: #993333; font-weight: bold;">WHERE</span> id <span style="color: #66cc66;">=</span> object_id<span style="color: #66cc66;">&#40;</span>N<span style="color: #ff0000;">'[dbo].[enterStoredProcedureNameHere]'</span><span style="color: #66cc66;">&#41;</span>
         <span style="color: #993333; font-weight: bold;">AND</span> OBJECTPROPERTY<span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">,</span> N<span style="color: #ff0000;">'IsProcedure'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span>
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">DROP</span> <span style="color: #993333; font-weight: bold;">PROCEDURE</span> <span style="color: #66cc66;">&#91;</span>dbo<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">.</span><span style="color: #66cc66;">&#91;</span>enterStoredProcedureNameHere<span style="color: #66cc66;">&#93;</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">GO</span></pre></td></tr></table></div>

<p>Check if the user-defined function exists in a database:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">IF</span> <span style="color: #993333; font-weight: bold;">EXISTS</span>
<span style="color: #66cc66;">&#40;</span>
	<span style="color: #993333; font-weight: bold;">SELECT</span>	<span style="color: #66cc66;">*</span>
	<span style="color: #993333; font-weight: bold;">FROM</span>	INFORMATION_SCHEMA<span style="color: #66cc66;">.</span>ROUTINES
	<span style="color: #993333; font-weight: bold;">WHERE</span>		ROUTINE_NAME 	<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'enterFunctionNameHere'</span>
		<span style="color: #993333; font-weight: bold;">AND</span>	ROUTINE_SCHEMA	<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'dbo'</span>
		<span style="color: #993333; font-weight: bold;">AND</span>	ROUTINE_TYPE	<span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'FUNCTION'</span>
<span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">DROP</span> <span style="color: #993333; font-weight: bold;">FUNCTION</span> <span style="color: #66cc66;">&#91;</span>dbo<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">.</span><span style="color: #66cc66;">&#91;</span>enterFunctionNameHere<span style="color: #66cc66;">&#93;</span>
&nbsp;
<span style="color: #993333; font-weight: bold;">GO</span></pre></td></tr></table></div>

<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thegeek?a=Th8aY_KXCZY:MFCZs3b2yAg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/thegeek?i=Th8aY_KXCZY:MFCZs3b2yAg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=Th8aY_KXCZY:MFCZs3b2yAg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thegeek?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=Th8aY_KXCZY:MFCZs3b2yAg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/thegeek?i=Th8aY_KXCZY:MFCZs3b2yAg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=Th8aY_KXCZY:MFCZs3b2yAg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/thegeek?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thegeek/~4/Th8aY_KXCZY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://geek.amellie.net/2007/03/sql-if-exists/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Web Design Resources</title>
		<link>http://geek.amellie.net/2007/02/web-design-resources/</link>
		<comments>http://geek.amellie.net/2007/02/web-design-resources/#comments</comments>
		<pubDate>Tue, 06 Feb 2007 20:34:39 +0000</pubDate>
		<dc:creator>amellie</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[photoshop]]></category>

		<guid isPermaLink="false">http://geek.amellie.net/2007/02/web-design-resources/</guid>
		<description><![CDATA[I rely on these websites when it comes to designing websites. So, this is a time for me to share them with you. Hope it is useful. Graphics &#38; Stock Photos Famfamfam.com &#8211; The most famous icons on the web! stock.xchng &#8211; my favourite stock pictures!! Getty Images &#8211; royalty-free StockVault Bullet Madness &#8211; a [...]]]></description>
			<content:encoded><![CDATA[<p>I rely on these websites when it comes to designing websites. So, this is a time for me to share them with you. Hope it is useful.</p>
<p><strong>Graphics &amp; Stock Photos</strong></p>
<ul>
<li><a href="http://www.famfamfam.com/lab/icons/" target="_blank">Famfamfam.com</a> &#8211; The most famous icons on the web!</li>
<li><a href="http://www.sxc.hu/" target="_blank">stock.xchng</a> &#8211; my favourite stock pictures!!</li>
<li><a href="http://creative.gettyimages.com/source/frontdoor/DefaultRfLanding.aspx" target="_blank">Getty Images</a> &#8211; royalty-free</li>
<li><a href="http://www.stockvault.net/gallery/" target="_blank">StockVault</a></li>
<li><a href="http://www.stylegala.com/features/bulletmadness/" target="_blank">Bullet Madness</a> &#8211; a great collection of bullets!</li>
<li><a href="http://pstutorialsblog.com/44/free-stock-photos/" target="_blank">Free Stock Photos</a> &#8211; the list of stock photo websites</li>
<li><a href="http://gtmcknight.com/buttons/" target="_blank">Steal These Buttons</a></li>
<li><a href="http://www.factorycity.net/projects/microformats-icons/" target="_blank">Microformats Icons</a> &#8211; created by Wolfgang Bartelme. Both photoshop and illustrator files are included, so you can modify the icons to the ones you like!</li>
</ul>
<p><span id="more-24"></span></p>
<p><strong>Photoshop Goodies</strong></p>
<ul>
<li><a href="http://www.adobe.com/cfusion/exchange/index.cfm?view=sn710" target="_blank">Adobe Exchange</a> &#8211; from brushes, filters, actions to custom shapes&#8230; you can find all of them here!</li>
<li><a href="http://designfruit.com/jasongaylor/blog/?cat=4" target="_blank">Design Fruit: Photoshop Brushes</a></li>
<li><a href="http://www.brushes.obsidiandawn.com/designs.htm" target="_blank">Obsidian Dawn: Photoshop Brushes</a></li>
<li><a href="http://missm.paperlilies.com/" target="_blank">Miss M</a> &#8211; handmade photoshop brushes by Miss M</li>
<li><a href="http://browse.deviantart.com/resources/applications/psbrushes/?order=9&amp;alltime=yes" target="_blank">DeviantArt: Photoshop Brushes</a> &#8211; browse the most popular brushes @ DeviantArt. A great collection!</li>
<li><a href="http://www.psbrushes.net/" target="_blank">PS Brushes</a></li>
<li><a href="http://browse.deviantart.com/resources/applications/psactions/?order=9&amp;alltime=yes" target="_blank">DeviantArt: Photoshop Actions</a></li>
</ul>
<p><strong>Patterns</strong></p>
<ul>
<li><a href="http://squidfingers.com/patterns/" target="_blank">Squidfingers: Patterns</a></li>
<li><a href="http://citrusmoon.typepad.com/patterns/" target="_blank">Citrus Moon Patterns</a></li>
<li><a href="http://k10k.net/pixelpatterns/" target="_blank">Kaliber10000 Patterns</a></li>
</ul>
<p><strong>Inspiration</strong></p>
<ul>
<li><a href="http://www.designshack.co.uk/" target="_blank">Design Shack</a> &#8211; it has one of the best inspirational web design collections.</li>
<li><a href="http://www.cssbeauty.com/gallery/" target="_blank">CSS beauty</a></li>
<li><a href="http://www.flickr.com/photos/splat/sets/981332/" target="_blank">Flickr: Web Design Inspiration</a> &#8211; a photoset created by Patrick Haney.</li>
<li><a href="http://www.cssremix.com/" target="_blank">CSS Remix</a></li>
<li><a href="http://cssmania.com/" target="_blank">CSS Mania</a></li>
<li><a href="http://www.smashingmagazine.com/2007/01/31/inspire-yourself-50-remarkable-favicons/" target="_blank">Inspire Yourself: 50 Remarkable Favicons</a></li>
<li><a href="http://www.smashingmagazine.com/2006/12/19/50-beautiful-css-based-web-designs-in-2006" target="_blank">50 Beautiful CSS Based Web Designs in 2006</a></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thegeek?a=GkRg8XxFGZY:Tg_MEcMFbjs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/thegeek?i=GkRg8XxFGZY:Tg_MEcMFbjs:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=GkRg8XxFGZY:Tg_MEcMFbjs:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thegeek?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=GkRg8XxFGZY:Tg_MEcMFbjs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/thegeek?i=GkRg8XxFGZY:Tg_MEcMFbjs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=GkRg8XxFGZY:Tg_MEcMFbjs:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/thegeek?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thegeek/~4/GkRg8XxFGZY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://geek.amellie.net/2007/02/web-design-resources/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Showing off: UQ</title>
		<link>http://geek.amellie.net/2006/11/showing-off-uq/</link>
		<comments>http://geek.amellie.net/2006/11/showing-off-uq/#comments</comments>
		<pubDate>Mon, 06 Nov 2006 11:23:53 +0000</pubDate>
		<dc:creator>amellie</dc:creator>
				<category><![CDATA[Links]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[map]]></category>

		<guid isPermaLink="false">http://geek.amellie.net/2006/11/showing-off-uq/</guid>
		<description><![CDATA[The University of Queensland, Brisbane, Australia. Brought to you by Flash Earth. This is a very cool site that uses 8 different sources to view the satellite and aerial imagery of the earth!]]></description>
			<content:encoded><![CDATA[<p>The University of Queensland, Brisbane, Australia.</p>
<p><a href="http://geek.amellie.net/files/2006/11/uq.jpg" target="_blank" rel="lightbox[23]"><img src="http://geek.amellie.net/files/2006/11/uq.jpg" alt="uq.jpg" /></a></p>
<p>Brought to you by <a href="http://www.flashearth.com/#" target="_blank">Flash Earth</a>.<span id="more-23"></span> This is a very cool site that uses 8 different sources to view the satellite and aerial imagery of the earth!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thegeek?a=SN77Loxfr-g:yIDWp-rUaj0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/thegeek?i=SN77Loxfr-g:yIDWp-rUaj0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=SN77Loxfr-g:yIDWp-rUaj0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thegeek?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=SN77Loxfr-g:yIDWp-rUaj0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/thegeek?i=SN77Loxfr-g:yIDWp-rUaj0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=SN77Loxfr-g:yIDWp-rUaj0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/thegeek?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thegeek/~4/SN77Loxfr-g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://geek.amellie.net/2006/11/showing-off-uq/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>I/O in C++</title>
		<link>http://geek.amellie.net/2006/11/io-in-c/</link>
		<comments>http://geek.amellie.net/2006/11/io-in-c/#comments</comments>
		<pubDate>Wed, 01 Nov 2006 14:12:40 +0000</pubDate>
		<dc:creator>amellie</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[io]]></category>

		<guid isPermaLink="false">http://geek.amellie.net/2006/11/io-in-c/</guid>
		<description><![CDATA[Out of three programming languages that I&#8217;ve learnt, C++ has the simplest way to handle the I/O (input/output). I&#8217;m trying to demostrate how to write a program that reads doubles from a file, performs addition of those numbers, and print the results to stdout (standard output). C++ has useful ifstream and fstream classes that provide [...]]]></description>
			<content:encoded><![CDATA[<p>Out of <span class="abbr" title="Java, C, and C++">three programming languages</span> that I&#8217;ve learnt, C++ has the simplest way to handle the I/O (input/output). I&#8217;m trying to demostrate how to write a program that reads doubles from a file, performs addition of those numbers, and print the results to <code>stdout</code> (standard output).</p>
<p>C++ has useful <code>ifstream</code> and <code>fstream</code> classes that provide a stream interface to read and write data from/to files. The difference between both classes is, <code>ifstream</code> can only be used for reading, while <code>fstream</code> can be used for both reading and writing. Since we&#8217;re only going to read the files, we better use <code>ifstream</code> class.<span id="more-15"></span></p>
<p>Before we start, make sure you have the <a href="http://geek.amellie.net/files/2006/11/test.txt" target="_blank">test.txt</a> (you can copy mine, if you want). Now, let&#8217;s get into the codes (the fun part!):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;">string inputFile <span style="color: #000080;">=</span> <span style="color: #FF0000;">&quot;test.txt&quot;</span><span style="color: #008080;">;</span>
ifstream fileIn<span style="color: #008080;">;</span>
fileIn.<span style="color: #007788;">open</span><span style="color: #008000;">&#40;</span>inputFile.<span style="color: #007788;">c_str</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>fileIn.<span style="color: #007788;">fail</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	<span style="color: #0000dd;">cerr</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;Cannot open file&quot;</span> <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>Nothing fancy and tricky about the above codes. But notice that, in line 3, I use <code>inputFile.c_str()</code> instead of <code>inputFile</code> to open the file. If you see the <a href="http://www.cplusplus.com/ref/iostream/ifstream/open.html" target="_blank">C++ Reference</a>, the function <code>open</code> takes the argument <code>const char *</code> for the filename. Since <code>string</code> is an object, we have to convert it to <code>char *</code> which interprets each characters in an array of size N and is used in C language. The function <code>c_str()</code> takes care of the conversion. The code <code>fileIn.fail()</code> checks if failure has occured, i.e. whether the file exists or not. If it fails, return an error.</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
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;">vector inputs<span style="color: #008080;">;</span>
<span style="color: #0000ff;">double</span> temp<span style="color: #008080;">;</span>
<span style="color: #0000ff;">double</span> adds <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
<span style="color: #0000ff;">while</span> <span style="color: #008000;">&#40;</span><span style="color: #000040;">!</span>fileIn.<span style="color: #007788;">eof</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	fileIn <span style="color: #000080;">&gt;&gt;</span> temp<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>fileIn.<span style="color: #007788;">fail</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
		<span style="color: #0000ff;">break</span><span style="color: #008080;">;</span>
	inputs.<span style="color: #007788;">push_back</span><span style="color: #008000;">&#40;</span>temp<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	adds <span style="color: #000080;">=</span> adds <span style="color: #000040;">+</span> temp<span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
fileIn.<span style="color: #007788;">close</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;total: &quot;</span> <span style="color: #000080;">&lt;&lt;</span> adds <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span>
<span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> <span style="color: #FF0000;">&quot;results:&quot;</span> <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span>
&nbsp;
<span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> i <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span> i <span style="color: #000080;">&lt;</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span><span style="color: #008000;">&#41;</span>inputs.<span style="color: #007788;">size</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
	<span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> inputs<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span> <span style="color: #000080;">&lt;&lt;</span> endl<span style="color: #008080;">;</span></pre></td></tr></table></div>

<p>The vector <code>inputs</code> record all the doubles from the specified files. Why do I use vector? Vector makes our life much easier. Unlike the arrays, we don&#8217;t have to worry about how big the size will be and don&#8217;t have to bother about resizing it if the size is too small. We just have to declare the vector and use <code>push_back()</code> function to insert the inputs.</p>
<p>In line 6, the stream <code>fileIn</code> extracts the data and stores it in <code>temp</code> which has the parameter type of <code>double</code>. The stream will handle the conversion itself. If the current data in <code>fileIn</code> is not double, it will break out of the loop; as illustrated in code line 7 &#8211; 8. The <code>while</code> loop between line 4 and 11 will continue to do its job until the the file points to the <code>eof</code> or end of file. The codes between line 14 and 18 do the usual stuff, i.e. displaying the results to <code>stdout</code>.</p>
<p>You can download the complete .cpp file <a href="http://geek.amellie.net/files/2006/11/io.zip">here</a> (right click &#038; save-as).</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thegeek?a=hUEuQ9BBvIQ:8yoXZzevEn8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/thegeek?i=hUEuQ9BBvIQ:8yoXZzevEn8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=hUEuQ9BBvIQ:8yoXZzevEn8:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thegeek?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=hUEuQ9BBvIQ:8yoXZzevEn8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/thegeek?i=hUEuQ9BBvIQ:8yoXZzevEn8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=hUEuQ9BBvIQ:8yoXZzevEn8:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/thegeek?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thegeek/~4/hUEuQ9BBvIQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://geek.amellie.net/2006/11/io-in-c/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Exception in Firefox</title>
		<link>http://geek.amellie.net/2006/10/exception-in-firefox/</link>
		<comments>http://geek.amellie.net/2006/10/exception-in-firefox/#comments</comments>
		<pubDate>Wed, 25 Oct 2006 00:44:46 +0000</pubDate>
		<dc:creator>amellie</dc:creator>
				<category><![CDATA[Web Browser]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[exception]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://geek.amellie.net/2006/10/exception-in-firefox/</guid>
		<description><![CDATA[I have a Microsoft Visual Studio 2005 installed on my laptop. And it told me to debug the Firefox&#8217;s unhandled exception! Is this part of Firefox&#8217;s weakness? A weakness has been discovered in Firefox, which can be exploited by malicious people to disclose system information. The weakness is caused due to file path information being [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://geek.amellie.net/files/2006/10/exception.jpg" alt="Exception in Firefox" /><span id="more-14"></span></p>
<p>I have a Microsoft Visual Studio 2005 installed on my laptop. And it told me to debug the Firefox&#8217;s unhandled exception! Is this part of Firefox&#8217;s weakness?</p>
<blockquote><p>A weakness has been discovered in Firefox, which can be exploited by malicious people to disclose system information.</p>
<p>The weakness is caused due to file path information being included in certain exceptions being thrown by the browser. This can e.g. be exploited to disclose the full installation path by calling the &#8220;window.sidebar.addSearchEngine()&#8221; JavaScript function with invalid parameters.</p>
<p>This may reportedly also be exploited to disclose the full path to the user&#8217;s profile via errors thrown in installed extensions.</p>
<p>The weakness has been confirmed in version 1.5.0.3. Other versions may also be affected. <a href="http://secunia.com/advisories/20244/" target="_blank">Secunia.com</a></p></blockquote>
<p>My lecturer always told me that EXCEPTIONS MUST BE HANDLED APPROPRIATELY. Did Firefox&#8217;s people miss something? <img src='http://geek.amellie.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  FYI, I&#8217;m running Firefox 1.5.0.7.</p>
<p><strong>UPDATE</strong>: This exception STILL exists in the most recent Firefox 2.0!!! I discovered it today!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thegeek?a=CNK7tvHk7yE:Gp2TNFrfqsc:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/thegeek?i=CNK7tvHk7yE:Gp2TNFrfqsc:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=CNK7tvHk7yE:Gp2TNFrfqsc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thegeek?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=CNK7tvHk7yE:Gp2TNFrfqsc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/thegeek?i=CNK7tvHk7yE:Gp2TNFrfqsc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=CNK7tvHk7yE:Gp2TNFrfqsc:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/thegeek?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thegeek/~4/CNK7tvHk7yE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://geek.amellie.net/2006/10/exception-in-firefox/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>sIFR: a (not-so-new) technology</title>
		<link>http://geek.amellie.net/2006/10/sifr-a-not-so-new-technology/</link>
		<comments>http://geek.amellie.net/2006/10/sifr-a-not-so-new-technology/#comments</comments>
		<pubDate>Mon, 23 Oct 2006 23:55:40 +0000</pubDate>
		<dc:creator>amellie</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[sifr]]></category>

		<guid isPermaLink="false">http://geek.amellie.net/2006/10/sifr-a-not-so-new-technology/</guid>
		<description><![CDATA[Scalable Inman Flash Replacement, or sIFR, is a technology that uses JavaScript and Flash to replace text elements in HTML files with the font you desire. So forget about Arial, Georgia, Times New Roman, Verdana, and Helvetica! With sIFR, you can display texts with any type of font you like without having the users installed [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wiki.novemberborn.net/sifr/What+is+sIFR" target="blank">Scalable Inman Flash Replacement</a>, or sIFR, is a technology that uses JavaScript and Flash to replace text elements in HTML files with the font you desire. So forget about Arial, Georgia, Times New Roman, Verdana, and Helvetica! With sIFR, you can display texts with any type of font you like without having the users installed the particular font on their computer &#8211; from san-serifs, romans, dingbats, handwritings&#8230; you name it! Thanks to <a href="http://www.mikeindustries.com/blog/archive/2004/08/sifr" target="blank">Mike Davidson</a> and all the people who involve in the development of this technology, problems concerning web typography is <em>partly</em> solved.<span id="more-12"></span></p>
<p>Why is it partly solved? Well, it is not the <em>best</em> typography solution. It has limitations and restrictions. Users who have neither Javascript nor Flash plugins installed or enabeled on their PC could still see the texts, but without the sIFR-based styling. It will unfortunately be displayed using the CSS-based styling. Even Mike Davidson admits that:</p>
<blockquote><p>While sIFR is a liberating solution, it clearly falls into the category of “things which shouldn’t have to be done”.</p></blockquote>
<p>You can read other limitations <a href="http://www.mikeindustries.com/blog/archive/2004/08/sifr" target="blank">here</a>.</p>
<h2 class="section-title">How does it work?</h2>
<p>As I mentioned before, sIFR relies on both JavaScript and Flash. If the browser has the JavaScript enabled, JavaScript detects if Flash 6 or greater is installed. If both of them are enabled, all the texts that use sIFR are hidden and replaced by the Flash movies referring to those texts. </p>
<h2 class="section-title">How can I use it?</h2>
<p>First of all, download the latest sIFR package <a href="http://www.mikeindustries.com/sifr/" target="blank">here</a> and unzip the file.</p>
<p><strong>If you have a Macromedia Flash program:</strong><br />
1. Open sifr.fla<br />
2. Using a Selection Tool (type &#8220;v&#8221;), double-click the stage (the white working-space)<br />
3. Select the text &#8220;Do not remove this text&#8221;<br />
4. You should now see the Properties Window. If it&#8217;s not visible, click Window &gt; Properties or CTRL+F3<br />
5. From the Properties Window, select the font you want to be displayed.<br />
6. Click File &gt; Export &gt; Export Movie<br />
7. Let&#8217;s call the file &#8220;font.swf&#8221; then click OK<br />
8. Click OK once more</p>
<p><strong>If you <em>don&#8217;t</em> have a Macromedia Flash program:</strong><br />
Don&#8217;t worry!! You can download the fonts from <a href="http://www.fontsmack.com/" target="blank">FontSmack.com</a>. Make sure you download .swf file, which is either &#8220;Basic Character Set&#8221; or &#8220;Full Latin Character Set&#8221;. Rename it to &#8220;font.swf&#8221;.</p>
<p>Let&#8217;s now create a separate folder, name it with whatever thing you like. Copy these files (which can be found in the sIFR package that you just downloaded) over to a folder you just created:</p>
<ul>
<li>sifr.js</li>
<li>sifr-addons.js</li>
<li>sIFR-screen.css</li>
<li>sIFR-print.css</li>
<li>font.swf</li>
</ul>
<p>Create a new html document in the same folder, and copy these codes:</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
35
36
37
38
39
40
41
42
43
44
45
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</span>
<span style="color: #00bbdd;">&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span> <span style="color: #000066;">lang</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;en&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>sIFR<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">style</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span>&gt;</span>
	<span style="color: #808080; font-style: italic;">&lt;!-- h1{</span>
<span style="color: #808080; font-style: italic;">	font-family: Helvetica, Arial, Verdana, sans-serif;</span>
<span style="color: #808080; font-style: italic;">	font-weight: bold;</span>
<span style="color: #808080; font-style: italic;">	letter-spacing: -.05em;</span>
<span style="color: #808080; font-style: italic;">	margin: 0;</span>
<span style="color: #808080; font-style: italic;">	padding: 0;</span>
<span style="color: #808080; font-style: italic;">	line-height: 1em;</span>
<span style="color: #808080; font-style: italic;">	} --&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">style</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sIFR-screen.css&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;screen&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sIFR-print.css&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;print&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sifr.js&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sifr-addons.js&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>The Gothic Times<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Use sIFR? (Requires refresh) <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript:sIFR.preferenceManager.disable()&quot;</span>&gt;</span>no<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span> | <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript:sIFR.preferenceManager.enable()&quot;</span>&gt;</span>yes<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span> | <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript:sIFR.preferenceManager.storage.reset()&quot;</span>&gt;</span>forget<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
	//<span style="color: #009900;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
<span style="color: #009900;">	<span style="color: #66cc66;">/</span>* Replacement calls. Please see documentation <span style="color: #000066;">for</span> more information. *<span style="color: #66cc66;">/</span></span>
&nbsp;
<span style="color: #009900;">	if<span style="color: #66cc66;">&#40;</span>typeof sIFR <span style="color: #66cc66;">==</span> <span style="color: #ff0000;">&quot;function&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></span>
&nbsp;
<span style="color: #009900;">	<span style="color: #66cc66;">//</span> This is the preferred <span style="color: #ff0000;">&quot;named argument&quot;</span> syntax</span>
<span style="color: #009900;">		sIFR.replaceElement<span style="color: #66cc66;">&#40;</span>named<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span>sSelector:<span style="color: #ff0000;">&quot;h1&quot;</span>, sFlashSrc:<span style="color: #ff0000;">&quot;font.swf&quot;</span>, sColor:<span style="color: #ff0000;">&quot;#000000&quot;</span>, sLinkColor:<span style="color: #ff0000;">&quot;#000000&quot;</span>, sBgColor:<span style="color: #ff0000;">&quot;#FFFFFF&quot;</span>, sHoverColor:<span style="color: #ff0000;">&quot;#CCCCCC&quot;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</span>
&nbsp;
<span style="color: #009900;">	<span style="color: #66cc66;">&#125;</span>;</span>
&nbsp;
<span style="color: #009900;">	<span style="color: #66cc66;">//</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<p>The CSS h1 style between line number 6 and 15 is the style you need if the user doesn&#8217;t have JavaScript or Flash enabled (and if the user has disabled the use of sIFR).</p>
<p>The JavaScript codes between line number 30 and 42 are essential for styling the sIFR. The codes include the CSS selector, the .swf file name, color of the font, background color, and hover color. For more information about this, please refer to the <a href="http://wiki.novemberborn.net/sifr/How+to+use">documentation</a>.</p>
<p>Next, open a file called sIFR-screen.css and add these codes at the end of file:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.sIFR-hasFlash</span> h1 <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">55px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">letter-spacing</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>This CSS stuff is used to configure the size of the text. You can remove those properties EXCEPT <code>visibility: hidden</code>. Remember, different fonts have different sizes, so you have to play around with those 3 CSS properties (font-size, letter-spacing, line-height) by increasing or decreasing the values.</p>
<p>Open up the html file you just created, and you can see the result right away! It&#8217;s not that hard, right?? So, you can style your website with sIFR now!! <img src='http://geek.amellie.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Tips: use sIFR as minimum as possible, i.e. use it only for titles and some texts that you want to emphasise (like short quotes). DON&#8217;T use it for long texts coz it will slow down the loading time of your page.</p>
<p>Happy sIFR-ing!!</p>
<p><strong>NOTE:</strong> If you&#8217;re using WordPress, you can try on a <a href="http://www.chait.net/index.php?p=310">sIFR plugin</a>. I&#8217;ve never tried this before, so I don&#8217;t know how it really works.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thegeek?a=j_pflzDidDk:ILCz71MmO9E:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/thegeek?i=j_pflzDidDk:ILCz71MmO9E:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=j_pflzDidDk:ILCz71MmO9E:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thegeek?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=j_pflzDidDk:ILCz71MmO9E:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/thegeek?i=j_pflzDidDk:ILCz71MmO9E:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=j_pflzDidDk:ILCz71MmO9E:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/thegeek?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thegeek/~4/j_pflzDidDk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://geek.amellie.net/2006/10/sifr-a-not-so-new-technology/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>A New Beginning</title>
		<link>http://geek.amellie.net/2006/10/a-new-beginning/</link>
		<comments>http://geek.amellie.net/2006/10/a-new-beginning/#comments</comments>
		<pubDate>Sat, 21 Oct 2006 10:51:38 +0000</pubDate>
		<dc:creator>amellie</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://geek.amellie.net/2006/10/a-new-beginning/</guid>
		<description><![CDATA[Hello, everyone! Let me introduce myself *ehm*. My name is Amalia. You can call me Amalia, Amel, Meli, or whatever you want . I&#8217;m an Indonesian student who studies IT in Brisbane, Australia. You can read more about me in here. One may wonder, why geek??? According to Wikipedia, geek may not always be the [...]]]></description>
			<content:encoded><![CDATA[<p>Hello, everyone! Let me introduce myself *ehm*. My name is Amalia. You can call me Amalia, Amel, Meli, or whatever you want <img src='http://geek.amellie.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> . I&#8217;m an Indonesian student who studies IT in Brisbane, Australia. You can read more about me in <a href="http://amellie.net/about/about-the-author">here</a>.</p>
<p>One may wonder, <em>why geek???</em> According to <a href="http://en.wikipedia.org/wiki/Geek" target="_blank">Wikipedia</a>, geek may not always be the same as <em>nerd</em>. These are the definition of geek mentioned by Wikipedia:</p>
<blockquote><p>One who is primarily motivated by passion.<br />
A person who is interested in technology, especially computing and new media.<br />
A person who has chosen concentration rather than conformity; one who pursues skill (especially technical skill) and imagination, not mainstream social acceptance.<br />
A person with a devotion to something in a way that places him or her outside the mainstream.</p></blockquote>
<p><span id="more-11"></span></p>
<p>This blog was built as a result of my endless passion for IT. I want to share my knowledge that I learnt both at Uni and work to other people. I admit that I&#8217;m not an expert on this field, but I&#8217;d like to do this as part of my contribution to the subject I truly enjoy. Honestly, I&#8217;m still not sure where I&#8217;m going to head this blog to. I&#8217;ll perhaps write everything related to IT that pops out of my mind for the time being. I&#8217;m a newbie on this, so please be patient <img src='http://geek.amellie.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> . Hope you like my new IT blog! <img src='http://geek.amellie.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/thegeek?a=ijz2NNXVCHg:TjLUQYY2xng:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/thegeek?i=ijz2NNXVCHg:TjLUQYY2xng:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=ijz2NNXVCHg:TjLUQYY2xng:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/thegeek?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=ijz2NNXVCHg:TjLUQYY2xng:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/thegeek?i=ijz2NNXVCHg:TjLUQYY2xng:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/thegeek?a=ijz2NNXVCHg:TjLUQYY2xng:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/thegeek?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/thegeek/~4/ijz2NNXVCHg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://geek.amellie.net/2006/10/a-new-beginning/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

