<?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>Notes &#187; programming</title>
	<atom:link href="http://alexpb.com/notes/articles/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexpb.com/notes</link>
	<description></description>
	<lastBuildDate>Mon, 26 Jul 2010 01:27:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Active Perl&#8217;s Package Manager: ppm</title>
		<link>http://alexpb.com/notes/articles/2008/08/06/active-perls-package-manager-ppm/</link>
		<comments>http://alexpb.com/notes/articles/2008/08/06/active-perls-package-manager-ppm/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 02:06:54 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://alexpb.com/notes/?p=138</guid>
		<description><![CDATA[It allows you to get Perl pre-compiled packages. You can avoid installing a C compiler which is needed for some packages (KinoSearch for example). http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/ Alternate packages repositories: http://cpan.uwinnipeg.ca/PPMPackages/10xx/]]></description>
			<content:encoded><![CDATA[<p>It allows you to get Perl pre-compiled packages. You can avoid installing a C compiler which is needed for some packages (KinoSearch for example).</p>
<p><a href="http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/">http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/</a></p>
<p>Alternate packages repositories:<br />
<a href="http://cpan.uwinnipeg.ca/PPMPackages/10xx/">http://cpan.uwinnipeg.ca/PPMPackages/10xx/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://alexpb.com/notes/articles/2008/08/06/active-perls-package-manager-ppm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl&#8217;s KinoSearch vs Plucene</title>
		<link>http://alexpb.com/notes/articles/2008/07/17/perls-kinosearch-vs-plucene/</link>
		<comments>http://alexpb.com/notes/articles/2008/07/17/perls-kinosearch-vs-plucene/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 02:33:59 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://alexpb.com/notes/?p=125</guid>
		<description><![CDATA[KinoSearch is the winner The following perl scripts index *.txt in the current folder and search for &#8220;TEST&#8221;. The first one is using Perl&#8217;s KinoSearch module and the other one is using Plucene. KinoSearch is alot faster then Plucene and also gives better results. (right click to download) KinoSearch.pl Plucene.pl]]></description>
			<content:encoded><![CDATA[<h3>KinoSearch is the winner</h3>
<p>The following perl scripts index *.txt in the current folder and search for &#8220;TEST&#8221;.  The first one is using Perl&#8217;s KinoSearch module and the other one is using Plucene.  KinoSearch is alot faster then Plucene and also gives better results.</p>
<p></p>
<p>(right click to download)</p>
<p><a href='http://alexpb.com/notes/wp-content/uploads/2008/07/kinosearch.pl'>KinoSearch.pl</a></p>
<p><a href='http://alexpb.com/notes/wp-content/uploads/2008/07/plucenesearch.pl'>Plucene.pl</a></p>
]]></content:encoded>
			<wfw:commentRss>http://alexpb.com/notes/articles/2008/07/17/perls-kinosearch-vs-plucene/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free Download: US zip codes list and more</title>
		<link>http://alexpb.com/notes/articles/2007/11/07/free-us-zip-codes-list-download-and-canadausa-cities-lists/</link>
		<comments>http://alexpb.com/notes/articles/2007/11/07/free-us-zip-codes-list-download-and-canadausa-cities-lists/#comments</comments>
		<pubDate>Wed, 07 Nov 2007 22:05:59 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[free]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://alexpb.com/notes/articles/2007/11/07/free-us-zip-codes-list-download-and-canadausa-cities-lists/</guid>
		<description><![CDATA[US Zip Code CSV List It include the zip code, city, state, latitude, longitude, and county (Last Updated: Sept 20, 2007). Download US ZIP codes CSV list City CSV lists (USA and Canada) They include city name, state/province, latitude, and longitude (Last Updated: July 31, 2007). Download Canada cities CSV List Download USA cities CSV [...]]]></description>
			<content:encoded><![CDATA[<h3>US Zip Code CSV List</h3>
<p>It include the zip code, city, state, latitude, longitude, and county (Last Updated: Sept 20, 2007).</p>
<ul>
<li><a href='http://alexpb.com/notes/wp-content/uploads/2007/11/zip5.zip' title='US ZIP codes list'>Download US ZIP codes CSV list</a></li>
</ul>
<h3>City CSV lists (USA and Canada)</h3>
<p>They include city name, state/province, latitude, and longitude (Last Updated: July 31, 2007).</p>
<ul>
<li><a href='http://alexpb.com/notes/wp-content/uploads/2007/11/canada_cities.zip' title='Canada cities'>Download Canada cities CSV List</a></li>
<li><a href='http://alexpb.com/notes/wp-content/uploads/2007/11/us_cities.zip' title='USA cities'>Download USA cities CSV List</a></li>
</ul>
<p>Great to import in a database.</p>
<p>Credits: <a href="http://geocoder.ibegin.com/downloads.php">http://geocoder.ibegin.com/downloads.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://alexpb.com/notes/articles/2007/11/07/free-us-zip-codes-list-download-and-canadausa-cities-lists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Dictionary Database</title>
		<link>http://alexpb.com/notes/articles/2007/10/13/dictionary-database-created-using-wiktionary-and-wordnet/</link>
		<comments>http://alexpb.com/notes/articles/2007/10/13/dictionary-database-created-using-wiktionary-and-wordnet/#comments</comments>
		<pubDate>Sat, 13 Oct 2007 23:02:05 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://alexpb.com/notes/articles/2007/10/13/dictionary-database-created-using-wiktionary-and-wordnet/</guid>
		<description><![CDATA[I created it by extracting data from Wiktionary and Wordnet. It contains definitons, synonyms, antonyms, hyponyms and related words. Download the dictionary. Note: This file has been extracted from a MySQL database using MySQL Administrator&#8217;s backup feature.]]></description>
			<content:encoded><![CDATA[<p>I created it by extracting data from Wiktionary and Wordnet.  It contains definitons, synonyms, antonyms, hyponyms and related words.</p>
<p><a href="/dictionary.zip">Download the dictionary</a>.</p>
<p>Note: This file has been extracted from a MySQL database using MySQL Administrator&#8217;s backup feature.</p>
]]></content:encoded>
			<wfw:commentRss>http://alexpb.com/notes/articles/2007/10/13/dictionary-database-created-using-wiktionary-and-wordnet/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Install a Perl Module on a Shared Host</title>
		<link>http://alexpb.com/notes/articles/2007/09/25/installing-perl-module-on-a-shared-host/</link>
		<comments>http://alexpb.com/notes/articles/2007/09/25/installing-perl-module-on-a-shared-host/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 21:16:26 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://alexpb.com/notes/articles/2007/09/25/installing-perl-module-on-a-shared-host/</guid>
		<description><![CDATA[Make a directory where you will install the modules, eg: $ mkdir ~/perl Get and Install the Module Manually Download, extract and change the current directory to the newly created module&#8217;s directory and than make and install the module using the following commands: $ perl Makefile.PL PREFIX=/home/your_username/perl/ $ make $ make install Automatically $ cpan [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Make a directory where you will install the modules, eg:</li>
<p>    <code>$ mkdir ~/perl </code></p>
<li>Get and Install the Module
<ul>
<li><strong>Manually</strong>
<ol>
<li>Download, extract and change the current directory to the newly created module&#8217;s directory and than make and install the module using the following commands:</li>
<p>                    <code>$ perl Makefile.PL PREFIX=/home/your_username/perl/<br />
                    $ make<br />
                    $ make install</code>
          </ol>
</li>
<li><strong>Automatically</strong>
<ol>
<li><code>$ cpan force install Module::Name</code></li>
<p>                OR</p>
<li><code>$ perl -MCPAN -e 'install Module::Name'</code></li>
</ol>
</li>
</ul>
</li>
<li>Make sure Perl can find your modules</li>
<p>Add this line in each of your Perl scripts (change perl version accordingly):</p>
<p>    <code>use lib '/home/your_username/perl/lib/perl5/site_perl/5.8.7';</code> </p>
<p>OR rather than editing all your Perl scripts, in your cgi-bin/.htaccess file:</p>
<p>    <code>SetEnvIf  Request_URI  "^/cgi-bin/" PERL5LIB=/home/user/perl/lib/perl5/site_perl/5.8.7:/home/user/perl/lib/perl5/site_perl/5.8.7/site_perl</code></p>
<p>OR in your .bash_profile:</p>
<p>    <code>export PERL5LIB=/home/user/perl/lib/perl5/site_perl/5.8.7:/home/user/perl/lib:/home/user/perl/lib/perl5:/home/user/perl/lib/perl5/site_perl</code></p>
<p>It won&#8217;t be effective until you log back in, if you want to make it effective in your current session, just type that line in your command prompt.</p>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://alexpb.com/notes/articles/2007/09/25/installing-perl-module-on-a-shared-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing Wikimedia&#8217;s Dump File to MySQL</title>
		<link>http://alexpb.com/notes/articles/2007/09/25/importing-wikimedia-dump-file-to-mysql/</link>
		<comments>http://alexpb.com/notes/articles/2007/09/25/importing-wikimedia-dump-file-to-mysql/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 20:34:28 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://alexpb.com/notes/articles/2007/09/25/importing-wikimedia-dump-file-to-mysql/</guid>
		<description><![CDATA[Create &#8220;wiktionary&#8221; schema Import wikimedia&#8217;s DB structure using tables.sql $ mysql -u root -p wiktionary < tables.sql Import the dump file to your new database using mwdumper.jar $ java -jar mwdumper.jar --format=sql:1.5 enwiktionary-20070914-pages-meta-current.xml.bz2 &#124; mysql -u root -p wiktionary Optional Copy the 'old_text' column from the 'text' table to the 'page' table mysql> UPDATE `wiktionary`.`page`,`wiktionary`.`text` [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Create &#8220;wiktionary&#8221; schema</li>
<li>Import wikimedia&#8217;s DB structure using <a href="http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance/tables.sql?view=markup" class="external free" title="http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance/tables.sql?view=markup" rel="nofollow">tables.sql</a></li>
<p><code>$ mysql -u root -p wiktionary < tables.sql</code></p>
<li>Import the dump file to your new database using <a href="http://download.wikimedia.org/tools/mwdumper.jar">mwdumper.jar</a></li>
<p><code>$ java -jar mwdumper.jar --format=sql:1.5 enwiktionary-20070914-pages-meta-current.xml.bz2 | mysql -u root -p wiktionary</code></ol>
<p>Optional</p>
<p>Copy the 'old_text' column from the 'text' table to the 'page' table<br />
<code>mysql> UPDATE `wiktionary`.`page`,`wiktionary`.`text` SET `wiktionary`.`page`.`old_text`=`wiktionary`.`text`.`old_text` WHERE `wiktionary`.`page`.`page_latest` = `wiktionary`.`text`.`old_id`</code></p>
<p>Delete non-English rows:<br />
<code>mysql> DELETE FROM `wiktionary`.`page` where old_text not LIKE '%==English==%'</code></p>
<p>Remove results not in namespace 0 (see <a href="http://en.wiktionary.org/wiki/Wiktionary:Namespace">Wiktionary:Namespace</a>):<br />
<code>mysql> DELETE FROM `wiktionary`.`page` WHERE `wiktionary`.`page`.`namespace` != 0</code></p>
]]></content:encoded>
			<wfw:commentRss>http://alexpb.com/notes/articles/2007/09/25/importing-wikimedia-dump-file-to-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extract Data From Wordnet</title>
		<link>http://alexpb.com/notes/articles/2007/09/25/extract-data-from-wordnet/</link>
		<comments>http://alexpb.com/notes/articles/2007/09/25/extract-data-from-wordnet/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 20:13:07 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[perl]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://alexpb.com/notes/articles/2007/09/25/extract-data-from-wordnet/</guid>
		<description><![CDATA[Get a word&#8217;s definition(s), synonyms and hyponyms (related words) using perl and WordNet. The word must be specified as a command line argument, but the script could easily be modified to use an html parameter. What you need: Download and Install WordNet Download and Install this Perl interface by Jason Rennie Download this Perl Script: [...]]]></description>
			<content:encoded><![CDATA[<p>Get a word&#8217;s definition(s), synonyms and hyponyms (related words) using perl and WordNet.  The word must be specified as a command line argument, but the script could easily be modified to use an html parameter.</p>
<p>What you need:</p>
<ol>
<li>Download and Install <a href="http://wordnet.princeton.edu/ ">WordNet</a></li>
<li>Download and Install this <a href="http://www.ai.mit.edu/~jrennie/WordNet/">Perl interface</a> by <a href="http://www.ai.mit.edu/%7Ejrennie/">Jason Rennie</a></li>
<li>Download this <a href='http://alexpb.com/notes/wp-content/uploads/2007/09/wordnet1.zip' title='Extract Data From Wordnet'>Perl Script:</a></li>
<li>usage: perl wordnet.pl word</li>
</ol>
<p><code>#!/usr/bin/perl -w</p>
<p>  use strict;<br />
  use warnings;<br />
  use WordNet::QueryData;<br />
  my $word = $ARGV[0] or exit(usage());<br />
  my $wn = WordNet::QueryData->new;<br />
  my @senses = $wn->querySense("$word#n", "glos");<br />
  my $i = 1;<br />
  foreach my $sense(@senses) {<br />
    my $temp_sense    = join(",", $wn->querySense($sense, "glos"));<br />
    my $temp_synset   = join(",", $wn->querySense($sense, "syns"));<br />
    my $temp_hyponyms = join(",", $wn->querySense($sense, "hypo"));<br />
    $temp_synset =~ s/#\w#\d+//g;<br />
    $temp_hyponyms =~ s/#\w#\d+//g;<br />
    $temp_synset =~ s/_/ /g;<br />
    $temp_hyponyms =~ s/_/ /g;<br />
    print $i.". ".$temp_sense."\n";<br />
    print "Synonyms: ".$temp_synset."\n";<br />
    print "Related: ".$temp_hyponyms."\n";<br />
    $i++;<br />
  }<br />
sub usage{<br />
print "\n\n\nUsage: ".$0." word\n\n\n\n";<br />
}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://alexpb.com/notes/articles/2007/09/25/extract-data-from-wordnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
