<?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>itlivewire dev blog</title>
	<atom:link href="http://itlivewire.com/devblog/feed/" rel="self" type="application/rss+xml" />
	<link>http://itlivewire.com/devblog</link>
	<description>Just another web development blog...</description>
	<lastBuildDate>Mon, 16 Apr 2012 12:37:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Demonstrate responsive web design</title>
		<link>http://itlivewire.com/devblog/2012/04/16/demonstrate-responsive-web-design/</link>
		<comments>http://itlivewire.com/devblog/2012/04/16/demonstrate-responsive-web-design/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 12:35:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://itlivewire.com/devblog/?p=510</guid>
		<description><![CDATA[Demonstrate responsive web design using jamus http://jamus.co.uk/demos/rwd-demonstrations/]]></description>
			<content:encoded><![CDATA[<p>Demonstrate responsive web design using jamus <a href="http://jamus.co.uk/demos/rwd-demonstrations/">http://jamus.co.uk/demos/rwd-demonstrations/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://itlivewire.com/devblog/2012/04/16/demonstrate-responsive-web-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jquery covered by the parent technique</title>
		<link>http://itlivewire.com/devblog/2012/03/07/jquery-covered-by-the-parent-technique/</link>
		<comments>http://itlivewire.com/devblog/2012/03/07/jquery-covered-by-the-parent-technique/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 20:35:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://itlivewire.com/devblog/?p=491</guid>
		<description><![CDATA[We always encounter them on our JavaScript apps, the dynamic elements, most of the time they are in the form of new rows in the table &#60;tr&#62;&#60;td&#62;&#60;/td&#62;&#60;/tr&#62; or a new list &#60;li&#62; from a &#60;ul&#62;. So sometimes we need to capture an event to these newly loaded dynamic elements, and the solution in jquery is [...]]]></description>
			<content:encoded><![CDATA[<p>We always encounter them on our JavaScript apps, the<strong> <a href="http://stackoverflow.com/questions/867916/creating-a-div-element-in-jquery">dynamic elements</a></strong>, most of the time they are in the form of new rows in the table &lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt; or a new list &lt;li&gt; from a &lt;ul&gt;.</p>
<p>So sometimes we need to capture an event to these newly loaded dynamic elements, and the solution in jquery is to use the <strong><a href="http://api.jquery.com/live/">live</a> </strong>function.</p>
<p>Alternatively we can also use the covered by the parent technique, so if the parent of the dynamic element is loaded manually, we can just capture the event by this code.</p>
<pre class="brush: php;">
$('ul').on('click','li',function(){
    alert('Has been clicked.. Do something next');
})
</pre>
<p>With the code on top we have eliminated the use of making this line</p>
<pre class="brush: php;">
$('li').live('click',function(){
    alert('Has been clicked.. Do something next');
});
</pre>
<p>because the event for <strong> &lt;li&gt;</strong> has been covered by the parent  <strong>&lt;ul&gt;</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://itlivewire.com/devblog/2012/03/07/jquery-covered-by-the-parent-technique/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Codeigniter how to display the query that was executed?</title>
		<link>http://itlivewire.com/devblog/2012/01/23/codeigniter-how-to-display-the-query-that-was-executed/</link>
		<comments>http://itlivewire.com/devblog/2012/01/23/codeigniter-how-to-display-the-query-that-was-executed/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 17:50:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://itlivewire.com/devblog/?p=481</guid>
		<description><![CDATA[To display the executed query using the codeigniter database class insert the line of code below echo $this->db->last_query(); $this->db->last_query(); //returns the last executed query &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- So if your code is like this $this->db->select('*'); $this->db->from('sales'); $query = $this->db->get(); echo $this->db->last_query(); // Adding echo $this->db->last_query(); will output the query on the page like this // SELECT * [...]]]></description>
			<content:encoded><![CDATA[<p>To display the executed query using the codeigniter database class<br />
insert the line of code below</p>
<p><strong>echo $this->db->last_query();</strong></p>
<p>$this->db->last_query(); //returns the last executed query<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
So if your code is like this </p>
<p><code>$this->db->select('*');<br />
$this->db->from('sales');<br />
$query = $this->db->get();<br />
echo $this->db->last_query();</code></p>
<p>// Adding <strong>echo $this->db->last_query();</strong> will output the query on the page like this </p>
<p>// SELECT * FROM sales;</p>
]]></content:encoded>
			<wfw:commentRss>http://itlivewire.com/devblog/2012/01/23/codeigniter-how-to-display-the-query-that-was-executed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find files that are created more than 7 days and delete them using bash</title>
		<link>http://itlivewire.com/devblog/2012/01/18/find-files-that-are-created-more-than-7-days-and-delete-them-using-bash/</link>
		<comments>http://itlivewire.com/devblog/2012/01/18/find-files-that-are-created-more-than-7-days-and-delete-them-using-bash/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 23:31:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://itlivewire.com/devblog/?p=475</guid>
		<description><![CDATA[Here we will use the find -mtime and xargs commands Complete script: find '/home/user/data/' -name '*.txt' -mtime +7 &#124; xargs rm Explanation: find -mtime displays files made based on given number of days find '/home/user/data/' -name '*.txt' -mtime +7 xargs captures the result of a previous command and pass it as an argument for another [...]]]></description>
			<content:encoded><![CDATA[<p>Here we will use the <strong>find -mtime</strong> and <strong>xargs</strong> commands</p>
<p>Complete script:</p>
<pre class="brush: php;">find '/home/user/data/' -name '*.txt' -mtime +7 | xargs rm</pre>
<p>Explanation:<br />
<strong>find -mtime</strong> displays files made based on given number of days</p>
<p>    <code>find '/home/user/data/' -name '*.txt' -mtime +7</code></p>
<p><strong>xargs</strong> captures the result of a previous command and pass it as an argument for another function</p>
<p>    <code>find '/home/user/data/' -name '*.txt' -mtime +7 | xargs rm</code></p>
<p>The result of the find command is passed to another function rm which then removes the files</p>
]]></content:encoded>
			<wfw:commentRss>http://itlivewire.com/devblog/2012/01/18/find-files-that-are-created-more-than-7-days-and-delete-them-using-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a database backup using mysqldump and gzip</title>
		<link>http://itlivewire.com/devblog/2012/01/18/create-a-database-backup-using-mysqldump-and-gzip/</link>
		<comments>http://itlivewire.com/devblog/2012/01/18/create-a-database-backup-using-mysqldump-and-gzip/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 23:21:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://itlivewire.com/devblog/?p=469</guid>
		<description><![CDATA[mysqldump -u username -p Password database_name &#124; gzip &#62; database_backup.sql.gz]]></description>
			<content:encoded><![CDATA[<pre class="brush: php;">mysqldump -u username -p Password database_name | gzip &gt; database_backup.sql.gz</pre>
]]></content:encoded>
			<wfw:commentRss>http://itlivewire.com/devblog/2012/01/18/create-a-database-backup-using-mysqldump-and-gzip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a zip file and append the date on the filename in linux</title>
		<link>http://itlivewire.com/devblog/2011/12/29/create-a-zip-file-and-append-the-date-on-the-filename-in-linux/</link>
		<comments>http://itlivewire.com/devblog/2011/12/29/create-a-zip-file-and-append-the-date-on-the-filename-in-linux/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 23:45:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://itlivewire.com/devblog/?p=464</guid>
		<description><![CDATA[When we backup we want to add a date on the filename to know when the file was created Try this line tar -zcvf database_backup_$(date +%m-%d-%Y).tar.gz /DB/data]]></description>
			<content:encoded><![CDATA[<p><strong>When we backup we want to add a date on the filename to know when the file was created</strong></p>
<p>Try this line</p>
<pre class="brush: php;">tar -zcvf database_backup_$(date +%m-%d-%Y).tar.gz /DB/data</pre>
]]></content:encoded>
			<wfw:commentRss>http://itlivewire.com/devblog/2011/12/29/create-a-zip-file-and-append-the-date-on-the-filename-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jquery perfomance tips</title>
		<link>http://itlivewire.com/devblog/2011/12/14/jquery-perfomance-tips/</link>
		<comments>http://itlivewire.com/devblog/2011/12/14/jquery-perfomance-tips/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 19:20:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://itlivewire.com/devblog/?p=459</guid>
		<description><![CDATA[I have just stumbled on this performance tip so I tried and tested it, so far the results were good there are some speed improvement on my jquery codes. Optimize selectors for Sizzle’s ‘right to left’ model As of version 1.3, jQuery has been using the Sizzle Javascript Selector Library which works a bit differently [...]]]></description>
			<content:encoded><![CDATA[<p>I have just stumbled on this performance tip so I tried and tested it, so far the results were good there are some speed improvement on my jquery codes.</p>
<p>Optimize selectors for Sizzle’s ‘right to left’ model<br />
As of version 1.3, jQuery has been using the Sizzle Javascript Selector Library which works a bit differently from the selector engine used in the past. Namely it uses a ‘right to left’ model rather than a ‘left to right’. Make sure that your right-most selector is really specific and any selectors on the left are more broad:</p>
<p><strong>var linkContacts = $(&#8216;.contact-links div.side-wrapper&#8217;);</strong></p>
<p>instead of:</p>
<p><strong>var linkContacts = $(&#8216;a.contact-links .side-wrapper&#8217;);</strong></p>
<p><em>More tips from this website</em><br />
<a href="http://dumitruglavan.com/jquery-performance-tips-cheat-sheet/">http://dumitruglavan.com/jquery-performance-tips-cheat-sheet/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://itlivewire.com/devblog/2011/12/14/jquery-perfomance-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Duplicate entry for key PRIMARY on Auto_Increment</title>
		<link>http://itlivewire.com/devblog/2011/12/14/mysql-duplicate-entry-for-key-primary-on-auto_increment/</link>
		<comments>http://itlivewire.com/devblog/2011/12/14/mysql-duplicate-entry-for-key-primary-on-auto_increment/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 18:34:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://itlivewire.com/devblog/?p=452</guid>
		<description><![CDATA[Example errors: &#8220;Duplicate entry &#8217;123711155&#8242; for key &#8216;PRIMARY&#8217;&#8221; or &#8220;Duplicate entry &#8217;14676163&#8242; for key &#8217;1&#8242;&#8221; Most likely this happens for tables with more than 5 million records THE FIX The fix is to use repair table REPAIR TABLE &#60;TABLE_NAME&#62;; Note: Sometimes the duplicate error is also caused by your field type having the maximum value [...]]]></description>
			<content:encoded><![CDATA[<p>Example errors:</p>
<p>&#8220;Duplicate entry &#8217;123711155&#8242; for key &#8216;PRIMARY&#8217;&#8221; or &#8220;Duplicate entry &#8217;14676163&#8242; for key &#8217;1&#8242;&#8221;</p>
<p>Most likely this happens for tables with more than 5 million records</p>
<p>THE FIX</p>
<p>The fix is to use repair table </p>
<p><strong><code>REPAIR TABLE &lt;TABLE_NAME&gt;;</code></strong></p>
<p>Note: Sometimes the duplicate error is also caused by your field type having the maximum value already, for example in tinyint which has the maximum value of 127 so it better to use bigint for your auto ids, if this is not the case you can try the solution above.</p>
]]></content:encoded>
			<wfw:commentRss>http://itlivewire.com/devblog/2011/12/14/mysql-duplicate-entry-for-key-primary-on-auto_increment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java find the size of an array</title>
		<link>http://itlivewire.com/devblog/2011/11/15/java-find-the-size-of-an-array/</link>
		<comments>http://itlivewire.com/devblog/2011/11/15/java-find-the-size-of-an-array/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 17:10:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://itlivewire.com/devblog/?p=450</guid>
		<description><![CDATA[Use Java Array Length. Example: String months[] = {&#34;Jan&#34;, &#34;Feb&#34;, &#34;Mar&#34;, &#34;Apr&#34;, &#34;May&#34;, &#34;Jun&#34;, &#34;July&#34;, &#34;Aug&#34;, &#34;Sep&#34;, &#34;Oct&#34;, &#34;Nov&#34;, &#34;Dec&#34;}; System.out.println(months.length); Value of months.length is equal to 12]]></description>
			<content:encoded><![CDATA[<p>Use Java Array Length.</p>
<p>Example:</p>
<pre class="brush: php;">String months[] = {&quot;Jan&quot;, &quot;Feb&quot;, &quot;Mar&quot;, &quot;Apr&quot;, &quot;May&quot;,
 &quot;Jun&quot;, &quot;July&quot;, &quot;Aug&quot;, &quot;Sep&quot;, &quot;Oct&quot;, &quot;Nov&quot;, &quot;Dec&quot;};

System.out.println(months.length);</pre>
<p><strong>Value of months.length is equal to 12</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://itlivewire.com/devblog/2011/11/15/java-find-the-size-of-an-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu certified laptops and hardware for 10.10 and 11.04</title>
		<link>http://itlivewire.com/devblog/2011/11/14/ubuntu-certified-laptops-and-hardware-for-10-10-and-11-04/</link>
		<comments>http://itlivewire.com/devblog/2011/11/14/ubuntu-certified-laptops-and-hardware-for-10-10-and-11-04/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 22:24:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://itlivewire.com/devblog/?p=447</guid>
		<description><![CDATA[Check if your laptop is fully compatible with ubuntu http://www.ubuntu.com/certification/]]></description>
			<content:encoded><![CDATA[<p>Check if your laptop is fully compatible with ubuntu</p>
<p><a href="http://www.ubuntu.com/certification/">http://www.ubuntu.com/certification/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://itlivewire.com/devblog/2011/11/14/ubuntu-certified-laptops-and-hardware-for-10-10-and-11-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

