<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Bits of Wizardry</title>
	<atom:link href="https://bitsofwizardry.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://bitsofwizardry.wordpress.com</link>
	<description>Just random bits of IT wizardry</description>
	<lastBuildDate>Tue, 17 Jan 2012 14:51:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='bitsofwizardry.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://secure.gravatar.com/blavatar/17023319f68c7614b34c81070069986f?s=96&#038;d=https%3A%2F%2Fs-ssl.wordpress.com%2Fi%2Fbuttonw-com.png</url>
		<title>Bits of Wizardry</title>
		<link>https://bitsofwizardry.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://bitsofwizardry.wordpress.com/osd.xml" title="Bits of Wizardry" />
	<atom:link rel='hub' href='https://bitsofwizardry.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Unknown Runtime Error in Internet Explorer while using innerHTML</title>
		<link>https://bitsofwizardry.wordpress.com/2011/12/13/unknown-runtime-error-in-internet-explorer-while-using-innerhtml/</link>
		<comments>https://bitsofwizardry.wordpress.com/2011/12/13/unknown-runtime-error-in-internet-explorer-while-using-innerhtml/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 12:25:06 +0000</pubDate>
		<dc:creator>Nuno Furtado</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[microsoft browser]]></category>
		<category><![CDATA[runtime error]]></category>

		<guid isPermaLink="false">http://bitsofwizardry.wordpress.com/?p=229</guid>
		<description><![CDATA[This is one of those awesome &#8220;features&#8221; of the Microsoft browser. One which can send web developers of the deep end. Seems this error may happen due to several reasons: You are trying to put a block-level element inside an inline element like a div element inside a p element (see source 1) You are trying [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=229&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is one of those awesome &#8220;features&#8221; of the Microsoft browser. One which can send web developers of the deep end.</p>
<p>Seems this error may happen due to several reasons:</p>
<ul>
<li>You are trying to put a block-level element inside an inline element like a div element inside a p element (see source 1)</li>
<li>You are trying to set a table&#8217;s innerHTML (see source 2)</li>
<li>You are trying to put a form element inside an element that is itself inside another form</li>
</ul>
<div>By looking at those two sources you can easily fix the first two errors. On the third one i didn&#8217;t seem to find any sources for it so here it is.</div>
<div></div>
<div></div>
<div>I had a strange (read stupid) situation where i was trying to do the following</div>
<div></div>
<div>&lt;form&gt;</div>
<div>   &lt;div id=&#8221;container&#8221;&gt;</div>
<div>   &lt;/div&gt;</div>
<div>&lt;/form&gt;</div>
<div>&lt;script type=&#8221;text/javascript&#8221;&gt;</div>
<div>    &lt;!&#8211;</div>
<div>    var obj=document.getElementById(&#8216;container&#8217;);</div>
<div>    obj.innerHTML=&#8217;&lt;form&gt;&#8230;.. another form&lt;/form&gt;&#8217;;</div>
<div>    //&#8211;&gt;</div>
<div>&lt;/script&gt;</div>
<div></div>
<div>Note that div is already inside another form tag. The code above will throw our URE friend since i am trying to put a form tag inside another form tag. Chrome and Firefox jump over this problem by doing some kind of code clean up on render.</div>
<p>In my case i chose to  replace the original form completely or avoid using the form tag in these situations. All together this seems like a design problem as situations like this should not occur in the first place.</p>
<p>Note that if you run into trouble with the prototype Ajax functions you might want to set the onException option in order to see what is really happening. Though in this case the exceptions isn&#8217;t particularly helpful since it only states : Unknown Runtime Error</p>
<p>Sources:</p>
<ol>
<li><a href="http://blog.rakeshpai.me/2007/02/ies-unknown-runtime-error-when-using.html">http://blog.rakeshpai.me/2007/02/ies-unknown-runtime-error-when-using.html</a></li>
<li><a href="http://stackoverflow.com/questions/555965/javascript-replace-innerhtml-throwing-unknown-runtime-error#556020">http://stackoverflow.com/questions/555965/javascript-replace-innerhtml-throwing-unknown-runtime-error#556020</a></li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofwizardry.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofwizardry.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofwizardry.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofwizardry.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofwizardry.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofwizardry.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofwizardry.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofwizardry.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofwizardry.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofwizardry.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofwizardry.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofwizardry.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofwizardry.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofwizardry.wordpress.com/229/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=229&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://bitsofwizardry.wordpress.com/2011/12/13/unknown-runtime-error-in-internet-explorer-while-using-innerhtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/0ae90bf5614d28c2300cdcd1dfc9f503?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Peras</media:title>
		</media:content>
	</item>
		<item>
		<title>Extreme Exception Programming &#8211; Catch Every Exception and Work Around It</title>
		<link>https://bitsofwizardry.wordpress.com/2010/10/10/extreme-exception-programming-catch-every-exception-and-work-around-it/</link>
		<comments>https://bitsofwizardry.wordpress.com/2010/10/10/extreme-exception-programming-catch-every-exception-and-work-around-it/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 09:50:51 +0000</pubDate>
		<dc:creator>Nuno Furtado</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[WTF]]></category>
		<category><![CDATA[Code Smell]]></category>
		<category><![CDATA[Exception Handling]]></category>

		<guid isPermaLink="false">http://bitsofwizardry.wordpress.com/?p=216</guid>
		<description><![CDATA[I was reviewing the commit log from the last week commits and found this gem: try{ list = (ArrayList&#60;MyObject1&#62;)session.getAttribute(TEMPORARY_LIST); }catch (ClassCastException e){ if(add.getMyObjectCurrentItem()) != -1) try{ list = add.getOtherList().get(add.getMyObjectList()).getMyObjectList(); } catch(IndexOutOfBoundsException e2){ try{ list = add.getOtherList().get(add.getMyObjectList()-1).getMyObjectList();&#60; } catch(IndexOutOfBoundsException e3){ //Move On } } } Only thing that came to mind was WTF, after Showing it to my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=216&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">I was reviewing the commit log from the last week commits and found this gem:</div>
<blockquote>
<div>try{</div>
<div style="padding-left:30px;"><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">list = (ArrayList&lt;MyObject1&gt;)session.getAttribute(TEMPORARY_LIST);</span></div>
<div><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">}catch (ClassCastException e){</span></div>
<div style="padding-left:30px;"><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">if(add.getMyObjectCurrentItem()) != -1)</span></div>
<div style="padding-left:60px;"><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">try{</span></div>
<div style="padding-left:90px;"><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">list = add.getOtherList().get(add.getMyObjectList()).getMyObjectList();</span></div>
<div style="padding-left:60px;"><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">} catch(IndexOutOfBoundsException e2){</span></div>
<div style="padding-left:90px;"><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">try{</span></div>
<div style="padding-left:120px;"><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">list = add.getOtherList().get(add.getMyObjectList()-1).getMyObjectList();&lt;</span></div>
<div style="padding-left:90px;"><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">} catch(IndexOutOfBoundsException e3){</span></div>
<div style="padding-left:120px;"><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">//Move On</span></div>
<div style="padding-left:90px;"><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">}</span></div>
<div style="padding-left:60px;"><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">}</span></div>
<div><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">}</span></div>
</blockquote>
<div style="padding-left:30px;"><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;"><br />
</span></div>
<div>Only thing that came to mind was WTF, after Showing it to my boss he called it : Extreme Exception Programming.</div>
<div>I tweeted before about how in Enterprise we end up coding for every possible chance, but this is going too far.</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofwizardry.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofwizardry.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofwizardry.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofwizardry.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofwizardry.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofwizardry.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofwizardry.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofwizardry.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofwizardry.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofwizardry.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofwizardry.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofwizardry.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofwizardry.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofwizardry.wordpress.com/216/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=216&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://bitsofwizardry.wordpress.com/2010/10/10/extreme-exception-programming-catch-every-exception-and-work-around-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/0ae90bf5614d28c2300cdcd1dfc9f503?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Peras</media:title>
		</media:content>
	</item>
		<item>
		<title>Cygwin with Tabs using Console(and still portable)</title>
		<link>https://bitsofwizardry.wordpress.com/2010/05/04/cygwin-with-tabs-using-consoleand-still-portable/</link>
		<comments>https://bitsofwizardry.wordpress.com/2010/05/04/cygwin-with-tabs-using-consoleand-still-portable/#comments</comments>
		<pubDate>Tue, 04 May 2010 12:48:47 +0000</pubDate>
		<dc:creator>Nuno Furtado</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[cygwin portable]]></category>
		<category><![CDATA[window]]></category>

		<guid isPermaLink="false">http://bitsofwizardry.wordpress.com/?p=205</guid>
		<description><![CDATA[I recently found a way to use tabs with cygwin wich reduces the clutter in your taskbar. You can easily use Console to achieve this, unfortunally the instructions around the web assume your cygwin is installed in the default manner (not portable, not using rxvt as an emulator) so those of you using my instructions [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=205&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently found a way to use tabs with cygwin wich reduces the clutter in your taskbar. You can easily use Console to achieve this, unfortunally the instructions around the web assume your cygwin is installed in the default manner (not portable, not using rxvt as an emulator) so those of you using my instructions to set up a portable cygwin instalation will have a hard time getting Console to work with cygwin.</p>
<p>To use Console just make sure to set up the shell execution path to call /bin/bash and not rxvt.</p>
<p>In the spirit of keeping things portable you need to do the following:</p>
<ul>
<li>just edit your bat file and edit the last line:</li>
</ul>
<blockquote><p>%WD%\bin\run %WD%\bin\rxvt.exe -geometry 140&#215;40 -sl 1500 -fn &#8220;Courier New&#8221; -bg black -fg grey -sr -e %WD%\bin\bash &#8211;login -i</p></blockquote>
<p style="padding-left:60px;">to</p>
<blockquote><p>%WD%\bin\bash &#8211;login -i</p></blockquote>
<ul>
<li>move all Console files to the cygwin folder (same folder as CygwinPortable.exe)</li>
<li>make sure the path defined in the Console settings is relative(If you have trouble doing this just edit the console.xml file by hand):</li>
</ul>
<blockquote><p>Shell: &#8220;\App\Cygwin\cygwin.bat&#8221;</p>
<p>Startup Dir: &#8220;.&#8221;</p></blockquote>
<p>Console changes some of the window behavior but you can work around that by changing the settings:</p>
<ul>
<li>Mark Settings&gt;Behavior&gt;copy on select</li>
<li>Mark Settings&gt;Behavior&gt;Clear selection on copy</li>
<li>Settings&gt;Hotkeys&gt;Select Rename Tab on the list &gt; hit the clear button (this will make sure you can use the bash history)</li>
<li>There might be some mouse configurations i forgot that you can change.</li>
</ul>
<p>Links :</p>
<ul>
<li><a href="http://sourceforge.net/projects/console/">http://sourceforge.net/projects/console/</a></li>
</ul>
<p style="padding-left:60px;">
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofwizardry.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofwizardry.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofwizardry.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofwizardry.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofwizardry.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofwizardry.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofwizardry.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofwizardry.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofwizardry.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofwizardry.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofwizardry.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofwizardry.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofwizardry.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofwizardry.wordpress.com/205/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=205&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://bitsofwizardry.wordpress.com/2010/05/04/cygwin-with-tabs-using-consoleand-still-portable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/0ae90bf5614d28c2300cdcd1dfc9f503?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Peras</media:title>
		</media:content>
	</item>
		<item>
		<title>Split Windows and Shell Commands in VI</title>
		<link>https://bitsofwizardry.wordpress.com/2010/03/23/split-windows-and-shell-commands-in-vi/</link>
		<comments>https://bitsofwizardry.wordpress.com/2010/03/23/split-windows-and-shell-commands-in-vi/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 13:44:08 +0000</pubDate>
		<dc:creator>Nuno Furtado</dc:creator>
				<category><![CDATA[vi]]></category>
		<category><![CDATA[learning vi]]></category>
		<category><![CDATA[vi shell command]]></category>
		<category><![CDATA[vi split window]]></category>
		<category><![CDATA[vi viewport]]></category>

		<guid isPermaLink="false">http://bitsofwizardry.wordpress.com/?p=201</guid>
		<description><![CDATA[Been working on a project to learn Ruby and decided it was also a great opportunity to learn VIM. One of the gripes i was having was needing to close vim to open another file or run commands on the shell. I figured there should be another way to do this so i googled around and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=201&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">Been working on a project to learn Ruby and decided it was also a great opportunity to learn VIM. One of the gripes i was having was needing to close vim to open another file or run commands on the shell. I figured there should be another way to do this so i googled around and found a way to do it.</div>
<div id="_mcePaste">The sp command will split you window horizontally and spw will split it vertically. Let&#8217;s say you want to edit another file and split the window horizontally you use the command:</div>
<blockquote>
<div id="_mcePaste">:sp filename</div>
</blockquote>
<div>This will split the window with your new file on the top pane, and your old file on your bottom pane. You can also decide how big your new pane should be by supplying the line number before issuing the command:</div>
<blockquote>
<div>:20 sp filename</div>
</blockquote>
<div>The above command splits the window and gives your top pane 20 lines, leaving the rest for the bottom pane.</div>
<div id="_mcePaste">To switch between panes just us <strong>Ctrl-w [up|down|j|k]</strong>, you can also change the pane size with <strong>Ctrl-w[number+|number-]</strong> (where number is the number of lines to grow or shrink). If  you want to split the window without opening a new file just use <strong>Ctrl-ws</strong></div>
<div>A small note: you have other options besides split to edit multiple files since VI supports buffers easily, use :</div>
<blockquote>
<div>:e filename</div>
</blockquote>
<div>to open a new file in a new buffer and <strong>:bn</strong> or <strong>:bp </strong>to cycle between them.</div>
<div>Now i just needed a way to call the ruby interpreter on the shell without being forced to quit vi. Found its pretty easy to run code on the shell. just use :</div>
<blockquote>
<div id="_mcePaste">:!command</div>
</blockquote>
<div id="_mcePaste">So to run ruby on some file (on the folder i ran vi) i just typed</div>
<blockquote>
<div id="_mcePaste">:!ruby file</div>
</blockquote>
<div id="_mcePaste">Also you can run a command on the file in the current buffer by using the % character:</div>
<blockquote>
<div id="_mcePaste">:!ruby %</div>
</blockquote>
<p>Even though i used ruby as an example you can run any shell command you need.</p>
<p>For further explanations visit links bellow.</p>
<p>References:</p>
<ul>
<li><a href="http://www.linux.com/archive/feed/54157">http://www.linux.com/archive/feed/54157</a></li>
<li><a href="http://seerofsouls.com/wiki/How-Tos/SplitScreenVi">http://seerofsouls.com/wiki/How-Tos/SplitScreenVi</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofwizardry.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofwizardry.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofwizardry.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofwizardry.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofwizardry.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofwizardry.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofwizardry.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofwizardry.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofwizardry.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofwizardry.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofwizardry.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofwizardry.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofwizardry.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofwizardry.wordpress.com/201/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=201&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://bitsofwizardry.wordpress.com/2010/03/23/split-windows-and-shell-commands-in-vi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/0ae90bf5614d28c2300cdcd1dfc9f503?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Peras</media:title>
		</media:content>
	</item>
		<item>
		<title>No GTK# version when creating new project in MonoDevelop</title>
		<link>https://bitsofwizardry.wordpress.com/2010/02/07/no-gtk-version-when-creating-new-project-in-monodevelop/</link>
		<comments>https://bitsofwizardry.wordpress.com/2010/02/07/no-gtk-version-when-creating-new-project-in-monodevelop/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 15:01:17 +0000</pubDate>
		<dc:creator>Nuno Furtado</dc:creator>
				<category><![CDATA[fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[gtk-sharp]]></category>
		<category><![CDATA[MonoDevelop]]></category>

		<guid isPermaLink="false">http://bitsofwizardry.wordpress.com/?p=195</guid>
		<description><![CDATA[I&#8217;ve recently had to do a full reinstall of my development environment and ran into to some issues with monodevelop.One of these issues appeared when i tried to create a new gtk# application solution. MonoDevelop didn&#8217;t detect any gtk# versions on my system. I had this same issue on the first time i installed mono [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=195&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently had to do a full reinstall of my development environment and ran into to some issues with monodevelop.One of these issues appeared when i tried to create a new gtk# application solution. MonoDevelop didn&#8217;t detect any gtk# versions on my system.</p>
<p>I had this same issue on the first time i installed mono develop on my fedora box so this time i knew what i was looking for.</p>
<p>Installing  monodevelop with yum from fedora repositories isn&#8217;t enough to get you started on developing gtk# 2.0 apps. You are going to need to install one other package : gtk# 2.0 development. Just run : yum install gtk-sharp2-devel and this will solve your problem.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofwizardry.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofwizardry.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofwizardry.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofwizardry.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofwizardry.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofwizardry.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofwizardry.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofwizardry.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofwizardry.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofwizardry.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofwizardry.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofwizardry.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofwizardry.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofwizardry.wordpress.com/195/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=195&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://bitsofwizardry.wordpress.com/2010/02/07/no-gtk-version-when-creating-new-project-in-monodevelop/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/0ae90bf5614d28c2300cdcd1dfc9f503?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Peras</media:title>
		</media:content>
	</item>
		<item>
		<title>Cygwin Portable &#8211; (some) Linux power on a USB for Windows</title>
		<link>https://bitsofwizardry.wordpress.com/2010/01/29/cygwin-portable-some-linux-power-on-a-usb-for-windows/</link>
		<comments>https://bitsofwizardry.wordpress.com/2010/01/29/cygwin-portable-some-linux-power-on-a-usb-for-windows/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 17:44:10 +0000</pubDate>
		<dc:creator>Nuno Furtado</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[cygwin portable]]></category>

		<guid isPermaLink="false">http://bitsofwizardry.wordpress.com/?p=187</guid>
		<description><![CDATA[The Cygwin tools are ports of the popular GNU development tools for Microsoft Windows. They run thanks to the Cygwin library which provides the POSIX system calls and environment these programs expect. With these tools installed, it is possible to write Windows console or GUI applications that make use of significant parts of the POSIX [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=187&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<blockquote><p>The Cygwin tools are ports of the popular GNU development tools for Microsoft Windows. They run thanks to the Cygwin library which provides the POSIX system calls and environment these programs expect.</p>
<p>With these tools installed, it is possible to write Windows console or GUI applications that make use of significant parts of the POSIX API. As a result, it is possible to easily port many Unix programs without the need for extensive changes to the source code. This includes configuring and building most of the available GNU software (including the packages included with the Cygwin development tools themselves) as well as lots of BSD tools and packages (including OpenSSH). Even if the development tools are of little to no use to you, you may have interest in the many standard POSIX utilities provided with the package. They can be used from one of the provided Unix shells like bash, tcsh or zsh, as well as from the standard Windows command shell if you have to for some sad reason.</p>
<p style="text-align:right;"><em>From Cygwin FAQ</em></p>
</blockquote>
<p>If you google Cygwin Portable you will find several solutions:</p>
<ul>
<li><a href="http://sites.google.com/site/devinsezer/Home/software/portable-cygwin" target="_blank">Cygwin on portable storage devices (Devin Sezer)</a></li>
<li><a href="http://sourceforge.net/projects/cygwinportable/" target="_blank">Cygwin Portable Project</a></li>
<li><a href="http://blogs.linux.ie/fuzzbucket/2008/02/23/cygwin/" target="_blank">A Guide to Building a Portable Cygwin « fuzzix</a></li>
</ul>
<p>The one that actually worked for me came from the SourceForge project called CygwinPortable. This version is designed to work with the software bundle <a href="http://portableapps.com/" target="_blank">PortableApps</a>, but you could use it yourself outside the bundle (see bellow).</p>
<p>To install this software under the bundle just extract the zip file into your PortableAps folder, and on the gui launcher click on Options-&gt;Refresh App Icons. You will see two icons appear : one launches cygwin the other launches the setup.</p>
<p>I had some issues getting it to work as i wanted:</p>
<h3>Subversion information</h3>
<p>it seems the project mantainer packaged the software with svn files, you will need to remove all .svn folders from the exploded contents. I used SVN Cleaner for that.</p>
<h3>Outdated setup.exe</h3>
<h3><span style="font-weight:normal;font-size:13px;">The project seems to be unmaintained for some time now. Since that time a new version of cygwin came out which changed how setup.exe and setup.ini work. If you want to update or install new Cygwin packages you will need to download setup.exe from the cygwin page (see bellow for links) and replace the file cygwinsetup.exe in CygwinPortable\App\Cygwin\setup\ with the download one, i would advise you to replace it with a renamed version of the one download if you are using Portable Apps since the portable Apps link runs the original exe file. After doing this you can update and install new cygwin software without a hinch.</span></h3>
<h3><span style="font-weight:normal;font-size:13px;"><strong>Cygwin is locked to the drive you updated it on</strong></span></h3>
<p>After i updated some packages on my cygwin my shell window changed into a normal cmd dos windows, which besides being ugly had the huge disadvantage of not allowing me to copy and paste with a single click. I set out to find a solution and it came in the form of rxvt. %Explain rxvt%. The problem was in my cygwin.bat file.</p>
<p>If you go into CygwinPortable\App\Cygwin you will find a file named cygwin.bat. This batch file is responsible for starting up cygwin. For some reason this file will be changed when you update your cygwin version and (after the setup) it will look something like bellow:</p>
<pre>@echo off
F:
chdir F:\Software\Bin\PortableApps\CygwinPortable\App\Cygwin\bin
bash --login -i</pre>
<p>the above just runs bash.exe from your cygwin bin dir.  And worse it just locked your instalation of cygwin back to the current computer (see the two lines bellow @echo off).</p>
<p>In order to solve this all you have to do is open the cygwin portable zip file you downloaded and replace your cygwin.bat with the one provided in there. This will be able to determine the folder you are running CygwinPortable.exe from and open up your rxvt window.</p>
<p>For those of you wanting to use cygwin outside the PortableApps bundle all the above steps apply, but unfortunally there is some other work you need to do:</p>
<ol>
<li>All you need to work with cygwin is the folder &#8220;CygwinPortable\App\Cygwin&#8221; so pull that out</li>
<li>To run cygwin you will need to execute the cygwin.bat file inside that folder. But this file is configured to be run by the CygwinPortable.exe file and not on its own. So to get it to run on is own you will need to change the first line of the script to</li>
</ol>
<pre>for /F %%A in ('cd') do set WD=%%A</pre>
<p>Notice i only removed the last part of the line which was telling the batch file where the cygwin base folder was. Since with Portable Apps we run CygwinPortable.exe the base folder would be the file execution folder (\CygwinPortable\) plus &#8220;App\Cygwin&#8221;. But when running the batch file directly the base folder becomes the batch file execution folder. Ok this part was confusing, if you have any doubts let me know and i&#8217;ll revise this part</p>
<p>Enjoy your new powers.</p>
<p>External Links:</p>
<ul>
<li><a href="http://sourceforge.net/projects/cygwinportable/" target="_blank">Cygwin Portable Project</a> -</li>
<li><a href="http://www.cygwin.com/" target="_blank">Cygwin Home</a></li>
<li><a href="http://www.cygwin.com/setup.exe" target="_blank">Cygwin setup.exe</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofwizardry.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofwizardry.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofwizardry.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofwizardry.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofwizardry.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofwizardry.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofwizardry.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofwizardry.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofwizardry.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofwizardry.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofwizardry.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofwizardry.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofwizardry.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofwizardry.wordpress.com/187/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=187&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://bitsofwizardry.wordpress.com/2010/01/29/cygwin-portable-some-linux-power-on-a-usb-for-windows/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/0ae90bf5614d28c2300cdcd1dfc9f503?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Peras</media:title>
		</media:content>
	</item>
		<item>
		<title>Oracle Number to Java Object</title>
		<link>https://bitsofwizardry.wordpress.com/2010/01/19/oracle-number-to-java-object/</link>
		<comments>https://bitsofwizardry.wordpress.com/2010/01/19/oracle-number-to-java-object/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 20:02:17 +0000</pubDate>
		<dc:creator>Nuno Furtado</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[oracle data type]]></category>

		<guid isPermaLink="false">http://bitsofwizardry.wordpress.com/?p=177</guid>
		<description><![CDATA[Recently i needed to know what should be the JAVA Object to use when mapping against an oracle database. You can easily find alot of documentation on these mappings by searching google, but if you need to convert data types in the form of Number(p,s) (where p is precision and s is scale) you will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=177&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently i needed to know what should be the JAVA Object to use when mapping against an oracle database.</p>
<p>You can easily find alot of documentation on these mappings by searching google, but if you need to convert data types in the form of Number(p,s) (where p is precision and s is scale) you will have alot more trouble.</p>
<p>I ended up finding a reference to some old bea documentation(which got thrown offline when oracle took over bea) in an objectmix thread. So i put it here if anyone ever needs it:</p>
<blockquote><p>Column Definition Returned by getObject()<br />
NUMBER(P &lt;=3D 9)<br />
Integer</p>
<p>NUMBER(P &lt;=3D 18)<br />
Long</p>
<p>NUMBER(P &gt;=3D 19)<br />
BigDecimal</p>
<p>NUMBER(P &lt;=3D16, S &gt; 0)<br />
Double</p>
<p>NUMBER(P &gt;=3D 17, S &gt; 0)<br />
BigDecimal</p></blockquote>
<p>Links :</p>
<ul>
<li><a href="http://objectmix.com/weblogic/544948-mapping-oracle-number-18-java-int.html#post1930040" target="_blank">ObjectMix Thread</a></li>
<li><a href="http://edocs.bea.com/wle/wle42/drivers/oracle.htm" target="_blank">Old Bea Docs</a> (offline)</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofwizardry.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofwizardry.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofwizardry.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofwizardry.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofwizardry.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofwizardry.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofwizardry.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofwizardry.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofwizardry.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofwizardry.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofwizardry.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofwizardry.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofwizardry.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofwizardry.wordpress.com/177/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=177&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://bitsofwizardry.wordpress.com/2010/01/19/oracle-number-to-java-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/0ae90bf5614d28c2300cdcd1dfc9f503?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Peras</media:title>
		</media:content>
	</item>
		<item>
		<title>Why I Hate Weblogic Integration</title>
		<link>https://bitsofwizardry.wordpress.com/2009/12/22/why-i-hate-weblogic-integration/</link>
		<comments>https://bitsofwizardry.wordpress.com/2009/12/22/why-i-hate-weblogic-integration/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 17:26:04 +0000</pubDate>
		<dc:creator>Nuno Furtado</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[weblogic]]></category>
		<category><![CDATA[workshop]]></category>
		<category><![CDATA[taskplan]]></category>
		<category><![CDATA[weblogic integration]]></category>
		<category><![CDATA[weblogic workshop]]></category>
		<category><![CDATA[worklists]]></category>
		<category><![CDATA[workshop bugs]]></category>

		<guid isPermaLink="false">http://bitsofwizardry.wordpress.com/?p=172</guid>
		<description><![CDATA[This is a running post, as i go along with my current task of trying to use WLI i&#8217;m pretty sure i will be adding items to this list: WorkShop &#8211; What a bloated and buggy piece of crap. This is probably the worst part till now. I guess its too much to ask for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=172&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a running post, as i go along with my current task of trying to use WLI i&#8217;m pretty sure i will be adding items to this list:</p>
<ul>
<li>WorkShop &#8211; What a bloated and buggy piece of crap. This is probably the worst part till now.
<ul>
<li>I guess its too much to ask for a software to give reasons for not working but eh, here are some i have found:
<ul>
<li>Don&#8217;t put your workspace on a path with spaces or strange letters(like ó)</li>
<li>If trying to create to create a task plan workshop refuses to responde to next your trying to create the plan in the wrong folder</li>
</ul>
</li>
</ul>
</li>
<li>Transformations &#8211; grrrrrr&#8230; trying to debug these things is the worst thing i&#8217;ve had to do. want to know why? because i can&#8217;t&#8230;</li>
<li>It&#8217;s really hard to understand why we should even use this crap, and why do people around the world actually consider this as added value&#8230;.</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofwizardry.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofwizardry.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofwizardry.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofwizardry.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofwizardry.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofwizardry.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofwizardry.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofwizardry.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofwizardry.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofwizardry.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofwizardry.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofwizardry.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofwizardry.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofwizardry.wordpress.com/172/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=172&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://bitsofwizardry.wordpress.com/2009/12/22/why-i-hate-weblogic-integration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/0ae90bf5614d28c2300cdcd1dfc9f503?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Peras</media:title>
		</media:content>
	</item>
		<item>
		<title>Extending EJB3 Objects</title>
		<link>https://bitsofwizardry.wordpress.com/2009/12/02/extending-ejb3-objects/</link>
		<comments>https://bitsofwizardry.wordpress.com/2009/12/02/extending-ejb3-objects/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 21:26:21 +0000</pubDate>
		<dc:creator>Nuno Furtado</dc:creator>
				<category><![CDATA[ejb3]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[JPA]]></category>

		<guid isPermaLink="false">http://bitsofwizardry.wordpress.com/?p=164</guid>
		<description><![CDATA[Small and fast tip. In order to be able to extend an EJB Entity object (be it a main object or a primary key embbedable) you need to write the MappedSuperclass anotation in the super class. The following is taken from hibernate documentation : @MappedSuperclass public class BaseEntity { @Basic @Temporal(TemporalType.TIMESTAMP) public Date getLastUpdate() { [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=164&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Small and fast tip.</p>
<p>In order to be able to extend an EJB Entity object (be it a main object or a primary key embbedable) you need to write the <tt>MappedSuperclass anotation in the super class.</tt></p>
<p>The following is taken from hibernate documentation :</p>
<pre>@MappedSuperclass
public class BaseEntity {
    @Basic
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastUpdate() { ... }
    public String getLastUpdater() { ... }
    ...
}

@Entity class Order extends BaseEntity {
    @Id public Integer getId() { ... }
    ...
}
<strong>
</strong></pre>
<p>Some other notes taken from the documentation :</p>
<ul>
<li>Properties from superclasses not mapped as <tt>@MappedSuperclass</tt> are ignored;</li>
<li>The access type (field or methods), is inherited from the root entity, unless you use the Hibernate annotation <tt>@AccessType;</tt></li>
<li>Any class in the hierarchy non annotated with <tt>@MappedSuperclass</tt> nor <tt>@Entity</tt> will be ignored.</li>
</ul>
<p>Read the documentation to understand it fully : <a href="http://docs.jboss.org/hibernate/stable/annotations/reference/en/html/entity.html">http://docs.jboss.org/hibernate/stable/annotations/reference/en/html/entity.html</a> chapter 2.2.4.4</p>
<p><span style="text-decoration:underline;">Please note that even though i&#8217;ve used the Hibernate documentation as a reference this anotation also exists in javax.persistence so it can be used with JPA</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofwizardry.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofwizardry.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofwizardry.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofwizardry.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofwizardry.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofwizardry.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofwizardry.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofwizardry.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofwizardry.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofwizardry.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofwizardry.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofwizardry.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofwizardry.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofwizardry.wordpress.com/164/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=164&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://bitsofwizardry.wordpress.com/2009/12/02/extending-ejb3-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/0ae90bf5614d28c2300cdcd1dfc9f503?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Peras</media:title>
		</media:content>
	</item>
		<item>
		<title>Linux File Permissions</title>
		<link>https://bitsofwizardry.wordpress.com/2009/11/12/linux-file-permissions/</link>
		<comments>https://bitsofwizardry.wordpress.com/2009/11/12/linux-file-permissions/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 18:43:17 +0000</pubDate>
		<dc:creator>Nuno Furtado</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[chmod shorthand]]></category>
		<category><![CDATA[permissions]]></category>

		<guid isPermaLink="false">http://bitsofwizardry.wordpress.com/?p=147</guid>
		<description><![CDATA[I&#8217;ve allways struggled with how the linux permissions work. Recently i had another one of those times where i had to change a folders permission recursively so, once again, i googled it. The 5th result is a Google Code University Lab which actually explained it in a way i could get. This post is a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=147&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve allways struggled with how the linux permissions work. Recently i had another one of those times where i had to change a folders permission recursively so, once again, i <a href="http://www.google.pt/search?q=linux+permissions" target="_blank">googled </a>it. The 5th result is a <a href="http://code.google.com/edu/tools101/linux/ownership_permissions.html" target="_blank">Google Code University Lab</a> which actually explained it in a way i could get.</p>
<p><span style="text-decoration:underline;"><strong>This post is a simple sumary of the lab.</strong></span></p>
<p>When you do an ls -l on your console you will see something like the following</p>
<pre style="padding-left:30px;">drwxr-xr-x. 2 sapiens sapiens 4096 2009-10-19 14:20 Desktop
drwxr-xr-x. 2 sapiens sapiens 4096 2009-10-07 23:55 Documents
-rwxr-xr-x. 3 sapiens sapiens 4096 2009-11-05 18:42 myStuff.txt</pre>
<p>If you look at the start of the line you will notice a bunch of letters, they are actually 10 of them. At first when you are getting into linux these will seem like gibberish to you and you will basicly ignore them, but when you need to actually change the folders permissions you might want to try and learn how to read them.</p>
<p>The letters on that text means the following :</p>
<ul>
<li><strong>d</strong> &#8211; directory;</li>
<li><strong>r</strong> &#8211; read granted;</li>
<li><strong>w</strong> &#8211; write granted;</li>
<li><strong>x </strong>- execute granted;</li>
<li><strong>-</strong> &#8211; Not granted.</li>
</ul>
<p>Tha piece of text can be divided in 4 groups (1st group composed of the first caracther, then 3 groups of 3 characters each) :</p>
<ol>
<li>first letter states wether the file is a folder or not (if it has a &#8216;d&#8217; its a directory);</li>
<li>the next 3 letters states the permissions for the file Owner</li>
<li>The next 3 letters states the permissions for the Group</li>
<li>the last 3 letters states the permissions for Everyone</li>
</ol>
<p>So you&#8217;ve learned how to read it, but how do you change it well basicly you will be using chmod for that (just <em>man</em> it). As for the arguments you can either write the whole text for the given file or use the short hand.The following table shows you how to use short hand version to give permissions:</p>
<div style="text-align:center;">
<table style="height:196px;" width="456">
<tbody>
<tr>
<th> Number</th>
<th> Read (r)</th>
<th> Write (w)</th>
<th> Execute (x)</th>
</tr>
<tr style="text-align:center;">
<td style="text-align:center;">0</td>
<td style="text-align:center;">-</td>
<td style="text-align:center;">-</td>
<td style="text-align:center;">-</td>
</tr>
<tr>
<td style="text-align:center;">1</td>
<td style="text-align:center;">-</td>
<td style="text-align:center;">-</td>
<td style="text-align:center;">x</td>
</tr>
<tr>
<td style="text-align:center;">2</td>
<td style="text-align:center;">-</td>
<td style="text-align:center;">w</td>
<td style="text-align:center;">-</td>
</tr>
<tr>
<td style="text-align:center;">3</td>
<td style="text-align:center;">-</td>
<td style="text-align:center;">w</td>
<td style="text-align:center;">x</td>
</tr>
<tr>
<td style="text-align:center;">4</td>
<td style="text-align:center;">r</td>
<td style="text-align:center;">-</td>
<td style="text-align:center;">-</td>
</tr>
<tr>
<td style="text-align:center;">5</td>
<td style="text-align:center;">r</td>
<td style="text-align:center;">-</td>
<td style="text-align:center;">x</td>
</tr>
<tr>
<td style="text-align:center;">6</td>
<td style="text-align:center;">r</td>
<td style="text-align:center;">w</td>
<td style="text-align:center;">-</td>
</tr>
<tr>
<td style="text-align:center;">7</td>
<td style="text-align:center;">r</td>
<td style="text-align:center;">w</td>
<td style="text-align:center;">x</td>
</tr>
</tbody>
</table>
</div>
<p><strong><span style="text-decoration:underline;">Note: The above table was directly taken from the google lab, it also presents a good way to remember this table</span></strong></p>
<p>&nbsp;</p>
<p>In order to change a files permission you would write a 3 digit number, using the table above,  that defines the permissions for the groups mentioned above (owner, group, everyone else) for instance:</p>
<ul>
<li>644 would change a file/folder pemission to be read-only to everyone but the owner which would have full permissions</li>
<li> 755 (probably one of the most used) would make the file executable and readable to everyone and full permissions to the file owner.</li>
</ul>
<p>&nbsp;</p>
<p>External Links :</p>
<ul>
<li>Google Code Lab &#8211; <a href="http://code.google.com/edu/tools101/linux/ownership_permissions.html">Linux Ownership and Permissions Lab</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofwizardry.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofwizardry.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofwizardry.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofwizardry.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofwizardry.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofwizardry.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofwizardry.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofwizardry.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofwizardry.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofwizardry.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofwizardry.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofwizardry.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofwizardry.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofwizardry.wordpress.com/147/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofwizardry.wordpress.com&amp;blog=5716155&amp;post=147&amp;subd=bitsofwizardry&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>https://bitsofwizardry.wordpress.com/2009/11/12/linux-file-permissions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="https://secure.gravatar.com/avatar/0ae90bf5614d28c2300cdcd1dfc9f503?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Peras</media:title>
		</media:content>
	</item>
	</channel>
</rss>
