<?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>BrainyCreatures.org</title>
	<atom:link href="http://www.brainycreatures.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brainycreatures.org</link>
	<description></description>
	<lastBuildDate>Wed, 21 Mar 2012 12:52:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Request exceeded the limit of 10 internal redirects due to probable configuration error (Apache Server)</title>
		<link>http://www.brainycreatures.org/system-administration/03/2012/request-exceeded-the-limit-of-10-internal-redirects-due-to-probable-configuration-error-apache-server/</link>
		<comments>http://www.brainycreatures.org/system-administration/03/2012/request-exceeded-the-limit-of-10-internal-redirects-due-to-probable-configuration-error-apache-server/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 12:51:58 +0000</pubDate>
		<dc:creator>Fidel Viegas</dc:creator>
				<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://www.brainycreatures.org/?p=97</guid>
		<description><![CDATA[I came across a redirection problem on Apache, but I couldn&#8217;t find a solution on the Internet. Well, I found a couple of suggestions, but none did solve my problem. The error says something like this &#8220;Request exceeded the limit of 10 internal redirects due to probable configuration error. Use &#8216;LimitInternalRecursion&#8217; to increase the limit <a href="http://www.brainycreatures.org/system-administration/03/2012/request-exceeded-the-limit-of-10-internal-redirects-due-to-probable-configuration-error-apache-server/">continue...</a>]]></description>
			<content:encoded><![CDATA[<p>I came across a redirection problem on Apache, but I couldn&#8217;t find a solution on the Internet. Well, I found a couple of suggestions, but none did solve my problem.</p>
<p>The error says something like this &#8220;Request exceeded the limit of 10 internal redirects due to probable configuration error. Use &#8216;LimitInternalRecursion&#8217; to increase the limit if necessary. Use &#8216;LogLevel debug&#8217; to get a backtrace.&#8221;</p>
<p>And that is exactly what I did, I used the LogLevel debug and this is what I was getting on my apache error log:</p>
<p>[Wed Mar 21 12:29:50 2012] [debug] core.c(3063): [client xxx.xxx.xxx] r-&amp;gt;uri = /index.php<br />
[Wed Mar 21 12:29:50 2012] [debug] core.c(3069): [client xxx.xxx.xxx] redirected from r-&amp;gt;uri = /index.php<br />
[Wed Mar 21 12:29:50 2012] [debug] core.c(3069): [client xxx.xxx.xxx] redirected from r-&amp;gt;uri = /index.php<br />
[Wed Mar 21 12:29:50 2012] [debug] core.c(3069): [client xxx.xxx.xxx] redirected from r-&amp;gt;uri = /index.php<br />
[Wed Mar 21 12:29:50 2012] [debug] core.c(3069): [client xxx.xxx.xxx] redirected from r-&amp;gt;uri = /index.php<br />
[Wed Mar 21 12:29:50 2012] [debug] core.c(3069): [client xxx.xxx.xxx] redirected from r-&amp;gt;uri = /index.php<br />
[Wed Mar 21 12:29:50 2012] [debug] core.c(3069): [client xxx.xxx.xxx] redirected from r-&amp;gt;uri = /index.php<br />
[Wed Mar 21 12:29:50 2012] [debug] core.c(3069): [client xxx.xxx.xxx] redirected from r-&amp;gt;uri = /index.php<br />
[Wed Mar 21 12:29:50 2012] [debug] core.c(3069): [client xxx.xxx.xxx] redirected from r-&amp;gt;uri = /index.php<br />
[Wed Mar 21 12:29:50 2012] [debug] core.c(3069): [client xxx.xxx.xxx] redirected from r-&amp;gt;uri = /index.php<br />
[Wed Mar 21 12:29:50 2012] [debug] core.c(3069): [client xxx.xxx.xxx] redirected from r-&amp;gt;uri = /login</p>
<p>According to the solutions I found on discussion forums, the problem was usually associated with the MultViews option not being disabled. Your virtual host configuration should be something like this:</p>
<blockquote><p>   &lt;VirtualHost *:80&gt;<br />
ServerName www.yourhost.com<br />
DocumentRoot /somewhere/public    # &lt;&#8211; be sure to point to &#8216;public&#8217;!<br />
&lt;Directory /somewhere/public&gt;<br />
AllowOverride all              # &lt;&#8211; relax Apache security settings<br />
Options -MultiViews            # &lt;&#8211; MultiViews must be turned off<br />
&lt;/Directory&gt;<br />
&lt;/VirtualHost&gt;</p></blockquote>
<p>Another solution I found was to create an .htaccess file at the root of apache, and add the following content to it:</p>
<blockquote><p>RewriteBase /</p></blockquote>
<p>After viewing this, I searched for a .htaccess file, and to my suprise I actually had one pointing to my wordpress directory. I had done this before creating a virtual host. After removing the file .htaccess my problem was resolved.</p>
<p>I don&#8217;t expect this to be a solution to your problem, but at least it can give you some hints like it gave me.</p>
<p>Good luck!</p>
<p>Fidel.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brainycreatures.org/system-administration/03/2012/request-exceeded-the-limit-of-10-internal-redirects-due-to-probable-configuration-error-apache-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enable NTFS write mode in Ubuntu 11.10</title>
		<link>http://www.brainycreatures.org/ubuntu/02/2012/how-to-enable-ntfs-write-mode-in-ubuntu-10-10/</link>
		<comments>http://www.brainycreatures.org/ubuntu/02/2012/how-to-enable-ntfs-write-mode-in-ubuntu-10-10/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 12:02:11 +0000</pubDate>
		<dc:creator>Fidel Viegas</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.brainycreatures.org/?p=91</guid>
		<description><![CDATA[I have recently experienced a problem whereby I couldn&#8217;t write to any NTFS partition under Ubuntu 11.10. Given that many of you are probably experiencing the same thing, I thought I should share the solution that I found here. According to the discussion it appears that in Ubuntu 11.10, NTFS is available in read-only mode <a href="http://www.brainycreatures.org/ubuntu/02/2012/how-to-enable-ntfs-write-mode-in-ubuntu-10-10/">continue...</a>]]></description>
			<content:encoded><![CDATA[<p>I have recently experienced a problem whereby I couldn&#8217;t write to any NTFS partition under Ubuntu 11.10. Given that many of you are probably experiencing the same thing, I thought I should share the solution that I found <a href="http://askubuntu.com/questions/74321/adding-ntfs-write-capability-by-default" title="Adding NTFS-Write capability by default" target="_blank">here</a>. According to the discussion it appears that in Ubuntu 11.10, NTFS is available in read-only mode by default, because the package ntfs-3g is not installed. In order to fix this, you need to install the package executing the following command:</p>
<p><code><br />
sudo apt-get install ntfs-config<br />
</code></p>
<p>This will in turn install ntfs-3g, and any other dependencies. After this, you should have your problem resolved. You should pay attention to the command used. You should use &#8220;apt-get&#8221; as opposed to &#8220;aptitude&#8221;. &#8220;aptitude&#8221; seems to have some sort of bug.</p>
<p>Hope that has helped you sort out the writing to ntfs issue.</p>
<p>All the best,</p>
<p>Fidel.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brainycreatures.org/ubuntu/02/2012/how-to-enable-ntfs-write-mode-in-ubuntu-10-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Archive of old website</title>
		<link>http://www.brainycreatures.org/website/10/2011/archive-of-my-old-website/</link>
		<comments>http://www.brainycreatures.org/website/10/2011/archive-of-my-old-website/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 20:47:03 +0000</pubDate>
		<dc:creator>Fidel Viegas</dc:creator>
				<category><![CDATA[Website]]></category>
		<category><![CDATA[brainycreatures]]></category>

		<guid isPermaLink="false">http://www.brainycreatures.org/?p=51</guid>
		<description><![CDATA[Today I was looking for some tutorials and stumbled upon an archive of the old Brainy Creatures website. In case you have been directed to this website and found an error on the link you were looking for, please visit this link <a title="http://web.archive.org/web/20090505184313/http://www.brainycreatures.org/default.asp" href="http://web.archive.org/web/20090505184313/http://www.brainycreatures.org/default.asp" target="_blank">http://web.archive.org/web/20090505184313/http://www.brainycreatures.org/default.asp</a>, and you should find all the original articles I have published in the old site.

Regards,

Fidel.]]></description>
			<content:encoded><![CDATA[<p>Today I was looking for some tutorials and stumbled upon an archive of the old Brainy Creatures website. In case you have been directed to this website and found an error on the link you were looking for, please visit this link <a title="http://web.archive.org/web/20090505184313/http://www.brainycreatures.org/default.asp" href="http://web.archive.org/web/20090505184313/http://www.brainycreatures.org/default.asp" target="_blank">http://web.archive.org/web/20090505184313/http://www.brainycreatures.org/default.asp</a>, and you should find all the original articles I have published in the old site.</p>
<p>Regards,</p>
<p>Fidel.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brainycreatures.org/website/10/2011/archive-of-my-old-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing CSV data into your Rails app</title>
		<link>http://www.brainycreatures.org/web-development/10/2011/importing-csv-data-into-your-rails-app/</link>
		<comments>http://www.brainycreatures.org/web-development/10/2011/importing-csv-data-into-your-rails-app/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 10:53:42 +0000</pubDate>
		<dc:creator>Fidel Viegas</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.brainycreatures.org/?p=40</guid>
		<description><![CDATA[Sometimes I need a quick way to import data into my databases. For this, I usually use two formats: XML or CSV. In Ruby, you can easily manipulate the two formats using existing libraries. In the case of XML, you can use the concept of builders. As for CSV you have the built-in CSV library <a href="http://www.brainycreatures.org/web-development/10/2011/importing-csv-data-into-your-rails-app/">continue...</a>]]></description>
			<content:encoded><![CDATA[<p>Sometimes I need a quick way to import data into my databases. For this, I usually use two formats: XML or CSV. In Ruby, you can easily manipulate the two formats using existing libraries. In the case of XML, you can use the concept of builders. As for CSV you have the built-in CSV library or you can use fastcsv. In this article, I will show you how to import data in the CSV format into your Rails database.</p>
<p>If you are looking for a quick and dirty way you can do it as described in <a title="http://goodbadtech.com/2009/05/13/ruby-on-rails-import-csv-data-into-database/" href="http://goodbadtech.com/2009/05/13/ruby-on-rails-import-csv-data-into-database/" target="_blank">http://goodbadtech.com/2009/05/13/ruby-on-rails-import-csv-data-into-database/</a>, which I will elaborate below:</p>
<blockquote><p>require &#8216;csv&#8217;<br />
CSV.open(&#8216;your-csv-file.csv&#8217;, &#8216;r&#8217;).each do |row|<br />
YourModel.create(:field1 =&gt; row[0], :field2 =&gt; row[1])<br />
end</p></blockquote>
<p>Here your-csv-file.csv is the name of the csv file that contains the data you wish to import. YourModel is the name of your model. For instance, if you are importing data into your Language model, then YourModel is Language. field1 and field2 are the names of your model&#8217;s fields, which are not required to have an order. row[0] and row[1] are the items found according to their position in the CSV line.</p>
<p>What this code will do is go throug each record (line) found in the CSV file and create an instance of that model in the database, using ActiveRecord. In order for this code to work you will need to fire up the Rails console like this:</p>
<blockquote><p><strong>rails console</strong> (if you are using Rails 3 or above)<br />
<strong>ruby script/console</strong> (if you are using Rails 2.xxx or below)</p></blockquote>
<p>And that&#8217;s basically it. This a quick and dirty way to import data into your Rails database using CSV. If you want a more complete solution, where you will be able to upload data from your browser, then have a look at this article <a title="http://goodbadtech.com/2009/05/13/ruby-on-rails-import-csv-data-into-database/" href="http://goodbadtech.com/2009/05/13/ruby-on-rails-import-csv-data-into-database/" target="_blank">http://goodbadtech.com/2009/05/13/ruby-on-rails-import-csv-data-into-database/</a></p>
<p>I am preparing another article that will show you how to import data from an Excel or ODF file.</p>
<p>Until then, hope this one was useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brainycreatures.org/web-development/10/2011/importing-csv-data-into-your-rails-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing a small compiler with SableCC and Java</title>
		<link>http://www.brainycreatures.org/compilers/09/2011/writing-a-small-compiler-with-sablecc/</link>
		<comments>http://www.brainycreatures.org/compilers/09/2011/writing-a-small-compiler-with-sablecc/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 15:32:36 +0000</pubDate>
		<dc:creator>Fidel Viegas</dc:creator>
				<category><![CDATA[Compiler Engineering]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[sablecc]]></category>
		<category><![CDATA[smallpascal]]></category>

		<guid isPermaLink="false">http://www.brainycreatures.org/?p=14</guid>
		<description><![CDATA[Introduction This article covers the implementation of a compiler using the SableCC framework and the Java programming language. The language we are going to implement is a subset of Pascal that we will call SmallPascal. This is a very small language that can be used as a calculator. In other words, the language supports the <a href="http://www.brainycreatures.org/compilers/09/2011/writing-a-small-compiler-with-sablecc/">continue...</a>]]></description>
			<content:encoded><![CDATA[<h2>Introduction</h2>
<p>This article covers the implementation of a compiler using the SableCC framework and the Java programming language. The language we are going to implement is a subset of Pascal that we will call SmallPascal. This is a very small language that can be used as a calculator. In other words, the language supports the integer data type, reading from standard input and writing to the standard output. For those that come from a Microsoft Windows background, the standard input in Unix based operating systems is normally represented by the keyboard, and the standard output by the screen. In other words, our compiler will work in the command line and will read data from the keyboard and display text in the screen.</p>
<p>The SableCC framework is a piece of software that simplifies compiler writing. It does include support for writing lexical analysers (or lexers) and syntactic analysers (or parsers). The parser generates a tree that represents your grammar. This tree can then be manipulated by tree walkers known as visitors (for more information about this, please read Gagnon (1998)), in order to create a semantic analyser, code generator and code optimizer. In this article we will only cover the semantic analyser and the code generator. In future articles I will demonstrate more advanced compiler writing techniques.</p>
<p>Now that we know what this article is all about, let&#8217;s define the steps required to implement our compiler. Gagnon (1998) defines the following 5 steps one must follow in order to implement our compiler:</p>
<ol>
<li>We create a SableCC specification file containing the lexical definitions and the grammar for the language being designed.</li>
<li>After creating the SableCC specification file, we generate the framework by launching SableCC on the specification file.</li>
<li>Once the code is generated, we generate the working classes. This is the only code we have to write in Java<sup>TM</sup>. It is in this step that we write the semantic analyser, the code generator, and possibly the code optimizer. In the case of an interpreter, we write a single class. These working classes may be subclasses of one of the classes from the analysis subfolder generated by SableCC in the previous step.</li>
<li>Following our tree walkers, we need to create our main class, known as the driver class of the compiler. It is used to activate the lexer, parser and working classes.</li>
<li>Finally, after implementing the driver class, we compile the compiler with a Java<sup>TM</sup> compiler.</li>
</ol>
<p>Once the steps are described, we are now going to follow one by one in turn, in the following sections.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brainycreatures.org/compilers/09/2011/writing-a-small-compiler-with-sablecc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome!!!</title>
		<link>http://www.brainycreatures.org/website/09/2011/hello-world/</link>
		<comments>http://www.brainycreatures.org/website/09/2011/hello-world/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 01:04:00 +0000</pubDate>
		<dc:creator>Fidel Viegas</dc:creator>
				<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://www.brainycreatures.org/?p=1</guid>
		<description><![CDATA[Dear visitor, I have finally found the time to bring my site back up. I was initially implementing a website using Ruby on Rails, but later decided on using something that was already stable and flexible for my own site. I will start by bringing up all the tutorials that were found in the old <a href="http://www.brainycreatures.org/website/09/2011/hello-world/">continue...</a>]]></description>
			<content:encoded><![CDATA[<p>Dear visitor,</p>
<p>I have finally found the time to bring my site back up. I was initially implementing a website using Ruby on Rails, but later decided on using something that was already stable and flexible for my own site.</p>
<p>I will start by bringing up all the tutorials that were found in the old site, and will soon start posting new articles in areas I am acquainted with.</p>
<p>I hope that you enjoy reading my articles and hope to hear from you so that I can improve the site to make your reading more pleasurable.</p>
<p>Thanks!</p>
<p>Fidel.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brainycreatures.org/website/09/2011/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

