<?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>Ivan's Technical Blog &#187; Webmaster</title>
	<atom:link href="http://ivan-grace.com/techblog/category/webmaster/feed/" rel="self" type="application/rss+xml" />
	<link>http://ivan-grace.com/techblog</link>
	<description></description>
	<lastBuildDate>Mon, 06 Apr 2009 03:54:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ways to search your Gmail mailboxes</title>
		<link>http://ivan-grace.com/techblog/2008/12/ways-to-search-your-gmail-mailboxes/</link>
		<comments>http://ivan-grace.com/techblog/2008/12/ways-to-search-your-gmail-mailboxes/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 16:07:49 +0000</pubDate>
		<dc:creator>Ivan Guan</dc:creator>
				<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[gmail]]></category>

		<guid isPermaLink="false">http://ivan-grace.com/techblog/?p=61</guid>
		<description><![CDATA[Search with operators
Looking for a mail from your friend John? Use the Gmail search box and type from:john. Gmail will find all mails from John. If you can’t remember if the mail you are looking for was sent by John or Paul, type from:john OR paul.
If you have more than one friend called John, the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Search with operators</strong></p>
<p>Looking for a mail from your friend John? Use the Gmail search box and type <strong>from:john</strong>. Gmail will find all mails from John. If you can’t remember if the mail you are looking for was sent by John or Paul, type <strong>from:john OR paul</strong>.</p>
<p>If you have more than one friend called John, the search phrase looks like this: <strong>from:john-smith</strong>.</p>
<p>There are several operators of this kind:</p>
<ul>
<li>from:</li>
<li>to:</li>
<li>cc:</li>
<li>bcc:</li>
<li>subject:</li>
<li>label:</li>
<li>filename:</li>
<li>has:attachment</li>
<li>in:anywhere</li>
<li>in:inbox</li>
<li>in:trash</li>
<li>in:spam</li>
<li>is:starred</li>
<li>is:unread</li>
<li>is:read</li>
<li>after:</li>
<li>before:</li>
</ul>
<p>The two last operators relate to dates. If you want to find emails from a April 2007, the form is: <strong>after:2007/03/31 before:2004/05/01</strong>.</p>
<p>If you want to search for a label consisting of more than one word, use hyphens, like in the example with John Smith above: <strong>label:holiday-france</strong>.</p>
<p>To find mail from email addresses within a certain domain, you just enter the domain in the “From:” field.</p>
<p>You can also use standard Boolean operators (AND, OR, +, -, quotes and parentheses). For an introduction to Boolean search, see the <a href="http://www.pandia.com/goalgetter/index.html">Pandia Goalgetter search tutorial</a>.</p>
<p><strong>Use the Google Toolbar</strong></p>
<p>If you have the <a href="http://toolbar.google.com/">Google Toolbar</a> installed (and many Page Rank junkies do), recent editions have a Gmail button you can use to search your mail.</p>
]]></content:encoded>
			<wfw:commentRss>http://ivan-grace.com/techblog/2008/12/ways-to-search-your-gmail-mailboxes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An introduction to foreign keys and referential integrity in MySQL</title>
		<link>http://ivan-grace.com/techblog/2008/10/an-introduction-to-foreign-keys-and-referential-integrity-in-mysql/</link>
		<comments>http://ivan-grace.com/techblog/2008/10/an-introduction-to-foreign-keys-and-referential-integrity-in-mysql/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 13:19:25 +0000</pubDate>
		<dc:creator>Ivan Guan</dc:creator>
				<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[foreign key]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://ivan-grace.com/techblog/?p=35</guid>
		<description><![CDATA[Referential integrity is an important concept in database design. The term refers to a state when all the references in a database are valid and no invalid links exist between the various tables that make up the system. When referential integrity exists, any attempt to link to a record which does not already exist will [...]]]></description>
			<content:encoded><![CDATA[<p>Referential integrity is an important concept in database design. The term refers to a state when all the references in a database are valid and no invalid links exist between the various tables that make up the system. When referential integrity exists, any attempt to link to a record which does not already exist will fail; this helps prevent user errors, producing a more accurate (and useful) database.</p>
<p>Referential integrity is usually implemented through the use of foreign keys. For a long time, the popular open-source RDBMS <a href="http://techrepublic.com.com/5264-1-0.html?query=mysql" target="_blank">MySQL</a> did not support foreign keys, citing concerns that such support would erode RDBMS speed and performance. However, given the high volume of user interest in this feature, recent versions of MySQL have implemented support for foreign keys through the new <a href="http://dev.mysql.com/doc/refman/5.0/en/innodb.html" target="_blank">InnoDB</a> table engine. Consequently, maintaining referential integrity within the tables that make up a database has become significantly simpler.</p>
<p>In order to set up a foreign key relationship between two MySQL tables, three conditions must be met:</p>
<ol type="1">
<li>Both tables must be of the InnoDB table type.</li>
<li>The fields used in the foreign key relationship must be indexed.</li>
<li>The fields used in the foreign key relationship must be similar in data type.</li>
</ol>
<p>The best way to understand how this works is with an example. Begin by creating two tables (<strong>Listing A</strong>), one listing animal species and their corresponding codes (table name: <em>species</em>) and the other listing animals in a zoo (table name: <em>zoo</em>). The idea here is to link the two tables by the species code, so that only those entries in the <em>zoo</em> table which have a valid species code in the <em>species</em> table are accepted and saved to the database.</p>
<h3>Listing A</h3>
<p><span class="code">mysql&gt; CREATE TABLE species (id TINYINT NOT NULL AUTO_INCREMENT, name VARCHAR(50) NOT NULL, PRIMARY KEY(id)) ENGINE=INNODB;<br />
Query OK, 0 rows affected (0.11 sec)</p>
<p>mysql&gt; INSERT INTO species VALUES (1, &#8216;orangutan&#8217;), (2, &#8216;elephant&#8217;), (3, &#8216;hippopotamus&#8217;), (4, &#8216;yak&#8217;);<br />
Query OK, 4 rows affected (0.06 sec)<br />
Records: 4  Duplicates: 0  Warnings: 0</p>
<p>mysql&gt; CREATE TABLE zoo (id INT(4) NOT NULL, name VARCHAR(50) NOT NULL, FK_species TINYINT(4) NOT NULL, INDEX (FK_species), FOREIGN KEY (FK_species) REFERENCES species (id), PRIMARY KEY(id)) ENGINE=INNODB;</span></p>
<p><strong><em>Important:</em></strong><em> For non-InnoDB tables, the FOREIGN KEY clause is ignored.</em></p>
<p>As the above illustrates, a foreign key relationship now exists between the fields<em>zoo.species</em> and <em>species.id</em><em>.</em> An entry in the zoo table will be permitted only if the corresponding <em>zoo.species</em> field matches a value in the <em>species.id</em>field. This is clearly visible in the following output, which demonstrates what happens when you attempt to enter a record for Harry Hippopotamus with an invalid species code:</p>
<p><span class="code">mysql&gt; INSERT INTO zoo VALUES (1, &#8216;Harry&#8217;, 5);<br />
ERROR 1216 (23000): Cannot add or update a child row: a foreign key constraint fails</span></p>
<p>Here, MySQL checks the <em>species</em>table to see if the species code exists and, finding that it does not, rejects the record. Contrast this with what happens when you enter the same record with a valid species code (one that already exists in the <em>species</em> table):</p>
<p><span class="code"><em>mysql</em><em>&gt; INSERT INTO zoo VALUES (1, &#8216;Harry&#8217;, 3);<br />
Query OK, 1 row affected (0.06 sec)</em></span></p>
<p>Here, MySQL checks the <em>species</em> table to see if the species code exists and, finding that it does, permits the record to be saved to the <em>zoo</em> table.</p>
<p>To delete a foreign key relationship, first use the SHOW CREATE TABLE command to find out InnoDB&#8217;s internal label for the field (<strong>Listing B</strong>).</p>
<h3>Listing B</h3>
<p><span class="code">+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| Table | Create Table                                      |<br />
+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| zoo   | CREATE TABLE `zoo` (<br />
  `id` int(4) NOT NULL default &#8216;0&#8242;,<br />
  `name` varchar(50) NOT NULL default &#8221;,<br />
  `FK_species` tinyint(4) NOT NULL default &#8216;0&#8242;,<br />
  KEY `FK_species` (`FK_species`),<br />
  CONSTRAINT `<strong>zoo_ibfk_1</strong>` FOREIGN KEY (`FK_species`)<br />
  REFERENCES `species` (`id`)<br />
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |<br />
+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+</span></p>
<p>And then use the <em>ALTER TABLE</em> command with the <em>DROP FOREIGN KEY</em> clause, as below:</p>
<p><span class="code">mysql&gt; ALTER TABLE zoo DROP FOREIGN KEY zoo_ibfk_1;<br />
Query OK, 1 row affected (0.11 sec)<br />
Records: 1  Duplicates: 0  Warnings: 0</span></p>
<p>To add a foreign key to an existing table, use the <em>ALTER TABLE</em> command with an <em>ADD FOREIGN KEY</em> clause to define the appropriate field as a foreign key:</p>
<p><span class="code">mysql&gt; ALTER TABLE zoo ADD FOREIGN KEY (FK_species) REFERENCES species (id);<br />
Query OK, 1 rows affected (0.11 sec)<br />
Records: 1  Duplicates: 0  Warnings: 0</span></p>
<p>As the examples above illustrate, foreign key relationships can play an important role in catching data entry errors, and implementing them usually results in a stronger, better-integrated database. On the other hand, it&#8217;s worthwhile noting that performing foreign key checks is a resource-intensive process and defining complicated inter-relationships between tables can result in a significant performance drop. Therefore, it&#8217;s important to always balance referential integrity considerations with performance considerations, and use foreign keys judiciously to ensure an optimal mix of speed and strength.</p>
]]></content:encoded>
			<wfw:commentRss>http://ivan-grace.com/techblog/2008/10/an-introduction-to-foreign-keys-and-referential-integrity-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reduce number of files in Gallery</title>
		<link>http://ivan-grace.com/techblog/2008/08/reduce-number-of-files-in-gallery/</link>
		<comments>http://ivan-grace.com/techblog/2008/08/reduce-number-of-files-in-gallery/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 07:03:13 +0000</pubDate>
		<dc:creator>Ivan Guan</dc:creator>
				<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[gallery2]]></category>
		<category><![CDATA[inode]]></category>

		<guid isPermaLink="false">http://ivan-grace.com/techblog/?p=25</guid>
		<description><![CDATA[Gallery is a fantastic program to organise your photos. However, it generates a large number of files. This application alone is using 16,102 inodes in my server. As most server limits the number of inodes to be 50,000. Some of the tips to reduce the number of files would be handy.
Be sure to back up first.

Removing [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://gallery.menalto.com/">Gallery</a> is a fantastic program to organise your photos. However, it generates a large number of files. This application alone is using 16,102 inodes in my server. As most server limits the number of inodes to be 50,000. Some of the tips to reduce the number of files would be handy.</p>
<p><strong>Be sure to back up first</strong>.</p>
<ol>
<li>Removing the modules/*/locale/* and themes/*/locale/*/ folders is fine. you&#8217;ll still see g2&#8217;s American English default output.</li>
<li>You can delete the g2data/cache (or just the g2data/cache/derivative) directory periodically (yours may be under a different path) at the expense of performance, as each page visit will have to rebuild those cached files from the original.</li>
<li>Delete any modules in ./gallery2/modules that you don&#8217;t use, make sure they are deactivated / uninstalled first. You can also &#8221;delete&#8221; from site admin, plugins</li>
<li>Delete any themes you don&#8217;t use in ./gallery2/themes, of course making sure they aren&#8217;t activated (uninstall them!). Might be able to delete from the same place as above</li>
<li>In each module, there are lots of .po and .mo files in each module/po directory (ie: ./gallery2/modules/uploadapplet/po). You should be safe to delete any languages you *don&#8217;t* use, but you can see this could quickly be time consuming. If you have shell access, you could do something like `<strong>find . -name &#8216;es.*&#8217;</strong>` to see all the &#8220;es&#8221; language files (is that spanish?). You could expand the find request until you are happy with the results (say, using regex) then add a &#8220;-delete&#8221; or &#8220;-exec rm &#8216;{}&#8217; &#8216;;&#8217;&#8221; (depending on which it supports) to nuke all those language files. You might have to repeat it a few times with different file names specified so you can get them all w/o removing the languages you want to keep. This should save a lot of files too.</li>
<li>You might consider de-activating all your modules, downloading the latest &#8220;minimal&#8221; release and blowing away your ./gallery2/ dir (after making a backup of course), copying the &#8220;config.php&#8221; from your backup and then making sure everything is going. Now, using the downloadable plugins, you can get modules with *only* the languages you want.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://ivan-grace.com/techblog/2008/08/reduce-number-of-files-in-gallery/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>htaccess resources</title>
		<link>http://ivan-grace.com/techblog/2008/07/htaccess-resources/</link>
		<comments>http://ivan-grace.com/techblog/2008/07/htaccess-resources/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 16:21:21 +0000</pubDate>
		<dc:creator>Ivan Guan</dc:creator>
				<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://ivan-grace.com/techblog/2008/07/htaccess-resources/</guid>
		<description><![CDATA[This is on the List of resource list threads, along with other kinds of useful stuff
Beginners Guide to . htaccess File with Examples
5 htaccess Tricks Every Webmaster Should Know
Comprehensive guide to . htaccess &#8211; intro
Ultimate htaccess Examples &#124; evolt.org
the jackol’s den » htaccess Cheatsheet &#8211; Mikhail Esteves
Stupid htaccess Tricks &#8211; Perishable Press
htaccess Magic
Wise-Women: Tutorial: Using [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: x-small;">This is on the </span><span style="font-size: x-small; color: #0033cc;"><a href="http://forums.hostgator.com/showthread.php?t=24939" target="_blank">List of resource list threads</a></span><span style="font-size: x-small;">, along with other kinds of useful stuff</span></p>
<div><a href="http://www.bloghash.com/2006/11/beginners-guide-to-htaccess-file-with-examples/" target="_blank"><span style="color: #00008d;">Beginners Guide to . htaccess File with Examples</span></a></div>
<p><a href="http://passwordrobot.com/blog/5-htaccess-tricks-every-webmaster-should-know/" target="_blank"><span style="color: #00008d;">5 htaccess Tricks Every Webmaster Should Know</span></a></p>
<p><a href="http://www.javascriptkit.com/howto/htaccess.shtml" target="_blank"><span style="color: #00008d;">Comprehensive guide to . htaccess &#8211; intro</span></a></p>
<p><a href="http://www.evolt.org/ultimate_htaccess_examples" target="_blank"><span style="color: #00008d;">Ultimate htaccess Examples | evolt.org</span></a></p>
<p><a href="http://www.thejackol.com/htaccess-cheatsheet/" target="_blank"><span style="color: #00008d;">the jackol’s den » htaccess Cheatsheet &#8211; Mikhail Esteves</span></a></p>
<p><a href="http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/" target="_blank"><span style="color: #00008d;">Stupid htaccess Tricks &#8211; Perishable Press</span></a></p>
<p><a href="http://www.devwebpro.com/devwebpro-39-20030416htaccess-Magic.html" target="_blank"><span style="color: #00008d;">htaccess Magic</span></a></p>
<p><a href="http://www.wise-women.org/tutorials/htaccess/" target="_blank"><span style="color: #00008d;">Wise-Women: Tutorial: Using the . htaccess File</span></a></p>
<p><a href="http://www.hostingmanual.net/other/htfun.shtml" target="_blank"><span style="color: #00008d;">Fun with . htaccess</span></a></p>
<p><a href="http://httpd.apache.org/docs/1.3/howto/htaccess.html" target="_blank"><span style="color: #00008d;">Apache Tutorial: . htaccess files</span></a></p>
<p><a href="http://www.clockwatchers.com/htaccess_intro.html" target="_blank"><span style="color: #00008d;">Clockwatchers &#8211; . htaccess Tutorial &#8211; Introduction</span></a></p>
<p><a href="http://daringfireball.net/2006/05/htaccess_redirection" target="_blank"><span style="color: #00008d;">Daring Fireball: Using . htaccess Redirection to Standardize Web &#8230;</span></a></p>
<p><a href="http://www.securityfocus.com/infocus/1368" target="_blank"><span style="color: #00008d;">Hardening HTAccess , Part One</span></a></p>
<p><a href="http://www.vortexmind.net/index.php/2006-02-26-apache-htaccess-tweaking-tutorial/" target="_blank"><span style="color: #00008d;">Vortexmind: free your mind » Apache . htaccess tweaking tutorial</span></a></p>
<p><a href="http://www.thesitewizard.com/archive/bandwidththeft.shtml" target="_blank"><span style="color: #00008d;">Preventing Image Bandwidth Theft With . htaccess (thesitewizard.com)</span></a></p>
<p><a href="http://www.freewebmasterhelp.com/tutorials/htaccess/" target="_blank"><span style="color: #00008d;">. htaccess Tutorial &#8211; Part 1</span></a></p>
<p><strong>Tools</strong></p>
<p>The first link is a really spiffy web-based .htaccess generator. Using it is a great way to learn more&#8211;if you make a subdirectory in your public_html directory, you can use it with a .htaccess file to see what happens with the generator&#8217;s assorted options.</p>
<p>Reminder: each .htacess file works governs only its own directory and subdirectories below that, until superseded by another, and, like any file with a specific name, only one can exist per directory/subdirectory.</p>
<p><a href="http://cooletips.de/htaccess/" target="_blank"><span style="color: #00008d;">htaccess Generator</span></a></p>
<p><a href="http://www.htaccesstools.com/" target="_blank"><span style="color: #00008d;">. htaccess Tools</span></a></p>
<p><!-- / message --><!-- edit note --></p>
<div class="smallfont"><em></em></div>
<div class="smallfont"><em>by gwyneth <a href="http://forums.hostgator.com/showthread.php?t=21532">HostGator Forum </a></em></div>
]]></content:encoded>
			<wfw:commentRss>http://ivan-grace.com/techblog/2008/07/htaccess-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
