<?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>Ersin Acar</title>
	<atom:link href="http://ersinacar.com/feed" rel="self" type="application/rss+xml" />
	<link>http://ersinacar.com</link>
	<description>PHP and Web Technologies Freak</description>
	<lastBuildDate>Fri, 14 May 2010 11:57:42 +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>Chaning MySQL root password without access</title>
		<link>http://ersinacar.com/chaning-mysql-root-password-without-access_191.html</link>
		<comments>http://ersinacar.com/chaning-mysql-root-password-without-access_191.html#comments</comments>
		<pubDate>Fri, 14 May 2010 11:57:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://ersinacar.com/?p=191</guid>
		<description><![CDATA[
Stop the mysqld daemon process.
Start the mysqld daemon process with the&#8211;skip-grant-tables option.
Start the mysql client with the -u rootoption.
Execute the UPDATE mysql.user SET Password=PASSWORD(&#8216;password&#8217;) WHERE User=&#8217;root&#8217;;
Execute the FLUSH PRIVILEGES;command.

These steps reset the password for the &#8220;root&#8221; account to &#8220;password&#8221;. To change the password for a different account, or to set a different password, just edit the variables in [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Stop the mysqld daemon process.</li>
<li>Start the mysqld daemon process with the<em>&#8211;skip-grant-tables</em> option.</li>
<li>Start the mysql client with the <em>-u root</em>option.</li>
<li>Execute the <em>UPDATE mysql.user SET Password=PASSWORD(&#8216;password&#8217;) WHERE User=&#8217;root&#8217;;</em></li>
<li>Execute the <em>FLUSH PRIVILEGES;</em>command.</li>
</ol>
<p>These steps reset the password for the &#8220;root&#8221; account to &#8220;password&#8221;. To change the password for a different account, or to set a different password, just edit the variables in single-quotes in step 4.</p>
<p>If you know your existing MySQL root password, steps 1-3 are not necessary.</p>
]]></content:encoded>
			<wfw:commentRss>http://ersinacar.com/chaning-mysql-root-password-without-access_191.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Fulltext Indexes in MySQL &#8211; Part 2, Boolean searches</title>
		<link>http://ersinacar.com/using-fulltext-indexes-in-mysql-part-2-boolean-searches_189.html</link>
		<comments>http://ersinacar.com/using-fulltext-indexes-in-mysql-part-2-boolean-searches_189.html#comments</comments>
		<pubDate>Fri, 26 Mar 2010 18:53:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[fulltext]]></category>

		<guid isPermaLink="false">http://ersinacar.com/?p=189</guid>
		<description><![CDATA[Part 1 of this article looked at the fulltext index, and how to search on it using an ordinary MATCH() AGAINST(). Even more powerful, (although only available on the newer MySQL version 4), is the ability to do a boolean search. Part 2 of this article examines the possibilities.
You&#8217;ll use the same table you used [...]]]></description>
			<content:encoded><![CDATA[<p>Part 1 of this article looked at the fulltext index, and how to search on it using an ordinary MATCH() AGAINST(). Even more powerful, (although only available on the newer MySQL version 4), is the ability to do a boolean search. Part 2 of this article examines the possibilities.</p>
<p>You&#8217;ll use the same table you used in Part 1. The full list of records is:</p>
<pre>mysql&gt; SELECT * FROM fulltext_sample;
+---------------------------+
| copy                      |
+---------------------------+
| It appears good from here |
| The here and the past     |
| Why are we here           |
| An all-out alert          |
| All you need is love      |
| A good alert              |
+---------------------------+</pre>
<p>To perform a boolean search, the IN BOOLEAN MODE modifier is used. The following query demonstrates the new syntax.</p>
<p><span id="more-189"></span></p>
<pre>mysql&gt; SELECT * FROM fulltext_sample
WHERE MATCH (copy) AGAINST ('love' IN BOOLEAN MODE);
+----------------------+
| copy                 |
+----------------------+
| All you need is love |
+----------------------+</pre>
<p>An important difference between ordinary MATCH() AGAINST() queries and IN BOOLEAN MODE searches is that the latter does not apply the 50% limit (so the word can appear in more than half the rows).</p>
<p>There are a number of special operators you&#8217;ll need to know in order to make the most of the boolean search. If no symbol is specified, the appearance of this word causes the relevance of the row to be higher, similar to an ordinary MATCH() AGAINST().</p>
<h3>Boolean Search Operators</h3>
<table border="0">
<tbody>
<tr>
<td>+</td>
<td>The word is mandatory in all rows returned.</td>
</tr>
<tr>
<td>-</td>
<td>The word cannot appear in any row returned.</td>
</tr>
<tr>
<td>&lt;</td>
<td>The word that follows has a lower relevance than other words, although rows containing it will still match</td>
</tr>
<tr>
<td>&gt;</td>
<td>The word that follows has a higher relevance than other words.</td>
</tr>
<tr>
<td>()</td>
<td>Used to group words into subexpressions.</td>
</tr>
<tr>
<td>~</td>
<td>The word following contributes negatively to the relevance of the row (which is different to the &#8216;-&#8217; operator, which specifically excludes the word, or the &#8216;&lt;&#8217; operator, which still causes the word to contribute positively to the relevance of the row.</td>
</tr>
<tr>
<td>*</td>
<td>The wildcard, indicating zero or more characters. It can only appear at the end of a word.</td>
</tr>
<tr>
<td>&#8220;</td>
<td>Anything enclosed in the double quotes is taken as a whole (so you can match phrases, for example).</td>
</tr>
</tbody>
</table>
<h3>Examples</h3>
<p>Let&#8217;s see some of this action. The first example returns all rows containing the word &#8216;here&#8217;, but not the word &#8216;past&#8217;.</p>
<pre>mysql&gt; SELECT copy FROM fulltext_sample WHERE MATCH(copy)
AGAINST ('+here -past' IN BOOLEAN MODE);
+---------------------------+
| copy                      |
+---------------------------+
| It appears good from here |
| Why are we here           |
+---------------------------+</pre>
<p>Compare the difference between the next two examples:</p>
<pre>mysql&gt; SELECT copy FROM fulltext_sample WHERE MATCH(copy)
AGAINST ('here past' IN BOOLEAN MODE);
+---------------------------+
| copy                      |
+---------------------------+
| It appears good from here |
| The here and the past     |
| Why are we here           |
+---------------------------+

mysql&gt; SELECT copy FROM fulltext_sample WHERE MATCH(copy)
AGAINST ('here +past'IN BOOLEAN MODE);
+-----------------------+
| copy                  |
+-----------------------+
| The here and the past |
+-----------------------+</pre>
<p>The first works in a similar way to an ordinary MATCH() AGAINST(), albeit without the 50% threshold. The word &#8216;past&#8217; is mandatory in the second search (by default a word is optional), so the other two records are not returned.</p>
<p>The next example demonstrates a common mistake.</p>
<pre>mysql&gt; SELECT copy FROM fulltext_sample
WHERE MATCH(copy) AGAINST ('+are here' IN BOOLEAN MODE);
+---------------------------+
| copy                      |
+---------------------------+
| It appears good from here |
| The here and the past     |
| Why are we here           |
+---------------------------+</pre>
<p>The results may appear surprising compared the previous example, but since &#8216;are&#8217; contains three or less letters, it is excluded for purposes of the search and is not mandatory.</p>
<p>The next two examples demonstrate a powerful enhancement for searching purposes:</p>
<pre>mysql&gt; SELECT copy FROM fulltext_sample
WHERE MATCH(copy) AGAINST ('aler' IN BOOLEAN MODE);
Empty set (0.01 sec)

mysql&gt; SELECT copy FROM fulltext_sample
WHERE MATCH(copy) AGAINST ('aler*' IN BOOLEAN MODE);
+------------------+
| copy             |
+------------------+
| An all-out alert |
| A good alert     |
+------------------+</pre>
<pre></pre>
<pre>
By default only whole words are matched, unless the '*' operator is used.

The '&lt;' and '&gt;' symbols are less commonly used, but they allow a great degree of control for relevance. In the following examples, we return the relevance indicator to demonstrate the difference between the queries.
<pre>mysql&gt; SELECT copy, MATCH(copy)
AGAINST ('appears good alert' IN BOOLEAN MODE)
AS m FROM fulltext_sample WHERE MATCH(copy)
AGAINST ('appears good alert' IN BOOLEAN MODE);
+---------------------------+------+
| copy                      | m    |
+---------------------------+------+
| It appears good from here |    2 |
| An all-out alert          |    1 |
| A good alert              |    2 |
+---------------------------+------+

mysql&gt; SELECT copy, MATCH(copy)
AGAINST ('appears &lt;good alert' IN BOOLEAN MODE)
AS m FROM fulltext_sample WHERE MATCH(copy)
AGAINST ('appears &lt;good alert' IN BOOLEAN MODE);
+---------------------------+------------------+
| copy                      | m                |
+---------------------------+------------------+
| It appears good from here |  1.6666667461395 |
| An all-out alert          |                1 |
| A good alert              |  1.6666667461395 |
+---------------------------+------------------+</pre>
<p>The '&lt;' operator decreases the relevance of the word 'good', in this case by approximately 0.33.</p>
<pre>mysql&gt; SELECT copy, MATCH(copy)
AGAINST ('appears good &gt;alert' IN BOOLEAN MODE)
AS m FROM fulltext_sample WHERE MATCH(copy)
AGAINST ('appears good &gt;alert' IN BOOLEAN MODE);
+---------------------------+------+
| copy                      | m    |
+---------------------------+------+
| It appears good from here |    2 |
| An all-out alert          |  1.5 |
| A good alert              |  2.5 |
+---------------------------+------+</pre>
<p>The '&gt;' operator increases the relevance of the word 'alert', in this case by 0.5.</p>
<p>The parentheses group words into a subexpression. In the following example, the '+' symbol applies to the group of words, so that at least one of 'appears' or 'past' must appear.</p>
<pre>mysql&gt; SELECT copy, MATCH(copy)
AGAINST ('+(appears past)' IN BOOLEAN MODE)
AS m FROM fulltext_sample WHERE MATCH(copy)
AGAINST ('(appears past)' IN BOOLEAN MODE);
+---------------------------+------+
| copy                      | m    |
+---------------------------+------+
| It appears good from here |    1 |
| The here and the past     |    1 |
+---------------------------+------+</pre>
<p>You can also apply the operators to words in the subexpression, as follows:</p>
<pre>mysql&gt; SELECT copy, MATCH(copy)
AGAINST ('+(&gt;appears &lt;past)' IN BOOLEAN MODE)
AS m FROM fulltext_sample WHERE MATCH(copy)
AGAINST ('+(&gt;appears &lt;past)' IN BOOLEAN MODE);
+---------------------------+------------------+
| copy                      | m                |
+---------------------------+------------------+
| It appears good from here |              1.5 |
| The here and the past     | 0.66666668653488 |
+---------------------------+------------------+</pre>
<p>The '~' operator contributes negatively to the relevance, but does not bar the word from appearing, as the '-' operator does. It also does not do the same as the '&lt;' operator, which is to make a reduced, yet still positive, difference to the relevance. These subtle difference allows for powerfully tuned searches, but can cause confusion. Look at the difference between the following. First, the word 'here' is compulsory, and the word 'past' optional:</p>
<pre>mysql&gt; SELECT copy, MATCH(copy)
AGAINST ('+here past' IN BOOLEAN MODE)
AS m FROM fulltext_sample WHERE MATCH(copy)
AGAINST ('+here past' IN BOOLEAN MODE);
+---------------------------+-----------------+
| copy                      | m               |
+---------------------------+-----------------+
| It appears good from here |               1 |
| The here and the past     | 1.3333333730698 |
| Why are we here           |               1 |
+---------------------------+-----------------+</pre>
<p>Next, a reduced relevance for the word 'past'. The same results are returned, but the record with both words ('The here and the past') has less weighting, though still more than the other records.</p>
<pre>mysql&gt; SELECT copy, MATCH(copy)
AGAINST ('+here &lt;past' IN BOOLEAN MODE)
AS m FROM fulltext_sample WHERE MATCH(copy)
AGAINST ('+here &lt;past' IN BOOLEAN MODE);
+---------------------------+-----------------+
| copy                      | m               |
+---------------------------+-----------------+
| It appears good from here |               1 |
| The here and the past     | 1.2222222089767 |
| Why are we here           |               1 |
+---------------------------+-----------------+</pre>
<p>Take note of the relevance in the next example:</p>
<pre>mysql&gt; SELECT copy, MATCH(copy)
AGAINST ('+here ~past' IN BOOLEAN MODE)
AS m FROM fulltext_sample WHERE MATCH(copy)
AGAINST ('+here ~past' IN BOOLEAN MODE);
+---------------------------+------------------+
| copy                      | m                |
+---------------------------+------------------+
| It appears good from here |                1 |
| The here and the past     | 0.83333331346512 |
| Why are we here           |                1 |
+---------------------------+------------------+</pre>
<p>The important difference is that the relevance is negatively affected, and is now lower than the other two records. This means if you asked for only '~past', you'd get nothing back, as the relevance would be lower than 0 (and therefore not returned)</p>
<pre>mysql&gt; SELECT copy, MATCH(copy)
AGAINST ('~past' IN BOOLEAN MODE)
AS m FROM fulltext_sample WHERE MATCH(copy)
AGAINST ('~past' IN BOOLEAN MODE);
Empty set (0.00 sec)</pre>
<p>Finally, '-' simply removes the second record from the result set, as we've seen before.</p>
<pre>mysql&gt; SELECT copy, MATCH(copy)
AGAINST ('+here -past' IN BOOLEAN MODE)
AS m FROM fulltext_sample WHERE MATCH(copy)
AGAINST ('+here -past' IN BOOLEAN MODE);
+---------------------------+------+
| copy                      | m    |
+---------------------------+------+
| It appears good from here |    1 |
| Why are we here           |    1 |
+---------------------------+------+</pre>
<p>The final operator, the double quotes ("), is useful to group phrases together. So, if you were interested in returning 'good from here' but none of those words if they did not appear in the phrase, you'd use:</p>
<pre>mysql&gt; SELECT copy, MATCH(copy)
AGAINST ('"good from here"' IN BOOLEAN MODE)
AS m FROM fulltext_sample WHERE MATCH(copy)
AGAINST ('"good from here"' IN BOOLEAN MODE);
+---------------------------+------+
| copy                      | m    |
+---------------------------+------+
| It appears good from here |    1 |
+---------------------------+------+</pre>
<p>For many applications, boolean searches are one of MySQL 4's most useful features. With careful use, you can save yourself substantial of development time, and add many useful enhancements. Good luck!</pre>
]]></content:encoded>
			<wfw:commentRss>http://ersinacar.com/using-fulltext-indexes-in-mysql-part-2-boolean-searches_189.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Fulltext Indexes in MySQL &#8211; Part 1</title>
		<link>http://ersinacar.com/using-fulltext-indexes-in-mysql-part-1_186.html</link>
		<comments>http://ersinacar.com/using-fulltext-indexes-in-mysql-part-1_186.html#comments</comments>
		<pubDate>Fri, 26 Mar 2010 18:46:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://ersinacar.com/?p=186</guid>
		<description><![CDATA[One of the more useful MySQL features is the ability to search for text using a FULLTEXT index. Currently this is only available if you use the MyISAM table type (which is the default table type, so if you don&#8217;t know what table type you&#8217;re using, it&#8217;ll most likely be MyISAM). A fulltext index can [...]]]></description>
			<content:encoded><![CDATA[<p>One of the more useful MySQL features is the ability to search for text using a FULLTEXT index. Currently this is only available if you use the MyISAM table type (which is the default table type, so if you don&#8217;t know what table type you&#8217;re using, it&#8217;ll most likely be MyISAM). A fulltext index can be created for a TEXT, CHAR or VARCHAR type field, or combination of fields. We&#8217;re going to create a sample table and use it to explore the various features.</p>
<p>The simple form of usage (the MATCH() function) is available to all MySQL servers from version 3.23.23, while the more complex usage (the IN BOOLEAN MODE modifier) is available from version 4. The first part of this article looks at the former, and the second part at the latter.</p>
<p>A sample table</p>
<p>We&#8217;re going to use the following table throughout this tutorial.</p>
<p>CREATE TABLE fulltext_sample(copy TEXT,FULLTEXT(copy)) TYPE=MyISAM;<br />
The TYPE=MyISAM clause isn&#8217;t necessary unless you&#8217;ve set the default table type to be something other than MyISAM (perhaps you use InnoDB tables to make use of MySQL&#8217;s transactional capabilities). Once you&#8217;ve created the table, populate it with some data, as follows:<br />
INSERT INTO fulltext_sample VALUES<br />
(&#8216;It appears good from here&#8217;),<br />
(&#8216;The here and the past&#8217;),<br />
(&#8216;Why are we hear&#8217;),<br />
(&#8216;An all-out alert&#8217;),<br />
(&#8216;All you need is love&#8217;),<br />
(&#8216;A good alert&#8217;);<br />
If you&#8217;d already created an existing table, you can add a FULLTEXT index with the ALTER TABLE statement (as well as the CREATE INDEX statement), for example:<br />
<span id="more-186"></span><br />
ALTER TABLE fulltext_sample ADD FULLTEXT(copy)<br />
Searching for text</p>
<p>The syntax of a FULLTEXT search is simple. You MATCH the field AGAINST the text you are searching for, for example:</p>
<p>mysql> SELECT * FROM fulltext_sample WHERE MATCH(copy) AGAINST(&#8216;love&#8217;);<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| copy                 |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| All you need is love |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
Searches on a FULLTEXT index are performed case-insensitively (as are searches on TEXT and non-binary VARCHAR fields generally). So the following works as well:<br />
mysql> SELECT * FROM fulltext_sample WHERE MATCH(copy) AGAINST(&#8216;LOVE&#8217;);<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| copy                 |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
| All you need is love |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+<br />
FULLTEXT indexes are most often used to search natural language text, such as through newspaper articles, web page contents and so on. For this reason MySQL has added a number of features to assist this kind of searching. MySQL does not index any words less than or equal to 3 characters in length, nor does it index any words that appear in more than 50% of the rows. This means that if your table contains 2 or less rows, a search on a FULLTEXT index will never return anything. In future, MySQL will make this behavior more flexible, but for now it should suit most natural language uses. If most fields in your database contain the word &#8216;music&#8217;, you probably don&#8217;t want these records returned, You can use the IN BOOLEAN MODE modifier to get around the 50% threshold, as you&#8217;ll see in Part 2 of this article.</p>
<p>Results are returned in order of relevance, from highest to lowest.</p>
<p>The main features</p>
<p>A list of the main features of a standard FULLTEXT search follows:</p>
<p>Excludes partial words<br />
Excludes words less than 4 characters in length (3 or less)<br />
Excludes words that appear in more than half the rows (meaning at least 3 rows are required)<br />
Hyphenated words are treated as two words<br />
Rows are returned in order of relevance, descending<br />
Words in the stopword list (common words) are also excluded from the search results. The stopword list is based upon common English words, so if your data is used for a different purpose, you&#8217;ll probably want to change the list. Unfortunately, doing so at present is not easy. You&#8217;ll need to edit the file myisam/ft_static.c. recompile MySQL, and rebuild the indexes! To save you hunting through the source, or if you have a binary version of MySQL, here is a list of stopwords. Note that these can and do change with different versions. To be absolutely sure, you&#8217;ll have to check the specific list for your version.<br />
Stopwords</p>
<p>&#8220;a&#8221;, &#8220;a&#8217;s&#8221;, &#8220;able&#8221;, &#8220;about&#8221;, &#8220;above&#8221;, &#8220;according&#8221;, &#8220;accordingly&#8221;, &#8220;across&#8221;, &#8220;actually&#8221;, &#8220;after&#8221;, &#8220;afterwards&#8221;, &#8220;again&#8221;, &#8220;against&#8221;, &#8220;ain&#8217;t&#8221;, &#8220;all&#8221;, &#8220;allow&#8221;, &#8220;allows&#8221;, &#8220;almost&#8221;, &#8220;alone&#8221;, &#8220;along&#8221;, &#8220;already&#8221;, &#8220;also&#8221;, &#8220;although&#8221;, &#8220;always&#8221;, &#8220;am&#8221;, &#8220;among&#8221;, &#8220;amongst&#8221;, &#8220;an&#8221;, &#8220;and&#8221;, &#8220;another&#8221;, &#8220;any&#8221;, &#8220;anybody&#8221;, &#8220;anyhow&#8221;, &#8220;anyone&#8221;, &#8220;anything&#8221;, &#8220;anyway&#8221;, &#8220;anyways&#8221;, &#8220;anywhere&#8221;, &#8220;apart&#8221;, &#8220;appear&#8221;, &#8220;appreciate&#8221;, &#8220;appropriate&#8221;, &#8220;are&#8221;, &#8220;aren&#8217;t&#8221;, &#8220;around&#8221;, &#8220;as&#8221;, &#8220;aside&#8221;, &#8220;ask&#8221;, &#8220;asking&#8221;, &#8220;associated&#8221;, &#8220;at&#8221;, &#8220;available&#8221;, &#8220;away&#8221;, &#8220;awfully&#8221;, &#8220;b&#8221;, &#8220;be&#8221;, &#8220;became&#8221;, &#8220;because&#8221;, &#8220;become&#8221;, &#8220;becomes&#8221;, &#8220;becoming&#8221;, &#8220;been&#8221;, &#8220;before&#8221;, &#8220;beforehand&#8221;, &#8220;behind&#8221;, &#8220;being&#8221;, &#8220;believe&#8221;, &#8220;below&#8221;, &#8220;beside&#8221;, &#8220;besides&#8221;, &#8220;best&#8221;, &#8220;better&#8221;, &#8220;between&#8221;, &#8220;beyond&#8221;, &#8220;both&#8221;, &#8220;brief&#8221;, &#8220;but&#8221;, &#8220;by&#8221;, &#8220;c&#8221;, &#8220;c&#8217;mon&#8221;, &#8220;c&#8217;s&#8221;, &#8220;came&#8221;, &#8220;can&#8221;, &#8220;can&#8217;t&#8221;, &#8220;cannot&#8221;, &#8220;cant&#8221;, &#8220;cause&#8221;, &#8220;causes&#8221;, &#8220;certain&#8221;, &#8220;certainly&#8221;, &#8220;changes&#8221;, &#8220;clearly&#8221;, &#8220;co&#8221;, &#8220;com&#8221;, &#8220;come&#8221;, &#8220;comes&#8221;, &#8220;concerning&#8221;, &#8220;consequently&#8221;, &#8220;consider&#8221;, &#8220;considering&#8221;, &#8220;contain&#8221;, &#8220;containing&#8221;, &#8220;contains&#8221;, &#8220;corresponding&#8221;, &#8220;could&#8221;, &#8220;couldn&#8217;t&#8221;, &#8220;course&#8221;, &#8220;currently&#8221;, &#8220;d&#8221;, &#8220;definitely&#8221;, &#8220;described&#8221;, &#8220;despite&#8221;, &#8220;did&#8221;, &#8220;didn&#8217;t&#8221;, &#8220;different&#8221;, &#8220;do&#8221;, &#8220;does&#8221;, &#8220;doesn&#8217;t&#8221;, &#8220;doing&#8221;, &#8220;don&#8217;t&#8221;, &#8220;done&#8221;, &#8220;down&#8221;, &#8220;downwards&#8221;, &#8220;during&#8221;, &#8220;e&#8221;, &#8220;each&#8221;, &#8220;edu&#8221;, &#8220;eg&#8221;, &#8220;eight&#8221;, &#8220;either&#8221;, &#8220;else&#8221;, &#8220;elsewhere&#8221;, &#8220;enough&#8221;, &#8220;entirely&#8221;, &#8220;especially&#8221;, &#8220;et&#8221;, &#8220;etc&#8221;, &#8220;even&#8221;, &#8220;ever&#8221;, &#8220;every&#8221;, &#8220;everybody&#8221;, &#8220;everyone&#8221;, &#8220;everything&#8221;, &#8220;everywhere&#8221;, &#8220;ex&#8221;, &#8220;exactly&#8221;, &#8220;example&#8221;, &#8220;except&#8221;, &#8220;f&#8221;, &#8220;far&#8221;, &#8220;few&#8221;, &#8220;fifth&#8221;, &#8220;first&#8221;, &#8220;five&#8221;, &#8220;followed&#8221;, &#8220;following&#8221;, &#8220;follows&#8221;, &#8220;for&#8221;, &#8220;former&#8221;, &#8220;formerly&#8221;, &#8220;forth&#8221;, &#8220;four&#8221;, &#8220;from&#8221;, &#8220;further&#8221;, &#8220;furthermore&#8221;, &#8220;g&#8221;, &#8220;get&#8221;, &#8220;gets&#8221;, &#8220;getting&#8221;, &#8220;given&#8221;, &#8220;gives&#8221;, &#8220;go&#8221;, &#8220;goes&#8221;, &#8220;going&#8221;, &#8220;gone&#8221;, &#8220;got&#8221;, &#8220;gotten&#8221;, &#8220;greetings&#8221;, &#8220;h&#8221;, &#8220;had&#8221;, &#8220;hadn&#8217;t&#8221;, &#8220;happens&#8221;, &#8220;hardly&#8221;, &#8220;has&#8221;, &#8220;hasn&#8217;t&#8221;, &#8220;have&#8221;, &#8220;haven&#8217;t&#8221;, &#8220;having&#8221;, &#8220;he&#8221;, &#8220;he&#8217;s&#8221;, &#8220;hello&#8221;, &#8220;help&#8221;, &#8220;hence&#8221;, &#8220;her&#8221;, &#8220;here&#8221;, &#8220;here&#8217;s&#8221;, &#8220;hereafter&#8221;, &#8220;hereby&#8221;, &#8220;herein&#8221;, &#8220;hereupon&#8221;, &#8220;hers&#8221;, &#8220;herself&#8221;, &#8220;hi&#8221;, &#8220;him&#8221;, &#8220;himself&#8221;, &#8220;his&#8221;, &#8220;hither&#8221;, &#8220;hopefully&#8221;, &#8220;how&#8221;, &#8220;howbeit&#8221;, &#8220;however&#8221;, &#8220;i&#8221;, &#8220;i&#8217;d&#8221;, &#8220;i&#8217;ll&#8221;, &#8220;i&#8217;m&#8221;, &#8220;i&#8217;ve&#8221;, &#8220;ie&#8221;, &#8220;if&#8221;, &#8220;ignored&#8221;, &#8220;immediate&#8221;, &#8220;in&#8221;, &#8220;inasmuch&#8221;, &#8220;inc&#8221;, &#8220;indeed&#8221;, &#8220;indicate&#8221;, &#8220;indicated&#8221;, &#8220;indicates&#8221;, &#8220;inner&#8221;, &#8220;insofar&#8221;, &#8220;instead&#8221;, &#8220;into&#8221;, &#8220;inward&#8221;, &#8220;is&#8221;, &#8220;isn&#8217;t&#8221;, &#8220;it&#8221;, &#8220;it&#8217;d&#8221;, &#8220;it&#8217;ll&#8221;, &#8220;it&#8217;s&#8221;, &#8220;its&#8221;, &#8220;itself&#8221;, &#8220;j&#8221;, &#8220;just&#8221;, &#8220;k&#8221;, &#8220;keep&#8221;, &#8220;keeps&#8221;, &#8220;kept&#8221;, &#8220;know&#8221;, &#8220;knows&#8221;, &#8220;known&#8221;, &#8220;l&#8221;, &#8220;last&#8221;, &#8220;lately&#8221;, &#8220;later&#8221;, &#8220;latter&#8221;, &#8220;latterly&#8221;, &#8220;least&#8221;, &#8220;less&#8221;, &#8220;lest&#8221;, &#8220;let&#8221;, &#8220;let&#8217;s&#8221;, &#8220;like&#8221;, &#8220;liked&#8221;, &#8220;likely&#8221;, &#8220;little&#8221;, &#8220;look&#8221;, &#8220;looking&#8221;, &#8220;looks&#8221;, &#8220;ltd&#8221;, &#8220;m&#8221;, &#8220;mainly&#8221;, &#8220;many&#8221;, &#8220;may&#8221;, &#8220;maybe&#8221;, &#8220;me&#8221;, &#8220;mean&#8221;, &#8220;meanwhile&#8221;, &#8220;merely&#8221;, &#8220;might&#8221;, &#8220;more&#8221;, &#8220;moreover&#8221;, &#8220;most&#8221;, &#8220;mostly&#8221;, &#8220;much&#8221;, &#8220;must&#8221;, &#8220;my&#8221;, &#8220;myself&#8221;, &#8220;n&#8221;, &#8220;name&#8221;, &#8220;namely&#8221;, &#8220;nd&#8221;, &#8220;near&#8221;, &#8220;nearly&#8221;, &#8220;necessary&#8221;, &#8220;need&#8221;, &#8220;needs&#8221;, &#8220;neither&#8221;, &#8220;never&#8221;, &#8220;nevertheless&#8221;, &#8220;new&#8221;, &#8220;next&#8221;, &#8220;nine&#8221;, &#8220;no&#8221;, &#8220;nobody&#8221;, &#8220;non&#8221;, &#8220;none&#8221;, &#8220;noone&#8221;, &#8220;nor&#8221;, &#8220;normally&#8221;, &#8220;not&#8221;, &#8220;nothing&#8221;, &#8220;novel&#8221;, &#8220;now&#8221;, &#8220;nowhere&#8221;, &#8220;o&#8221;, &#8220;obviously&#8221;, &#8220;of&#8221;, &#8220;off&#8221;, &#8220;often&#8221;, &#8220;oh&#8221;, &#8220;ok&#8221;, &#8220;okay&#8221;, &#8220;old&#8221;, &#8220;on&#8221;, &#8220;once&#8221;, &#8220;one&#8221;, &#8220;ones&#8221;, &#8220;only&#8221;, &#8220;onto&#8221;, &#8220;or&#8221;, &#8220;other&#8221;, &#8220;others&#8221;, &#8220;otherwise&#8221;, &#8220;ought&#8221;, &#8220;our&#8221;, &#8220;ours&#8221;, &#8220;ourselves&#8221;, &#8220;out&#8221;, &#8220;outside&#8221;, &#8220;over&#8221;, &#8220;overall&#8221;, &#8220;own&#8221;, &#8220;p&#8221;, &#8220;particular&#8221;, &#8220;particularly&#8221;, &#8220;per&#8221;, &#8220;perhaps&#8221;, &#8220;placed&#8221;, &#8220;please&#8221;, &#8220;plus&#8221;, &#8220;possible&#8221;, &#8220;presumably&#8221;, &#8220;probably&#8221;, &#8220;provides&#8221;, &#8220;q&#8221;, &#8220;que&#8221;, &#8220;quite&#8221;, &#8220;qv&#8221;, &#8220;r&#8221;, &#8220;rather&#8221;, &#8220;rd&#8221;, &#8220;re&#8221;, &#8220;really&#8221;, &#8220;reasonably&#8221;, &#8220;regarding&#8221;, &#8220;regardless&#8221;, &#8220;regards&#8221;, &#8220;relatively&#8221;, &#8220;respectively&#8221;, &#8220;right&#8221;, &#8220;s&#8221;, &#8220;said&#8221;, &#8220;same&#8221;, &#8220;saw&#8221;, &#8220;say&#8221;, &#8220;saying&#8221;, &#8220;says&#8221;, &#8220;second&#8221;, &#8220;secondly&#8221;, &#8220;see&#8221;, &#8220;seeing&#8221;, &#8220;seem&#8221;, &#8220;seemed&#8221;, &#8220;seeming&#8221;, &#8220;seems&#8221;, &#8220;seen&#8221;, &#8220;self&#8221;, &#8220;selves&#8221;, &#8220;sensible&#8221;, &#8220;sent&#8221;, &#8220;serious&#8221;, &#8220;seriously&#8221;, &#8220;seven&#8221;, &#8220;several&#8221;, &#8220;shall&#8221;, &#8220;she&#8221;, &#8220;should&#8221;, &#8220;shouldn&#8217;t&#8221;, &#8220;since&#8221;, &#8220;six&#8221;, &#8220;so&#8221;, &#8220;some&#8221;, &#8220;somebody&#8221;, &#8220;somehow&#8221;, &#8220;someone&#8221;, &#8220;something&#8221;, &#8220;sometime&#8221;, &#8220;sometimes&#8221;, &#8220;somewhat&#8221;, &#8220;somewhere&#8221;, &#8220;soon&#8221;, &#8220;sorry&#8221;, &#8220;specified&#8221;, &#8220;specify&#8221;, &#8220;specifying&#8221;, &#8220;still&#8221;, &#8220;sub&#8221;, &#8220;such&#8221;, &#8220;sup&#8221;, &#8220;sure&#8221;, &#8220;t&#8221;, &#8220;t&#8217;s&#8221;, &#8220;take&#8221;, &#8220;taken&#8221;, &#8220;tell&#8221;, &#8220;tends&#8221;, &#8220;th&#8221;, &#8220;than&#8221;, &#8220;thank&#8221;, &#8220;thanks&#8221;, &#8220;thanx&#8221;, &#8220;that&#8221;, &#8220;that&#8217;s&#8221;, &#8220;thats&#8221;, &#8220;the&#8221;, &#8220;their&#8221;, &#8220;theirs&#8221;, &#8220;them&#8221;, &#8220;themselves&#8221;, &#8220;then&#8221;, &#8220;thence&#8221;, &#8220;there&#8221;, &#8220;there&#8217;s&#8221;, &#8220;thereafter&#8221;, &#8220;thereby&#8221;, &#8220;therefore&#8221;, &#8220;therein&#8221;, &#8220;theres&#8221;, &#8220;thereupon&#8221;, &#8220;these&#8221;, &#8220;they&#8221;, &#8220;they&#8217;d&#8221;, &#8220;they&#8217;ll&#8221;, &#8220;they&#8217;re&#8221;, &#8220;they&#8217;ve&#8221;, &#8220;think&#8221;, &#8220;third&#8221;, &#8220;this&#8221;, &#8220;thorough&#8221;, &#8220;thoroughly&#8221;, &#8220;those&#8221;, &#8220;though&#8221;, &#8220;three&#8221;, &#8220;through&#8221;, &#8220;throughout&#8221;, &#8220;thru&#8221;, &#8220;thus&#8221;, &#8220;to&#8221;, &#8220;together&#8221;, &#8220;too&#8221;, &#8220;took&#8221;, &#8220;toward&#8221;, &#8220;towards&#8221;, &#8220;tried&#8221;, &#8220;tries&#8221;, &#8220;truly&#8221;, &#8220;try&#8221;, &#8220;trying&#8221;, &#8220;twice&#8221;, &#8220;two&#8221;, &#8220;u&#8221;, &#8220;un&#8221;, &#8220;under&#8221;, &#8220;unfortunately&#8221;, &#8220;unless&#8221;, &#8220;unlikely&#8221;, &#8220;until&#8221;, &#8220;unto&#8221;, &#8220;up&#8221;, &#8220;upon&#8221;, &#8220;us&#8221;, &#8220;use&#8221;, &#8220;used&#8221;, &#8220;useful&#8221;, &#8220;uses&#8221;, &#8220;using&#8221;, &#8220;usually&#8221;, &#8220;v&#8221;, &#8220;value&#8221;, &#8220;various&#8221;, &#8220;very&#8221;, &#8220;via&#8221;, &#8220;viz&#8221;, &#8220;vs&#8221;, &#8220;w&#8221;, &#8220;want&#8221;, &#8220;wants&#8221;, &#8220;was&#8221;, &#8220;wasn&#8217;t&#8221;, &#8220;way&#8221;, &#8220;we&#8221;, &#8220;we&#8217;d&#8221;, &#8220;we&#8217;ll&#8221;, &#8220;we&#8217;re&#8221;, &#8220;we&#8217;ve&#8221;, &#8220;welcome&#8221;, &#8220;well&#8221;, &#8220;went&#8221;, &#8220;were&#8221;, &#8220;weren&#8217;t&#8221;, &#8220;what&#8221;, &#8220;what&#8217;s&#8221;, &#8220;whatever&#8221;, &#8220;when&#8221;, &#8220;whence&#8221;, &#8220;whenever&#8221;, &#8220;where&#8221;, &#8220;where&#8217;s&#8221;, &#8220;whereafter&#8221;, &#8220;whereas&#8221;, &#8220;whereby&#8221;, &#8220;wherein&#8221;, &#8220;whereupon&#8221;, &#8220;wherever&#8221;, &#8220;whether&#8221;, &#8220;which&#8221;, &#8220;while&#8221;, &#8220;whither&#8221;, &#8220;who&#8221;, &#8220;who&#8217;s&#8221;, &#8220;whoever&#8221;, &#8220;whole&#8221;, &#8220;whom&#8221;, &#8220;whose&#8221;, &#8220;why&#8221;, &#8220;will&#8221;, &#8220;willing&#8221;, &#8220;wish&#8221;, &#8220;with&#8221;, &#8220;within&#8221;, &#8220;without&#8221;, &#8220;won&#8217;t&#8221;, &#8220;wonder&#8221;, &#8220;would&#8221;, &#8220;would&#8221;, &#8220;wouldn&#8217;t&#8221;, &#8220;x&#8221;, &#8220;y&#8221;, &#8220;yes&#8221;, &#8220;yet&#8221;, &#8220;you&#8221;, &#8220;you&#8217;d&#8221;, &#8220;you&#8217;ll&#8221;, &#8220;you&#8217;re&#8221;, &#8220;you&#8217;ve&#8221;, &#8220;your&#8221;, &#8220;yours&#8221;, &#8220;yourself&#8221;, &#8220;yourselves&#8221;, &#8220;z&#8221;, &#8220;zero&#8221;,</p>
<p>Let&#8217;s have a look at some of the consequences of this. If you were a bit lazy in your typing, and tried &#8216;to look for the word &#8216;love&#8217;, as follows:<br />
mysql> SELECT * FROM fulltext_sample WHERE MATCH(copy) AGAINST(&#8216;lov&#8217;);<br />
Empty set (0.00 sec)<br />
you&#8217;d get nothing back, as the FULLTEXT index only contains complete words, not partial words. You&#8217;d have to write the full word to get anything back, as you did in the first example.<br />
As mentioned, hyphenated words are also excluded from the FULLTEXT index (they are indexed as separate words), so the following also returns nothing:</p>
<p>mysql> SELECT * FROM fulltext_sample WHERE MATCH(copy) AGAINST(&#8216;all-out&#8217;);<br />
Empty set (0.00 sec)<br />
Unfortunately, both words are less than the required 4 letters, so they don&#8217;t appear on their own either, and cannot be found at all with an ordinary search. Part 2 of this tutorial looks at BOOLEAN MODE searches when you can search for partial or hyphenated words.<br />
You can also search for more than one word at a time, by separating the words with commas. Try and return records containing the words &#8216;here&#8217; and &#8216;appears&#8217;, as follows:</p>
<p>mysql> SELECT * FROM fulltext_sample WHERE MATCH(copy) AGAINST(&#8216;here&#8217;);<br />
Empty set (0.01 sec)<br />
Unexpectedly this returns nothing. But, a more careful look at the stopword list shows this word is listed, so they are excluded from the index. Stopwords are a common cause of people complaining that the MySQL FULLTEXT index facility is not working properly. If your query does return a result, then the stopword list in your version of MySQL does not contain the word &#8216;here&#8217;.<br />
Relevance</p>
<p>The following example shows how the records are returned in order of precedence:</p>
<p>mysql> SELECT * FROM fulltext_sample WHERE MATCH(copy) AGAINST(&#8216;good,alert&#8217;);<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| copy                      |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| A good alert              |<br />
| It appears good from here |<br />
| An all-out alert          |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
The record &#8216;A good alert&#8217; appears first, as it contains both words being searched for. You don&#8217;t have to believe me &#8211; just ask MySQL to display the precedence in the results. Simply repeat the MATCH() function in the field list, as follows:<br />
mysql> SELECT copy,MATCH(copy) AGAINST(&#8216;good,alert&#8217;) AS relevance<br />
FROM fulltext_sample WHERE MATCH(copy) AGAINST(&#8216;good,alert&#8217;);<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| copy                      | relevance        |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
| A good alert              |  1.3551264824316 |<br />
| An all-out alert          | 0.68526663197496 |<br />
| It appears good from hear | 0.67003110026735 |<br />
+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br />
The relevance calculation is fairly complex and is based upon the number of words in the index, the number of unique words in that row, the total number of words in both the index and the result, as well as the weight of the word (for the average English sentence, the word &#8216;cool&#8217; will be weighted less, and therefore have a lower relevance, than the word &#8216;dandy&#8217;, though trends can change!). The figures may differ in your version of MySQL, as MySQL does occasionally tweak the calculation algorithms. </p>
<p>While the standard FULLTEXT search is fairly useful and sufficient for many, MySQL 4 takes it much further. Part 2 of this article looks at BOOLEAN FULLTEXT searches, which offer a lot more functionality.</p>
]]></content:encoded>
			<wfw:commentRss>http://ersinacar.com/using-fulltext-indexes-in-mysql-part-1_186.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do I find the largest top 10 files and directories on a Linux / UNIX / BSD filesystem?</title>
		<link>http://ersinacar.com/how-do-i-find-the-largest-top-10-files-and-directories-on-a-linux-unix-bsd-filesystem_185.html</link>
		<comments>http://ersinacar.com/how-do-i-find-the-largest-top-10-files-and-directories-on-a-linux-unix-bsd-filesystem_185.html#comments</comments>
		<pubDate>Fri, 26 Mar 2010 18:40:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://ersinacar.com/how-do-i-find-the-largest-top-10-files-and-directories-on-a-linux-unix-bsd-filesystem_185.html</guid>
		<description><![CDATA[Sometime it is necessary to find out what file(s) or directories is eating up all disk space. Further it may be necessary to find out it at particular location such as /tmp or /var or /home etc.
There is no simple command available to find out the largest files/directories on a Linux/UNIX/BSD filesystem. However, combination of [...]]]></description>
			<content:encoded><![CDATA[<p>Sometime it is necessary to find out what file(s) or directories is eating up all disk space. Further it may be necessary to find out it at particular location such as /tmp or /var or /home etc.</p>
<p>There is no simple command available to find out the largest files/directories on a Linux/UNIX/BSD filesystem. However, combination of following three commands (using pipes) you can easily find out list of largest files:</p>
<p>du : Estimate file space usage<br />
sort : Sort lines of text files or given input data<br />
head : Output the first part of files i.e. to display first 10 largest file<br />
Here is what you need to type at shell prompt to find out top 10 largest file/directories is taking up the most space in a /var directory/file system:<br />
# du -a /var | sort -n -r | head -n 10</p>
<p>Output:</p>
<p>1008372 /var<br />
313236  /var/www<br />
253964  /var/log<br />
192544  /var/lib<br />
152628  /var/spool<br />
152508  /var/spool/squid<br />
136524  /var/spool/squid/00<br />
95736   /var/log/mrtg.log<br />
74688   /var/log/squid<br />
62544   /var/cache<br />
If you want more human readable output try:</p>
<p># du -ks /var | sort -n -r | head -n 10</p>
<p>Where,</p>
<p>-a : Include all files, not just directories (du command)<br />
-h : Human readable format<br />
-n : Numeric sort (sort command)<br />
-r : Reverse the result of comparisons (sort command)<br />
-n 10 : Display 10 largest file. If you want 20 largest file replace 10 with 20. (head command)</p>
]]></content:encoded>
			<wfw:commentRss>http://ersinacar.com/how-do-i-find-the-largest-top-10-files-and-directories-on-a-linux-unix-bsd-filesystem_185.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Visualize: Updated accessible charts and graphs</title>
		<link>http://ersinacar.com/jquery-visualize-updated-accessible-charts-and-graphs_182.html</link>
		<comments>http://ersinacar.com/jquery-visualize-updated-accessible-charts-and-graphs_182.html#comments</comments>
		<pubDate>Fri, 21 Aug 2009 07:54:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Bookmarks]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[graphs]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[visualize]]></category>

		<guid isPermaLink="false">http://ersinacar.com/?p=182</guid>
		<description><![CDATA[Scott Jehl has released jQuery Visualize, the plugin that groks HTML tables and generates lovely charts from it, all from a simple $(&#8216;table&#8217;).visualize(); (lot&#8217;s of options for you to twiddle too if you want).
First, you create a bog standard table like:

&#60;table border=&#34;0&#34;&#62;
&#60;caption&#62;2009 Individual Sales by Category&#60;/caption&#62;
&#60;thead&#62;
&#60;tr&#62;
&#60;td&#62;&#60;/td&#62;
&#60;th&#62;food&#60;/th&#62;
&#60;th&#62;auto&#60;/th&#62;
&#60;th&#62;household&#60;/th&#62;
&#60;th&#62;furniture&#60;/th&#62;
&#60;th&#62;kitchen&#60;/th&#62;
&#60;th&#62;bath&#60;/th&#62;
&#60;/tr&#62;
&#60;/thead&#62;
&#60;tbody&#62;
&#60;tr&#62;
&#60;th&#62;Mary&#60;/th&#62;
&#60;td&#62;150&#60;/td&#62;
&#60;td&#62;160&#60;/td&#62;
&#60;td&#62;40&#60;/td&#62;
&#60;td&#62;120&#60;/td&#62;
&#60;td&#62;30&#60;/td&#62;
&#60;td&#62;70&#60;/td&#62;
&#60;/tr&#62;
&#60;tr&#62;
&#60;th&#62;Tom&#60;/th&#62;
&#60;td&#62;3&#60;/td&#62;
&#60;td&#62;40&#60;/td&#62;
&#60;td&#62;30&#60;/td&#62;
&#60;td&#62;45&#60;/td&#62;
&#60;td&#62;35&#60;/td&#62;
&#60;td&#62;49&#60;/td&#62;
&#60;/tr&#62;
...repetitive rows removed for brevity.&#60;/tbody&#62;&#60;/table&#62;

Then you visualize it. You end [...]]]></description>
			<content:encoded><![CDATA[<p>Scott Jehl has <a href="http://www.filamentgroup.com/lab/jquery_visualize_plugin_accessible_charts_graphs_from_tables_html5_canvas/">released jQuery Visualize</a>, the plugin that groks HTML tables and generates lovely charts from it, all from a simple $(&#8216;table&#8217;).visualize(); (lot&#8217;s of options for you to twiddle too if you want).</p>
<p>First, you create a bog standard table like:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;table border=&quot;0&quot;&gt;
&lt;caption&gt;2009 Individual Sales by Category&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;th&gt;food&lt;/th&gt;
&lt;th&gt;auto&lt;/th&gt;
&lt;th&gt;household&lt;/th&gt;
&lt;th&gt;furniture&lt;/th&gt;
&lt;th&gt;kitchen&lt;/th&gt;
&lt;th&gt;bath&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Mary&lt;/th&gt;
&lt;td&gt;150&lt;/td&gt;
&lt;td&gt;160&lt;/td&gt;
&lt;td&gt;40&lt;/td&gt;
&lt;td&gt;120&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;70&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Tom&lt;/th&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;40&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;45&lt;/td&gt;
&lt;td&gt;35&lt;/td&gt;
&lt;td&gt;49&lt;/td&gt;
&lt;/tr&gt;
...repetitive rows removed for brevity.&lt;/tbody&gt;&lt;/table&gt;</pre></div></div>

<p>Then you <a href="http://www.filamentgroup.com/examples/charting_v2/">visualize</a> it. You end up with pretty graphs like these:<br />
<img src="http://ersinacar.com/wp-content/uploads/2009/08/jqueryvisualize.png.png" alt="jquery visualize" title="jquery visualize" width="500" height="747" class="alignnone size-full wp-image-183" /></p>
]]></content:encoded>
			<wfw:commentRss>http://ersinacar.com/jquery-visualize-updated-accessible-charts-and-graphs_182.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Text rotation with CSS</title>
		<link>http://ersinacar.com/text-rotation-with-css_177.html</link>
		<comments>http://ersinacar.com/text-rotation-with-css_177.html#comments</comments>
		<pubDate>Fri, 21 Aug 2009 07:36:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bookmarks]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[rotation]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://ersinacar.com/?p=177</guid>
		<description><![CDATA[Jonathan Snook posted good CSS stuff on Text Rotation with CSS that takes a nice bit of markup like this:

&#60;div class=&#34;example-date&#34;&#62;
  &#60;span class=&#34;day&#34;&#62;31&#60;/span&#62; 
  &#60;span class=&#34;month&#34;&#62;July&#60;/span&#62; 
  &#60;span class=&#34;year&#34;&#62;2009&#60;/span&#62;
&#60;/div&#62;

and converts it to:

all via the CSS:

-webkit-transform: rotate&#40;-90deg&#41;; 
-moz-transform: rotate&#40;-90deg&#41;;	
filter: progid:DXImageTransform.Microsoft.BasicImage&#40;rotation=3&#41;;

yeah as you can see it&#8217;s working on IE too. Not bad ha?
]]></description>
			<content:encoded><![CDATA[<p>Jonathan Snook posted good CSS stuff on <a href="http://snook.ca/archives/html_and_css/css-text-rotation">Text Rotation with CSS</a> that takes a nice bit of markup like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div class=&quot;example-date&quot;&gt;
  &lt;span class=&quot;day&quot;&gt;31&lt;/span&gt; 
  &lt;span class=&quot;month&quot;&gt;July&lt;/span&gt; 
  &lt;span class=&quot;year&quot;&gt;2009&lt;/span&gt;
&lt;/div&gt;</pre></div></div>

<p>and converts it to:<br />
<img src="http://ersinacar.com/wp-content/uploads/2009/08/text-rotation.png" alt="text-rotation" title="text-rotation" width="265" height="100" class="alignnone size-full wp-image-178" /><br />
all via the CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">-webkit-transform<span style="color: #00AA00;">:</span> rotate<span style="color: #00AA00;">&#40;</span>-90deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> 
-moz-transform<span style="color: #00AA00;">:</span> rotate<span style="color: #00AA00;">&#40;</span>-90deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>	
filter<span style="color: #00AA00;">:</span> progid<span style="color: #3333ff;">:DXImageTransform</span><span style="color: #6666ff;">.Microsoft</span>.BasicImage<span style="color: #00AA00;">&#40;</span>rotation<span style="color: #00AA00;">=</span><span style="color: #cc66cc;">3</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span></pre></div></div>

<p>yeah as you can see it&#8217;s working on IE too. Not bad ha?</p>
]]></content:encoded>
			<wfw:commentRss>http://ersinacar.com/text-rotation-with-css_177.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fuck This Website!</title>
		<link>http://ersinacar.com/fuck-this-website_175.html</link>
		<comments>http://ersinacar.com/fuck-this-website_175.html#comments</comments>
		<pubDate>Mon, 27 Jul 2009 09:05:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bookmarks]]></category>
		<category><![CDATA[fuck]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[sticker]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://ersinacar.com/?p=175</guid>
		<description><![CDATA[I found this website about 2 or years ago. it&#8217;s freaking funny xD Here are some picture from the site;




]]></description>
			<content:encoded><![CDATA[<p>I found <a href="http://www.fuckthiswebsite.com/">this</a> website about 2 or years ago. it&#8217;s freaking funny xD Here are some picture from the site;<br />
<img src="http://www.fuckthiswebsite.com/Images/fuck_23.gif" alt="Tiger Terror" /><span id="more-175"></span><br />
<img src="http://www.fuckthiswebsite.com/Images/fuck_27.gif" alt="restroom" /><br />
<img src="http://www.fuckthiswebsite.com/Images/fuck_7.gif" alt="no fuck" /><br />
<img src="http://www.fuckthiswebsite.com/Images/fuck_10.gif" alt="Chicken" /></p>
]]></content:encoded>
			<wfw:commentRss>http://ersinacar.com/fuck-this-website_175.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS 3 and  HTML 5 Cheat Sheet (PDF)</title>
		<link>http://ersinacar.com/css-3-and-html-5-cheat-sheet-pdf_171.html</link>
		<comments>http://ersinacar.com/css-3-and-html-5-cheat-sheet-pdf_171.html#comments</comments>
		<pubDate>Mon, 27 Jul 2009 08:51:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bookmarks]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[css 3]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html 5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[sheet]]></category>

		<guid isPermaLink="false">http://ersinacar.com/?p=171</guid>
		<description><![CDATA[I saw this and this post on smashin magazine.
You can download this sheets for free
CSS 3

HTML 5


]]></description>
			<content:encoded><![CDATA[<p>I saw <a href="http://www.smashingmagazine.com/2009/07/13/css-3-cheat-sheet-pdf/">this</a> and <a href="http://www.smashingmagazine.com/2009/07/06/html-5-cheat-sheet-pdf/">this</a> post on smashin magazine.<br />
You can download this sheets for free<br />
<a href="http://media2.smashingmagazine.com/wp-content/uploads/images/css3-cheat-sheet/css3.gif">CSS 3<br />
<img src="http://media2.smashingmagazine.com/wp-content/uploads/images/css3-cheat-sheet/css3.gif" alt="CSS 3 Sheet" /></a><br />
<a href="http://www.smashingmagazine.com/2009/07/06/html-5-cheat-sheet-pdf/">HTML 5<br />
<img src="http://media2.smashingmagazine.com/wp-content/uploads/images/html5-cheat-sheet/html5.gif" alt="HTML 5 Sheet" /><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ersinacar.com/css-3-and-html-5-cheat-sheet-pdf_171.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 5.3 Released!! Horeyyy!!</title>
		<link>http://ersinacar.com/php-5-3-released-horeyyy_168.html</link>
		<comments>http://ersinacar.com/php-5-3-released-horeyyy_168.html#comments</comments>
		<pubDate>Mon, 27 Jul 2009 08:41:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[closures]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[namespaces]]></category>
		<category><![CDATA[php 5.3]]></category>

		<guid isPermaLink="false">http://ersinacar.com/?p=168</guid>
		<description><![CDATA[I can&#8217;t blog much cuz of my works. I&#8217;m pretty busy in these days. When i check php.net,  i saw PHP 5.3 released post in 30 Jun -.- nevermind. After a long string of delays, PHP 5.3 is finally out.  On the course of last 2 years, I was pretty sure a number [...]]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t blog much cuz of my works. I&#8217;m pretty busy in these days. When i check <a href="http://php.net">php.net</a>,  i saw PHP 5.3 released post in 30 Jun -.- nevermind. After a long string of delays, <a href="http://php.net/releases/5_3_0.php">PHP 5.3 is finally out</a>.  On the course of last 2 years, I was pretty sure a number of times that it will happen next month the latest, but there always were good reasons to postpone it. Now finally it’s officially out. I think it’s a huge step for PHP. Download it and try it!</p>
<p>Some major new features in 5.3:<br />
<span id="more-168"></span><br />
   1. <a href="http://php.net/namespaces">Namespaces</a>! They didn’t end up exactly as I thought they would but they are a major feature PHP was missing for a long time, and I’m very curious to see how it works out in big projects.<br />
   2.<a href="http://www.php.net/manual/en/functions.anonymous.php"> Closures and anonymous functions</a>! PHP now has first-class functions, and you can do all kinds of crazy stuff with it. Or just make your code easier to read and maintain <img src='http://ersinacar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
   3.<a href="http://php.net/gc_enable"> Garbage collection</a>. PHP engine, being refcount-based, always has had a slight problem with reference loops. Even though usually it was not a big issue since at the end of the request everything is cleaned up, for long-running PHP applications not based on short request pattern it became a problem. Not anymore – now the engine knows to clean up such loops.<br />
   4. <a href="http://php.net/lsb">Late static binding</a> – it’s somewhat exotic thing for people that never encountered it, but was very burning issue for people that did need it. Basically, when class Foo extends class Bar, and the method func() defined in Foo is called as Bar::func(), there was no way to distinguish it from Foo::func(). Now there is. This allows to implement all kinds of cool patterns like ActiveRecord.<br />
   5. <a href="http://php.net/intl">Intl extension</a> in core – lots of functions to allow you to internationalize your application.<br />
   6. <a href="http://php.net/phar">Phar</a> in core – now you can pack all the application in one neat file and still be able to run it!</p>
<p>Also in 5.3:</p>
<p>   1. Nowdocs – same as <a href="http://www.php.net/manual/en/language.types.string.php">heredocs</a>, but doesn’t parse variables. Excellent feature for somebody that wants to include bing chunk of text into the script which can happen to have $’s etc. in it.<br />
   2. ?: shortcut. That’s simple – $a?:$b is $a if $a is true, otherwise it’s $b.<br />
   3. goto. Yes, I know. But now we have it too. Deal with it. <img src='http://ersinacar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
   4. <a href="http://php.net/mysqli.mysqlnd">mysqlnd</a> – native PHP-specific mysql driver.</p>
<p>Last but definitely not least – tons of performance improvements, bug fixes, etc. <a href="http://php.net/downloads.php">Download it</a> today! <img src='http://ersinacar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://ersinacar.com/php-5-3-released-horeyyy_168.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to change SSH welcome message on linux</title>
		<link>http://ersinacar.com/how-to-change-ssh-welcome-message-on-linux_164.html</link>
		<comments>http://ersinacar.com/how-to-change-ssh-welcome-message-on-linux_164.html#comments</comments>
		<pubDate>Wed, 08 Jul 2009 17:00:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[kenny]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://ersinacar.com/?p=164</guid>
		<description><![CDATA[Every time I connect to my home server through my ssh client, I receive the same message and I’m getting bored of seeing it, so I decided to change the message to something else.
Here’s the message that I get every time:


Last login: Wed Jul  8 16:35:28 2009 from 192.168.2.3
Linux localhost 2.6.20-15-server #2 SMP Sun [...]]]></description>
			<content:encoded><![CDATA[<p>Every time I connect to my home server through my ssh client, I receive the same message and I’m getting bored of seeing it, so I decided to change the message to something else.</p>
<p>Here’s the message that I get every time:<br />
<span id="more-164"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Last <span style="color: #c20cb9; font-weight: bold;">login</span>: Wed Jul  <span style="color: #000000;">8</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">35</span>:<span style="color: #000000;">28</span> <span style="color: #000000;">2009</span> from 192.168.2.3
Linux localhost 2.6.20-<span style="color: #000000;">15</span>-server <span style="color: #666666; font-style: italic;">#2 SMP Sun Apr 15 07:41:34 UTC 2007 i686</span>
&nbsp;
The programs included with the Ubuntu system are <span style="color: #c20cb9; font-weight: bold;">free</span> software;
the exact distribution terms <span style="color: #000000; font-weight: bold;">for</span> each program are described <span style="color: #000000; font-weight: bold;">in</span> the
individual files <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>doc<span style="color: #000000; font-weight: bold;">/*/</span>copyright.
&nbsp;
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
root<span style="color: #000000; font-weight: bold;">@</span>localhost:~<span style="color: #666666; font-style: italic;">#</span></pre></div></div>

<p>Changing this message requires editing two different files. The first three sections can be modified by editing the following file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">  <span style="color: #c20cb9; font-weight: bold;">nano</span>  <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>motd</pre></div></div>

<p>This file contains the linux build number as well as the Ubuntu warranty message. I don’t find this particularly useful, so I removed all of it and replaced it with my own message.</p>
<p>To disable the last login message (which I don’t recommend doing), you will need to edit the following file in sudo mode:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">  <span style="color: #c20cb9; font-weight: bold;">nano</span>  <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ssh<span style="color: #000000; font-weight: bold;">/</span>sshd_config</pre></div></div>

<p>Find this line in the file and change the yes to no as shown:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">    PrintLastLog no</pre></div></div>

<p>Now when you login, you’ll get a blank prompt, although I wouldn’t necessarily recommend it because it’s useful to see the last login to the system for security reasons. This is my prompt now:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Last <span style="color: #c20cb9; font-weight: bold;">login</span>: Wed Jul  <span style="color: #000000;">8</span> <span style="color: #000000;">17</span>:05:<span style="color: #000000;">12</span> <span style="color: #000000;">2009</span> from 192.168.2.3
OMG<span style="color: #000000; font-weight: bold;">!!</span> You killed kenny<span style="color: #000000; font-weight: bold;">!</span> You BASTARD<span style="color: #000000; font-weight: bold;">!</span>
&nbsp;
             _..-<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #ff0000;">&quot;&quot;</span>-.._
           .<span style="color: #ff0000;">'            '</span>.
          <span style="color: #000000; font-weight: bold;">/</span>     _...._     \
         <span style="color: #000000; font-weight: bold;">/</span>  ,=<span style="color: #ff0000;">&quot;;_.''._;&quot;</span>=,  \
        ;  <span style="color: #000000; font-weight: bold;">/</span>  <span style="color: #000000; font-weight: bold;">/</span>  <span style="color: #000000; font-weight: bold;">`</span>\<span style="color: #000000; font-weight: bold;">/`</span>  \  \  ;
        <span style="color: #000000; font-weight: bold;">|</span>  <span style="color: #000000; font-weight: bold;">|</span>  <span style="color: #000000; font-weight: bold;">|</span>  <span style="color: #ff0000;">'/\'</span>  <span style="color: #000000; font-weight: bold;">|</span>  <span style="color: #000000; font-weight: bold;">|</span>  <span style="color: #000000; font-weight: bold;">|</span>
        <span style="color: #000000; font-weight: bold;">|</span>  <span style="color: #000000; font-weight: bold;">|</span>  \..<span style="color: #ff0000;">'  '</span>..<span style="color: #000000; font-weight: bold;">/</span>  <span style="color: #000000; font-weight: bold;">|</span>  <span style="color: #000000; font-weight: bold;">|</span>
         ;  \  \      <span style="color: #000000; font-weight: bold;">/</span> .<span style="color: #ff0000;">'  ;
          \  '</span>._-.__.-_.<span style="color: #ff0000;">'  /
          /'</span>.   <span style="color: #000000; font-weight: bold;">``|</span>\<span style="color: #000000; font-weight: bold;">``</span>   .<span style="color: #ff0000;">'\
         /   `'</span>-..<span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #7a0874; font-weight: bold;">&#41;</span>.-<span style="color: #ff0000;">'`   \
        |_                  _|
       (  \                /  )
        '</span>-<span style="color: #000000; font-weight: bold;">/</span>                \-<span style="color: #ff0000;">'
          |________________|
          (________.________)
&nbsp;
root@localhost:~#</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://ersinacar.com/how-to-change-ssh-welcome-message-on-linux_164.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
