<?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>Electrotek</title>
	<atom:link href="http://electrotek.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://electrotek.wordpress.com</link>
	<description>From programming to day dreaming</description>
	<lastBuildDate>Wed, 25 Jan 2012 09:45:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='electrotek.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Electrotek</title>
		<link>http://electrotek.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://electrotek.wordpress.com/osd.xml" title="Electrotek" />
	<atom:link rel='hub' href='http://electrotek.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Half-marathon in 4 weeks? &#8211; Easy</title>
		<link>http://electrotek.wordpress.com/2011/09/15/half-marathon-in-4-weeks-easy/</link>
		<comments>http://electrotek.wordpress.com/2011/09/15/half-marathon-in-4-weeks-easy/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 17:59:22 +0000</pubDate>
		<dc:creator>Viktoras Agejevas</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[half-marathon]]></category>
		<category><![CDATA[marathon]]></category>

		<guid isPermaLink="false">http://electrotek.wordpress.com/?p=431</guid>
		<description><![CDATA[Others might say it&#8217;s dangerous due to a high risk of injuries, etc., but for me it was a very pleasant experience. I had four weeks for my preparation: did 13 runs, 2 of them were more than 10 km long. I did my first half-marathon at a relaxed, easy pace; finished with 1:51:28 (Update: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=431&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Others might say it&#8217;s dangerous due to a high risk of injuries, etc., but for me it was a very pleasant experience. I had four weeks for my preparation: did 13 runs, 2 of them were more than 10 km long. </p>
<p>I did my first <a href="http://www.vilniausmaratonas.lt/">half-marathon</a> at a relaxed, easy pace; finished with <em>1:51:28</em> (Update: real calculated time is <em>1:50:12</em>). No injuries, no problems, just had a very good time :) </p>
<p><a href="http://electrotek.files.wordpress.com/2011/09/picture-132-small.jpg"><img src="http://electrotek.files.wordpress.com/2011/09/picture-132-small.jpg?w=630" alt="" title="Half-marathon finish"   class="aligncenter size-full wp-image-432" /></a></p>
<p>I have started thinking about doing a full marathon, will probably require_a_bit_more_preparation&#8230;</p>
<br />Filed under: <a href='http://electrotek.wordpress.com/category/personal/'>Personal</a> Tagged: <a href='http://electrotek.wordpress.com/tag/half-marathon/'>half-marathon</a>, <a href='http://electrotek.wordpress.com/tag/marathon/'>marathon</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/electrotek.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/electrotek.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/electrotek.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/electrotek.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/electrotek.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/electrotek.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/electrotek.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/electrotek.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/electrotek.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/electrotek.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/electrotek.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/electrotek.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/electrotek.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/electrotek.wordpress.com/431/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=431&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://electrotek.wordpress.com/2011/09/15/half-marathon-in-4-weeks-easy/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/19f012610d4bef7304210436bd7f468e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Electro</media:title>
		</media:content>

		<media:content url="http://electrotek.files.wordpress.com/2011/09/picture-132-small.jpg" medium="image">
			<media:title type="html">Half-marathon finish</media:title>
		</media:content>
	</item>
		<item>
		<title>Save changes in Vim even if you forgot to sudo</title>
		<link>http://electrotek.wordpress.com/2011/07/06/save-changes-in-vim-even-if-you-forgot-to-sudo/</link>
		<comments>http://electrotek.wordpress.com/2011/07/06/save-changes-in-vim-even-if-you-forgot-to-sudo/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 16:07:56 +0000</pubDate>
		<dc:creator>Viktoras Agejevas</dc:creator>
				<category><![CDATA[Blah blah]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[tee]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://electrotek.wordpress.com/?p=412</guid>
		<description><![CDATA[If you forgot to run Vim with sudo and don&#8217;t have permissions to save a file, you can use a little trick from within Vim: Write buffer [w] to external (system) command [!], the command is [sudo tee] and argument for tee is current filename [%]. Usually you would also redirect tee output somewhere (since [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=412&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you forgot to run Vim with sudo and don&#8217;t have permissions to save a file, you can use a little trick from within Vim:</p>
<p><pre class="brush: bash; gutter: false;">:w ! sudo tee % </pre><br />
Write buffer [<strong>w</strong>] to external (system) command [<strong>!</strong>], the command is [<strong>sudo tee</strong>] and argument for tee is current filename [<strong>%</strong>]. Usually you would also redirect tee output somewhere (since it splits standard input by writing into argument file and standard output), in our case it could be tee % &gt; /dev/null, but I don&#8217;t think it&#8217;s necessary here.</p>
<p>Probably a known thing, but anyway, love it, so just wanted to share&#8230;</p>
<br />Filed under: <a href='http://electrotek.wordpress.com/category/blah-blah/'>Blah blah</a>, <a href='http://electrotek.wordpress.com/category/linux/'>Linux</a> Tagged: <a href='http://electrotek.wordpress.com/tag/sudo/'>sudo</a>, <a href='http://electrotek.wordpress.com/tag/tee/'>tee</a>, <a href='http://electrotek.wordpress.com/tag/vim/'>vim</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/electrotek.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/electrotek.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/electrotek.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/electrotek.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/electrotek.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/electrotek.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/electrotek.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/electrotek.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/electrotek.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/electrotek.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/electrotek.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/electrotek.wordpress.com/412/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/electrotek.wordpress.com/412/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/electrotek.wordpress.com/412/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=412&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://electrotek.wordpress.com/2011/07/06/save-changes-in-vim-even-if-you-forgot-to-sudo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/19f012610d4bef7304210436bd7f468e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Electro</media:title>
		</media:content>
	</item>
		<item>
		<title>JDK 7 new language features (Project Coin)</title>
		<link>http://electrotek.wordpress.com/2011/04/30/jdk-7-and-project-coin/</link>
		<comments>http://electrotek.wordpress.com/2011/04/30/jdk-7-and-project-coin/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 23:04:43 +0000</pubDate>
		<dc:creator>Viktoras Agejevas</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jdk7]]></category>
		<category><![CDATA[jre7]]></category>
		<category><![CDATA[project coin]]></category>

		<guid isPermaLink="false">http://electrotek.wordpress.com/?p=374</guid>
		<description><![CDATA[Tonight I&#8217;ve played a bit with JDK 7 small language changes. I find some of them quite handy. The new stuff: I&#8217;ve always missed this one &#8211; strings in switch: Readability counts; underscores in numeric literals and nice binary literals (I personally think that the underscores in number literals look a bit ugly/hacky/unclean): Less code [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=374&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://electrotek.files.wordpress.com/2011/04/duke-plug.png?w=630" alt="" title="duke-plug"   class="alignnone size-full wp-image-403" style="float:right;border:none;background:none;margin:0;" />Tonight I&#8217;ve played a bit with JDK 7 <a href="http://openjdk.org/projects/coin/">small language changes</a>. I find some of them quite handy.</p>
<p><strong>The new stuff:</strong></p>
<p>I&#8217;ve always missed this one &#8211; strings in <code>switch</code>:<br />
<pre class="brush: java;">
String string = &quot;foo&quot;;

switch (string) {
    case &quot;foo&quot;:
        System.out.println(&quot;bar&quot;);
        break;
}
</pre></p>
<p>Readability counts; underscores in numeric literals and nice binary literals (I personally think that the underscores in number literals look a bit ugly/hacky/unclean):<br />
<pre class="brush: java;">
long l = 1111_2222_3333_4444L; // I is card number
double d = 0_0; // I is cute, 1337h4x0r style!
byte b = 0b00101010; // I is binary

System.out.println(l); // 1111222233334444
System.out.println(d); // 0.0
System.out.println(b); // 42
</pre></p>
<p>Less code for generics, meet the Diamond operator:<br />
<pre class="brush: java;">
List&lt;String&gt; list1 = new ArrayList&lt;String&gt;(); // Pre JRE 7
List&lt;String&gt; list2 = new ArrayList&lt;&gt;(); // Diamonds are forever
</pre></p>
<p>Multi-catch:<br />
<pre class="brush: java;">
try {
    // Uuuuu scary stuff here...
} catch (Exception|Error e) {
    // http://ns.c2.com/cgi/wiki?PokemonExceptionHandling 
}
</pre></p>
<p>No tedious resource closing in <code>finally</code> block, less code and it looks much cleaner:<br />
<pre class="brush: java;">
/**
 * AutoCloseable will close the resource when it's not needed.
 * 
 * @see http://download.java.net/jdk7/docs/api/java/lang/AutoCloseable.html
 * 
 * @param file
 * @return
 * @throws IOException 
 */
public static String readFirstLine(String file) throws IOException {    
    try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
        return reader.readLine();
    }
}
</pre></p>
<p>Simplified varargs method invocation &#8211; haven&#8217;t checked this improvement yet.</p>
<p>On the side note &#8211; <a href="http://www.ubuntu.com/">Ubuntu</a> 11.04 and <a href="http://unity.ubuntu.com/">Unity</a> are awesome on my Eee netbook, I&#8217;ve been checking Unity during development and I honestly thought it will not be ready for the release.</p>
<br />Filed under: <a href='http://electrotek.wordpress.com/category/java/'>Java</a> Tagged: <a href='http://electrotek.wordpress.com/tag/java/'>Java</a>, <a href='http://electrotek.wordpress.com/tag/jdk7/'>jdk7</a>, <a href='http://electrotek.wordpress.com/tag/jre7/'>jre7</a>, <a href='http://electrotek.wordpress.com/tag/project-coin/'>project coin</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/electrotek.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/electrotek.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/electrotek.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/electrotek.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/electrotek.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/electrotek.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/electrotek.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/electrotek.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/electrotek.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/electrotek.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/electrotek.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/electrotek.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/electrotek.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/electrotek.wordpress.com/374/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=374&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://electrotek.wordpress.com/2011/04/30/jdk-7-and-project-coin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/19f012610d4bef7304210436bd7f468e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Electro</media:title>
		</media:content>

		<media:content url="http://electrotek.files.wordpress.com/2011/04/duke-plug.png" medium="image">
			<media:title type="html">duke-plug</media:title>
		</media:content>
	</item>
		<item>
		<title>Operator Precedence and concatenation</title>
		<link>http://electrotek.wordpress.com/2011/02/04/operator-precedence-and-concatenation/</link>
		<comments>http://electrotek.wordpress.com/2011/02/04/operator-precedence-and-concatenation/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 13:07:43 +0000</pubDate>
		<dc:creator>Viktoras Agejevas</dc:creator>
				<category><![CDATA[Blah blah]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[concatenation]]></category>
		<category><![CDATA[operator precedence]]></category>

		<guid isPermaLink="false">http://electrotek.wordpress.com/?p=367</guid>
		<description><![CDATA[Today a colleague of mine was having a problem with running a JPQL query which for some reason failed with a rather cryptic exception. The code looked something like: Even experienced developers were puzzled by this and we had a good laugh after the mystery was unsolved :) Operator Precedence Filed under: Blah blah, Java, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=367&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today a colleague of mine was having a problem with running a <a href="http://en.wikipedia.org/wiki/JPQL">JPQL</a> query which for some reason failed with a rather cryptic exception.</p>
<p>The code looked something like:</p>
<p><pre class="brush: java;">
String query = &quot;select s from SomeEntity e &quot;
        + &quot;join e.something s &quot;
        + &quot;where something &quot;
        + variable == null ? &quot;and something&quot; : &quot;and other&quot;;
System.out.println(query); // What is the output?
</pre></p>
<p>Even experienced developers were puzzled by this and we had a good laugh after the mystery was unsolved :)</p>
<p><a href="http://download.oracle.com/javase/tutorial/java/nutsandbolts/operators.html">Operator Precedence</a></p>
<br />Filed under: <a href='http://electrotek.wordpress.com/category/blah-blah/'>Blah blah</a>, <a href='http://electrotek.wordpress.com/category/java/'>Java</a>, <a href='http://electrotek.wordpress.com/category/software-development/'>Software development</a> Tagged: <a href='http://electrotek.wordpress.com/tag/concatenation/'>concatenation</a>, <a href='http://electrotek.wordpress.com/tag/java/'>Java</a>, <a href='http://electrotek.wordpress.com/tag/operator-precedence/'>operator precedence</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/electrotek.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/electrotek.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/electrotek.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/electrotek.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/electrotek.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/electrotek.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/electrotek.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/electrotek.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/electrotek.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/electrotek.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/electrotek.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/electrotek.wordpress.com/367/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/electrotek.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/electrotek.wordpress.com/367/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=367&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://electrotek.wordpress.com/2011/02/04/operator-precedence-and-concatenation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/19f012610d4bef7304210436bd7f468e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Electro</media:title>
		</media:content>
	</item>
		<item>
		<title>Feynman and psychiatrist</title>
		<link>http://electrotek.wordpress.com/2011/02/04/feynman-and-psychiatrist/</link>
		<comments>http://electrotek.wordpress.com/2011/02/04/feynman-and-psychiatrist/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 07:31:59 +0000</pubDate>
		<dc:creator>Viktoras Agejevas</dc:creator>
				<category><![CDATA[Blah blah]]></category>
		<category><![CDATA[feynman]]></category>
		<category><![CDATA[psychiatrist]]></category>

		<guid isPermaLink="false">http://electrotek.wordpress.com/?p=357</guid>
		<description><![CDATA[From Surely You&#8217;re Joking, Mr. Feynman! (Adventures of a Curious Character) &#8211; an awesome bio of an awesome Physicist: I sit down at the desk, and the psychiatrist starts looking through my papers. “Hello, Dick!” he says in a cheerful voice. “Where do you work?” I’m thinking, “Who does he think he is, calling me [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=357&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://www.amazon.com/Surely-Feynman-Adventures-Curious-Character/dp/0393316041">Surely You&#8217;re Joking, Mr. Feynman! (Adventures of a Curious Character)</a> &#8211; an awesome bio of an awesome <a href="http://en.wikipedia.org/wiki/Richard_Feynman">Physicist</a>:</p>
<blockquote><p>I sit down at the desk, and the psychiatrist starts looking through my papers. “Hello, Dick!” he says in a cheerful voice. “Where do you work?”</p>
<p>I’m thinking, “Who does he think he is, calling me by my first name?” and I say coldly, “Schenectady.”</p>
<p>“Who do you work for, Dick?” says the psychiatrist, smiling again.</p>
<p>“General Electric.”</p>
<p>“Do you like your work, Dick?” he says, with that same big smile on his face.</p>
<p>“So‑so.” I just wasn’t going to have anything to do with him.</p>
<p>Three nice questions, and then the fourth one is completely different. “Do you think people talk about you?” he asks, in a low, serious tone.</p>
<p>I light up and say, “Sure! When I go home, my mother often tells me how she was telling her friends about me.” He isn’t listening to the explanation; instead, he’s writing something down on my paper.</p>
<p>Then again, in a low, serious tone, he says, “Do you think people stare at you?”</p>
<p>I’m all ready to say no, when he says, “For instance, do you think any of the boys waiting on the benches are staring at you now?”</p>
<p>While I had been waiting to talk to the psychiatrist, I had noticed there were about twelve guys on the benches waiting for the three psychiatrists, and they’ve got nothing else to look at, so I divide twelve by three–that makes four each–but I’m conservative, so I say, “Yeah, maybe two of them are looking at us.”</p>
<p>He says, “Well just turn around and look”–and he’s not even bothering to look himself!</p>
<p>So I turn around, and sure enough, two guys are looking. So I point to them and I say, “Yeah–there’s that guy, and that guy over there looking at us.” Of course, when I’m turned around and pointing like that, other guys start to look at us, so I say, “Now him, and those two over there‑and now the whole bunch.” He still doesn’t look up to check. He’s busy writing more things on my paper.</p>
<p>Then he says, “Do you ever hear voices in your head?”</p>
<p>“Very rarely,” and I’m about to describe the two occasions on which it happened when he says, “Do you talk to yourself?”</p>
<p>“Yeah, sometimes when I’m shaving, or thinking; once in a while.” He’s writing down more stuff.</p>
<p>“I see you have a deceased wife–do you talk to her ?”</p>
<p>This question really annoyed me, but I contained myself and said, “Sometimes, when I go up on a mountain and I’m thinking about her.”</p>
<p>More writing. Then he asks, “Is anyone in your family in a mental institution?”</p>
<p>“Yeah, I have an aunt in an insane asylum.”</p>
<p>“Why do you call it an insane asylum?” he says, resentfully. “Why don’t you call it a mental institution?”</p>
<p>“I thought it was the same thing.”</p>
<p>“Just what do you think insanity is?” he says, angrily.</p>
<p>“It’s a strange and peculiar disease in human beings,” I say honestly.</p>
<p>“There’s nothing any more strange or peculiar about it than appendicitis!” he retorts.</p>
<p>“I don’t think so. In appendicitis we understand the causes better, and something about the mechanism of it, whereas with insanity it’s much more complicated and mysterious.” I won’t go through the whole debate; the point is that I meant insanity is physiologically peculiar, and he thought I meant it was socially peculiar.</p>
<p>Up until this time, although I had been unfriendly to the psychiatrist, I had nevertheless been honest in everything I said. But when he asked me to put out my hands, I couldn’t resist pulling a trick a guy in the “bloodsucking line” had told me about. I figured nobody was ever going to get a chance to do this, and as long as I was halfway under water, I would do it. So I put out my hands with one palm up and the other one down.</p>
<p>The psychiatrist doesn’t notice. He says, “Turn them over.”</p>
<p>I turn them over. The one that was up goes down, and the one that was down goes up, and he still doesn’t notice, because he’s always looking very closely at one hand to see if it is shaking. So the trick had no effect.</p>
<p>Finally, at the end of all these questions, he becomes friendly again. He lights up and says, “I see you have a Ph.D., Dick. Where did you study?”</p>
<p>“MIT and Princeton. And where did you study!”</p>
<p>“Yale and London. And what did you study, Dick?”</p>
<p>“Physics. And what did you study?”</p>
<p>“Medicine.”</p>
<p>“And this is medicine ?”</p>
<p>“Well, yes. What do you think it is? You go and sit down over there and wait a few minutes!”</p>
<p>So I sit on the bench again, and one of the other guys waiting sidles up to me and says, “Gee! You were in there twenty‑five minutes! The other guys were in there only five minutes!”</p>
<p>“Yeah.”</p>
<p>“Hey,” he says. “You wanna know how to fool the psychiatrist? All you have to do is pick your nails, like this.”</p>
<p>“Then why don’t you pick your nails like that?”</p>
<p>“Oh,” he says, “I wanna get in the army!”</p>
<p>“You wanna fool the psychiatrist?” I say. “You just tell him that!”</p>
<p>After a while I was called over to a different desk to see another psychiatrist. While the first psychiatrist had been rather young and innocent‑looking, this one was gray‑haired and distinguished‑looking–obviously the superior psychiatrist. I figure all of this is now going to get straightened out, but no matter what happens, I’m not going to become friendly.</p>
<p>The new psychiatrist looks at my papers, puts a big smile on his face, and says, “Hello, Dick. I see you worked at Los Alamos during the war.”</p>
<p>“Yeah.”</p>
<p>“There used to be a boys’ school there, didn’t there?”</p>
<p>“That’s right.”</p>
<p>“Were there a lot of buildings in the school?”</p>
<p>“Only a few.”</p>
<p>Three questions–same technique‑and the next question is completely different. “You said you hear voices in your head. Describe that, please.”</p>
<p>“It happens very rarely, when I’ve been paying attention to a person with a foreign accent. As I’m falling asleep I can hear his voice very clearly. The first time it happened was while I was a student at MIT. I could hear old Professor Vallarta say, ‘Dee‑a dee‑a electric field‑a.’ And the other time was in Chicago during the war, when Professor Teller was explaining to me how the bomb worked. Since I’m interested in all kinds of phenomena, I wondered how I could hear these voices with accents so precisely, when I couldn’t imitate them that well … Doesn’t everybody have something like that happen once in a while?”</p>
<p>The psychiatrist put his hand over his face, and I could see through his fingers a little smile (he wouldn’t answer the question).</p>
<p>Then the psychiatrist checked into something else. “You said that you talk to your deceased wife. What do you say to her?”</p>
<p>I got angry. I figure it’s none of his damn business, and I say, “I tell her I love her, if it’s all right with you!”</p>
<p>After some more bitter exchanges he says, “Do you believe in the supernormal?”</p>
<p>I say, “I don’t know what the ‘supernormal’ is.”</p>
<p>“What? You, a Ph.D. in physics, don’t know what the supernormal is?”</p>
<p>“That’s right.”</p>
<p>“It’s what Sir Oliver Lodge and his school believe in.”</p>
<p>That’s not much of a clue, but I knew it. “You mean the supernatural .”</p>
<p>“You can call it that if you want.”</p>
<p>“All right, I will.”</p>
<p>“Do you believe in mental telepathy?”</p>
<p>“No. Do you?”</p>
<p>“Well, I’m keeping an open mind.”</p>
<p>“What? You, a psychiatrist, keeping an open mind ? Ha!” It went on like this for quite a while.</p>
<p>Then at some point near the end he says, “How much do you value life?”</p>
<p>“Sixty‑four.”</p>
<p>“Why did you say ‘sixty‑four’?”</p>
<p>“How are you supposed to measure the value of life?”</p>
<p>“No! I mean, why did you say ‘sixty‑four,’ and not ‘seventy‑three,’ for instance?”</p>
<p>“If I had said ‘seventy‑three,’ you would have asked me the same question!”</p>
<p>The psychiatrist finished with three friendly questions, just as the other psychiatrist had done, handed me my papers, and I went off to the next booth.</p>
<p>While I’m waiting in the line, I look at the paper which has the summary of all the tests I’ve taken so far. And just for the hell of it I show my paper to the guy next to me, and I ask him in a rather stupid‑sounding voice, “Hey! What did you get in ‘Psychiatric’? Oh! You got an ‘N.’ I got an ‘N’ in everything else, but I got a ‘D’ in ‘Psychiatric.’ What does that mean?” I knew what it meant: “N” is normal, “D” is deficient.</p>
<p>The guy pats me on the shoulder and says, “Buddy, it’s perfectly all right. It doesn’t mean anything. Don’t worry about it!” Then he walks way over to the other corner of the room, frightened: It’s a lunatic!</p>
<p>I started looking at the papers the psychiatrists had written, and it looked pretty serious! The first guy wrote:</p>
<p>Thinks people talk about him.</p>
<p>Thinks people stare at him.</p>
<p>Auditory hypnogogic hallucinations.</p>
<p>Talks to self.</p>
<p>Talks to deceased wife.</p>
<p>Maternal aunt in mental institution.</p>
<p>Very peculiar stare. (I knew what that was–that was when I said, “And this is medicine ?”)</p></blockquote>
<br />Filed under: <a href='http://electrotek.wordpress.com/category/blah-blah/'>Blah blah</a> Tagged: <a href='http://electrotek.wordpress.com/tag/feynman/'>feynman</a>, <a href='http://electrotek.wordpress.com/tag/psychiatrist/'>psychiatrist</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/electrotek.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/electrotek.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/electrotek.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/electrotek.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/electrotek.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/electrotek.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/electrotek.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/electrotek.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/electrotek.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/electrotek.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/electrotek.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/electrotek.wordpress.com/357/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/electrotek.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/electrotek.wordpress.com/357/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=357&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://electrotek.wordpress.com/2011/02/04/feynman-and-psychiatrist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/19f012610d4bef7304210436bd7f468e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Electro</media:title>
		</media:content>
	</item>
		<item>
		<title>Find out generic type at runtime</title>
		<link>http://electrotek.wordpress.com/2010/10/23/find-out-generic-type-at-runtime/</link>
		<comments>http://electrotek.wordpress.com/2010/10/23/find-out-generic-type-at-runtime/#comments</comments>
		<pubDate>Sat, 23 Oct 2010 12:52:56 +0000</pubDate>
		<dc:creator>Viktoras Agejevas</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[DAO]]></category>
		<category><![CDATA[generics]]></category>
		<category><![CDATA[ParametrizedType]]></category>

		<guid isPermaLink="false">http://electrotek.wordpress.com/?p=338</guid>
		<description><![CDATA[With Hibernate and generic DAO it has now become a common practice to figure out the class of generic type at runtime (please note that the code is a bit simplified): Then we can do things like: This approach is very nice, since we don&#8217;t have to pass an entity class during initialization. But it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=338&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>With <a href="http://community.jboss.org/wiki/GenericDataAccessObjects">Hibernate and generic DAO</a> it has now become a common practice to figure out the class of generic type at runtime (please note that the code is a bit simplified):<br />
<pre class="brush: java;">
import java.lang.reflect.ParameterizedType;

// It's not marked as abstract, probably better name would be GenericDao...
public class AbstractDao&lt;T&gt; {

    private Class&lt;T&gt; elementClass;

    @SuppressWarnings(&quot;unchecked&quot;)
    public AbstractDao() {
        elementClass =
                (Class&lt;T&gt;) ((ParameterizedType) getClass().getGenericSuperclass())
                        .getActualTypeArguments()[0];
    }

    public Class&lt;T&gt; getElementClass() {
        return elementClass;
    }
    ...
}
</pre></p>
<p>Then we can do things like:<br />
<pre class="brush: java;">
public class ConcreteDao extends AbstractDao&lt;SomeEntity&gt; {
}

ConcreteDao dao = new ConcreteDao();
</pre></p>
<p>This approach is very nice, since we don&#8217;t have to pass an entity class during initialization. But it has some limitations, one of which is that it won&#8217;t work if we try to initialize it directly, e.g.:<br />
<pre class="brush: java;">
// java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
AbstractDao&lt;SomeEntity&gt; dao = new AbstractDao&lt;SomeEntity&gt;();
</pre><br />
Due to type erasure it is not possible to figure out the generic type for stand alone generic class, e.g. AbstractDao. This can be done only for superclass. In this case the superclass is Object, so sorry, no go.<br />
For this case we can add a remedy &#8211; another constructor with a Class parameter, then we can initialize the class like this:<br />
<pre class="brush: java;">
AbstractDao&lt;SomeEntity&gt; dao = new AbstractDao&lt;SomeEntity&gt;(SomeEntity.class);
</pre><br />
Also since we are trying to getGenericSuperclass, this code will work only with single inheritance, multiple inheritance won&#8217;t work:<br />
<pre class="brush: java;">
public class ConcreteDao extends AbstractDao&lt;SomeEntity&gt; {
}
class SpecializedDao extends ConcreteDao {
}

SpecilizedDao dao = new SpecializedDao(); // no go, since constructor tries to read generic info from ConcreteDao
</pre><br />
After some thinking I&#8217;ve made it a little bit more flexible (but in a somewhat hacky way):<br />
<pre class="brush: java;">
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

public class AbstractDao&lt;T&gt; {

    private Class&lt;T&gt; elementClass;

    public AbstractDao(final Class&lt;T&gt; clazz) {
        elementClass = clazz;
    }

    @SuppressWarnings(&quot;unchecked&quot;)
    protected AbstractDao() {
        Class&lt;?&gt; cl = getClass();

        if (Object.class.getSimpleName().equals(cl.getSuperclass().getSimpleName())) {
            throw new IllegalArgumentException(
                    &quot;Default constructor does not support direct instantiation&quot;);
        }

        while (!AbstractDao.class.getSimpleName().equals(cl.getSuperclass().getSimpleName())) {
            // case of multiple inheritance, we are trying to get the first available generic info
            if (cl.getGenericSuperclass() instanceof ParameterizedType) {
                break;
            }
            cl = cl.getSuperclass();
        }

        if (cl.getGenericSuperclass() instanceof ParameterizedType) {
            elementClass =
                    (Class&lt;T&gt;) ((ParameterizedType) cl.getGenericSuperclass())
                            .getActualTypeArguments()[0];
        }
    }

    public Class&lt;T&gt; getElementClass() {
        return elementClass;
    }
    ...
}
</pre><br />
Now we can do things like:<br />
<pre class="brush: java;">
public class ConcreteDao extends AbstractDao&lt;SomeEntity&gt; {
}
class SpecializedDao extends ConcreteDao {
}

SpecilizedDao dao = new SpecializedDao();
</pre></p>
<br />Filed under: <a href='http://electrotek.wordpress.com/category/java/'>Java</a> Tagged: <a href='http://electrotek.wordpress.com/tag/dao/'>DAO</a>, <a href='http://electrotek.wordpress.com/tag/generics/'>generics</a>, <a href='http://electrotek.wordpress.com/tag/java/'>Java</a>, <a href='http://electrotek.wordpress.com/tag/parametrizedtype/'>ParametrizedType</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/electrotek.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/electrotek.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/electrotek.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/electrotek.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/electrotek.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/electrotek.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/electrotek.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/electrotek.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/electrotek.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/electrotek.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/electrotek.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/electrotek.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/electrotek.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/electrotek.wordpress.com/338/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=338&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://electrotek.wordpress.com/2010/10/23/find-out-generic-type-at-runtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/19f012610d4bef7304210436bd7f468e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Electro</media:title>
		</media:content>
	</item>
		<item>
		<title>NetworkManager&#8217;s OpenVPN plugin problems on Ubuntu</title>
		<link>http://electrotek.wordpress.com/2010/10/03/networkmanagers-openvpn-plugin-problems-on-ubuntu/</link>
		<comments>http://electrotek.wordpress.com/2010/10/03/networkmanagers-openvpn-plugin-problems-on-ubuntu/#comments</comments>
		<pubDate>Sun, 03 Oct 2010 12:55:33 +0000</pubDate>
		<dc:creator>Viktoras Agejevas</dc:creator>
				<category><![CDATA[Blah blah]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[networkmanager]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://electrotek.wordpress.com/?p=321</guid>
		<description><![CDATA[After trying to connect to OpenVPN using NetworkManager on Ubuntu 10.04 LTS (Lucid Lynx) I got an error: The VPN connection &#8220;XXX&#8221; failed because there were no valid VPN secrets Nothing seemed to help, but after some google&#8217;ing I have found a fix that worked for me: 1. Edit /etc/dbus-1/system.d/nm-openvpn-service.conf and add additional policy: 2. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=321&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After trying to connect to OpenVPN using NetworkManager on Ubuntu 10.04 LTS (Lucid Lynx) I got an error:</p>
<blockquote><p>The VPN connection &#8220;XXX&#8221; failed because there were no valid VPN secrets</p></blockquote>
<p>Nothing seemed to help, but after some google&#8217;ing I have found a fix that worked for me:</p>
<p>1. Edit <code style="font-size:11px;">/etc/dbus-1/system.d/nm-openvpn-service.conf</code> and add additional policy:</p>
<p><pre class="brush: xml;">
&lt;policy user=&quot;at_console&quot;&gt;
    &lt;allow own=&quot;org.freedesktop.NetworkManager.vpnc&quot;/&gt;
    &lt;allow send_destination=&quot;org.freedesktop.NetworkManager.vpnc&quot;/&gt;
&lt;/policy&gt;
</pre></p>
<p>2. Restart the NetworkManager after the new policy is added: <code style="font-size:11px;">sudo /etc/init.d/network-manager restart</code></p>
<p>After these steps the VPN started to work.</p>
<br />Filed under: <a href='http://electrotek.wordpress.com/category/blah-blah/'>Blah blah</a>, <a href='http://electrotek.wordpress.com/category/linux/'>Linux</a>, <a href='http://electrotek.wordpress.com/category/linux/ubuntu/'>Ubuntu</a> Tagged: <a href='http://electrotek.wordpress.com/tag/networkmanager/'>networkmanager</a>, <a href='http://electrotek.wordpress.com/tag/openvpn/'>openvpn</a>, <a href='http://electrotek.wordpress.com/tag/ubuntu/'>Ubuntu</a>, <a href='http://electrotek.wordpress.com/tag/vpn/'>vpn</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/electrotek.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/electrotek.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/electrotek.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/electrotek.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/electrotek.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/electrotek.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/electrotek.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/electrotek.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/electrotek.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/electrotek.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/electrotek.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/electrotek.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/electrotek.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/electrotek.wordpress.com/321/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=321&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://electrotek.wordpress.com/2010/10/03/networkmanagers-openvpn-plugin-problems-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/19f012610d4bef7304210436bd7f468e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Electro</media:title>
		</media:content>
	</item>
		<item>
		<title>If by Rudyard Kipling</title>
		<link>http://electrotek.wordpress.com/2010/06/23/if-by-rudyard-kipling/</link>
		<comments>http://electrotek.wordpress.com/2010/06/23/if-by-rudyard-kipling/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 11:35:10 +0000</pubDate>
		<dc:creator>Viktoras Agejevas</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Kipling]]></category>
		<category><![CDATA[poem]]></category>

		<guid isPermaLink="false">http://electrotek.wordpress.com/?p=316</guid>
		<description><![CDATA[If If you can keep your head when all about you Are losing theirs and blaming it on you; If you can trust yourself when all men doubt you, But make allowance for their doubting too; If you can wait and not be tired by waiting, Or, being lied about, don&#8217;t deal in lies, Or, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=316&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>If</strong></p>
<p>If you can keep your head when all about you<br />
Are losing theirs and blaming it on you;<br />
If you can trust yourself when all men doubt you,<br />
But make allowance for their doubting too;<br />
If you can wait and not be tired by waiting,<br />
Or, being lied about, don&#8217;t deal in lies,<br />
Or, being hated, don&#8217;t give way to hating,<br />
And yet don&#8217;t look too good, nor talk too wise;</p>
<p>If you can dream &#8211; and not make dreams your master;<br />
If you can think &#8211; and not make thoughts your aim;<br />
If you can meet with triumph and disaster<br />
And treat those two imposters just the same;<br />
If you can bear to hear the truth you&#8217;ve spoken<br />
Twisted by knaves to make a trap for fools,<br />
Or watch the things you gave your life to broken,<br />
And stoop and build &#8216;em up with wornout tools;</p>
<p>If you can make one heap of all your winnings<br />
And risk it on one turn of pitch-and-toss,<br />
And lose, and start again at your beginnings<br />
And never breath a word about your loss;<br />
If you can force your heart and nerve and sinew<br />
To serve your turn long after they are gone,<br />
And so hold on when there is nothing in you<br />
Except the Will which says to them: &#8220;Hold on&#8221;;</p>
<p>If you can talk with crowds and keep your virtue,<br />
Or walk with kings &#8211; nor lose the common touch;<br />
If neither foes nor loving friends can hurt you;<br />
If all men count with you, but none too much;<br />
If you can fill the unforgiving minute<br />
With sixty seconds&#8217; worth of distance run -<br />
Yours is the Earth and everything that&#8217;s in it,<br />
And &#8211; which is more &#8211; you&#8217;ll be a Man my son!</p>
<p>Rudyard Kipling</p>
<br />Filed under: <a href='http://electrotek.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://electrotek.wordpress.com/tag/kipling/'>Kipling</a>, <a href='http://electrotek.wordpress.com/tag/poem/'>poem</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/electrotek.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/electrotek.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/electrotek.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/electrotek.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/electrotek.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/electrotek.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/electrotek.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/electrotek.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/electrotek.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/electrotek.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/electrotek.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/electrotek.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/electrotek.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/electrotek.wordpress.com/316/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=316&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://electrotek.wordpress.com/2010/06/23/if-by-rudyard-kipling/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/19f012610d4bef7304210436bd7f468e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Electro</media:title>
		</media:content>
	</item>
		<item>
		<title>X-Plane 9 on Ubuntu 9.10</title>
		<link>http://electrotek.wordpress.com/2010/02/18/ubuntu-9-10-and-x-plane-9/</link>
		<comments>http://electrotek.wordpress.com/2010/02/18/ubuntu-9-10-and-x-plane-9/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 11:05:04 +0000</pubDate>
		<dc:creator>Viktoras Agejevas</dc:creator>
				<category><![CDATA[Blah blah]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[libopenal]]></category>
		<category><![CDATA[openal]]></category>
		<category><![CDATA[x-plane]]></category>
		<category><![CDATA[xplane]]></category>

		<guid isPermaLink="false">http://electrotek.wordpress.com/?p=306</guid>
		<description><![CDATA[While running X-Plane 9 Linux installer on Ubuntu 9.10 I got an: error while loading shared libraries: libopenal.so.0: cannot open shared object file: No such file or directory It seems that OpenAL is not installed by default, to fix this: apt-get install libopenal1 ln -s /usr/lib/libopenal.so.1 /usr/lib/libopenal.so.0 After these steps I got the X-Plane installer [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=306&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While running X-Plane 9 Linux installer on Ubuntu 9.10 I got an:</p>
<pre style="font-size:11px;">error while loading shared libraries: libopenal.so.0: cannot open shared object file: No such file or directory</pre>
<p>It seems that OpenAL is not installed by default, to fix this:</p>
<pre style="font-size:11px;">apt-get install libopenal1</pre>
<pre style="font-size:11px;">ln -s /usr/lib/libopenal.so.1 /usr/lib/libopenal.so.0</pre>
<p>After these steps I got the X-Plane installer running.</p>
<br />Filed under: <a href='http://electrotek.wordpress.com/category/blah-blah/'>Blah blah</a>, <a href='http://electrotek.wordpress.com/category/linux/ubuntu/'>Ubuntu</a> Tagged: <a href='http://electrotek.wordpress.com/tag/libopenal/'>libopenal</a>, <a href='http://electrotek.wordpress.com/tag/openal/'>openal</a>, <a href='http://electrotek.wordpress.com/tag/ubuntu/'>Ubuntu</a>, <a href='http://electrotek.wordpress.com/tag/x-plane/'>x-plane</a>, <a href='http://electrotek.wordpress.com/tag/xplane/'>xplane</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/electrotek.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/electrotek.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/electrotek.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/electrotek.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/electrotek.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/electrotek.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/electrotek.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/electrotek.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/electrotek.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/electrotek.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/electrotek.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/electrotek.wordpress.com/306/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/electrotek.wordpress.com/306/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/electrotek.wordpress.com/306/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=306&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://electrotek.wordpress.com/2010/02/18/ubuntu-9-10-and-x-plane-9/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/19f012610d4bef7304210436bd7f468e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Electro</media:title>
		</media:content>
	</item>
		<item>
		<title>Lėja and Canon 450D</title>
		<link>http://electrotek.wordpress.com/2009/08/20/leja-and-canon-450d/</link>
		<comments>http://electrotek.wordpress.com/2009/08/20/leja-and-canon-450d/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 17:56:12 +0000</pubDate>
		<dc:creator>Viktoras Agejevas</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[450D]]></category>
		<category><![CDATA[baby]]></category>
		<category><![CDATA[canon]]></category>

		<guid isPermaLink="false">http://electrotek.wordpress.com/?p=267</guid>
		<description><![CDATA[After some hesitation I&#8217;ve bought my first DSLR &#8211; Canon 450D. After a few days of playing I&#8217;m quite happy with it. Now I only miss 50mm f/1.8 lens, so in near future I&#8217;m planning to buy it. Kit lens is ok for everyday shooting, but I want a faster lens for portraits. Meet my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=267&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After some hesitation I&#8217;ve bought my first DSLR &#8211; <a href="http://en.wikipedia.org/wiki/450D">Canon 450D</a>.<br />
After a few days of playing I&#8217;m quite happy with it. Now I only miss <a href="http://en.wikipedia.org/wiki/Canon_EF_50mm_lens#EF_50mm_f.2F1.8_II">50mm f/1.8 lens</a>, so in near future I&#8217;m planning to buy it. <a href="http://en.wikipedia.org/wiki/Canon_EF-S_18-55mm_lens#EF-S_18-55_IS">Kit lens</a> is ok for everyday shooting, but I want a faster lens for portraits.</p>
<p>Meet my 5 months old baby girl Lėja:</p>
<div style="text-align:center;">
<img src="http://electrotek.files.wordpress.com/2009/08/leja.jpg?w=630" alt="Leja" title="Lėja (5 months old)"   class="alignnone size-full wp-image-268" /></p>
<div style="font-size:9px;">Canon EF-S 18-55mm f/3.5-5.6 IS (Shutter: 1/25, aperture: 4.0, ISO: 400)</div>
</div>
<br />Posted in Personal Tagged: 450D, baby, canon <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/electrotek.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/electrotek.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/electrotek.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/electrotek.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/electrotek.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/electrotek.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/electrotek.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/electrotek.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/electrotek.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/electrotek.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/electrotek.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/electrotek.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/electrotek.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/electrotek.wordpress.com/267/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=electrotek.wordpress.com&amp;blog=2568182&amp;post=267&amp;subd=electrotek&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://electrotek.wordpress.com/2009/08/20/leja-and-canon-450d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/19f012610d4bef7304210436bd7f468e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Electro</media:title>
		</media:content>

		<media:content url="http://electrotek.files.wordpress.com/2009/08/leja.jpg" medium="image">
			<media:title type="html">Lėja (5 months old)</media:title>
		</media:content>
	</item>
	</channel>
</rss>
