<?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>Insanityville</title>
	<atom:link href="http://insanityville.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://insanityville.com</link>
	<description>Where insane things happen</description>
	<lastBuildDate>Mon, 14 Dec 2009 16:14:44 +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>Who doesn&#8217;t like music?!</title>
		<link>http://insanityville.com/2009/12/who-doesnt-like-music/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=who-doesnt-like-music</link>
		<comments>http://insanityville.com/2009/12/who-doesnt-like-music/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 16:11:46 +0000</pubDate>
		<dc:creator>in-sanity</dc:creator>
				<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[Miscellaneous ramblings]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[kamasutra]]></category>
		<category><![CDATA[sheet music]]></category>

		<guid isPermaLink="false">http://insanityville.com/?p=2088</guid>
		<description><![CDATA[I&#8217;m a huge fan of the progressive metal band Dream Theater and I love to play their tunes on the guitar. Having said that, I know that sheet music is a little hard to understand for some people when they see the song notes for the first time. To come in the aid of those [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a huge fan of the progressive metal band Dream Theater and I love to play their tunes on the guitar. Having said that, I know that sheet music is a little hard to understand for some people when they see the song notes for the first time. To come in the aid of those people I&#8217;ll post a little helping hand that will arouse their interest for good old sheet music.</p>
<p style="text-align: center;"><a rel="attachment wp-att-2089" href="http://insanityville.com/2009/12/who-doesnt-like-music/musical-kamasutra/"><img class="size-medium wp-image-2089 aligncenter" title="musical-kamasutra" src="http://insanityville.com/wp-content/uploads/2009/12/musical-kamasutra-300x262.jpg" alt="musical-kamasutra" width="300" height="262" /></a></p>
<p style="text-align: left;">Enjoy reading this sheet music. I&#8217;m sure it sounds great.</p>
]]></content:encoded>
			<wfw:commentRss>http://insanityville.com/2009/12/who-doesnt-like-music/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Key shaped USB drive</title>
		<link>http://insanityville.com/2009/11/key-shaped-usb-drive/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=key-shaped-usb-drive</link>
		<comments>http://insanityville.com/2009/11/key-shaped-usb-drive/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 17:56:00 +0000</pubDate>
		<dc:creator>in-sanity</dc:creator>
				<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Miscellaneous ramblings]]></category>
		<category><![CDATA[key usb]]></category>
		<category><![CDATA[usb stick]]></category>

		<guid isPermaLink="false">http://insanityville.com/?p=2073</guid>
		<description><![CDATA[We all hang our USB flash drives to our key chains because we don&#8217;t want to forget to take them (I mean&#8230; you don&#8217;t normally forget to take your keys with you, right?!).
So, to have a more natural look of the key chain that should have keys hanging on it (you know.. it&#8217;s a key [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a rel="attachment wp-att-2074" href="http://insanityville.com/2009/11/key-shaped-usb-drive/lacie-key-storage/"><img class="size-medium wp-image-2074 aligncenter" title="lacie-key-storage" src="http://insanityville.com/wp-content/uploads/2009/11/lacie-key-storage-300x168.jpg" alt="lacie-key-storage" width="300" height="168" /></a>We all hang our USB flash drives to our key chains because we don&#8217;t want to forget to take them (I mean&#8230; you don&#8217;t normally forget to take your keys with you, right?!).</p>
<p style="text-align: justify;">So, to have a more natural look of the key chain that should have keys hanging on it (you know.. it&#8217;s a key chain, not a USB flash drive chain <img src='http://insanityville.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> ) you could use one of the above key models to preserve the natural look of things.</p>
<p style="text-align: justify;">Yeah&#8230; that&#8217;s nice&#8230;</p>
<p style="text-align: justify;"><span>7WVFXGVB94XB</span></p>
]]></content:encoded>
			<wfw:commentRss>http://insanityville.com/2009/11/key-shaped-usb-drive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The holidays are coming</title>
		<link>http://insanityville.com/2009/11/the-holidays-are-coming/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=the-holidays-are-coming</link>
		<comments>http://insanityville.com/2009/11/the-holidays-are-coming/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 19:33:46 +0000</pubDate>
		<dc:creator>in-sanity</dc:creator>
				<category><![CDATA[Sponsored]]></category>
		<category><![CDATA[christmas]]></category>
		<category><![CDATA[christmas cards]]></category>
		<category><![CDATA[presents]]></category>
		<category><![CDATA[shopping]]></category>

		<guid isPermaLink="false">http://insanityville.com/?p=2068</guid>
		<description><![CDATA[I can&#8217;t believe how time flies. It seems like yesterday I was on a shopping spree for Christmas gifts, outfits for the Christmas party, for the new years party, spreading the good old Christmas cheer to all friends and family in the whole process.
I like to have a Christmas present package. I mean I can&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t believe how time flies. It seems like yesterday I was on a shopping spree for Christmas gifts, outfits for the Christmas party, for the new years party, spreading the good old Christmas cheer to all friends and family in the whole process.</p>
<p>I like to have a Christmas present package. I mean I can&#8217;t just give someone just like that, I like to create some anticipation, some excitement. The package would include a nice present bag, a Christmas card and the present itself.</p>
<p>In order to further personalize the present,  I like to give <a href="http://www.123print.co.uk/Photo-Christmas-Cards">photo christmas cards</a>. Nothing shows that you really care than a Christmas card customized to appeal the person to whom you want to give it to.</p>
<p>I like to see the face of my loved ones as they open their presents. It makes all the effort worth while so&#8230; have a merry present shopping spree.</p>
]]></content:encoded>
			<wfw:commentRss>http://insanityville.com/2009/11/the-holidays-are-coming/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using the ArrayList object in JAVA</title>
		<link>http://insanityville.com/2009/11/using-the-arraylist-object-in-java/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=using-the-arraylist-object-in-java</link>
		<comments>http://insanityville.com/2009/11/using-the-arraylist-object-in-java/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 18:57:32 +0000</pubDate>
		<dc:creator>in-sanity</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Java tuts]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://insanityville.com/?p=2055</guid>
		<description><![CDATA[I continue sharing with you bits of code from my JAVA project picking up the thread left in Running SQL queries in JAVA. I remind you that I must develop a library application for school project.
So far I showed you how I connected to a database and how I manipulate data from that database. In [...]]]></description>
			<content:encoded><![CDATA[<p>I continue sharing with you bits of code from my JAVA project picking up the thread left in <a style="cursor: pointer;" title="Running SQL queries in JAVA" href="../2009/11/running-sql-queries-in-java/">Running SQL queries in JAVA</a>. I remind you that I must develop a library application for school project.</p>
<p>So far I showed you how I connected to a database and how I manipulate data from that database. In the interface I use scrolled combo boxes (JComboBox object) and scrolled lists (JList). This wouldn&#8217;t present a problem except these objects accept arrays. Because in my database I have a dynamic number of records and  I don&#8217;t know the exact number of rows of a query result I can&#8217;t use arrays. Instead I use the ArrayList object which allows me to create an array with an unknown number of items.</p>
<p>I will show you how I used this object below.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">private</span> <span style="color: #003399;">ArrayList</span> listaAutori<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #003399;">ArrayList</span> rawAutori <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">ArrayList</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #003399;">String</span> query <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT id_autor, nume, prenume FROM AUTOR&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #003399;">ResultSet</span> rs <span style="color: #339933;">=</span> st.<span style="color: #006633;">executeQuery</span> <span style="color: #009900;">&#40;</span>query<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>rs.<span style="color: #006633;">next</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000066; font-weight: bold;">int</span> id_autor <span style="color: #339933;">=</span> rs.<span style="color: #006633;">getInt</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;id_autor&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #003399;">String</span> rawNume <span style="color: #339933;">=</span> rs.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;nume&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #003399;">String</span> rawPrenume <span style="color: #339933;">=</span> rs.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;prenume&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #003399;">String</span> nume <span style="color: #339933;">=</span> <span style="color: #003399;">String</span>.<span style="color: #006633;">format</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;%s%s&quot;</span>,<span style="color: #003399;">Character</span>.<span style="color: #006633;">toUpperCase</span><span style="color: #009900;">&#40;</span>rawNume.<span style="color: #006633;">charAt</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>,
                                        rawNume.<span style="color: #006633;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #003399;">String</span> prenume <span style="color: #339933;">=</span> <span style="color: #003399;">String</span>.<span style="color: #006633;">format</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;%s%s&quot;</span>,
                                   <span style="color: #003399;">Character</span>.<span style="color: #006633;">toUpperCase</span><span style="color: #009900;">&#40;</span>rawPrenume.<span style="color: #006633;">charAt</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>,
                                        rawPrenume.<span style="color: #006633;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   rawAutori.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span>id_autor <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;: &quot;</span> <span style="color: #339933;">+</span> nume <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot; &quot;</span> <span style="color: #339933;">+</span> prenume<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
 <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">SQLException</span> sqlex<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #003399;">JOptionPane</span>.<span style="color: #006633;">showMessageDialog</span> <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>, sqlex<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #000000; font-weight: bold;">return</span> rawAutori<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The result of this function is then transformed to array using the following call</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">listaAutori<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">toArray</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>It&#8217;s no too complicated but very helpful. Hope you find this useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://insanityville.com/2009/11/using-the-arraylist-object-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speedy Internet just got faster</title>
		<link>http://insanityville.com/2009/11/speedy-internet-just-got-faster/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=speedy-internet-just-got-faster</link>
		<comments>http://insanityville.com/2009/11/speedy-internet-just-got-faster/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 15:31:22 +0000</pubDate>
		<dc:creator>in-sanity</dc:creator>
				<category><![CDATA[Sponsored]]></category>
		<category><![CDATA[charter internet package]]></category>
		<category><![CDATA[ultra 60]]></category>
		<category><![CDATA[ultra fast]]></category>

		<guid isPermaLink="false">http://insanityville.com/?p=2043</guid>
		<description><![CDATA[This is a Sponsored Post written by me on behalf of Charter. All opinions are 100% mine.
I must tell you a story about my ISP. I have an Internet plan that ensures, theoretically at least, that I have speed up to 10Mb/s. The fastest speed I ever downloaded something at was 1.4Mb/s. Can you imagine [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-2049" title="Ultra60small" src="http://insanityville.com/wp-content/uploads/2009/11/Ultra60small-300x121.jpg" alt="Ultra60small" width="300" height="121" /><em>This is a Sponsored Post written by me on behalf of <a rel="nofollow" href="http://socialspark.com/metrics/click/disclosure?slot_id=92952&amp;url=http%3A%2F%2Fwww.charter.com%2Fultra">Charter</a>. All opinions are 100% mine.</em></p>
<p>I must tell you a story about my ISP. I have an Internet plan that ensures, theoretically at least, that I have speed up to 10Mb/s. The fastest speed I ever downloaded something at was 1.4Mb/s. Can you imagine that? Just 1.4Mb/s with a theoretical bandwidth of 20 Mb/s?!</p>
<p>At that speed though, most users would be content. It&#8217;s a decent bandwidth but it&#8217;s not what it could be, what it should be.</p>
<p>If only I had a reliable provider that stepped up to the task, that offered what he promised. I can only imagine having a 60Mb/s bandwidth at my disposal!? I would be able to download a 700Mb movie in just two minutes, I could watch internet HD TV without lagging and interruptions in the data stream, play whatever game online without the worry that I might loose due to a big lag. Everything would happen much, much faster. Everything would happen when I would want it to happen and that would be awesome.</p>
<p>A great hit in Saint Louis, <a rel="nofollow" href="http://socialspark.com/metrics/click/post?slot_id=92952&amp;url=http%3A%2F%2Fwww.charter.com%2Fultra">charter ultra fast 60</a> it’s now available in Southern California and is rolling into the northeast as we write this and it won&#8217;t stop here. By the end of 2010 the majority of the charter footprint will benefit from this service. The promising part is that ven higher speeds are possible with the new phatband technology.</p>
<p>These speeds can only be achieved through the use of cable technology. It is a fact that if you limit the network bottlenecks cable is much faster that DSL modem connections.</p>
<p>One thing is for sure: when this service hits my ares, I&#8217;m getting it. No more lagging internet for me. I won&#8217;t have it anymore. I won&#8217;t!<br />
<a rel="nofollow" href="http://socialspark.com/metrics/click/disclosure?slot_id=92952&amp;url=http%3A%2F%2Fsocialspark.com%2Fcode_of_ethics"><img style="border:0" src="http://socialspark.com/metrics/view/post?slot_id=92952&amp;url=http%3A%2F%2Fsocialspark.com%2Fimages%2Fdisclosure_badges%2Fdisclosure_badge_grey_new.png" border="0" alt="SocialSpark Disclosure Badge" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://insanityville.com/2009/11/speedy-internet-just-got-faster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running SQL queries in JAVA</title>
		<link>http://insanityville.com/2009/11/running-sql-queries-in-java/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=running-sql-queries-in-java</link>
		<comments>http://insanityville.com/2009/11/running-sql-queries-in-java/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 14:39:09 +0000</pubDate>
		<dc:creator>in-sanity</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Java tuts]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://insanityville.com/?p=2028</guid>
		<description><![CDATA[In a previous post, Connecting to Access database in JAVA, I&#8217;ve shared a little snippet of code with you that showed how to connect to an Access DBMS.
With the connection alone you can&#8217;t do much to the database excepting the connection. We need to manipulate the data found in the database we connected to.
The manipulation [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous post, <a href="http://insanityville.com/2009/11/connecting-to-access-database-in-java/">Connecting to Access database in JAVA</a>, I&#8217;ve shared a little snippet of code with you that showed how to connect to an Access DBMS.</p>
<p>With the connection alone you can&#8217;t do much to the database excepting the connection. We need to manipulate the data found in the database we connected to.</p>
<p>The manipulation can be done in JAVA using Statement and PreparedStatement objects.</p>
<p>The difference between the two objects consists in the fact that the prepared statement represents a precompiled SQL statement.</p>
<p>Let&#8217;s assume a database test.mdb that has a table called users. The fields of the table are as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">id int<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> autoNumber;
user text;
password text;
lastname text;
firstname text;
address text;</pre></div></div>

<p>I think that the fields above suffice for this example.</p>
<p>Let&#8217;s begin with a simple query that lists the records in the table.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #003399;">Statement</span> st<span style="color: #339933;">;</span>
<span style="color: #003399;">String</span> user, lastname, firstname, address<span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// little counter variable</span>
<span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #003399;">Statement</span> st1 <span style="color: #339933;">=</span> con.<span style="color: #006633;">createStatement</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 st <span style="color: #339933;">=</span> st1<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">SQLException</span> sqlex<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 sqlex.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// print the error that occurred</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #003399;">String</span> query <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT * FROM users&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// the string that holds the query</span>
<span style="color: #003399;">ResultSet</span> rs <span style="color: #339933;">=</span> st.<span style="color: #006633;">executeQuery</span><span style="color: #009900;">&#40;</span>query<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// runs the query</span>
<span style="color: #000000; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span>rs.<span style="color: #006633;">next</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// walking though the result set</span>
 user <span style="color: #339933;">=</span> rs.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;username&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// retrieving String data</span>
 lastname <span style="color: #339933;">=</span> rs.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;lastname&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// retrieving String data</span>
 firstname <span style="color: #339933;">=</span> rs.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;firstname&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// retrieving String data</span>
 address <span style="color: #339933;">=</span> rs.<span style="color: #006633;">getString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;address&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// retrieving String data</span>
 <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;no.  |  username  |  lastname  |  firstname  |  address&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">++</span>i<span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;  |  &quot;</span> <span style="color: #339933;">+</span> user <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;  |  &quot;</span> <span style="color: #339933;">+</span> lastname <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;  |  &quot;</span> <span style="color: #339933;">+</span>
                                      firstname <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;  |  &quot;</span> <span style="color: #339933;">+</span> address<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The code above does the querying and the basic display of the returned data. I must say that the code is not tested and may need adjustments or corrections but should work based on e visual inspection <img src='http://insanityville.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .</p>
<p>The PreparedStatement object  extends the Statement object and it stores precompiled SQL statements. This object can then be used to  efficiently execute this statement multiple times. A simple example of usage is found on the java support website and I will post it here.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"> <span style="color: #003399;">PreparedStatement</span> pstmt <span style="color: #339933;">=</span> con.<span style="color: #006633;">prepareStatement</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;UPDATE EMPLOYEES
                                     SET SALARY = ? WHERE ID = ?&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 pstmt.<span style="color: #006633;">setBigDecimal</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">153833.00</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 pstmt.<span style="color: #006633;">setInt</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">110592</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>As you can see from the example above, you don&#8217;t need to declare the query each time you use different conditions in the query. You can just use the setter methods of the fields in the query.</p>
<p>I hope you have found this post useful. If you find any errors feel free to post a comment with the corrected code.</p>
]]></content:encoded>
			<wfw:commentRss>http://insanityville.com/2009/11/running-sql-queries-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ads on mobile networks? YES</title>
		<link>http://insanityville.com/2009/11/ads-on-mobile-networks-yes/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=ads-on-mobile-networks-yes</link>
		<comments>http://insanityville.com/2009/11/ads-on-mobile-networks-yes/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 18:29:22 +0000</pubDate>
		<dc:creator>in-sanity</dc:creator>
				<category><![CDATA[Sponsored]]></category>
		<category><![CDATA[advertising]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[smaato]]></category>

		<guid isPermaLink="false">http://insanityville.com/?p=2018</guid>
		<description><![CDATA[We all try to make some money using the web. Why the web? Because it&#8217;s the cheapest way of making business. You don&#8217;t need storage space, no employees, basically no more than a good idea. But how to make money from just an idea on the internet? I&#8217;m sure this will come as no surprise: [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><a rel="attachment wp-att-2017" href="http://insanityville.com/2009/11/ads-on-mobile-networks-yes/smaato-logo/"><img class="size-full wp-image-2017  alignright" title="smaato-logo" src="http://insanityville.com/wp-content/uploads/2009/11/smaato-logo.png" alt="smaato-logo" width="200" height="55" /></a>We all try to make some money using the web. Why the web? Because it&#8217;s the cheapest way of making business. You don&#8217;t need storage space, no employees, basically no more than a good idea. But how to make money from just an idea on the internet? I&#8217;m sure this will come as no surprise: you must have a website!</p>
<p style="text-align: left;">The traffic that the website generates can be converted into revenue by selling ad space on it. Pretty straight-forward so far.</p>
<p style="text-align: left;">On the advertiser side it&#8217;s not so easy. They must consider the target audience and design ads in such a way that the ad will not only generate traffic for their website but sales. Sometimes advertising on websites just doesn&#8217;t cut it so <a href="http://www.smaato.com">Smaato</a> came up with something even cooler. They developed a platform that manages and maximizes the ad ARPU (Average revenue per user) on the mobile users world wide. The partnered up with mobile social communities like: Mocospace, Zedge and Qeep as well as game and application developers.</p>
<p style="text-align: left;">It can&#8217;t be any closer to the user than their mobile phones, right?</p>
]]></content:encoded>
			<wfw:commentRss>http://insanityville.com/2009/11/ads-on-mobile-networks-yes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fadeout chair</title>
		<link>http://insanityville.com/2009/11/2011/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=2011</link>
		<comments>http://insanityville.com/2009/11/2011/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 16:00:33 +0000</pubDate>
		<dc:creator>in-sanity</dc:creator>
				<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[Miscellaneous ramblings]]></category>
		<category><![CDATA[Other stuff]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[chairs]]></category>
		<category><![CDATA[floating chair]]></category>

		<guid isPermaLink="false">http://insanityville.com/?p=2011</guid>
		<description><![CDATA[This is a cool chair design, wouldn&#8217;t you say? It was designed by Nendo and it&#8217;s made of wood and acrylic legs which are painted in such a manner that they appear to fade out, creating a floating effect. This design is suggestively named Fadeout Chair.
]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-2010" href="http://insanityville.com/2009/11/2011/fadeout/"><img class="aligncenter size-medium wp-image-2010" title="fadeout" src="http://insanityville.com/wp-content/uploads/2009/11/fadeout-300x300.jpg" alt="fadeout" width="300" height="300" /></a>This is a cool chair design, wouldn&#8217;t you say? It was designed by <a href="http://www.nendo.jp/en/works/detail.php?y=2009&amp;t=156" target="_blank">Nendo</a> and it&#8217;s made of wood and acrylic legs which are painted in such a manner that they appear to fade out, creating a floating effect. This design is suggestively named Fadeout Chair.</p>
]]></content:encoded>
			<wfw:commentRss>http://insanityville.com/2009/11/2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blazer Pentium 1.0 sneakers</title>
		<link>http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=blazer-pentium-1-0-sneakers</link>
		<comments>http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 12:58:13 +0000</pubDate>
		<dc:creator>in-sanity</dc:creator>
				<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[Miscellaneous ramblings]]></category>
		<category><![CDATA[Other stuff]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[sneakers]]></category>

		<guid isPermaLink="false">http://insanityville.com/?p=1960</guid>
		<description><![CDATA[
Here&#8217;s some pretty uncomfortable sneakers. They look pretty cool though, right?

[SOURCE]
]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a rel="attachment wp-att-1988" href="http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/001/"><img class="aligncenter size-medium wp-image-1988" title="001" src="http://insanityville.com/wp-content/uploads/2009/11/001-300x199.jpg" alt="001" width="300" height="199" /></a></p>
<p>Here&#8217;s some pretty uncomfortable sneakers. They look pretty cool though, right?</p>
<p><a rel="attachment wp-att-1961" href="http://insanityville.com/?attachment_id=1961"></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/001/' title='001'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/001-150x150.jpg" class="attachment-thumbnail" alt="" title="001" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/002/' title='002'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/002-150x150.jpg" class="attachment-thumbnail" alt="" title="002" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/003/' title='003'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/003-150x150.jpg" class="attachment-thumbnail" alt="" title="003" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/004/' title='004'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/004-150x150.jpg" class="attachment-thumbnail" alt="" title="004" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/005/' title='005'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/005-150x150.jpg" class="attachment-thumbnail" alt="" title="005" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/006/' title='006'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/006-150x150.jpg" class="attachment-thumbnail" alt="" title="006" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/007/' title='007'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/007-150x150.jpg" class="attachment-thumbnail" alt="" title="007" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/008/' title='008'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/008-150x150.jpg" class="attachment-thumbnail" alt="" title="008" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/009/' title='009'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/009-150x150.jpg" class="attachment-thumbnail" alt="" title="009" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/010/' title='010'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/010-150x150.jpg" class="attachment-thumbnail" alt="" title="010" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/011/' title='011'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/011-150x150.jpg" class="attachment-thumbnail" alt="" title="011" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/012/' title='012'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/012-150x150.jpg" class="attachment-thumbnail" alt="" title="012" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/013/' title='013'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/013-150x150.jpg" class="attachment-thumbnail" alt="" title="013" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/014/' title='014'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/014-150x150.jpg" class="attachment-thumbnail" alt="" title="014" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/015/' title='015'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/015-150x150.jpg" class="attachment-thumbnail" alt="" title="015" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/016/' title='016'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/016-150x150.jpg" class="attachment-thumbnail" alt="" title="016" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/017/' title='017'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/017-150x150.jpg" class="attachment-thumbnail" alt="" title="017" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/018/' title='018'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/018-150x150.jpg" class="attachment-thumbnail" alt="" title="018" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/019/' title='019'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/019-150x150.jpg" class="attachment-thumbnail" alt="" title="019" /></a>
<a href='http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/attachment/020/' title='020'><img width="150" height="150" src="http://insanityville.com/wp-content/uploads/2009/11/020-150x150.jpg" class="attachment-thumbnail" alt="" title="020" /></a>
</p>
<p>[<strong><a href="http://www.gabrieldishaw.com/sculptures/pages/035_blazer-pentium.html" target="_blank">SOURCE</a></strong>]</p>
]]></content:encoded>
			<wfw:commentRss>http://insanityville.com/2009/11/blazer-pentium-1-0-sneakers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Translate your documents fast and accurate</title>
		<link>http://insanityville.com/2009/11/translate-your-documents-fast-and-accurate/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=translate-your-documents-fast-and-accurate</link>
		<comments>http://insanityville.com/2009/11/translate-your-documents-fast-and-accurate/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 15:33:45 +0000</pubDate>
		<dc:creator>in-sanity</dc:creator>
				<category><![CDATA[Sponsored]]></category>
		<category><![CDATA[translation services]]></category>
		<category><![CDATA[translia]]></category>

		<guid isPermaLink="false">http://insanityville.com/?p=1119</guid>
		<description><![CDATA[With the new Web 2.0 services taking over traditional services such as logo generators, online document processors, online spreadsheets and others, a new service arises from the crowd.

Translia it&#8217;s a new service that streamlines the processes in such a manner that the clients can get translations with just a few clicks and the turnaround is [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><a rel="attachment wp-att-1120" href="http://insanityville.com/2009/11/translate-your-documents-fast-and-accurate/translialogo/"><img class="size-full wp-image-1120 alignleft" title="translialogo" src="http://insanityville.com/wp-content/uploads/2009/11/translialogo.png" alt="translialogo" width="183" height="64" /></a>With the new Web 2.0 services taking over traditional services such as logo generators, online document processors, online spreadsheets and others, a new service arises from the crowd.</p>
<p style="text-align: left;">
<p style="text-align: left;">Translia it&#8217;s a new service that streamlines the processes in such a manner that the clients can get translations with just a few clicks and the turnaround is shorter than any other services. For small translation jobs, clients may get finished translation on the same day or even in several hours. Pretty cool huh?!</p>
<p style="text-align: left;">
<p style="text-align: left;">Translia offers a plethora of options to select just the right prices and translators for your document translation projects, <a href="http://www.translia.com/business_card_translation">business card translation</a> projects and other translation projects. The quality of the translation is guaranteed by the fact that you&#8217;ll pay for the job only after you&#8217;re completely satisfied.</p>
<p style="text-align: left;">
<p style="text-align: left;">Give it a try, what do you say?</p>
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://insanityville.com/2009/11/translate-your-documents-fast-and-accurate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
