<?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>Shaaf's Blog &#187; tips</title>
	<atom:link href="http://www.shaafshah.com/tag/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shaafshah.com</link>
	<description>Another bit in the wall</description>
	<lastBuildDate>Wed, 12 Aug 2009 14:28:51 +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>Generate XML &#8211; DBMS_XMLGEN</title>
		<link>http://www.shaafshah.com/2008/12/10/generate-xml-dbms_xmlgen/</link>
		<comments>http://www.shaafshah.com/2008/12/10/generate-xml-dbms_xmlgen/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 14:58:04 +0000</pubDate>
		<dc:creator>Shaaf Shah</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[DBMS_XMLGEN]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[utils]]></category>

		<guid isPermaLink="false">http://www.shaafshah.com/?p=137</guid>
		<description><![CDATA[On my way to my solution store just found this nice to use, old and easy feature. Possibilities endless, usage typically very easy. I used the following to generate XML from sqlplus: select dbms_xmlgen.getxml('select * from user') from dual; Output: < ROWSET > < ROW > < TNAME >Employee< / TNAME > < TABTYPE > [...]]]></description>
			<content:encoded><![CDATA[<p>On my way to my solution store just found this nice to use, old and easy feature.<br />
Possibilities endless, usage typically very easy.</p>
<p>I used the following to generate XML from sqlplus:</p>
<pre lang="SQL" line=1> select dbms_xmlgen.getxml('select * from user') from dual; </pre>
<p><strong>Output:</strong></p>
<pre lang="XML" line=1>
< ROWSET >
 < ROW >
  < TNAME >Employee< / TNAME >
  < TABTYPE > TABLE < / TABTYPE >
 < / ROW >
< / ROWSET >
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.shaafshah.com/2008/12/10/generate-xml-dbms_xmlgen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Doing the Locale &#8211; Danmark</title>
		<link>http://www.shaafshah.com/2008/11/12/doing-the-locale-danmark/</link>
		<comments>http://www.shaafshah.com/2008/11/12/doing-the-locale-danmark/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 12:52:08 +0000</pubDate>
		<dc:creator>Shaaf Shah</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[locale]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[utils]]></category>

		<guid isPermaLink="false">http://www.shaafshah.com/?p=110</guid>
		<description><![CDATA[The following illustrates how to get the Number format working with a danish locale. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 import java.text.NumberFormat; import java.util.Currency; import java.util.Locale; &#160; &#160; public class TestLocale &#123; &#160; public static void main&#40;String [...]]]></description>
			<content:encoded><![CDATA[<p>The following illustrates how to get the Number format working with a danish locale.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.text.NumberFormat</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.Currency</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.Locale</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TestLocale <span style="color: #009900;">&#123;</span>
&nbsp;
 <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> args<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
 <span style="color: #666666; font-style: italic;">// Create a Locale for Danmark</span>
 <span style="color: #003399;">Locale</span> DANMARK <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">Locale</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;da&quot;</span>,<span style="color: #0000ff;">&quot;DK&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
 <span style="color: #666666; font-style: italic;">// get the currency instance for this locale.</span>
 Currency krone <span style="color: #339933;">=</span> Currency.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span>DANMARK<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
 <span style="color: #666666; font-style: italic;">// Get a Number format for the locale.</span>
 <span style="color: #003399;">NumberFormat</span> krFormat <span style="color: #339933;">=</span> <span style="color: #003399;">NumberFormat</span>.<span style="color: #006633;">getCurrencyInstance</span><span style="color: #009900;">&#40;</span>DANMARK<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #666666; font-style: italic;">// A symbol for the currency</span>
 <span style="color: #003399;">String</span> symbol <span style="color: #339933;">=</span> krFormat.<span style="color: #006633;">getCurrency</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getSymbol</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;">// A double amount</span>
 <span style="color: #000066; font-weight: bold;">double</span> amount <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10000.25</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// print it out after formatting.</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>krFormat.<span style="color: #006633;">format</span><span style="color: #009900;">&#40;</span>amount<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.shaafshah.com/2008/11/12/doing-the-locale-danmark/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to read a file from the JAR?</title>
		<link>http://www.shaafshah.com/2008/10/31/how-to-read-a-file-from-the-jar/</link>
		<comments>http://www.shaafshah.com/2008/10/31/how-to-read-a-file-from-the-jar/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 18:57:54 +0000</pubDate>
		<dc:creator>Shaaf Shah</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[jar]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[utils]]></category>

		<guid isPermaLink="false">http://www.shaafshah.com/?p=103</guid>
		<description><![CDATA[Someone just asked me this question today. And I thought might as well put it down for info. 1 2 3 4 public TestReadFileFromJar&#40;&#41; throws FileNotFoundException, IOException &#123; InputStream is = getClass&#40;&#41;.getResource&#40;&#34;txtData/states.properties&#34;&#41;; read&#40;is&#41;; &#125; In the case above txtData is placed in the jar on the root. Remmember to add the path with the /]]></description>
			<content:encoded><![CDATA[<p>Someone just asked me this question today. And I thought might as well put it down for info.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"> <span style="color: #000000; font-weight: bold;">public</span> TestReadFileFromJar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">FileNotFoundException</span>, <span style="color: #003399;">IOException</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003399;">InputStream</span> is <span style="color: #339933;">=</span> getClass<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getResource</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;txtData/states.properties&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        read<span style="color: #009900;">&#40;</span>is<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>In the case above txtData is placed in the jar on the root. Remmember to add the path with the /</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaafshah.com/2008/10/31/how-to-read-a-file-from-the-jar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
