<?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>MemoSoup</title>
	<atom:link href="http://www.memosoup.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.memosoup.com</link>
	<description>Mix of the things I always forget</description>
	<lastBuildDate>Fri, 30 Jul 2010 15:59:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>NetBeans: use a radio button group</title>
		<link>http://www.memosoup.com/20100730/netbeans-use-a-radio-button-group.html</link>
		<comments>http://www.memosoup.com/20100730/netbeans-use-a-radio-button-group.html#comments</comments>
		<pubDate>Fri, 30 Jul 2010 14:03:13 +0000</pubDate>
		<dc:creator>JM</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[group]]></category>
		<category><![CDATA[radiobutton]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=309</guid>
		<description><![CDATA[<p>It&#8217;s possible to unite several radio buttons into the group. For example, if the buttons &#8220;On&#8221; and &#8220;Off&#8221; are in the same button group, only one of them will be active (which is logical).</p>
<p>To create the radio button group in NetBeans do the following:</p>

Use &#8220;Button group&#8221; from the components palette and put it into Your form. [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s possible to unite several radio buttons into the group. For example, if the buttons &#8220;On&#8221; and &#8220;Off&#8221; are in the same button group, only one of them will be active (which is logical).</p>
<p><strong>To create</strong> the radio button group in NetBeans do the following:</p>
<ol>
<li>Use &#8220;Button group&#8221; from the components palette and put it into Your form. It will be added as &#8220;non-visual&#8221;</li>
<p><img src="http://www.memosoup.com/wp-content/uploads/2010/07/rbgroup.jpg" alt="Button group component" /></p>
<li>Add the radio buttons to the group, changing their ButtonGroup property (combobox in the Properties)</li>
<p><img src="http://www.memosoup.com/wp-content/uploads/2010/07/rbprop.jpg" alt="RadioButton properties" />
</ol>
<p><strong>To remove</strong> the radio button group, go to the inspector window and remove radio button group there.</p>
<ul>
<li>
<p><img src="http://www.memosoup.com/wp-content/uploads/2010/07/rbgdrop.jpg" alt="Remove radio button group" />
</li>
]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20100730/netbeans-use-a-radio-button-group.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PDF file: set the bookmark</title>
		<link>http://www.memosoup.com/20100709/pdf-file-set-the-bookmark.html</link>
		<comments>http://www.memosoup.com/20100709/pdf-file-set-the-bookmark.html#comments</comments>
		<pubDate>Fri, 09 Jul 2010 12:58:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Documents]]></category>
		<category><![CDATA[bookmark]]></category>
		<category><![CDATA[PDF]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=292</guid>
		<description><![CDATA[<p>Strange enough, Adobe Acrobar Reader does not allow to put the user-defined bookmarks into the PDF file (and this is so simple and necessary thing!)</p>
<p>However, with the help of some &#8220;hack&#8221; the bookmarks still could be used.</p>
<p>Here is the trick:</p>

Go to PDF Hacks site and download the zip file with the javascript.
Extract the file bookmark_page.js from [...]]]></description>
			<content:encoded><![CDATA[<p>Strange enough, Adobe Acrobar Reader does not allow to put the user-defined bookmarks into the PDF file (and this is so simple and necessary thing!)</p>
<p>However, with the help of some &#8220;hack&#8221; the bookmarks still could be used.</p>
<p>Here is the trick:</p>
<ol>
<li>Go to <a href="http://www.pdfhacks.com/bookmark_page/">PDF Hacks</a> site and download the zip file with the javascript.</li>
<li>Extract the file bookmark_page.js from the archive</li>
<li>Copy the file bookmark_page.js to one of the following folders:
<ul>
<li><strong>%ProgramFiles%\Adobe\Reader\Javascripts</strong></li>
<li><strong>%AppData%\Adobe\Reader\Javascripts</strong></li>
</ul>
<p>Please, check the real installation path of the Acrobat software, it could be different on Your system.</li>
<li>Restart the Acrobat Reader</li>
</ol>
<p>Now You have 4 new menu items in the menu &#8220;View&#8221;. The first two could be called using shortcut &#8220;Alt-V-5&#8243; and &#8220;Alt-V-6&#8243; (for English version of Acrobat)<br />
<img src="http://www.memosoup.com/wp-content/uploads/2010/07/PDFbookmark.jpg" alt="Bookmarks in PDF" /></p>
<p>The bookmarks are not saved in the PDF itself, so they could be lost, if the PDF file is moved to some other location. </p>
<p>To <strong>uninstall</strong> the bookmark script, just remove <em>bookmark_page.js</em> from the <em>Javascripts</em> folder and restart the Acrobat Reader.</p>
<p>Some other PDF tricks could be found in this book:<br />
<a href="http://www.amazon.com/gp/product/0596006551?ie=UTF8&#038;tag=memosoup-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0596006551"><br />
<img border="0" src="http://www.memosoup.com/wp-content/uploads/2010/07/pdf_hacks.jpg"></a><br />
<img src="http://www.assoc-amazon.com/e/ir?t=memosoup-20&#038;l=as2&#038;o=1&#038;a=0596006551" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20100709/pdf-file-set-the-bookmark.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux: get the version of the system</title>
		<link>http://www.memosoup.com/20100618/linux-get-the-version-of-the-system.html</link>
		<comments>http://www.memosoup.com/20100618/linux-get-the-version-of-the-system.html#comments</comments>
		<pubDate>Fri, 18 Jun 2010 15:41:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[distro]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=289</guid>
		<description><![CDATA[<p>Get the version of the distro:</p>
cat /etc/issue

cat /etc/*-release
<p>Get the kernel [...]]]></description>
			<content:encoded><![CDATA[<p>Get the version of the distro:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>issue<br />
<br />
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/*</span>-release</div></div>
<p>Get the kernel version:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">uname</span> <span style="color: #660033;">-r</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20100618/linux-get-the-version-of-the-system.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl: get file checksum</title>
		<link>http://www.memosoup.com/20100608/perl-get-file-checksum.html</link>
		<comments>http://www.memosoup.com/20100608/perl-get-file-checksum.html#comments</comments>
		<pubDate>Tue, 08 Jun 2010 15:12:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[checksum]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[md5]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=286</guid>
		<description><![CDATA[use Digest::MD5;
use IO::File;

my $chk = Digest::MD5-&#62;new&#40;&#41;;

foreach my $file &#40;@ARGV&#41;
&#123;
&#160; &#160; $chk-&#62;addfile&#40;IO::File-&#62;new&#40;$file&#41;&#41;;

&#160; &#160; print &#34;$file -&#62; &#34;,$chk-&#62;hexdigest,&#34;\n&#34;;
&#125;
<p>The additional details could be found on [...]]]></description>
			<content:encoded><![CDATA[<div class="codecolorer-container perl default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">use</span> Digest<span style="color: #339933;">::</span><span style="color: #006600;">MD5</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> IO<span style="color: #339933;">::</span><span style="color: #006600;">File</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$chk</span> <span style="color: #339933;">=</span> Digest<span style="color: #339933;">::</span><span style="color: #006600;">MD5</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$file</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #000000; font-weight: bold;">ARGV</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">$chk</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">addfile</span><span style="color: #009900;">&#40;</span>IO<span style="color: #339933;">::</span><span style="color: #006600;">File</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">new</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;$file -&gt; &quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$chk</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">hexdigest</span><span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>The additional details could be found on <a href="http://www.ibm.com/developerworks/aix/library/au-satsystemvalidity/index.html?S_TACT=105AGX99">IBM site</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20100608/perl-get-file-checksum.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install javadoc for NetBeans</title>
		<link>http://www.memosoup.com/20100514/install-javadoc-for-netbeans.html</link>
		<comments>http://www.memosoup.com/20100514/install-javadoc-for-netbeans.html#comments</comments>
		<pubDate>Fri, 14 May 2010 11:51:14 +0000</pubDate>
		<dc:creator>JM</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[javadoc]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=279</guid>
		<description><![CDATA[<p>Java documentation is not included neither in NetBeans installation, nor in &#8220;standard&#8221; Java SDK installation.</p>
<p>However, it&#8217;s possible to download it manually and add to the NetBeans IDE.</p>

Get the Java Documentation (currently &#8220;Java SE 6 Documentation&#8221;) from Sun site.
 Start NetBeans
 Select menu item &#8220;Tools-&#62;Java platforms&#8221;, then click &#8220;Javadoc&#8221; tab
 Click &#8220;Add Zip/Folder&#8221; button and select the [...]]]></description>
			<content:encoded><![CDATA[<p>Java documentation is not included neither in NetBeans installation, nor in &#8220;standard&#8221; Java SDK installation.</p>
<p>However, it&#8217;s possible to download it manually and add to the NetBeans IDE.</p>
<ol>
<li>Get the Java Documentation (currently &#8220;Java SE 6 Documentation&#8221;) from <a href="http://java.sun.com/javase/downloads/index.jsp">Sun site</a>.</li>
<li> Start NetBeans</li>
<li> Select menu item &#8220;Tools-&gt;Java platforms&#8221;, then click &#8220;Javadoc&#8221; tab</li>
<li> Click &#8220;Add Zip/Folder&#8221; button and select the path to the downloaded Zip-file</li>
</ol>
<p><img src="http://www.memosoup.com/wp-content/uploads/2010/05/javadoc.jpg" alt="NetBeans Javadoc window" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20100514/install-javadoc-for-netbeans.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deactivate social services in Google Reader</title>
		<link>http://www.memosoup.com/20100505/deactivate-social-services-in-google-reader.html</link>
		<comments>http://www.memosoup.com/20100505/deactivate-social-services-in-google-reader.html#comments</comments>
		<pubDate>Wed, 05 May 2010 13:42:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[deactivate]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[reader]]></category>
		<category><![CDATA[social]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=276</guid>
		<description><![CDATA[<p>There is a small piece of code (&#8220;bookmarklet&#8221;), which deactivates social services in Google Reader.</p>
<p>Just go to Google Reader and put into the browser command line the following:</p>
javascript:antisocial&#40;'true'&#41;
<p>If it&#8217;s necessary to reactivate it, use [...]]]></description>
			<content:encoded><![CDATA[<p>There is a small piece of code (&#8220;bookmarklet&#8221;), which deactivates social services in Google Reader.</p>
<p>Just go to <a href=http://www.google.com/reader>Google Reader</a> and put into the browser command line the following:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">javascript<span style="color: #339933;">:</span>antisocial<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'true'</span><span style="color: #009900;">&#41;</span></div></div>
<p>If it&#8217;s necessary to reactivate it, use the following:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">javascript<span style="color: #339933;">:</span>antisocial<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'false'</span><span style="color: #009900;">&#41;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20100505/deactivate-social-services-in-google-reader.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java: minimize Application window</title>
		<link>http://www.memosoup.com/20100429/java-minimize-application-window.html</link>
		<comments>http://www.memosoup.com/20100429/java-minimize-application-window.html#comments</comments>
		<pubDate>Thu, 29 Apr 2010 14:37:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[minimize]]></category>
		<category><![CDATA[window]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=273</guid>
		<description><![CDATA[<p>The following method could be used to minimize application window, if java.awt.Frame or its subclass is used:</p>
<p>public void setState(int state)
Parameters:
    state &#8211; Frame.ICONIFIED if this frame is in iconic state;
            Frame.NORMAL if this frame is in normal state.</p>
<p>Example:</p>
// Close window on ESC
// [...]]]></description>
			<content:encoded><![CDATA[<p>The following method could be used to minimize application window, if java.awt.Frame or its subclass is used:</p>
<p>public void <strong>setState</strong>(int state)<br />
Parameters:<br />
    state &#8211; Frame.ICONIFIED if this frame is in iconic state;<br />
            Frame.NORMAL if this frame is in normal state.</p>
<p>Example:</p>
<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// Close window on ESC</span><br />
<span style="color: #666666; font-style: italic;">// use it in the constructor of the window, extending JFrame</span><br />
<span style="color: #666666; font-style: italic;">//</span><br />
<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Akeystroke+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">KeyStroke</span></a> stroke <span style="color: #339933;">=</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Akeystroke+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">KeyStroke</span></a>.<span style="color: #006633;">getKeyStroke</span><span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Akeyevent+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">KeyEvent</span></a>.<span style="color: #006633;">VK_ESCAPE</span>, <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
rootPane.<span style="color: #006633;">registerKeyboardAction</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aactionlistener+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">ActionListener</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> actionPerformed<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aactionevent+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">ActionEvent</span></a> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setState<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aframe+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Frame</span></a>.<span style="color: #006633;">ICONIFIED</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> , stroke, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajcomponent+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">JComponent</span></a>.<span style="color: #006633;">WHEN_IN_FOCUSED_WINDOW</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20100429/java-minimize-application-window.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: eval function</title>
		<link>http://www.memosoup.com/20100211/oracle-eval-function.html</link>
		<comments>http://www.memosoup.com/20100211/oracle-eval-function.html#comments</comments>
		<pubDate>Thu, 11 Feb 2010 13:40:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[eval]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=271</guid>
		<description><![CDATA[<p>The function takes some expression as the argument and executes it, returning output in the varchar string</p>
CREATE OR REPLACE FUNCTION eval &#40;expr VARCHAR2&#41; RETURN VARCHAR2
AS 
&#160; ret VARCHAR2&#40;4000&#41;;
BEGIN
&#160; EXECUTE IMMEDIATE 'begin :result := ' &#124;&#124; expr &#124;&#124; '; end;' USING OUT ret;
&#160; RETURN ret;
END;
/
<p>The discussion and examples could be [...]]]></description>
			<content:encoded><![CDATA[<p>The function takes some expression as the argument and executes it, returning output in the varchar string</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">CREATE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">OR</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">REPLACE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FUNCTION</span> eval <span style="color: #66cc66;">&#40;</span>expr <span style="color: #993333; font-weight: bold; text-transform: uppercase;">VARCHAR2</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">RETURN</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">VARCHAR2</span><br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">AS</span> <br />
&nbsp; ret <span style="color: #993333; font-weight: bold; text-transform: uppercase;">VARCHAR2</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">4000</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">BEGIN</span><br />
&nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">EXECUTE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">IMMEDIATE</span> <span style="color: #ff0000;">'begin :result := '</span> <span style="color: #66cc66;">||</span> expr <span style="color: #66cc66;">||</span> <span style="color: #ff0000;">'; end;'</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">USING</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">OUT</span> ret;<br />
&nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">RETURN</span> ret;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span>;<br />
<span style="color: #66cc66;">/</span></div></div>
<p>The discussion and examples could be found <a href="http://www.adp-gmbh.ch/blog/2005/may/5.html">there</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20100211/oracle-eval-function.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: list of the system events</title>
		<link>http://www.memosoup.com/20100210/oracle-list-of-the-system-events.html</link>
		<comments>http://www.memosoup.com/20100210/oracle-list-of-the-system-events.html#comments</comments>
		<pubDate>Wed, 10 Feb 2010 16:17:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[event]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=269</guid>
		<description><![CDATA[<p>This piece of code show the list of events, set in the Oracle database</p>
SET serveroutput ON
&#160;DECLARE
&#160; event_level NUMBER;
&#160;BEGIN
&#160; dbms_output.enable&#40;20000&#41; ;
&#160; FOR i IN 10000..33999 LOOP
&#160; &#160; &#160;sys.dbms_system.read_ev&#40;i,event_level&#41;;
&#160; &#160; &#160;IF &#40;event_level &#62; 0&#41; THEN
&#160; &#160; &#160; &#160; dbms_output.put_line&#40;'Event '&#124;&#124;to_char&#40;i&#41;&#124;&#124;' set at level '&#124;&#124;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;TO_CHAR&#40;event_level&#41;&#41;;
&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>This piece of code show the list of events, set in the Oracle database</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SET</span> serveroutput <span style="color: #993333; font-weight: bold; text-transform: uppercase;">ON</span><br />
&nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">DECLARE</span><br />
&nbsp; event_level <span style="color: #993333; font-weight: bold; text-transform: uppercase;">NUMBER</span>;<br />
&nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">BEGIN</span><br />
&nbsp; dbms_output.enable<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20000</span><span style="color: #66cc66;">&#41;</span> ;<br />
&nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FOR</span> i <span style="color: #993333; font-weight: bold; text-transform: uppercase;">IN</span> <span style="color: #cc66cc;">10000</span>..33999 <span style="color: #993333; font-weight: bold; text-transform: uppercase;">LOOP</span><br />
&nbsp; &nbsp; &nbsp;sys.dbms_system.read_ev<span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">,</span>event_level<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">IF</span> <span style="color: #66cc66;">&#40;</span>event_level <span style="color: #66cc66;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">THEN</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; dbms_output.put_line<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Event '</span><span style="color: #66cc66;">||</span>to_char<span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">||</span><span style="color: #ff0000;">' set at level '</span><span style="color: #66cc66;">||</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">TO_CHAR</span><span style="color: #66cc66;">&#40;</span>event_level<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">IF</span>;<br />
&nbsp; <span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">LOOP</span>;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span>;</div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20100210/oracle-list-of-the-system-events.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: list of the running transactions</title>
		<link>http://www.memosoup.com/20100209/oracle-list-of-the-running-transactions.html</link>
		<comments>http://www.memosoup.com/20100209/oracle-list-of-the-running-transactions.html#comments</comments>
		<pubDate>Tue, 09 Feb 2010 12:58:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[run]]></category>
		<category><![CDATA[transaction]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=267</guid>
		<description><![CDATA[<p>This query shows SID, username and start time of the running transaction.
In addition, number of the used blocks is shown.</p>
SELECT a.sid, a.status, a.username, b.xidusn, b.used_urec, b.used_ublk, b.START_TIME
FROM v$session a, v$transaction b
WHERE a.saddr = b.ses_addr
ORDER BY [...]]]></description>
			<content:encoded><![CDATA[<p>This query shows SID, username and start time of the running transaction.<br />
In addition, number of the used blocks is shown.</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> a.sid<span style="color: #66cc66;">,</span> a.status<span style="color: #66cc66;">,</span> a.username<span style="color: #66cc66;">,</span> b.xidusn<span style="color: #66cc66;">,</span> b.used_urec<span style="color: #66cc66;">,</span> b.used_ublk<span style="color: #66cc66;">,</span> b.START_TIME<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> v$session a<span style="color: #66cc66;">,</span> v$transaction b<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">WHERE</span> a.saddr <span style="color: #66cc66;">=</span> b.ses_addr<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">ORDER</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">BY</span> START_TIME <span style="color: #993333; font-weight: bold; text-transform: uppercase;">DESC</span>;</div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20100209/oracle-list-of-the-running-transactions.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
