<?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>if(you.like(&#039;programming&#039;))</title>
	<atom:link href="http://www.youlikeprogramming.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.youlikeprogramming.com</link>
	<description>{ think.again(); }</description>
	<lastBuildDate>Fri, 17 Feb 2012 19:39:59 +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>Partial Word Search / Spell Check in PostgreSQL 9 using Trigram (trgm)</title>
		<link>http://www.youlikeprogramming.com/2012/02/partial-word-search-spell-check-in-postgresql-9-using-trigram-trgm/</link>
		<comments>http://www.youlikeprogramming.com/2012/02/partial-word-search-spell-check-in-postgresql-9-using-trigram-trgm/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 22:22:07 +0000</pubDate>
		<dc:creator>Joshua Burns</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Indexing]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Relational Databases]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.youlikeprogramming.com/?p=374</guid>
		<description><![CDATA[Assuming you only plan on using ASCII encoding, a very viable option may be to use the Trigram (pg_trgm) module: http://www.postgresql.org/docs/9.0/interactive/pgtrgm.html
Trigram uses your built-in method of indexing such as Gist or Gin.  The only modification you have to make is when defining your index is  specifying an operator class of &#8220;gist_trgm_ops&#8221; or &#8220;gin_trgm_ops&#8221;.
If [...]]]></description>
			<content:encoded><![CDATA[<p>Assuming you only plan on using ASCII encoding, a very viable option may be to use the Trigram (pg_trgm) module: <a rel="nofollow" href="http://www.postgresql.org/docs/9.0/interactive/pgtrgm.html">http://www.postgresql.org/docs/9.0/interactive/pgtrgm.html</a><span id="more-374"></span></p>
<p>Trigram uses your built-in method of indexing such as Gist or Gin.  The only modification you have to make is when defining your index is  specifying an operator class of &#8220;gist_trgm_ops&#8221; or &#8220;gin_trgm_ops&#8221;.</p>
<p>If you don&#8217;t have the contrib modules installed yet and are working in Ubuntu, from the command line enter:</p>
<pre><code># sudo apt-get install postgresql-contrib
</code></pre>
<p>After the contrib modules are make available, you must install  pg_trgm. You do this by executing the following PostgreSQL query on the  database you wish to install the module into:</p>
<pre><code>CREATE EXTENSION pg_trgm;
</code></pre>
<p>After the pg_trgm extension has been installed, we&#8217;re ready to have some fun!</p>
<pre><code>-- Create the table.
CREATE TABLE test (my_column text)
-- Create the index.
CREATE INDEX test_my_colun_trgm_idx ON test USING gist (my_column gist_trgm_ops);
-- Add a couple records
INSERT INTO test (my_Column) VALUES ('First Entry'), ('Second Entry'), ('Third Entry')
-- Query using our new index --
SELECT my_column, similarity(my_column, 'First Entry') AS similarity FROM test WHERE my_column % 'Frist Entry' ORDER BY similarity DESC
</code></pre>
<p>The above select statement should return all three rows with varying  confidence. You&#8217;ll notice the appropriate match &#8220;First Entry&#8221; have a 1.0  confidence, which means it believes the query to be a perfect match  even though the word has been mis-spelled.</p>
<p>Reference: http://www.postgresql.org/docs/9.0/interactive/pgtrgm.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.youlikeprogramming.com/2012/02/partial-word-search-spell-check-in-postgresql-9-using-trigram-trgm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Full Text Search (FTS) in PostgreSQL 9.1 (Examples Included)</title>
		<link>http://www.youlikeprogramming.com/2012/01/full-text-search-fts-in-postgresql-9-1/</link>
		<comments>http://www.youlikeprogramming.com/2012/01/full-text-search-fts-in-postgresql-9-1/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 23:38:06 +0000</pubDate>
		<dc:creator>Joshua Burns</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Indexing]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.youlikeprogramming.com/?p=365</guid>
		<description><![CDATA[This post is aimed at providing only the information necessary to rapidly understand and deploy Full Text Search into your PostgreSQL environment. For more documentation, I&#8217;d recommend checking out the following URLs:

http://linuxgazette.net/164/sephton.html
http://www.postgresql.org/docs/9.1/static/textsearch.html
http://www.slideshare.net/billkarwin/full-text-search-in-postgresql


1) Suppose we have a table named &#8220;fts&#8221; with the following schema :

id &#60;serial&#62;
body &#60;text&#62;
body_tsvector &#60;tsvector&#62;

CREATE TABLE fts (
  id serial NOT NULL,
 [...]]]></description>
			<content:encoded><![CDATA[<p>This post is aimed at providing only the information necessary to rapidly understand and deploy Full Text Search into your PostgreSQL environment. For more documentation, I&#8217;d recommend checking out the following URLs:</p>
<ul>
<li>http://linuxgazette.net/164/sephton.html</li>
<li>http://www.postgresql.org/docs/9.1/static/textsearch.html</li>
<li>http://www.slideshare.net/billkarwin/full-text-search-in-postgresql</li>
</ul>
<p><span id="more-365"></span></p>
<p><strong>1) Suppose we have a table named &#8220;</strong><strong>fts&#8221; with the following schema</strong><strong> :</strong></p>
<ul>
<li>id &lt;serial&gt;</li>
<li>body &lt;text&gt;</li>
<li>body_tsvector &lt;tsvector&gt;</li>
</ul>
<pre>CREATE TABLE fts (
  id serial NOT NULL,
  body text,
  body_tsvector tsvector
)</pre>
<p><strong>2) Now let&#8217;s suppose the following data is present within the table:</strong></p>
<pre>INSERT INTO fts (body) VALUES
('An artist cannot speak about his art any more than a plant can discuss horticulture.'),
('I like work; it fascinates me. I can sit and look at it for hours.'),
('Love is a great beautifier.')</pre>
<p><strong>3) Next, let&#8217;s populate the body_tsvector column:</strong></p>
<pre>UPDATE fts SET body_tsvector = to_tsvector('english', body)</pre>
<p><strong>4) For speed&#8217;s sake let&#8217;s create an index on our body_tsvector column:</strong></p>
<pre>CREATE INDEX fts_body_tsvector_gin_idx ON fts USING GIN(body_tsvector)</pre>
<p><strong>5) Finally, let&#8217;s create a trigger which automatically updates or populates our body_tsvector column whenever a row is updated or inserted:<br />
</strong></p>
<pre>CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE ON fts FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger('body_tsvector', 'pg_catalog.english', 'body');</pre>
<p>Now that we have a table which has been populated with data, has full text indexing set up, and will automatically update accordingly whenever a future update or insert occurs, let&#8217;s run some tests to ensure full text search works as expected.</p>
<ul>
<li>SELECT * FROM fts WHERE body_tsvector @@ plainto_tsquery(&#8216;english&#8217;, &#8216;Discuss&#8217;)</li>
<li>Should return: ID 1</li>
</ul>
<ul>
<li>SELECT * FROM fts WHERE body_tsvector @@ plainto_tsquery(&#8216;english&#8217;, &#8216;Discuss LOVE&#8217;)</li>
<li>Should return: IDs 1 and 3</li>
</ul>
<ul>
<li>SELECT * FROM fts WHERE body_tsvector @@ plainto_tsquery(&#8216;english&#8217;, &#8216;Discuss&#8217;) AND NOT (body_tsvector @@ plainto_tsquery(&#8216;english&#8217;, &#8216;Love&#8217;))</li>
<li>Should return: ID 1</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.youlikeprogramming.com/2012/01/full-text-search-fts-in-postgresql-9-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generate a Dynamic Filename Based On Date / Timestamp in Talend</title>
		<link>http://www.youlikeprogramming.com/2012/01/dynamic-file-naming-based-on-date-timestamp-in-talend/</link>
		<comments>http://www.youlikeprogramming.com/2012/01/dynamic-file-naming-based-on-date-timestamp-in-talend/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 21:12:28 +0000</pubDate>
		<dc:creator>Joshua Burns</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Talend]]></category>

		<guid isPermaLink="false">http://www.youlikeprogramming.com/?p=359</guid>
		<description><![CDATA[If you&#8217;re working with Talend Open Studio and would like to dynamically specify the name of a file you&#8217;re attempting to consume or output, refer to the following.


Create a new tSetGlobalVar object
Double-click the tSetGlobalVar object to open the Component tab.
Within the Component tab, create a new key with the value &#8220;timestamp&#8221; and set the value [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re working with Talend Open Studio and would like to dynamically specify the name of a file you&#8217;re attempting to consume or output, refer to the following.<br />
<span id="more-359"></span></p>
<ol>
<li>Create a new tSetGlobalVar object</li>
<li>Double-click the tSetGlobalVar object to open the Component tab.</li>
<li>Within the Component tab, create a new key with the value &#8220;timestamp&#8221; and set the value to: TalendDate.getDate(&#8220;yyyy-MM-dd KK.mm.ss a&#8221;) // This will create a string with a value similar to &#8220;2012-01-04 04;06;54 PM&#8221;</li>
<li>Double-click the file you wish to input/output.</li>
<li>Under &#8220;File Name&#8221;, enter somwething similar to &#8220;C:/Talend/Projects/MYProject/My File &#8221; +  ((String)globalMap.get(&#8220;timestamp&#8221;)) + &#8220;.txt&#8221; // Obviously, replace the path, filename and file extension with whatever you&#8217;re working with. If requested, I will post some screen shots.</li>
<li>That&#8217;s it!</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.youlikeprogramming.com/2012/01/dynamic-file-naming-based-on-date-timestamp-in-talend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using ConnectBot With Your Droid2</title>
		<link>http://www.youlikeprogramming.com/2011/12/using-connectbot-with-your-droid2/</link>
		<comments>http://www.youlikeprogramming.com/2011/12/using-connectbot-with-your-droid2/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 18:43:42 +0000</pubDate>
		<dc:creator>Joshua Burns</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.youlikeprogramming.com/?p=356</guid>
		<description><![CDATA[If you&#8217;re having trouble working with some of the basic functionality of your ConnectBot terminal, this article is designed to help you quickly overcome some of the common issues you may face.

- The Droid2 uses the OK button in place of the &#8220;CTRL&#8221; key.
- The Tab key doesn&#8217;t work properly in ConnectBot (Supposedly fixed in [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re having trouble working with some of the basic functionality of your ConnectBot terminal, this article is designed to help you quickly overcome some of the common issues you may face.<br />
<span id="more-356"></span><br />
- The Droid2 uses the OK button in place of the &#8220;CTRL&#8221; key.<br />
- The Tab key doesn&#8217;t work properly in ConnectBot (Supposedly fixed in the Git repository, but not in official release). Instead, you can press the OK button followed by the letter &#8220;i&#8221; (OK+i)</p>
<p>icial . Instead, you can use the OK + I<br />
combination</p>
]]></content:encoded>
			<wfw:commentRss>http://www.youlikeprogramming.com/2011/12/using-connectbot-with-your-droid2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with the hstore data type in PostgreSQL 9.0 / 9.1</title>
		<link>http://www.youlikeprogramming.com/2011/11/working-with-the-hstore-data-type-in-postgresql-9-0/</link>
		<comments>http://www.youlikeprogramming.com/2011/11/working-with-the-hstore-data-type-in-postgresql-9-0/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 05:45:18 +0000</pubDate>
		<dc:creator>Joshua Burns</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[HSTORE]]></category>

		<guid isPermaLink="false">http://www.youlikeprogramming.com/?p=343</guid>
		<description><![CDATA[This is a quick reference on how to install the HSTORE contrib module into your PostgreSQL database as well as a few example queries explaining how to interface with and query the HSTORE data type.
To install the hstore contrib module, simply run this query in the database you wish to use hstore in:
CREATE EXTENSION hstore;
 [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick reference on how to install the HSTORE contrib module into your PostgreSQL database as well as a few example queries explaining how to interface with and query the HSTORE data type.<span id="more-343"></span></p>
<p>To install the hstore contrib module, simply run this query in the database you wish to use hstore in:<br />
<code>CREATE EXTENSION hstore;</code><br />
<em> In these examples, we assume you have a table named &#8220;hstore_test&#8221; with a single column named &#8220;data&#8221; which is of the data type &#8220;hstore&#8221;.</em></p>
<p><strong>Set the contents of an hstore</strong><br />
<code>INSERT INTO hstore_test (data) VALUES ('"key1"=&gt;"value1", "key2"=&gt;"value2", "key3"=&gt;"value3"')</code></p>
<p><strong>Delete a key from an hstore</strong><br />
<code>UPDATE hstore_test SET data = delete(data, 'key2')</code></p>
<p><strong>Add a key/value to an hstore / replace the value of an existing key within an hstore</strong><br />
<code>UPDATE hstore_test SET data = data || '"key4"=&gt;"some value"'::hstore</code></p>
<p><strong>Return records where hstore contains a specific key</strong><br />
<code>SELECT * FROM hstore_test WHERE data ? 'key4'</code></p>
<p><strong>Return records where hstore does not contain a specific key</strong><br />
<code>SELECT * FROM hstore_test WHERE NOT data ? 'key5'</code></p>
<p><strong>Returns records where a specific key/value are present within an hstore.</strong><br />
<code>SELECT * FROM hstore_test WHERE data @&gt; '"key4"=&gt;"some value"'::hstore</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.youlikeprogramming.com/2011/11/working-with-the-hstore-data-type-in-postgresql-9-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python&#8217;s Django &#8211; Database Interactions</title>
		<link>http://www.youlikeprogramming.com/2011/10/pythons-django-database-interactions/</link>
		<comments>http://www.youlikeprogramming.com/2011/10/pythons-django-database-interactions/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 20:01:01 +0000</pubDate>
		<dc:creator>Joshua Burns</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.youlikeprogramming.com/?p=327</guid>
		<description><![CDATA[This post is a work in progress. Currently, we define what a couple views may look like and in those views, we perform various useful database interactions.
django/projects/my_project/users/models.py
&#60;br /&#62; from django.db import models&#60;/p&#62; &#60;p&#62;class User(models.Model):&#60;br /&#62; 	# username and password are equivalent to &#8220;character varying(64)&#8221; data type&#60;br /&#62; 	username = models.CharField(max_length = 64)&#60;br /&#62; 	password= models.CharField(max_length [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a work in progress. Currently, we define what a couple views may look like and in those views, we perform various useful database interactions.<span id="more-327"></span></p>
<p><strong>django/projects/my_project/users/models.py</strong><br />
<textarea style="width: 100%; height: 300px;">&lt;br /&gt; from django.db import models&lt;/p&gt; &lt;p&gt;class User(models.Model):&lt;br /&gt; 	# username and password are equivalent to &#8220;character varying(64)&#8221; data type&lt;br /&gt; 	username = models.CharField(max_length = 64)&lt;br /&gt; 	password= models.CharField(max_length = 64)&lt;br /&gt; 	# bio is equivalent to &#8220;text&#8221; data type&lt;br /&gt; 	bio = models.TextField(max_length = 2000)&lt;/p&gt; &lt;p&gt;class Transaction(models.Model):&lt;br /&gt; 	# Creates a foreign key relationship between this table&#8217;s &#8220;user_id&#8221;&lt;br /&gt; 	# column and the User class&#8217;s table&#8217;s &#8220;id&#8221; field.&lt;br /&gt; 	user_id = models.ForeignKey(User)&lt;br /&gt; 	# quantity equivalent to &#8220;integer&#8221; data type&lt;br /&gt; 	quantity = models.IntegerField()&lt;br /&gt; 	# amount equivalent to &#8220;numeric(7,2)&#8221; data type&lt;br /&gt; 	amount = models.DecimalField(max_digits = 7, decimal_places = 2)&lt;br /&gt; </textarea></p>
<p><strong>django/projects/my_project/users/models.py</strong><br />
<textarea style="width: 100%; height: 300px;">&lt;br /&gt; from django.template import Context, loader&lt;br /&gt; from django.http import HttpResponse&lt;/p&gt; &lt;p&gt;from users.models import User, Transaction&lt;/p&gt; &lt;p&gt;def index(request):&lt;br /&gt; 	template = loader.get_template(&#8216;users/index.html&#8217;)&lt;br /&gt; 	# Grab a list of all users, and order by username.&lt;br /&gt; 	# Alternately, we can order in reverse by passing &#8220;-username&#8221; instead of &#8220;username&#8221;&lt;br /&gt; 	all_users = User.objects.all().order_by(&#8216;username&#8217;)&lt;br /&gt; 	# Grab user information based on the primary key, where its value is 1.&lt;br /&gt; 	user = User.objects.filter(pk = 1)&lt;br /&gt; 	# Grab transactions associated with a specific user.&lt;br /&gt; 	# &#8220;select_related()&#8221; does a join between transaction and user tables.&lt;br /&gt; 	transactions = Transaction.objects.filter(user_id = 1).select_related()&lt;/p&gt; &lt;p&gt;	context = Context({&lt;br /&gt; 		&#8216;all_users&#8217;: all_users,&lt;br /&gt; 		&#8216;user&#8217;: user,&lt;br /&gt; 		&#8216;transactions&#8217;: transactions,&lt;br /&gt; 	})&lt;/p&gt; &lt;p&gt;	response = template.render(context)&lt;br /&gt; 	return HttpResponse(response)&lt;br /&gt; </textarea></p>
<p><strong>django/templates/users/index.html</strong><br />
<textarea style="width: 100%; height: 300px;">&lt;/p&gt; &lt;h2&gt;Render All Users&lt;/h2&gt; &lt;p&gt;{% if all_users %}&lt;/p&gt; &lt;ul&gt; 	{% for user in all_users %}&lt;/p&gt; &lt;li&gt;{{ user.username }}&lt;/li&gt; &lt;p&gt; 	{% endfor %} 	&lt;/ul&gt; &lt;p&gt;{% endif %}&lt;/p&gt; &lt;h2&gt;Display A Single User&#8217;s Information&lt;/h2&gt; &lt;p&gt;{{ user.username }}: {{ user.bio }}&lt;/p&gt; &lt;h2&gt;Display Transactions Associated With The Above User&lt;/h2&gt; &lt;p&gt;{% if transactions %}&lt;/p&gt; &lt;table&gt; &lt;tbody&gt; 			{% for transaction in transactions %}&lt;/p&gt; &lt;tr&gt; &lt;td&gt;{{ transaction.id }}&lt;/td&gt; &lt;td&gt;${{ transaction.amount }}&lt;/td&gt; &lt;td&gt;{{ transaction.user.username }}&lt;/td&gt; &lt;td&gt;{{ transaction.user.bio }}&lt;/td&gt; &lt;/tr&gt; &lt;p&gt;			{% endfor %}&lt;br /&gt; 		&lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;{% endif %}&lt;br /&gt; </textarea></p>
]]></content:encoded>
			<wfw:commentRss>http://www.youlikeprogramming.com/2011/10/pythons-django-database-interactions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL and ODBC in 64-Bit Windows</title>
		<link>http://www.youlikeprogramming.com/2011/09/postgresql-and-odbc-in-64-bit-windows/</link>
		<comments>http://www.youlikeprogramming.com/2011/09/postgresql-and-odbc-in-64-bit-windows/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 18:50:57 +0000</pubDate>
		<dc:creator>Joshua Burns</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://www.youlikeprogramming.com/?p=318</guid>
		<description><![CDATA[(This document has been modified to instruct the setup of not only 64-bit systems, but 32-bit set ups as well.)
This tutorial is for individuals who are interested in setting up a DSN entry in their Data Sources (ODBC) for PostgreSQL. We cover both 32-bit and 64-bit versions of Windows, as each must be configured slightly [...]]]></description>
			<content:encoded><![CDATA[<p><em>(This document has been modified to instruct the setup of not only 64-bit systems, but 32-bit set ups as well.)</em></p>
<p>This tutorial is for individuals who are interested in setting up a DSN entry in their Data Sources (ODBC) for PostgreSQL. We cover both 32-bit and 64-bit versions of Windows, as each must be configured slightly differently.<br />
<span id="more-318"></span></p>
<ul>
<li>Download and install the latest version of psqlODBC from: <a title="http://www.postgresql.org/ftp/odbc/versions/msi/ " href="http://www.postgresql.org/ftp/odbc/versions/msi/ ">http://www.postgresql.org/ftp/odbc/versions/msi/ </a>
<ul>
<li> Please note: If running a 64-bit version of Windows, you will want to download and install BOTH the psqlodbc_XX_XX_XXXX.zip and psqlodbc_XX_XX_XXXX-x64.zip file. If running the 32-bit version of Windows, simply download and install psqlodbc_XX_XX_XXXX.zip.</li>
</ul>
</li>
<li> Un-Zip and run the MSI contained within the Zip file(s). (Should be named psqlodbc.msi or psqlodbc_x64.msi)</li>
<li>If running a 32-bit version of Windows:
<ul>
<li>Go to Start -&gt; Administrative Tools -&gt; Data Sources (ODBC) (Or, go to Start -&gt; Run and enter: %WINDIR%\System32\odbcad32.exe)</li>
</ul>
</li>
<li>If running a 64-bit version of Windows:
<ul>
<li>To run the 64-bit version of Data Sources: Go to Start -&gt; Administrative Tools -&gt; Data Sources (ODBC) (Or, go to Start -&gt; Run and enter: %WINDIR%\System32\odbcad32.exe</li>
<li>To run the 32-bit version of Data Sources: Go to Start -&gt; Run (or Press Windows+R keys) and enter %WINDIR%\SysWOW64\odbcad32.exe</li>
<li>Please note: You CANNOT have the 32-bit and 64-bit versions of odbcad32.exe running at the same time. If you attempt to run one while the other is already loaded, it will simply focus on the one already running.</li>
</ul>
</li>
<li>On either the User DSN (DSNs available for only that user) or System DSN (DSNs available to every user) tab, click the Add button.</li>
<li>Scroll down the list and find the PostgreSQL ODBC Driver. You may select ANSI or UNICODE (For future support I personally prefer UNICODE), and click Finish.
<ul>
<li>Data Source refers to the programmable name of the DSN Entry. I&#8217;d recommend sticking to lower-case letters and underscores. Ex: psql_server</li>
<li>Specify the Database, Server, User Name and Password to your PostgreSQL server. Alternately, you may also enter a Description, specify a different Port, and set the SSL Mode.</li>
<li>Click the Test button to ensure everything has been specified correctly.</li>
<li>Click the Save button to create the DSN.</li>
</ul>
</li>
</ul>
<p>Some useful notes:</p>
<ul>
<li>If running a 64-bit version of Windows, 32-bit applications will reference ONLY the DSNs specified within the 32-bit version of Data Sources (ODBC). Likewise, 64-bit applications will only reference the DSNs specified within the 64-bit version of Data Sources (ODBC).</li>
<li>If running the 32-bit version of Windows, the above mentioned problems are not applicable.</li>
<li>If you are having problems Testing the connection before saving the DSN, ensure permissions are set appropriately on the PostgreSQL server&#8217;s side by taking a look at the pg_hba.conf file (Generally located at C:\program files\postgresql\9.1\data\pg_hba.conf). If the configuration file is not present within that directory, the file should be present within whatever directory was set as PostgreSQL&#8217;s &#8220;data&#8221; directory which also contains the data files as well).</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.youlikeprogramming.com/2011/09/postgresql-and-odbc-in-64-bit-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validate an uploaded image in PHP</title>
		<link>http://www.youlikeprogramming.com/2011/07/validate-an-uploaded-image-in-php/</link>
		<comments>http://www.youlikeprogramming.com/2011/07/validate-an-uploaded-image-in-php/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 19:25:27 +0000</pubDate>
		<dc:creator>Joshua Burns</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.youlikeprogramming.com/?p=312</guid>
		<description><![CDATA[This is a quick copy and past, but you should get the idea. This script validates the form field &#8220;photo&#8221; file being upload is a valid photo.

	// Validate Photo
	if(!empty($_FILES['photo'])) { // Photo uploaded.
		if($_FILES['photo']['error'] != UPLOAD_ERR_OK) {
			$errors['photo'] = 'Server encountered an error while attempting to upload your Photo.';
		} else if(!is_uploaded_file($_FILES['photo']['tmp_name'])) { // File specified is local [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick copy and past, but you should get the idea. This script validates the form field &#8220;photo&#8221; file being upload is a valid photo.<br />
<span id="more-312"></span></p>
<pre>	// Validate Photo
	if(!empty($_FILES['photo'])) { // Photo uploaded.
		if($_FILES['photo']['error'] != UPLOAD_ERR_OK) {
			$errors['photo'] = 'Server encountered an error while attempting to upload your Photo.';
		} else if(!is_uploaded_file($_FILES['photo']['tmp_name'])) { // File specified is local file system, not actually uploaded. BAD.
			$errors['photo'] = 'Photo specified is not valid.';
		} else { // Check if the image is valid by loading it into memory as an image.
			$image_info = @getimagesize($_FILES['photo']['tmp_name']); // Grabs the dimensions and type of image. May throw an error if not an image, not yet tested.
			$image_type = $image_info[2]; // Grab the image type.
			$image_function = False;
			if($image_type == IMAGETYPE_JPEG) {
				$image_function = 'jpeg';
			} else if($image_type == IMAGETYPE_PNG) {
				$image_function = 'png';
			} else if($image_type == IMAGETYPE_GIF) {
				$image_function = 'gif';
			} else if($image_type == IMAGETYPE_BMP) {
				$image_function = 'bmp';
			} else {
				$errors['photo'] = 'Photo uploaded does not appear to be a valid PNG, BMP, GIF or JPEG.';
			}
			if($image_function != False) { // Attempt to load the image into memory.
				$image_function = 'imagecreatefrom' . $image_function;
				$image = @$image_function($_FILES['photo']['tmp_name']); // Load the image into memory. May throw an error, su supress.
				if($image == False) { // If false, it means it was unable to load the image into memory.
					$errors['photo'] = 'Photo uploaded appears to be corrupt, unable to upload.';
				}
			}
			unset($image_info, $image_type, $image_function, $image); // Free no longer relavent memory.
		}
	}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.youlikeprogramming.com/2011/07/validate-an-uploaded-image-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generating Excel Documents With the xlwt Python Library (Examples)</title>
		<link>http://www.youlikeprogramming.com/2011/04/generating-excel-documents-with-the-xlwt-python-library-with-examples/</link>
		<comments>http://www.youlikeprogramming.com/2011/04/generating-excel-documents-with-the-xlwt-python-library-with-examples/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 16:31:36 +0000</pubDate>
		<dc:creator>Joshua Burns</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[xlwt]]></category>

		<guid isPermaLink="false">http://www.youlikeprogramming.com/?p=270</guid>
		<description><![CDATA[Here are some simple examples using Python&#8217;s xlwt library to dynamically generate Excel documents.
Please note a useful alternative may be ezodf, which allows you to generate ODS (Open Document Spreadsheet) files for LibreOffice / OpenOffice. You can check them out at: http://packages.python.org/ezodf/index.html

The Simplest Example
import xlwt
workbook = xlwt.Workbook(encoding = 'ascii')
worksheet = workbook.add_sheet('My Worksheet')
worksheet.write(0, 0, label = [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some simple examples using Python&#8217;s xlwt library to dynamically generate Excel documents.</p>
<p>Please note a useful alternative may be ezodf, which allows you to generate ODS (Open Document Spreadsheet) files for LibreOffice / OpenOffice. You can check them out at: <a href="http://packages.python.org/ezodf/index.html">http://packages.python.org/ezodf/index.html</a><br />
<span id="more-270"></span></p>
<p><b>The Simplest Example</b><br />
<code>import xlwt<br />
workbook = xlwt.Workbook(encoding = 'ascii')<br />
worksheet = workbook.add_sheet('My Worksheet')<br />
worksheet.write(0, 0, label = 'Row 0, Column 0 Value')<br />
workbook.save('Excel_Workbook.xls')<br />
</code></p>
<p><b>Formatting the Contents of a Cell</b><br />
<code>import xlwt<br />
workbook = xlwt.Workbook(encoding = 'ascii')<br />
worksheet = workbook.add_sheet('My Worksheet')<br />
font = xlwt.Font() # Create the Font<br />
font.name = 'Times New Roman'<br />
font.bold = True<br />
font.underline = True<br />
font.italic = True<br />
style = xlwt.XFStyle() # Create the Style<br />
style.font = font # Apply the Font to the Style<br />
worksheet.write(0, 0, label = 'Unformatted value')<br />
worksheet.write(1, 0, label = 'Formatted value', style) # Apply the Style to the Cell<br />
workbook.save('Excel_Workbook.xls')<br />
</code></p>
<p><b>Attributes of the Font Object</b><br />
<code>font.bold = True # May be: True, False<br />
font.italic = True # May be: True, False<br />
font.struck_out = True # May be: True, False<br />
font.underline = xlwt.Font.UNDERLINE_SINGLE # May be: UNDERLINE_NONE, UNDERLINE_SINGLE, UNDERLINE_SINGLE_ACC, UNDERLINE_DOUBLE, UNDERLINE_DOUBLE_ACC<br />
font.escapement = xlwt.Font.ESCAPEMENT_SUPERSCRIPT # May be: ESCAPEMENT_NONE, ESCAPEMENT_SUPERSCRIPT, ESCAPEMENT_SUBSCRIPT<br />
font.family = xlwt.Font.FAMILY_ROMAN # May be: FAMILY_NONE, FAMILY_ROMAN, FAMILY_SWISS, FAMILY_MODERN, FAMILY_SCRIPT, FAMILY_DECORATIVE<br />
font.charset = xlwt.Font.CHARSET_ANSI_LATIN # May be: CHARSET_ANSI_LATIN, CHARSET_SYS_DEFAULT, CHARSET_SYMBOL, CHARSET_APPLE_ROMAN, CHARSET_ANSI_JAP_SHIFT_JIS, CHARSET_ANSI_KOR_HANGUL, CHARSET_ANSI_KOR_JOHAB, CHARSET_ANSI_CHINESE_GBK, CHARSET_ANSI_CHINESE_BIG5, CHARSET_ANSI_GREEK, CHARSET_ANSI_TURKISH, CHARSET_ANSI_VIETNAMESE, CHARSET_ANSI_HEBREW, CHARSET_ANSI_ARABIC, CHARSET_ANSI_BALTIC, CHARSET_ANSI_CYRILLIC, CHARSET_ANSI_THAI, CHARSET_ANSI_LATIN_II, CHARSET_OEM_LATIN_I<br />
font.colour_index = ?<br />
font.get_biff_record = ?<br />
font.height = 0x00C8 # C8 in Hex (in decimal) = 10 points in height.<br />
font.name = ?<br />
font.outline = ?<br />
font.shadow = ?<br />
</code></p>
<p><b>Setting the Width of a Cell</b><br />
<code>import xltw<br />
workbook = xlwt.Workbook()<br />
worksheet = workbook.add_sheet('My Sheet')<br />
worksheet.write(0, 0, 'My Cell Contents')<br />
worksheet.col(0).width = 3333 # 3333 = 1" (one inch).<br />
workbook.save('Excel_Workbook.xls')<br />
</code></p>
<p><b>Entering a Date into a Cell</b><br />
<code>import xlwt<br />
import datetime<br />
workbook = xlwt.Workbook()<br />
worksheet = workbook.add_sheet('My Sheet')<br />
style = xlwt.XFStyle()<br />
style.num_format_str = 'M/D/YY' # Other options: D-MMM-YY, D-MMM, MMM-YY, h:mm, h:mm:ss, h:mm, h:mm:ss, M/D/YY h:mm, mm:ss, [h]:mm:ss, mm:ss.0<br />
worksheet.write(0, 0, datetime.datetime.now(), style)<br />
workbook.save('Excel_Workbook.xls')<br />
</code></p>
<p><b>Adding a Formula to a Cell</b><br />
<code>import xlwt<br />
workbook = xlwt.Workbook()<br />
worksheet = workbook.add_sheet('My Sheet')<br />
worksheet.write(0, 0, 5) # Outputs 5<br />
worksheet.write(0, 1, 2) # Outputs 2<br />
worksheet.write(1, 0, xlwt.Formula('A1*B1')) # Should output "10" (A1[5] * A2[2])<br />
worksheet.write(1, 1, xlwt.Formula('SUM(A1,B1)')) # Should output "7" (A1[5] + A2[2])<br />
workbook.save('Excel_Workbook.xls')<br />
</code></p>
<p><b>Adding a Hyperlink to a Cell</b><br />
<code>import xlwt<br />
workbook = xlwt.Workbook()<br />
worksheet = workbook.add_sheet('My Sheet')<br />
worksheet.write(0, 0, xlwt.Formula('HYPERLINK("http://www.google.com";"Google")')) # Outputs the text "Google" linking to http://www.google.com<br />
workbook.save('Excel_Workbook.xls')<br />
</code></p>
<p><b>Merging Columns and Rows</b><br />
<code>import xlwt<br />
workbook = xlwt.Workbook()<br />
worksheet = workbook.add_sheet('My Sheet')<br />
worksheet.write_merge(0, 0, 0, 3, 'First Merge') # Merges row 0's columns 0 through 3.<br />
font = xlwt.Font() # Create Font<br />
font.bold = True # Set font to Bold<br />
style = xlwt.XFStyle() # Create Style<br />
style.font = font # Add Bold Font to Style<br />
worksheet.write_merge(1, 2, 0, 3, 'Second Merge', style) # Merges row 1 through 2's columns 0 through 3.<br />
workbook.save('Excel_Workbook.xls')<br />
</code></p>
<p><b>Setting the Alignment for the Contents of a Cell</b><br />
<code>import xlwt<br />
workbook = xlwt.Workbook()<br />
worksheet = workbook.add_sheet('My Sheet')<br />
alignment = xlwt.Alignment() # Create Alignment<br />
alignment.horz = xlwt.Alignment.HORZ_CENTER # May be: HORZ_GENERAL, HORZ_LEFT, HORZ_CENTER, HORZ_RIGHT, HORZ_FILLED, HORZ_JUSTIFIED, HORZ_CENTER_ACROSS_SEL, HORZ_DISTRIBUTED<br />
alignment.vert = xlwt.Alignment.VERT_CENTER # May be: VERT_TOP, VERT_CENTER, VERT_BOTTOM, VERT_JUSTIFIED, VERT_DISTRIBUTED<br />
style = xlwt.XFStyle() # Create Style<br />
style.alignment = alignment # Add Alignment to Style<br />
worksheet.write(0, 0, 'Cell Contents', style)<br />
workbook.save('Excel_Workbook.xls')<br />
</code></p>
<p><b>Adding Borders to a Cell</b><br />
<code># Please note: While I was able to find these constants within the source code, on my system (using LibreOffice,) I was only presented with a solid line, varying from thin to thick; no dotted or dashed lines.<br />
import xlwt<br />
workbook = xlwt.Workbook()<br />
worksheet = workbook.add_sheet('My Sheet')<br />
borders = xlwt.Borders() # Create Borders<br />
borders.left = xlwt.Borders.DASHED # May be: NO_LINE, THIN, MEDIUM, DASHED, DOTTED, THICK, DOUBLE, HAIR, MEDIUM_DASHED, THIN_DASH_DOTTED, MEDIUM_DASH_DOTTED, THIN_DASH_DOT_DOTTED, MEDIUM_DASH_DOT_DOTTED, SLANTED_MEDIUM_DASH_DOTTED, or 0x00 through 0x0D.<br />
borders.right = xlwt.Borders.DASHED<br />
borders.top = xlwt.Borders.DASHED<br />
borders.bottom = xlwt.Borders.DASHED<br />
borders.left_colour = 0x40<br />
borders.right_colour = 0x40<br />
borders.top_colour = 0x40<br />
borders.bottom_colour = 0x40<br />
style = xlwt.XFStyle() # Create Style<br />
style.borders = borders # Add Borders to Style<br />
worksheet.write(0, 0, 'Cell Contents', style)<br />
workbook.save('Excel_Workbook.xls')<br />
</code></p>
<p><b>Setting the Background Color of a Cell</b><br />
<code>import xlwt<br />
workbook = xlwt.Workbook()<br />
worksheet = workbook.add_sheet('My Sheet')<br />
pattern = xlwt.Pattern() # Create the Pattern<br />
pattern.pattern = xlwt.Pattern.SOLID_PATTERN # May be: NO_PATTERN, SOLID_PATTERN, or 0x00 through 0x12<br />
pattern.pattern_fore_colour = 5 # May be: 8 through 63. 0 = Black, 1 = White, 2 = Red, 3 = Green, 4 = Blue, 5 = Yellow, 6 = Magenta, 7 = Cyan, 16 = Maroon, 17 = Dark Green, 18 = Dark Blue, 19 = Dark Yellow , almost brown), 20 = Dark Magenta, 21 = Teal, 22 = Light Gray, 23 = Dark Gray, the list goes on...<br />
style = xlwt.XFStyle() # Create the Pattern<br />
style.pattern = pattern # Add Pattern to Style<br />
worksheet.write(0, 0, 'Cell Contents', style)<br />
workbook.save('Excel_Workbook.xls')<br />
</code></p>
<p><b>TODO: Things Left to Document</b><br />
<code>- Panes -- separate views which are always in view<br />
- Border Colors (documented above, but not taking effect as it should)<br />
- Border Widths (document above, but not working as expected)<br />
- Protection<br />
- Row Styles<br />
- Zoom / Manification<br />
- WS Props?<br />
Source Code for reference available at: https://secure.simplistix.co.uk/svn/xlwt/trunk/xlwt/<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.youlikeprogramming.com/2011/04/generating-excel-documents-with-the-xlwt-python-library-with-examples/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Python and PostgreSQL: A Quick Reference to psycopg2</title>
		<link>http://www.youlikeprogramming.com/2011/03/python-and-postgresql-a-quick-reference-to-psycopg2/</link>
		<comments>http://www.youlikeprogramming.com/2011/03/python-and-postgresql-a-quick-reference-to-psycopg2/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 16:35:03 +0000</pubDate>
		<dc:creator>Joshua Burns</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Psycopg2]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Relational Databases]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.youlikeprogramming.com/?p=220</guid>
		<description><![CDATA[As with most database technologies I interact with, I like to throw together a few simple examples as reminders on how to interface with that technology. In this case we&#8217;re interfacing with the PostgreSQL database through the Python programming language.
Connect to a PostgreSQL Database
import psycopg2
db = psycopg2.connect(
host = '10.0.0.1',
database = 'my_database',
user = 'my_username',
password = 'my_password'
)
Create [...]]]></description>
			<content:encoded><![CDATA[<p>As with most database technologies I interact with, I like to throw together a few simple examples as reminders on how to interface with that technology. In this case we&#8217;re interfacing with the PostgreSQL database through the Python programming language.<span id="more-220"></span></p>
<p><strong>Connect to a PostgreSQL Database</strong><br />
<code>import psycopg2<br />
db = psycopg2.connect(<br />
host = '10.0.0.1',<br />
database = 'my_database',<br />
user = 'my_username',<br />
password = 'my_password'<br />
)</code></p>
<p><strong>Create a PostgreSQL Cursor (returning values in a Tuple)</strong><br />
<code>import psycopg2<br />
db = psycopg2.connect(<br />
host = '10.0.0.1',<br />
database = 'my_database',<br />
user = 'my_username',<br />
password = 'my_password'<br />
)<br />
cursor = db.cursor()</code></p>
<p><strong>Create a PostgreSQL Cursor (returning values in a Dict)</strong><br />
<code>import psycopg2<br />
import psycopg2.extras<br />
db = psycopg2.connect(<br />
host = '10.0.0.1',<br />
database = 'my_database',<br />
user = 'my_username',<br />
password = 'my_password'<br />
)<br />
cursor = db.cursor(cursor_factory=psycopg2.extras.DictCursor)</code></p>
<p><strong>Insert a Row Into a PostgreSQL Table</strong><br />
(Additional Reference: <a href="http://www.initd.org/psycopg/docs/usage.html#query-parameters">http://www.initd.org/psycopg/docs/usage.html#query-parameters</a>)<br />
<code>import psycopg2<br />
db = psycopg2.connect(<br />
host = '10.0.0.1',<br />
database = 'my_database',<br />
user = 'my_username',<br />
password = 'my_password'<br />
)<br />
cursor = db.cursor()<br />
# Define our values<br />
sku = 'asdf-123'<br />
cost = '7.99'<br />
# Insert into table without escaping values (not recommended)<br />
cursor.execute("INSERT INTO my_table (sku, price) VALUES ('" + sku + "', '" + str(cost) + "')")<br />
# Insert into table, properly escaping values (recommended)<br />
cursor.execute("INSERT INTO my_table (sku, price) VALUES (%s, %s)", (sku, cost,))<br />
# Another example inserting and properly escaping, while casting to appropriate data types<br />
cursor.execute("INSERT INTO my_table (sku, price) VALUES (%(str)s, %(int)s)", (sku, cost,))<br />
# After we've inserted our row, we must then perform a commit() to save the transaction.<br />
db.commit()<br />
</code></p>
<p><strong>Update an Existing Record Within a PostgreSQL Table</strong><br />
<code>import psycopg2<br />
db = psycopg2.connect(<br />
host = '10.0.0.1',<br />
database = 'my_database',<br />
user = 'my_username',<br />
password = 'my_password'<br />
)<br />
cursor = db.cursor()<br />
cursor.execute("UPDATE my_table SET first_name = %s, last_name = %s, email = %s", ('John', 'Doe', 'john@doe.com',))<br />
db.commit()<br />
</code></p>
<p><strong>Retrieve a Row From PostgreSQL Using Various Types of Cursors</strong><br />
<code>import psycopg2<br />
import psycopg2.extras<br />
db = psycopg2.connect(<br />
host = '10.0.0.1',<br />
database = 'my_database',<br />
user = 'my_username',<br />
password = 'my_password'<br />
)<br />
# Default cursor (returns nameless tuple)<br />
tuple_cursor = db.cursor()<br />
tuple_cursor.execute("SELECT * FROM my_table")<br />
my_row = tuple_cursor.fetchone()<br />
print my_row<br />
'''<br />
Will Return:<br />
('John', 'Doe', 'john@doe.com',)<br />
Example Reference:<br />
print my_row[0] # Prints: "John"<br />
'''<br />
# Named Tuple Cursor (returns a tuple which can be referenced by name or offset)<br />
dict_cursor = db.cursor(cursor_factory=psycopg2.extras.NamedTupleCursor)<br />
dict_cursor.execute("SELECT * FROM my_table")<br />
my_row = dict_cursor.fetchone()<br />
print my_row<br />
'''<br />
Will Return:<br />
{'first_name': 'John', 'last_name': 'Doe', 'email': 'john@doe.com'}<br />
Example Reference:<br />
print my_row.first_name # Prints: "John"<br />
print my_row[0] # Prints "John"<br />
'''<br />
# Dict Cursor (returns a Dict which can be referenced via named bracket access, or offset)<br />
dict_cursor = db.cursor(cursor_factory=psycopg2.extras.DictCursor)<br />
dict_cursor.execute("SELECT * FROM my_table")<br />
my_row = dict_cursor.fetchone()<br />
print my_row<br />
'''<br />
Will Return:<br />
{'first_name': 'John', 'last_name': 'Doe', 'email': 'john@doe.com'}<br />
Example Reference:<br />
print my_row['first_name'] # Prints: "John"<br />
print my_row[0] # Prints "John"<br />
'''<br />
# Real Dict Cursor (returns a Dict which can be referenced via named bracket access, or offset)<br />
dict_cursor = db.cursor(cursor_factory=psycopg2.extras.RealDictCursor)<br />
dict_cursor.execute("SELECT * FROM my_table")<br />
my_row = dict_cursor.fetchone()<br />
print my_row<br />
'''<br />
Will return:<br />
{'first_name': 'John', 'last_name': 'Doe', 'email': 'john@doe.com'}<br />
Example Reference:<br />
print my_row['first_name'] # Prints: "John"<br />
'''<br />
</code></p>
<p><strong>Iterate Over a Result Set</strong><br />
<code>import psycopg2<br />
import psycopg2.extras<br />
db = psycopg2.connect(<br />
host = '10.0.0.1',<br />
database = 'my_database',<br />
user = 'my_username',<br />
password = 'my_password'<br />
)<br />
cursor = db.cursor(cursor_factory=psycopg2.extras.RealDictCursor)<br />
cursor.execute("SELECT first_name, email FROM users WHERE last_name = %s", ('Doe',))<br />
for row in cursor:<br />
print '%s: %s' % (row['first_name'], row['email'],)<br />
'''<br />
Will Print:<br />
John: john@doe.com<br />
Jane: jane@doe.com<br />
Billy: billybob@doe.com<br />
'''<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.youlikeprogramming.com/2011/03/python-and-postgresql-a-quick-reference-to-psycopg2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

