<?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>ericbae.com</title>
	<atom:link href="http://ericbae.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ericbae.com</link>
	<description>woooooo hoooooo.</description>
	<lastBuildDate>Thu, 16 Feb 2012 23:08:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HTML5 &#8220;Placeholder&#8221; for non-HTML5 browsers</title>
		<link>http://ericbae.com/2012/02/16/html5-placeholder-for-non-html5-browsers/</link>
		<comments>http://ericbae.com/2012/02/16/html5-placeholder-for-non-html5-browsers/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 23:08:22 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://ericbae.com/?p=216</guid>
		<description><![CDATA[Had to dig around a few places to get this going. &#8220;Placeholder&#8221; attribute is a nice addition in HTML5, but browsers like IE8 doesn&#8217;t like it so much. Rather than paraphrasing, this site tells you the best way to go &#8230; <a href="http://ericbae.com/2012/02/16/html5-placeholder-for-non-html5-browsers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Had to dig around a few places to get this going. &#8220;Placeholder&#8221; attribute is a nice addition in HTML5, but browsers like IE8 doesn&#8217;t like it so much. Rather than paraphrasing, this site tells you the best way to go about it using Modernizr and jQuery.</p>
<p><a href="http://webdesignerwall.com/tutorials/cross-browser-html5-placeholder-text/comment-page-2">http://webdesignerwall.com/tutorials/cross-browser-html5-placeholder-text/comment-page-2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ericbae.com/2012/02/16/html5-placeholder-for-non-html5-browsers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stack Reputational</title>
		<link>http://ericbae.com/2012/02/14/stack-reputational/</link>
		<comments>http://ericbae.com/2012/02/14/stack-reputational/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 11:52:47 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Ideas!]]></category>

		<guid isPermaLink="false">http://ericbae.com/?p=214</guid>
		<description><![CDATA[StackExchange is currently running a contest that involves using their API v2.0 and I thought it would be a great way to kick off a new project that has a deadline! I know for sure that this one will at &#8230; <a href="http://ericbae.com/2012/02/14/stack-reputational/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>StackExchange is currently running a contest that involves using their API v2.0 and I thought it would be a great way to kick off a new project that has a deadline! I know for sure that this one will at least finish one way or another.</p>
<p>I&#8217;m calling my app &#8220;Stack Reputational&#8221;. It&#8217;s a way of providing a detailed look at how each user is rated throughout the Stackoverflow site.</p>
<p>I&#8217;ve been coding it for a few hours per day now, and it&#8217;s going great and I shall publish very soon. By the way, prize is iPad 2. Why wouldn&#8217;t anyone NOT enter the contest!</p>
]]></content:encoded>
			<wfw:commentRss>http://ericbae.com/2012/02/14/stack-reputational/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New retail trend &#8211; from online to offline?</title>
		<link>http://ericbae.com/2012/02/10/new-retail-trend-from-online-to-offline/</link>
		<comments>http://ericbae.com/2012/02/10/new-retail-trend-from-online-to-offline/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 10:56:40 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Anything & Everything]]></category>

		<guid isPermaLink="false">http://ericbae.com/?p=211</guid>
		<description><![CDATA[Two of the biggest online tech companies have been rumoured to open offline retail stores. Google &#8211; http://www.hindustantimes.com/technology/Events/Coming-soon-Google-s-retail-store/SP-Article1-809479.aspx Amazon - http://blogs.ajc.com/business-beat/2012/02/07/report-amazon-to-open-retail-store/?cxntfid=blogs_business_beat Is this the new trend in retail? While many offline retailers are struggling to get online, those who have primarily &#8230; <a href="http://ericbae.com/2012/02/10/new-retail-trend-from-online-to-offline/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Two of the biggest online tech companies have been rumoured to open offline retail stores.</p>
<p>Google &#8211; http://www.hindustantimes.com/technology/Events/Coming-soon-Google-s-retail-store/SP-Article1-809479.aspx</p>
<p>Amazon - http://blogs.ajc.com/business-beat/2012/02/07/report-amazon-to-open-retail-store/?cxntfid=blogs_business_beat</p>
<p>Is this the new trend in retail? While many offline retailers are struggling to get online, those who have primarily been an online entity are now moving into the offline ground.</p>
<p>Mind you, it seems only the established ones are able to afford such move, since for many small online retailers, it&#8217;s still far easier to stay on that course.</p>
<p>But it is indeed interesting to see that what is considered as a dead-end for some, offline still does have its place in our life, so long as you innovate.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericbae.com/2012/02/10/new-retail-trend-from-online-to-offline/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implement a Pinterest-like layout!</title>
		<link>http://ericbae.com/2012/01/30/implement-a-pinterest-like-layout/</link>
		<comments>http://ericbae.com/2012/01/30/implement-a-pinterest-like-layout/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 04:07:11 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Anything & Everything]]></category>

		<guid isPermaLink="false">http://ericbae.com/?p=206</guid>
		<description><![CDATA[Looks like Pinterest is one of the hot social sites right now. I think their main arsenal was their visual approach to presenting the content. It&#8217;s that infamous, infinite scrolling, tiled look, which works very well for the images. So &#8230; <a href="http://ericbae.com/2012/01/30/implement-a-pinterest-like-layout/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Looks like Pinterest is one of the hot social sites right now. I think their main arsenal was their visual approach to presenting the content. It&#8217;s that infamous, infinite scrolling, tiled look, which works very well for the images.</p>
<p>So how does one go about implementing such a layout? Well, there are a few options.</p>
<p>First, there are some great jQuery plugins such as <a href="http://masonry.desandro.com/">jquery Masonry</a> and <a href="http://isotope.metafizzy.co/">jQuery Isotope</a>. They work brilliantly in putting a dynamic layout on the content that you want to present. Mind you Isotope will costs you if you are implementing this in a commercial site.</p>
<p>However, as far as making something very similar to Pinterest layout, I have come across a great little plugin from Wookmark &#8211; <a href="http://www.wookmark.com/jquery-plugin">the Wookmark plugin</a>.</p>
<p>If you implement the plugin as the instruction asks you, it may not work as you expect, because the whole point is to make your layout &#8220;fluid&#8221;, so when you resize the browser, the layout should adjust itself accordingly. However, the plugin itself won&#8217;t do that automatically.</p>
<p>What you must do is:</p>
<ol>
<li>Create a function that will enable the wookmark plugin<span style="color: #993300;">resize : =&gt;</span><br />
<span style="color: #993300;">  resize = function() {<br />
$(&#8220;.item_to_be_tiled&#8221;).wookmark {</span><br />
<span style="color: #993300;">      offset:5</span><br />
<span style="color: #993300;">    }<br />
} </span></li>
<li>Detect resize event on the window to apply the plugin each time the browser is <span style="color: #993300;">resized.</span><span style="color: #993300;">$(window).resize =&gt;</span><br />
<span style="color: #993300;">  @resize() </span></li>
</ol>
<p>And that, works great! Now go get yourself <a href="http://imakewebthings.github.com/jquery-waypoints/">jQuery Waypoints plugin</a>, so you can easily enable the inifinite scrolling feature and you have yourself a nicely working Pinterest-like layout.</p>
<p>By the way, I am using Coffeescript here. You should try it. Oh pleaes. <img src='http://ericbae.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ericbae.com/2012/01/30/implement-a-pinterest-like-layout/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Freally &#8211; it&#8217;s about time.</title>
		<link>http://ericbae.com/2012/01/26/new-freally-its-about-time/</link>
		<comments>http://ericbae.com/2012/01/26/new-freally-its-about-time/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 01:48:13 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Anything & Everything]]></category>

		<guid isPermaLink="false">http://ericbae.com/?p=202</guid>
		<description><![CDATA[&#8220;Neglected&#8221; would be an understatement in this case. Though I launched Freally in mid-2010, it was left to itself without much improvement over the years. Well, I finally went off my butt and did something about it and I am &#8230; <a href="http://ericbae.com/2012/01/26/new-freally-its-about-time/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://ericbae.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-26-at-12.45.58-PM.png"><img class="aligncenter size-medium wp-image-203" title="Screen Shot 2012-01-26 at 12.45.58 PM" src="http://ericbae.com/wp-content/uploads/2012/01/Screen-Shot-2012-01-26-at-12.45.58-PM-300x193.png" alt="" width="300" height="193" /></a></p>
<p>&#8220;Neglected&#8221; would be an understatement in this case. Though I launched Freally in mid-2010, it was left to itself without much improvement over the years. Well, I finally went off my butt and did something about it and I am happy to announce that it&#8217;s nearly time for the re-launch. I cannot wait! And hopefully this time, I will learn from my mistakes and try to take a better care for it.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericbae.com/2012/01/26/new-freally-its-about-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apply natural sorting on MySQL or Postgres</title>
		<link>http://ericbae.com/2012/01/20/apply-natural-sorting-on-mysql-or-postgres/</link>
		<comments>http://ericbae.com/2012/01/20/apply-natural-sorting-on-mysql-or-postgres/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 02:09:10 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Anything & Everything]]></category>

		<guid isPermaLink="false">http://ericbae.com/?p=200</guid>
		<description><![CDATA[If you have a table with a varchar or text column, which may or may not contain text-based integer values, it&#8217;s sometimes hard to do natural sorting on MySQL or Postgres. By that what I mean is, if you have &#8230; <a href="http://ericbae.com/2012/01/20/apply-natural-sorting-on-mysql-or-postgres/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you have a table with a varchar or text column, which may or may not contain text-based integer values, it&#8217;s sometimes hard to do natural sorting on MySQL or Postgres. By that what I mean is, if you have</p>
<blockquote><p>col1<br />
&#8212;&#8212;<br />
a1<br />
a2<br />
a10<br />
a20</p></blockquote>
<p>and if you apply &#8220;order by col1&#8243;, the sorting result would be something like</p>
<blockquote><p>col1<br />
&#8212;&#8212;<br />
a1<br />
a10<br />
a2<br />
a20</p></blockquote>
<p>The easiest way to go around this is to first order by the length of the value and then the actual value. So in MySQL, you will have</p>
<blockquote><p>&#8230; order by LENGTH(col1) ASC, col1 ASC</p></blockquote>
<p>and in Postgres</p>
<blockquote><p>.. order by CHAR_LENGTH(col1) ASC, col1 ASC</p></blockquote>
<p>WA~LA~ saved me time.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericbae.com/2012/01/20/apply-natural-sorting-on-mysql-or-postgres/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SimplePie &amp; &#8216;ampersand&#8217; invalid XML error</title>
		<link>http://ericbae.com/2012/01/13/simplepie-ampersand-invalid-xml-error/</link>
		<comments>http://ericbae.com/2012/01/13/simplepie-ampersand-invalid-xml-error/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 06:56:39 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Anything & Everything]]></category>

		<guid isPermaLink="false">http://ericbae.com/?p=196</guid>
		<description><![CDATA[I was using one of the APIs to process their XML file using SimplePie, but it happens so that their XML document was invalid since one of the fields contained the ampersand character. How did I resolve it? SimplePie accepts &#8230; <a href="http://ericbae.com/2012/01/13/simplepie-ampersand-invalid-xml-error/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was using one of the APIs to process their XML file using SimplePie, but it happens so that their XML document was invalid since one of the fields contained the ampersand character.</p>
<p>How did I resolve it? SimplePie accepts &#8220;set_raw_data($feed_string)&#8221; as one of its options. This means that you don&#8217;t have to use the URL to parse the feed.</p>
<p>So first, download the content of the XML through file_get_contents() method in PHP, then replace the string using str_replace(&#8216;&amp;&#8217;, &#8216;&amp;amp&#8217;, $feed) and then you are safe to go.</p>
<p>I&#8217;m not entirely sure what other implications this has, but it&#8217;s serving me well so far.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericbae.com/2012/01/13/simplepie-ampersand-invalid-xml-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happenic is the mashup of the day at PW!</title>
		<link>http://ericbae.com/2012/01/06/happenic-is-the-mashup-of-the-day-at-pw/</link>
		<comments>http://ericbae.com/2012/01/06/happenic-is-the-mashup-of-the-day-at-pw/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 04:19:20 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Anything & Everything]]></category>

		<guid isPermaLink="false">http://ericbae.com/?p=193</guid>
		<description><![CDATA[Woo hoo! Happenic has been voted as the mashup of the day at programmableweb.com! NNIICCEE. &#160;]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-medium wp-image-194" title="2012-01-06_151602" src="http://ericbae.com/wp-content/uploads/2012/01/2012-01-06_151602-300x175.png" alt="" width="300" height="175" /></p>
<p>Woo hoo!</p>
<p>Happenic has been voted as the mashup of the day at programmableweb.com! NNIICCEE.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://ericbae.com/2012/01/06/happenic-is-the-mashup-of-the-day-at-pw/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Latest SimplePie 1.2.1 and CodeIgniter 2.1.0 working together.</title>
		<link>http://ericbae.com/2012/01/04/latest-simplepie-1-2-1-and-codeigniter-2-1-0-working-together/</link>
		<comments>http://ericbae.com/2012/01/04/latest-simplepie-1-2-1-and-codeigniter-2-1-0-working-together/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 12:38:54 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Anything & Everything]]></category>

		<guid isPermaLink="false">http://ericbae.com/?p=184</guid>
		<description><![CDATA[SimplePie is a popular RSS parser and it was always easy to integrate it with other PHP frameworks. However, I was not able to find the latest SP (1.2.1) integrated with the latest CI (2.1.0). So I decided to upload &#8230; <a href="http://ericbae.com/2012/01/04/latest-simplepie-1-2-1-and-codeigniter-2-1-0-working-together/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>SimplePie is a popular RSS parser and it was always easy to integrate it with other PHP frameworks.</p>
<p>However, I was not able to find the latest SP (1.2.1) integrated with the latest CI (2.1.0). So I decided to upload it to GitHub and make it available for all to use. The repo is available at</p>
<blockquote><p><a href="https://github.com/ericbae/SimplePie_CodeIgniter">https://github.com/ericbae/SimplePie_CodeIgniter</a></p></blockquote>
<p>There are two things I did to make this work, which weren&#8217;t too difficult.</p>
<p>First is to ensure that SP references are correctly fixed up when porting to CI. This is well documented with links in</p>
<blockquote><p><a href="http://www.smartango.com/blog/simplepie-and-codeigniter">http://www.smartango.com/blog/simplepie-and-codeigniter</a></p></blockquote>
<p>Secondly, when I was running this, it was giving the following error.</p>
<blockquote><p>cURL error 6: name lookup timed out</p></blockquote>
<p>It seemed like cURL was timing out when trying to access the remote RSS feed. The value for timeout is set to 10 seconds by default. Maybe this is a bit too strict. I changed this to 20 and it worked well.</p>
<p>Finally, here&#8217;s the snippet of my code to get this thing working. Make sure you include Simplepie.php in your libraries folder and also set your &#8220;cache&#8221; folder as writable.</p>
<p><code>public function aus_conf()<br />
{<br />
  $this->load->library('Simplepie');<br />
  $this->simplepie->set_cache_location(APPPATH.'cache');<br />
  $this->simplepie->set_feed_url('http://feeds.feedburner.com/TheAustralianArt?format=xml');<br />
  $this->simplepie->init();<br />
  $this->simplepie->handle_content_type();<br />
  foreach( $this->simplepie->get_items(0, 5) as $item)<br />
  {<br />
    echo $item->get_title() . '<br/>';<br />
    echo $item->get_description();<br />
  }<br />
}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://ericbae.com/2012/01/04/latest-simplepie-1-2-1-and-codeigniter-2-1-0-working-together/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What&#8217;s Happenic!</title>
		<link>http://ericbae.com/2011/12/29/whats-happenic-2/</link>
		<comments>http://ericbae.com/2011/12/29/whats-happenic-2/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 01:31:34 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Anything & Everything]]></category>

		<guid isPermaLink="false">http://ericbae.com/?p=182</guid>
		<description><![CDATA[Today I am launching Happenic v0.1. This is the second iteration of this project, yet I spent last 4 weeks refining the primitive first iteration. The interface now boasts full-screen calendar and event listing with easy-to-use search features and best &#8230; <a href="http://ericbae.com/2011/12/29/whats-happenic-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today I am launching Happenic v0.1. This is the second iteration of this project, yet I spent last 4 weeks refining the primitive first iteration.</p>
<p>The interface now boasts full-screen calendar and event listing with easy-to-use search features and best of all, now I don&#8217;t have to go and search for all different sites to get what is happenic (get it get it?) around my city.</p>
<p>For now, I am making it available for Australian cities, obviously, I will slowly expand the site to include other cities.</p>
<p><a title="Happenic" href="http://www.happenic.com">http://www.happenic.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ericbae.com/2011/12/29/whats-happenic-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

