<?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>Mior Muhammad Zaki</title>
	<atom:link href="http://crynobone.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://crynobone.com</link>
	<description>CodeIgniter, WordPress, jQuery, PHP &#38; JavaScript Programmer</description>
	<lastBuildDate>Tue, 23 Feb 2010 04:02:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CodeIgniter for Oracle: ADOdb Database Abstraction vs CodeIgniter Database Library</title>
		<link>http://crynobone.com/codeigniter-for-oracle-adodb-database-abstraction-vs-codeigniter-activerecord/</link>
		<comments>http://crynobone.com/codeigniter-for-oracle-adodb-database-abstraction-vs-codeigniter-activerecord/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 04:02:38 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[ADOdb for PHP]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Tool]]></category>

		<guid isPermaLink="false">http://crynobone.com/?p=626</guid>
		<description><![CDATA[Early last year, I got the chance to learn and develop a huge web application using CodeIgniter PHP Framework. It was my first project using the framework so at that time we have decided to avoid using CodeIgniter default Database Library in fear of incompatibility with oci8 or Oracle10g.
Only afterward did I got a chance [...]]]></description>
			<content:encoded><![CDATA[<p>Early last year, I got the chance to learn and develop a huge web application using <a href="http://codeigniter.com">CodeIgniter PHP Framework</a>. It was my first project using the framework so at that time we have decided to avoid using CodeIgniter default Database Library in fear of incompatibility with oci8 or Oracle10g.</p>
<p>Only afterward did I got a chance to test out CodeIgniter Database Library or ActiveRecord Library on project using MySQL. At this point, the simplicity of ActiveRecord really caught my attention but how would it be enough compared to ADOdb when using Oracle Database?<br />
<span id="more-626"></span></p>
<h3>Introduction</h3>
<p>Bare in mind, while CodeIgniter have the advantage with ActiveRecord, ADOdb Database Abstraction Layer also equipped with it&#8217;s own <a href="http://phplens.com/lens/adodb/docs-active-record.htm">ActiveRecord or Object Relation Mapping</a> but in this article I would only made comparison between CodeIgniter Database Library, CodeIgniter ActiveRecord Library and ADOdb Database Abstraction Layer (without the ActiveRecord).</p>
<h3>ADOdb as CodeIgniter Library</h3>
<p>You can get the ADOdb Database Abstraction Layer for CodeIgniter Library from <a href="http://codeigniter.com/wiki/ADODB/">CodeIgniter Wiki</a>. However I personally have modify the code to make it more integrated with CodeIgniter available at <a href="http://myci.googlecode.com/svn/trunk/system/application/libraries/Adodb5.php">Ext.CI GoogleCode page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/codeigniter-for-oracle-adodb-database-abstraction-vs-codeigniter-activerecord/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google Search now with Twitter Latest Status</title>
		<link>http://crynobone.com/google-search-now-with-twitter-latest-status/</link>
		<comments>http://crynobone.com/google-search-now-with-twitter-latest-status/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 07:08:32 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Search]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://crynobone.com/?p=622</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-623" title="Screen shot 2009-12-14 at 3.06.35 PM" src="http://crynobone.com/wp-content/uploads/2009/12/Screen-shot-2009-12-14-at-3.06.35-PM.png" alt="Screen shot 2009-12-14 at 3.06.35 PM" width="596" height="295" /></p>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/google-search-now-with-twitter-latest-status/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Comparing Today Date in MySQL</title>
		<link>http://crynobone.com/comparing-today-date-in-mysql/</link>
		<comments>http://crynobone.com/comparing-today-date-in-mysql/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 19:01:02 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[DBMS]]></category>

		<guid isPermaLink="false">http://crynobone.com/?p=619</guid>
		<description><![CDATA[
Conventionally getting today date from database in the past would require the use of date('Y-m-d'); function and add it to MySQL query such as below:

$today_date = date('Y-m-d');
$tmrw_date = date('Y-m-d', strtotime("+1 day"));
$sql = "SELECT * FROM my_table
    WHERE my_datetime BETWEEN '" . $today_date . "' AND '" . $tmrw_date . "'";

However this method [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://crynobone.com/wp-content/uploads/2009/12/mysql.png" alt="mysql" title="mysql" width="121" height="79" class="alignright size-full wp-image-620" /><br />
Conventionally getting today date from database in the past would require the use of <code>date('Y-m-d');</code> function and add it to MySQL query such as below:</p>
<pre name="code" class="php">
$today_date = date('Y-m-d');
$tmrw_date = date('Y-m-d', strtotime("+1 day"));
$sql = "SELECT * FROM my_table
    WHERE my_datetime BETWEEN '" . $today_date . "' AND '" . $tmrw_date . "'";
</pre>
<p>However this method might return false positive result if the web server and database server doesn&#8217;t have it date and time synchronized. From my point of view, it best to let the database server have the full control to insert, update or compare the dates. So what the alternative? You can check the full specification from <a href="http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html">MySQL Date and Time Functions</a> but I would opt for <a href="http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_datediff">DATEDIFF</a> if you specifically want to compare with today date. </p>
<pre name="code" class="sql">
SELECT * FROM my_table
    WHERE DATEDIFF(my_datetime, SYSDATE())=0</pre>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/comparing-today-date-in-mysql/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Add Additional Cookie on WordPress</title>
		<link>http://crynobone.com/add-additional-cookie-on-wordpress/</link>
		<comments>http://crynobone.com/add-additional-cookie-on-wordpress/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 15:37:34 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Cookie]]></category>

		<guid isPermaLink="false">http://crynobone.com/?p=604</guid>
		<description><![CDATA[
Today I realize that the simple setcookie("sevisitor", 1, time()+3600); would not work perfectly on WordPress especially when your combine it with WordPress permalink. Here a simple hack that you can opt for if you want to set in multiple WordPress environment (especially for plug-ins and themes).
setcookie("sevisitor", 1, time()+3600,
    SITECOOKIEPATH, COOKIE_DOMAIN, false, true);
There [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://crynobone.com/wp-content/uploads/2009/11/wordpress-logo-150x150.png" alt="wordpress-logo" title="wordpress-logo" width="150" height="150" class="alignright size-thumbnail wp-image-617" /><br />
Today I realize that the simple <code>setcookie("sevisitor", 1, time()+3600);</code> would not work perfectly on WordPress especially when your combine it with WordPress permalink. Here a simple hack that you can opt for if you want to set in multiple WordPress environment (especially for plug-ins and themes).</p>
<pre name="code" class="php">setcookie("sevisitor", 1, time()+3600,
    SITECOOKIEPATH, COOKIE_DOMAIN, false, true);</pre>
<p>There are multiple alternative but for it work perfectly on multiple installation.</p>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/add-additional-cookie-on-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Regular Expression Rules in Form Validation for Ext.CodeIgniter</title>
		<link>http://crynobone.com/regular-expression-rules-in-form-validation-for-ext-codeigniter/</link>
		<comments>http://crynobone.com/regular-expression-rules-in-form-validation-for-ext-codeigniter/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 17:34:45 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Ext.CodeIgniter]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Regular Expression]]></category>
		<category><![CDATA[Form Validation]]></category>

		<guid isPermaLink="false">http://crynobone.com/?p=599</guid>
		<description><![CDATA[Yes, I have a problem with CodeIgniter built-in Form Validation Library, the lack of direct Regular Expression test/rule is a huge turn off for me especially when I need to use Regular Expression to as a rule to verify user input.
There are alternative with the use of &#8220;callback&#8221; to by creating an additional method inside [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-597" title="logo" src="http://crynobone.com/wp-content/uploads/2009/10/logo.jpg" alt="logo" width="165" height="165" />Yes, I have a problem with CodeIgniter built-in Form Validation Library, the lack of direct Regular Expression test/rule is a huge turn off for me especially when I need to use Regular Expression to as a rule to verify user input.</p>
<p>There are alternative with the use of &#8220;callback&#8221; to by creating an additional method inside your Controller. The solution is good if you have a complex filtering but why bother when all you need to do is a simple RegExp verification. Based on my <a href="http://twitter.com/crynobone/status/5310657643">Twitter status</a>:</p>
<p><span id="more-599"></span><br />
<img class="size-full wp-image-600 alignnone" title="status-5310657643" src="http://crynobone.com/wp-content/uploads/2009/11/status-5310657643.png" alt="status-5310657643" width="565" height="224" /></p>
<p>Based from a reply to the status.</p>
<p><img class="alignnone size-full wp-image-602" title="reply" src="http://crynobone.com/wp-content/uploads/2009/11/reply.png" alt="reply" width="584" height="260" /></p>
<p>I took the challenge of extending Form Validation Library to add support for Regular Expression test. As a result here <a href="http://myci.googlecode.com/svn/trunk/system/application/libraries/MY_Form_validation.php" target="_blank">MY_Form_validation.php</a>. The changes was minimal but since I need to tweak some of the existing method to allow the special character such as | and [ ] to be use in our Regular Expression the LOC for this modify is quite big.</p>
<p>Now you can add rule such as:</p>
<pre name="code" class="php">$this-&gt;form_validation-&gt;set_rules(
    'username',
    'Username',
    'trim|required|expression:/^([a-zA-Z0-9\.\-\_\|]{1,50})$/|xss_clean'
);</pre>
<p>As you can see, an additional rule has been set with <code>expression:/^([a-zA-Z0-9\.\-\_\|]{1,50})$/</code>. With this new rule you can safely reject request such as below (with proper error message).</p>
<p><img class="alignnone size-full wp-image-601" title="error" src="http://crynobone.com/wp-content/uploads/2009/11/error.png" alt="error" width="431" height="107" /></p>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/regular-expression-rules-in-form-validation-for-ext-codeigniter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Nura Aesha Safia</title>
		<link>http://crynobone.com/introducing-nura-aesha-safia/</link>
		<comments>http://crynobone.com/introducing-nura-aesha-safia/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 04:20:31 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Family]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://crynobone.com/?p=550</guid>
		<description><![CDATA[
Here&#8217;s my first (and currently only) daughter Nura Aesha Safia binti Mior Muhammad Zaki.
]]></description>
			<content:encoded><![CDATA[<p><a title="Introducing Nura Aesha Safia by crynobone, on Flickr" href="http://www.flickr.com/photos/crynobone/4068071736/"><img class="aligncenter" src="http://farm4.static.flickr.com/3525/4068071736_a5abdd01d2.jpg" alt="IMG_3931" width="500" height="299" /></a></p>
<p>Here&#8217;s my first (and currently only) daughter <strong>Nura Aesha Safia binti Mior Muhammad Zaki</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/introducing-nura-aesha-safia/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>CRUD Library for Ext.CodeIgniter: An Example</title>
		<link>http://crynobone.com/crud-library-for-ext-codeigniter-an-example/</link>
		<comments>http://crynobone.com/crud-library-for-ext-codeigniter-an-example/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 10:30:55 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Ext.CodeIgniter]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[CRUD]]></category>

		<guid isPermaLink="false">http://crynobone.com/?p=596</guid>
		<description><![CDATA[One of the drawback on CodeIgniter is the Scaffolding Class which is only suitable for testing or development stage. In order to do the same functionality you might find in other PHP Framework for CRUD you have to combine few available libraries in CodeIgniter including Table, Pagination, Form Validation and etc. All the libraries are [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-597" title="logo" src="http://crynobone.com/wp-content/uploads/2009/10/logo.jpg" alt="logo" width="165" height="165" />One of the drawback on CodeIgniter is the Scaffolding Class which is only suitable for testing or development stage. In order to do the same functionality you might find in other PHP Framework for CRUD you have to combine few available libraries in CodeIgniter including Table, Pagination, Form Validation and etc. All the libraries are great but you will end up having to write a long list of function and code to do still CRUD process.</p>
<p>To make the learning process much easier to understand I would actually try to convert <a href="http://net.tutsplus.com/videos/screencasts/codeigniter-from-scratch-day-5-crud/">CodeIgniter From Scratch: Day 5 &#8211; CRUD</a> from <a href="http://net.tutsplus.com/">Nettuts+</a> from using available libraries to Ext.CodeIgniter CRUD Library.</p>
<h3>Requirements and Basic Informations</h3>
<ul>
<li>is based and developed on CodeIgniter 1.7.1, it might work with previous version but please do test it out first.</li>
<li>requires Table, Pagination, Form (Ext.CodeIgniter Library), Form Validation libraries and Form helper.</li>
<li>callback can be optimized with <a href="http://crynobone.com/template-library-for-ext-codeigniter/">Template Library for Ext.CodeIgniter</a>.</li>
<li>your model code can be minimized with ActiveRecord, you may require more works if using raw SQL.</li>
</ul>
<p><span id="more-596"></span></p>
<h3>Disclaimer</h3>
<p>This library is not as simple as implementing using Scaffolding Library for CodeIgniter but more to minimizing your development time to write code in CodeIgniter.</p>
<h3>Getting Started</h3>
<p>To use the Template library, you have to checkout a copy of latest <a href="http://myci.googlecode.com/">Ext.CodeIgniter</a> or grab the following files:</p>
<ul>
<li><a href="http://myci.googlecode.com/svn/trunk/system/application/libraries/CRUD.php">http://myci.googlecode.com/svn/trunk/system/application/libraries/CRUD.php</a></li>
<li><a href="http://myci.googlecode.com/svn/trunk/system/application/libraries/Form.php">http://myci.googlecode.com/svn/trunk/system/application/libraries/Form.php</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/crud-library-for-ext-codeigniter-an-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KreativeThemes: Selling Premium WordPress Themes</title>
		<link>http://crynobone.com/kreativethemes-selling-premium-wordpress-themes/</link>
		<comments>http://crynobone.com/kreativethemes-selling-premium-wordpress-themes/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 18:22:21 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[Project]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[KreativeThemes]]></category>
		<category><![CDATA[Premium Themes]]></category>

		<guid isPermaLink="false">http://crynobone.com/?p=591</guid>
		<description><![CDATA[
KreativeThemes is a collaboration of young creative and talented people in developing and producing WordPress themes (other platforms will join in in the future) of finest quality at affordable prices. It is co-founded by Izuddin Helmi and Amirul Faisyal and backed up by a dedicated team comprises of Ajmal Eylia, Gaddafi, Mohd Huzairy, Nur Fathihah [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://kreativethemes.com/shop/go.php?r=13&#038;i=b1"><img class="aligncenter size-full wp-image-592" title="kt" src="http://crynobone.com/wp-content/uploads/2009/10/kt.jpg" alt="kt" width="580" height="317" /></a></p>
<p><a href="http://kreativethemes.com/shop/go.php?r=13&#038;i=b1">KreativeThemes</a> is a collaboration of young creative and talented people in developing and producing WordPress themes (other platforms will join in in the future) of finest quality at affordable prices. It is co-founded by <a href="http://izuddinhelmi.com/">Izuddin Helmi</a> and <a href="http://jurnalsem.com">Amirul Faisyal</a> and backed up by a dedicated team comprises of <a href="http://ajmaleylia.com/">Ajmal Eylia</a>, <a href="http://flisterz.com/">Gaddafi</a>, <a href="http://mohdhuzairy.blogspot.com">Mohd Huzairy</a>, <a href="http://hellofath.com/">Nur Fathihah</a> and me.</p>
<p><span id="more-591"></span></p>
<p><a href="http://www.kreativethemes.com/kreativethemes-launch/">During the launch</a>, KreativeThemes released <a href="http://www.kreativethemes.com/phanatics/">Phanatics</a> and <a href="http://www.kreativethemes.com/viva-licious/">Viva-licious</a> as premium themes while <a href="http://www.kreativethemes.com/furvious/">Furvious</a> as free themes. Pricing for the themes is based on following structure (do know the price include support for the theme).</p>
<p><a href="http://crynobone.com/wp-content/uploads/2009/10/hargakt1.gif"><img class="aligncenter size-full wp-image-594" title="hargakt" src="http://crynobone.com/wp-content/uploads/2009/10/hargakt1.gif" alt="hargakt" width="573" height="355" /></a></p>
<p>You can test drive all themes and purchase or download the one you desired at <a href="http://kreativethemes.com/shop/go.php?r=13&#038;i=b1">KreativeThemes</a> official website. More themes will be developed and released in each month so you better be alert and check us out every now and then.</p>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/kreativethemes-selling-premium-wordpress-themes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3F Aidilfitri Open House 2009</title>
		<link>http://crynobone.com/3faidilfitri-open-house-2009/</link>
		<comments>http://crynobone.com/3faidilfitri-open-house-2009/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 18:01:19 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[Office Activity]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://crynobone.com/?p=590</guid>
		<description><![CDATA[

View full photoset 3F Aidilfitri 2009 Open House @ Flickr
]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a title="Bamboo Fence by crynobone, on Flickr" href="http://www.flickr.com/photos/crynobone/4021870897/"><img class="aligncenter" src="http://farm3.static.flickr.com/2458/4021870897_8107c8e2b3.jpg" alt="Bamboo Fence" width="500" height="334" /></a></p>
<p style="text-align: center;"><a title="Foods for everyone by crynobone, on Flickr" href="http://www.flickr.com/photos/crynobone/4022433032/"><img class="aligncenter" src="http://farm3.static.flickr.com/2788/4022433032_ff646317a0.jpg" alt="Foods for everyone" width="500" height="334" /></a></p>
<p>View full photoset <a href="http://www.flickr.com/photos/crynobone/sets/72157622609260352/">3F Aidilfitri 2009 Open House</a> @ Flickr</p>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/3faidilfitri-open-house-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SEO Friendly WordPress Title</title>
		<link>http://crynobone.com/seo-friendly-wordpress-title/</link>
		<comments>http://crynobone.com/seo-friendly-wordpress-title/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 12:03:15 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://crynobone.com/?p=551</guid>
		<description><![CDATA[
The default WordPress title using the_title() structure is acceptable but lack SEO. Some Wordpress theme already try to improve the structure instead of just the default value, most theme I been using has adopted this method.
&#60;title&#62;&#60;?php wp_title('--',true,'right'); ?&#62; &#60;?php bloginfo('name');?&#62;&#60;/title&#62;
I prefer a more informative title display to improve SEO for your blog/website.
&#60;?php
function seo_title()
{
   [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://crynobone.com/wp-content/uploads/2009/11/wordpress-logo-150x150.png" alt="wordpress-logo" title="wordpress-logo" width="150" height="150" class="alignright size-thumbnail wp-image-617" /><br />
The default WordPress title using <code>the_title()</code> structure is acceptable but lack <abbr title="Search Engine Optimization">SEO</abbr>. Some Wordpress theme already try to improve the structure instead of just the default value, most theme I been using has adopted this method.</p>
<pre name="code" class="php">&lt;title&gt;&lt;?php wp_title('--',true,'right'); ?&gt; &lt;?php bloginfo('name');?&gt;&lt;/title&gt;</pre>
<p>I prefer a more informative title display to improve SEO for your blog/website.</p>
<pre name="code" class="php">&lt;?php
function seo_title()
{
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    wp_title('&amp;laquo;', true, 'right');

    if ($paged &gt; 1)
    {
        echo ' Page ' . $paged . ' &amp;mdash;';
    }

    echo ' ';
    bloginfo('name');

    if (is_home() &amp;&amp; $paged === 1)
    {
        echo ' &amp;mdash; ';
        bloginfo('description');
    }
}
?&gt;
&lt;title&gt;&lt;?php seo_title(); ?&gt;&lt;/title&gt;</pre>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 57px; width: 1px; height: 1px;">
<pre class="php"></pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/seo-friendly-wordpress-title/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Convert Currency to The Nearest RM0.05</title>
		<link>http://crynobone.com/convert-currency-to-the-nearest-5-cent/</link>
		<comments>http://crynobone.com/convert-currency-to-the-nearest-5-cent/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 14:15:44 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Currency]]></category>
		<category><![CDATA[Malaysia]]></category>

		<guid isPermaLink="false">http://crynobone.com/?p=548</guid>
		<description><![CDATA[Malaysia recently introduce a rounding mechanism for trading to remove the need for 1 cent in the market, but with this new implementation it cause us web developer more task to make it work with our current application.
The Rounding Mechanism is a method whereby the total bill amount (including goods and services subject to tax) [...]]]></description>
			<content:encoded><![CDATA[<p>Malaysia recently introduce a rounding mechanism for trading to remove the need for 1 cent in the market, but with this new implementation it cause us web developer more task to make it work with our current application.</p>
<blockquote><p>The Rounding Mechanism is a method whereby the <strong>total bill amount </strong>(including goods and services subject to tax) is rounded upwards or downwards to the nearest multiple of 5 sen. In this regard, total bill amount that ends in <strong>1, 2, 6 and 7 </strong> sen will be rounded <strong>down </strong> while <strong>3, 4, 8 and 9 </strong> sen will be rounded <strong>up </strong> to the nearest multiple of 5 sen.</p>
<p>For example, a total bill amounting to RM82.01 will be rounded down to RM82.00. If it amounts to RM82.04, it will be rounded up to RM82.05.</p>
<p>Source <a href="http://www.bnm.gov.my/index.php?ch=209&amp;pg=657&amp;ac=568">BNM Rounding Mechanism</a></p></blockquote>
<p><span id="more-548"></span><br />
Here&#8217;s two different version if you ever need it:</p>
<h3>PHP</h3>
<p>Credit <a href="http://www.php.com.my/tips/penggenapan-kepada-5-sen-terdekat/">Resipi PHP</a></p>
<pre name="code" class="php">function nearest_5cent($val) {
    return round($val*20)/20;
}</pre>
<h3>JavaScript</h3>
<pre name="code" class="js">var nearest_5cent = function(val) {
	return (Math.round(val*20)/20);
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/convert-currency-to-the-nearest-5-cent/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Introducing Google Chrome Frame</title>
		<link>http://crynobone.com/introducing-google-chrome-frame/</link>
		<comments>http://crynobone.com/introducing-google-chrome-frame/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 06:00:36 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[Software & OS]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://crynobone.com/?p=547</guid>
		<description><![CDATA[Google Chrome Frame is an early-stage open source plug-in that seamlessly brings Google Chrome&#8217;s open web technologies and speedy JavaScript engine to Internet Explorer. With Google Chrome Frame, you can:

 Start using open web technologies &#8211; like the HTML5 canvas tag &#8211; right away, even technologies that aren&#8217;t yet supported in Internet Explorer 6, 7, [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p><a href="http://code.google.com/chrome/chromeframe/">Google Chrome Frame</a> is an early-stage open source plug-in that seamlessly brings Google Chrome&#8217;s open web technologies and speedy JavaScript engine to Internet Explorer. With Google Chrome Frame, you can:</p>
<ul>
<li> Start using open web technologies &#8211; like the HTML5 <code>canvas</code> tag &#8211; right away, even technologies that aren&#8217;t yet supported in Internet Explorer 6, 7, or 8.</li>
<li> Take advantage of JavaScript performance improvements to make your apps faster and more responsive.</li>
</ul>
</blockquote>
<p><span id="more-547"></span></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/sjW0Bchdj-w&amp;feature" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/sjW0Bchdj-w&amp;feature"></embed></object></p>
<p>With only 1KB+ It would cut-down development time to debug and make things work in Internet Explorer, no more CSS hack or JavaScript hack to recreate the same feature we would be able to gain from other modern browser. But before I jump into the Google Chrome Frame bandwagon I would like to see some questions answered:</p>
<ul>
<li>Does it carry Internet Explorer original <em>User Agent string</em> or does it have it&#8217;s own?<em><br />
</em></li>
<li>Does it still check for <a href="http://www.quirksmode.org/css/condcom.html">CSS Conditional Comments</a>?</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/introducing-google-chrome-frame/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to smile?</title>
		<link>http://crynobone.com/how-to-smile/</link>
		<comments>http://crynobone.com/how-to-smile/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 10:45:18 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Flickr]]></category>

		<guid isPermaLink="false">http://crynobone.com/how-to-smile/</guid>
		<description><![CDATA[
This is a random post&#8230; visit my flickr photostream for more pictures.
]]></description>
			<content:encoded><![CDATA[<p><a title="photo sharing" href="http://www.flickr.com/photos/crynobone/3833484945/"><img src="http://farm4.static.flickr.com/3493/3833484945_8009a87496.jpg" alt="" class="aligncenter" /></a></p>
<p>This is a random post&#8230; visit my <a href="http://flickr.com/photos/crynobone">flickr photostream</a> for more pictures.</p>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/how-to-smile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Template Library for Ext.CodeIgniter</title>
		<link>http://crynobone.com/template-library-for-ext-codeigniter/</link>
		<comments>http://crynobone.com/template-library-for-ext-codeigniter/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 03:38:07 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Ext.CodeIgniter]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Template]]></category>

		<guid isPermaLink="false">http://crynobone.com/?p=535</guid>
		<description><![CDATA[
For someone who spent 3 years maintaining my own PHP Framework I find it hard to understand why CodeIgniter bundle in a Template Library. There are actually a few good 3rd party Template Engine which you can find for CodeIgniter but let me share with you a port over Template Library for my so call [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://crynobone.com/wp-content/uploads/2009/10/logo.jpg" alt="logo" title="logo" width="165" height="165" class="alignright size-full wp-image-597" /></p>
<p>For someone who spent 3 years maintaining my own PHP Framework I find it hard to understand why CodeIgniter bundle in a Template Library. There are actually a few good 3rd party Template Engine which you can find for CodeIgniter but let me share with you a port over Template Library for my so call own PHP Framework.</p>
<h3>Requirements and Basic Informations</h3>
<ul>
<li>is based and developed on CodeIgniter 1.7.1, it might work with previous version but please do test it out first.</li>
<li>the library is build on top of Loader and Output Library allowing you to fully utilize caching, profiler output etc.</li>
<li>support Parser Library.</li>
</ul>
<p><span id="more-535"></span></p>
<h3>Getting Started</h3>
<p>To use the Template library, you have to checkout a copy of latest <a href="http://myci.googlecode.com">Ext.CodeIgniter</a> or grab the following files:</p>
<ul>
<li><a href="http://myci.googlecode.com/svn/trunk/system/application/libraries/Template.php">http://myci.googlecode.com/svn/trunk/system/application/libraries/Template.php</a></li>
<li><a href="http://myci.googlecode.com/svn/trunk/system/application/config/application.php">http://myci.googlecode.com/svn/trunk/system/application/config/application.php</a></li>
</ul>
<h3>Setup Template Folder</h3>
<p>You will need to create a folder <code>./public/styles/default/</code> at the root folder of your CodeIgniter installation. A terminal command equivalent to this is:</p>
<pre class="bash">&gt; mkdir -p public/styles/default</pre>
<h3>Setup Template File</h3>
<p>For this example let just make a simple template, by default the Template Class will look for &#8220;index.html&#8221;.</p>
<pre name="code" class="html">&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
        &lt;title&gt;{{PAGE-TITLE}}&lt;/title&gt;
        &lt;link href="{{STYLE-URI}}css/all.css" media="all" rel="stylesheet" type="text/css" /&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;div id="header"&gt;
            &lt;h1&gt;{{TITLE}}&lt;/h1&gt;
            &lt;div id="navigation"&gt;{{NAVIGATION}}&lt;/div&gt;
        &lt;/div&gt;
        &lt;div id="content"&gt;
            {{CONTENT}}
        &lt;/div&gt;
        &lt;div id="footer"&gt;
            &lt;p&gt;{{FOOTER}}&lt;/p&gt;
        &lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;</pre>
<h4>Possible Parse Keyword</h4>
<table border="0">
<thead>
<tr>
<th>Keyword</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{TITLE}}</td>
<td>Application/Site Title.</td>
</tr>
<tr>
<td>{{PAGE-NAME}}</td>
<td>Current Page Title</td>
</tr>
<tr>
<td>{{PAGE-TITLE}}</td>
<td>Current Page Title and Application/Site Title.</td>
</tr>
<tr>
<td>{{URI}}</td>
<td>Equivalent to <code>current_url()</code></td>
</tr>
<tr>
<td>{{BASE-URI}}</td>
<td>Equivalent to <code>base_url()</code></td>
</tr>
<tr>
<td>{{INDEX-URI}}</td>
<td>Equivalent to <code>site_url()</code></td>
</tr>
<tr>
<td>{{STYLE-URI}}</td>
<td>Generate full url path to current active template</td>
</tr>
<tr>
<td>{{SCRIPT-URI}}</td>
<td>Generate full url path to script folder: <code>./public/scripts</code></td>
</tr>
<tr>
<td>{{NAVIGATION}}</td>
<td>Navigation group</td>
</tr>
<tr>
<td>{{HEADER}}</td>
<td>Header group</td>
</tr>
<tr>
<td>{{CONTENT}}</td>
<td>Content group</td>
</tr>
<tr>
<td>{{SIDEBAR}}</td>
<td>Sidebar group</td>
</tr>
<tr>
<td>{{FOOTER}}</td>
<td>Footer group</td>
</tr>
</tbody>
</table>
<h3>Initializing the Template Class</h3>
<p>he following code loads and initializes the template class based on your configuration settings</p>
<pre name="code" class="php">$this-&gt;load-&gt;library('Template');</pre>
<h3>Configuration</h3>
<p>Open <code>system/application/config/application.php</code> and go to line 13 and 24.</p>
<pre name="code" class="php">/*
|--------------------------------------------------------------------------
| Base Site Name
|--------------------------------------------------------------------------
|
| Name of your site/application, e.g:
|
|    My First Website
|
*/
$config['site_name'] = 'AdsMalaya';

/*
|--------------------------------------------------------------------------
| Template Option
|--------------------------------------------------------------------------
|
| Enable you to configure template option
| Default template: &lt;your-site&gt;/public/styles/&lt;theme&gt;/&lt;filename&gt;.html
*/
$config['template']['theme'] = 'default';
$config['template']['filename'] = 'index.html';</pre>
<p>Here you can modify the title of your application or site and the folder and filename of the default template.</p>
<h3>$this-&gt;ui-&gt;set_output()</h3>
<p>There are 3 possible output type: html (default), text or json (require <code>json_encode</code> to be enabled)</p>
<pre name="code" class="php">$this-&gt;ui-&gt;set_output('json');</pre>
<p>Only html output will load the template file.</p>
<h3>$this-&gt;ui-&gt;set_title()</h3>
<pre name="code" class="php">$this-&gt;ui-&gt;set_title('Example Page');</pre>
<p>The function will only set page title, while application/site title is only editable through the configuration file.</p>
<h3>$this-&gt;ui-&gt;set_template()</h3>
<pre name="code" class="php">$this-&gt;ui-&gt;set_template('feedmalaya');</pre>
<p>The template engine will use folder <code>./public/styles/feedmalaya/</code> instead of the one specified in the configuration file.</p>
<h3>$this-&gt;ui-&gt;set_file()</h3>
<pre name="code" class="php">$this-&gt;ui-&gt;set_file('site.html');</pre>
<p>There are time when you need to have different set of layout but using the in the same theme.</p>
<h3>$this-&gt;ui-&gt;data()</h3>
<p>Set output for text or json. Here an example how to use it.</p>
<pre name="code" class="php">$data = array (
    'success' =&gt; TRUE,
    'text' =&gt; 'Some text'
);
$this-&gt;ui-&gt;set_output('json');
$this-&gt;ui-&gt;data($data);
$this-&gt;ui-&gt;render();</pre>
<h3>$this-&gt;ui-&gt;view(&#8216;filename&#8217;, $data, $group)</h3>
<p>The method is almost identical to <code>$this-&gt;load-&gt;view</code> with the exception of the third parameter.</p>
<pre name="code" class="php">$data = array (
'success' =&gt; TRUE,
'text' =&gt; 'Some text'
);
$this-&gt;ui-&gt;view('myfile', $data, 'sidebar');
// will render to sidebar
$this-&gt;ui-&gt;render();</pre>
<p>You can embed the view to any of the following group:</p>
<ul>
<li>header</li>
<li>navigation</li>
<li>content (default)</li>
<li>sidebar</li>
<li>footer</li>
</ul>
<h3>$this-&gt;ui-&gt;append(&#8217;some text&#8217;, $group);</h3>
<p>Append existing template group with some text.</p>
<pre name="code" class="php">$heading = heading('Hello world', 2);
$this-&gt;ui-&gt;append($heading);</pre>
<h3>$this-&gt;ui-&gt;prepend(&#8217;some text&#8217;, $group);</h3>
<p>Prepend existing template group with some text.</p>
<pre name="code" class="php">$heading = heading('&amp;copy; CodeIgniter', 2);
$this-&gt;ui-&gt;prepend($heading, 'footer');</pre>
<h3>Conclusion</h3>
<p>How you can make use of it as I made in my project. If you manage to fine any bug please <a href="http://code.google.com/p/myci/issues/list">report it to us</a>, Thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/template-library-for-ext-codeigniter/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>links for 2009-08-16</title>
		<link>http://crynobone.com/links-for-2009-08-16/</link>
		<comments>http://crynobone.com/links-for-2009-08-16/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 18:45:46 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[Daily Links]]></category>

		<guid isPermaLink="false">http://crynobone.com/links-for-2009-08-16/</guid>
		<description><![CDATA[The three types of programmers
]]></description>
			<content:encoded><![CDATA[<p><a href="http://codeutopia.net/blog/2009/08/09/the-three-types-of-programmers/">The three types of programmers</a></p>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/links-for-2009-08-16/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>links for 2009-07-17</title>
		<link>http://crynobone.com/links-for-2009-07-17/</link>
		<comments>http://crynobone.com/links-for-2009-07-17/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 18:46:31 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[Daily Links]]></category>

		<guid isPermaLink="false">http://crynobone.com/links-for-2009-07-17/</guid>
		<description><![CDATA[Authenticating Users With Facebook Connect and Google Friend Connect, 10 Tips for New iPhone Developers and 10 Essential SQL Tips for Developers
]]></description>
			<content:encoded><![CDATA[<p><a href="http://net.tutsplus.com/tutorials/other/authenticating-users-with-facebook-connect-and-google-friend-connect/">Authenticating Users With Facebook Connect and Google Friend Connect</a>, <a href="http://net.tutsplus.com/tutorials/other/10-tips-for-new-iphone-developers/">10 Tips for New iPhone Developers</a> and <a href="http://net.tutsplus.com/tutorials/other/10-essential-sql-tips-for-developers/">10 Essential SQL Tips for Developers</a></p>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/links-for-2009-07-17/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Database Table Prefix in CodeIgniter</title>
		<link>http://crynobone.com/database-table-prefix-in-codeigniter/</link>
		<comments>http://crynobone.com/database-table-prefix-in-codeigniter/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 12:20:06 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[How-To]]></category>

		<guid isPermaLink="false">http://crynobone.com/?p=524</guid>
		<description><![CDATA[I must say one of the main reason why I started to look into ActiveRecord for CodeIgniter was the availability to use database table name prefix.
&#124;    ['dbprefix'] You can add an optional prefix, which will be added
&#124;                [...]]]></description>
			<content:encoded><![CDATA[<p>I must say one of the main reason why I started to look into ActiveRecord for CodeIgniter was the availability to use database table name prefix.</p>
<pre name="code" class="php">|    ['dbprefix'] You can add an optional prefix, which will be added
|                 to the table name when using the  Active Record class
$db['default']['dbprefix'] = "feed_";</pre>
<p>For example: TABLE <em>feed_item</em></p>
<pre name="code" class="php">$this-&gt;db-&gt;get('item');</pre>
<p>Many might not know that you can also use it with normal database query using <code>'swap_pre'</code>. In <code>./system/application/config/database.php</code></p>
<pre name="code" class="php">|    ['dbprefix'] You can add an optional prefix, which will be added
|                 to the table name when using the  Active Record class
$db['default']['dbprefix'] = "feed_";
$db['default']['swap_pre'] = "{PRE}";</pre>
<p>So now you can actually use.</p>
<pre name="code" class="php">$sql = "SELECT * FROM {PRE}item";
$query = $this-&gt;db-&gt;query($sql);</pre>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/database-table-prefix-in-codeigniter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>UPDATE on SELECT With MySQL</title>
		<link>http://crynobone.com/update-on-select-with-mysql/</link>
		<comments>http://crynobone.com/update-on-select-with-mysql/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 03:00:53 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[DBMS]]></category>

		<guid isPermaLink="false">http://crynobone.com/?p=523</guid>
		<description><![CDATA[
Previously if there a need to something like this, I would have definitely create a temporary tool using PHP to automatically loop a SELECT and UPDATE each field inside the loop, for example:
$sql = "SELECT * FROM item";
$query = $this-&#62;db-&#62;query($sql);
foreach( $query-&#62;result_array() as $row ) :
    $this-&#62;db-&#62;query("UPDATE relationship
      [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://crynobone.com/wp-content/uploads/2009/12/mysql.png" alt="mysql" title="mysql" width="121" height="79" class="alignright size-full wp-image-620" /><br />
Previously if there a need to something like this, I would have definitely create a temporary tool using PHP to automatically loop a SELECT and UPDATE each field inside the loop, for example:</p>
<pre name="code" class="sql">$sql = "SELECT * FROM item";
$query = $this-&gt;db-&gt;query($sql);
foreach( $query-&gt;result_array() as $row ) :
    $this-&gt;db-&gt;query("UPDATE relationship
        SET rel_date=?
        WHERE (rel_value=? AND rel_type=1)", array(
        $row['item_datetime'],
        $row['item_id']
    ));
endforeach;</pre>
<p>This actually can be simplify using only MySQL query such as:</p>
<pre name="code" class="sql">UPDATE relationship r, item i
    SET r.rel_date=i.item_datetime
    WHERE (r.rel_value=i.item_id AND r.rel_type=1)</pre>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/update-on-select-with-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Rounding to The Next Nearest Digit Number</title>
		<link>http://crynobone.com/javascript-rounding-to-the-next-nearest-digit-number/</link>
		<comments>http://crynobone.com/javascript-rounding-to-the-next-nearest-digit-number/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 04:42:28 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://crynobone.com/?p=522</guid>
		<description><![CDATA[This is actually just a modification from JavaScript Round To Nearest Number by Talk in Code. Instead of getting the nearest digit, we will actually get the rounding to the next nearest number.
function roundNextNearest(num, acc) {
    if ( acc &#60; 0 ) {
        return Math.round(num*acc)/acc;
 [...]]]></description>
			<content:encoded><![CDATA[<p>This is actually just a modification from <a href="http://www.talkincode.com/javascript-round-to-nearest-number-1101.html">JavaScript Round To Nearest Number</a> by <a href="http://www.talkincode.com">Talk in Code</a>. Instead of getting the nearest digit, we will actually get the rounding to the next nearest number.</p>
<pre name="code" class="javascript">function roundNextNearest(num, acc) {
    if ( acc &lt; 0 ) {
        return Math.round(num*acc)/acc;
    } else {
        var value = Math.round(num/acc)*acc;
        if (value &lt; num) {
            value += acc;
        }
    }
    return value;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/javascript-rounding-to-the-next-nearest-digit-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>links for 2009-06-30</title>
		<link>http://crynobone.com/links-for-2009-06-30/</link>
		<comments>http://crynobone.com/links-for-2009-06-30/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 03:44:28 +0000</pubDate>
		<dc:creator>Zaki</dc:creator>
				<category><![CDATA[Daily Links]]></category>

		<guid isPermaLink="false">http://crynobone.com/links-for-2009-06-30/</guid>
		<description><![CDATA[How to Style an Application Like Facebook, How to Integrate with Facebook Connect and Facebook Developer: JavaScript Client Library
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.devtacular.com/articles/bkonrad/how-to-style-an-application-like-facebook/">How to Style an Application Like Facebook</a>, <a href="http://www.devtacular.com/articles/bkonrad/how-to-integrate-with-facebook-connect/">How to Integrate with Facebook Connect</a> and <a href="http://wiki.developers.facebook.com/index.php/JavaScript_Client_Library">Facebook Developer: JavaScript Client Library</a></p>
]]></content:encoded>
			<wfw:commentRss>http://crynobone.com/links-for-2009-06-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
