<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>olex.biz &#187; code</title>
	<atom:link href="http://olex.biz/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://olex.biz</link>
	<description>Website of a computer science student and a generally good man</description>
	<lastBuildDate>Wed, 27 Jul 2011 13:23:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Using ImageMagick for batch image processing in Picasa</title>
		<link>http://olex.biz/software/using-imagemagick-for-batch-image-processing-in-picasa/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-imagemagick-for-batch-image-processing-in-picasa</link>
		<comments>http://olex.biz/software/using-imagemagick-for-batch-image-processing-in-picasa/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 13:23:41 +0000</pubDate>
		<dc:creator>Olexandr Savchuk</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[diy]]></category>

		<guid isPermaLink="false">http://olex.biz/?p=283</guid>
		<description><![CDATA[Our office is using Google Picasa to process a lot of images. We&#8217;ve used Picasa for years now, and it&#8217;s a very convenient instrument for our needs. However, while it has many built-in functions to process and modify images, there are some missing, or only available through complicated multi-stage user interaction, which is unacceptable for [...]]]></description>
			<content:encoded><![CDATA[<p>Our office is using <a href="http://picasa.google.com/" title="Google Picasa" target="_blank">Google Picasa</a> to process a lot of images. We&#8217;ve used Picasa for years now, and it&#8217;s a very convenient instrument for our needs. However, while it has many built-in functions to process and modify images, there are some missing, or only available through complicated multi-stage user interaction, which is unacceptable for the amount of work our employees have to get done. My solution to this is a combination of two ingredients: the command-line <a href="http://www.imagemagick.org/script/index.php" title="ImageMagick" target="_blank">ImageMagick toolkit</a> for image processing, and Picasa&#8217;s <a href="http://code.google.com/intl/de-DE/apis/picasa/docs/button_api.html" title="Picasa Button API" target="_blank">Button API</a>.</p>
<p>
<div class="pie-gallery alignGalleryLeft">
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh5.ggpht.com/-LuA0LAXr5NI/Ti89NnP_7BI/AAAAAAAACfA/byANL2PndxE/stitcher-2.JPG?imgmax=800" rel="lightbox[2011-6-3-0-17-16]"><img src="http://lh5.ggpht.com/-LuA0LAXr5NI/Ti89NnP_7BI/AAAAAAAACfA/byANL2PndxE/stitcher-2.JPG?imgmax=144" alt="stitcher-2.JPG" width="144" height="80" class="pie-img"/></a></p>
</div>
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh3.ggpht.com/-WznaqfgnYIU/Ti887FF7BtI/AAAAAAAACes/vlR8r2ESnuk/2008%252520C-Class%2525204matic%252520007.jpg?imgmax=800" rel="lightbox[2011-6-3-0-17-16]"><img src="http://lh3.ggpht.com/-WznaqfgnYIU/Ti887FF7BtI/AAAAAAAACes/vlR8r2ESnuk/2008%252520C-Class%2525204matic%252520007.jpg?imgmax=144" alt="2008 C-Class 4matic 007.jpg" width="144" height="108" class="pie-img"/></a></p>
</div>
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh5.ggpht.com/-xWzI2yvRZH8/Ti8870LCLUI/AAAAAAAACew/_fKDGDoZaXE/2008%252520C-Class%2525204matic%252520009.jpg?imgmax=800" rel="lightbox[2011-6-3-0-17-16]"><img src="http://lh5.ggpht.com/-xWzI2yvRZH8/Ti8870LCLUI/AAAAAAAACew/_fKDGDoZaXE/2008%252520C-Class%2525204matic%252520009.jpg?imgmax=144" alt="2008 C-Class 4matic 009.jpg" width="144" height="108" class="pie-img"/></a></p>
</div>
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh4.ggpht.com/-9MEdtqyDDlU/Ti888kdWSQI/AAAAAAAACe0/bOke1AGxoy0/Collage%252520000814.jpg?imgmax=800" rel="lightbox[2011-6-3-0-17-16]"><img src="http://lh4.ggpht.com/-9MEdtqyDDlU/Ti888kdWSQI/AAAAAAAACe0/bOke1AGxoy0/Collage%252520000814.jpg?imgmax=144" alt="Collage 000814.jpg" width="96" height="144" class="pie-img"/></a></p>
</div>
</div>
<p>The example application I&#8217;ll explain here is a utility to combine multiple images into one in one click directly from a Picasa folder view. However, it is very easy to modify this to perform various other batch image processing tasks directly from Picasa.</p>
<p><span id="more-283"></span></p>
<p><b>Part 1: The Picasa button</b></p>
<p>First of all, we will need a button in our Picasa to start our ImageMagick script. To create the button using Picasa Button API, we follow these steps:</p>
<ol>
<li>
<strong>Write a <em>PBF</em> file.</strong><br />
A <em>PBF</em> is basically a simple XML file, that describes our button to Picasa. Here is the <em>PBF</em> file I wrote for my application:</p>
<pre name="code" class="xml">
&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;buttons format="1" version="1"&gt;
  &lt;button id="{ca234ae3-6340-40c3-a46b-51a126bb887c}" type="dynamic"&gt;
    &lt;label&gt;Combine&lt;/label&gt;
    &lt;tooltip&gt;Combine images vertically and save as a new image&lt;/tooltip&gt;
    &lt;action verb="trayexec"&gt;
      &lt;param name="exe_name" value="stitch.cmd" /&gt;
      &lt;param name="exe_path" value="S:\Tools\" /&gt;
    &lt;/action&gt;
  &lt;/button&gt;
&lt;/buttons&gt;
</pre>
<p>Although the whole code is contained within a <code>buttons</code> element, the file can currently only describe one button. </p>
<p>Note the <a href="http://en.wikipedia.org/wiki/Globally_unique_identifier" title="GUID on Wikipedia" target="_blank">GUID</a> in the <code>button/id</code> attribute. You&#8217;ll need a new GUID for every button you make. The PBF must be named using this GUID, <code>{ca234ae3-6340-40c3-a46b-51a126bb887c}.pbf</code> in my case.</p>
<p>The <code>label</code> and <code>tooltip</code> elements shouldn&#8217;t need much explanation. The next important element is <code>action</code>; this describes what the button will actually do when pressed. There are a few actions described in the Button API; the one I use here is a simple executable launch, that starts a batch script <code>stitch.cmd</code>, located in <code>S:\Tools\</code> (in our environment, S:\ is a shared network drive on the office server). The script will be detailed further on.</p>
</li>
<li>
<em>(optional)</em> <strong>Draw an icon.</strong><br />
You can include a custom icon for your button. The icon has to be an Adobe Photoshop <em>PSD</em> file called using your GUID (<code>{ca234ae3-6340-40c3-a46b-51a126bb887c}.psd</code> for me), in a single layer. If you use an icon, you have to include an additional element in your <em>PBF</em>, inside the <code>button</code> element:</p>
<p><code>&lt;icon name="{ca234ae3-6340-40c3-a46b-51a126bb887c}.psd/layer" src="pbz"/&gt;</code>
</li>
<li>
<strong>Package your button into a <em>PBZ</em> file.</strong><br />
A <em>PBZ</em> file is nothing different than a ZIP archive containing your <em>PBF</em> (and the icon, if you want to use one), with its extension changed to <code>.pbz</code>. This file is basically your distribution package, so name it appropriately, since Picasa differentiates its buttons by their <em>PBZ</em> file names. One <em>PBZ</em> can also contain multiple <em>PBF</em> files for multiple buttons at once.</p>
</li>
</ol>
<p><b>Part 2: The ImageMagick batch script</b></p>
<p>Since the ImageMagick package provides command-line utilities, the simplest way to automate them in Windows is a batch file. Here is my <code>stitch.cmd</code> script for merging multiple images together vertically, resizing them all to match the first one&#8217;s width:</p>
<pre name="code" class="c">
@echo off
cd /D "C:\Program Files\ImageMagick-6.7.1-Q16"

rem --- Output filename
set OUTFOLDER=%~dp1
set OUTFILENAME="%OUTFOLDER%Collage.jpg"

rem --- Imagemagick
for /f "delims=" %%a in ('identify -format "%%[fx:w]" %1') do @set WIDTH=%%a
montage -mode concatenate -resize %WIDTH% -tile 1x %* %OUTFILENAME%
</pre>
<p>When called from the Picasa button, the script will get filenames of all currently selected images in Picasa as arguments, including full paths.</p>
<p>First, we change directory to where ImageMagick is installed, to avoid possible problems with PATH. Then we generate a filename for our montage, taking the folder path from the first argument (first selected image from Picasa) and adding our own filename.</p>
<p>After that, we apply a batch hack, using a <code>for</code> loop to save a command output (ImageMagick&#8217;s <code>identify</code>) into a variable. This gives us the width of the first image. Next, we call the ImageMagick&#8217;s <code>montage</code> tool, that will combine all our images in one, additionally providing it with the output filename as a last argument. </p>
<p><b>Part 3: Installation</b></p>
<p>The installation is a bit tricky. Picasa doesn&#8217;t support importing the buttons directly, it can only be done using a browser and a specially formed link to the file. You&#8217;ll need to place your <em>PBZ</em> at some location reachable via an <code>http://</code> link; since I have a local development server running on my PC, I used that. Here is an the HTML file I used to install my script in Picasa:</p>
<pre name="code" class="html">
&lt;html&gt;
 &lt;body&gt;
  &lt;a href="picasa://importbutton/?url=http://localhost/olex-stitcher.pbz"&gt;Install&lt;/a&gt;
 &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Just open the file in a browser of your choice and click the link. Picasa will open and prompt you to select the button you want to install (only one option here, unless your <em>PBZ</em> contains multiple buttons), and where to place it in the button bar. Do that, and you&#8217;re all done.</p>
<div class="bottomcontainerBox" style="">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Folex.biz%2Fsoftware%2Fusing-imagemagick-for-batch-image-processing-in-picasa%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://olex.biz/software/using-imagemagick-for-batch-image-processing-in-picasa/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://olex.biz/software/using-imagemagick-for-batch-image-processing-in-picasa/"  data-text="Using ImageMagick for batch image processing in Picasa" data-count="horizontal" data-via="olex">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://olex.biz/software/using-imagemagick-for-batch-image-processing-in-picasa/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android: scroll a ListView with volume keys</title>
		<link>http://olex.biz/android/scroll-listview-with-volume-keys/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=scroll-listview-with-volume-keys</link>
		<comments>http://olex.biz/android/scroll-listview-with-volume-keys/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 23:47:06 +0000</pubDate>
		<dc:creator>Olexandr Savchuk</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://olex.biz/?p=255</guid>
		<description><![CDATA[Basically, what you need to do is to override the <code>dispatchKeyEvent()</code> method in your Activity, and intercept key presses for the volume keys, leaving the other keys untouched. This is how I did it, fairly straightforward...]]></description>
			<content:encoded><![CDATA[<p>Scrolling a list view in an Android app using the volume buttons on the side of the phone is actually quite easy. Not knowing this, yesterday I spent some time looking for a nice easy tutorial to do this, and found nothing. Having it coded and released in version 1.0 of <a href="http://olex.biz/android/quoter">Quoter</a>, I thought it&#8217;d be a good thing to write one myself.</p>
<p>Basically, what you need to do is to override the <code>dispatchKeyEvent()</code> method in your Activity, and intercept key presses for the volume keys, leaving the other keys untouched. This is how I did it, fairly straightforward:</p>
<pre name="code" class="java">@Override
public boolean dispatchKeyEvent(KeyEvent event) {
	if (event.getAction() == KeyEvent.ACTION_DOWN) {
		switch (event.getKeyCode()) {
		case KeyEvent.KEYCODE_VOLUME_UP:
			scrollToPrevious();
			return true;
		case KeyEvent.KEYCODE_VOLUME_DOWN:
			scrollToNext();
			return true;
		}
	}
	if (event.getAction() == KeyEvent.ACTION_UP
		&#038;&#038; (event.getKeyCode() == KeyEvent.KEYCODE_VOLUME_UP
			|| event.getKeyCode() == KeyEvent.KEYCODE_VOLUME_DOWN)) {
		return true;
	}
	return super.dispatchKeyEvent(event);
}</pre>
<p>Note that we only execute our code on the <code>ACTION_DOWN</code> event &#8211; the <code>ACTION_UP</code> event is only caught in order to mute the keypress sound. Then <code>event.getKeyCode()</code> is checked, and if the key pressed is volume up or volume down, my scrolling functions are called and the function returns. In any other case (another event or different keys) the execution is passed on to the standard key press handler.</p>
<p>Next are the scrolling functions to scroll the <code>ListView</code>. The problem with these is, you can scroll to any x/y coordinates using the <code>scrollTo</code> method. But what I needed is to scroll to the next visible item, since Quoter is a reading app and one wants to scroll to the next qoute in the list and read it. So this is what I did:</p>
<pre name="code" class="java">private void scrollToNext() {
	int currentPosition = getListView().getFirstVisiblePosition();
	if (currentPosition == getListView().getCount() - 1)
		return;
	getListView().setSelection(currentPosition + 1);
	getListView().clearFocus();
}

private void scrollToPrevious() {
	int currentPosition = getListView().getFirstVisiblePosition();
	if (currentPosition == 0)
		return;
	getListView().setSelection(currentPosition - 1);
	getListView().clearFocus();
}</pre>
<p>First we get the list position of the first element visible on screen. If it&#8217;s already the last position in scroll direction, we do nothing. If it isn&#8217;t, we set the selection in the list to the next item; this automatically scrolls the list (same thing happens if you use the D-pad keys to navigate a list). The only problem now is, the list item becomes selected and highlighted, which we don&#8217;t want since we&#8217;re reading text from it. By clearing the focus from the list, we remove the selection. All done.</p>
<div class="bottomcontainerBox" style="">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Folex.biz%2Fandroid%2Fscroll-listview-with-volume-keys%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://olex.biz/android/scroll-listview-with-volume-keys/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://olex.biz/android/scroll-listview-with-volume-keys/"  data-text="Android: scroll a ListView with volume keys" data-count="horizontal" data-via="olex">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://olex.biz/android/scroll-listview-with-volume-keys/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>OpenTTD WebConfig</title>
		<link>http://olex.biz/software/spiele/openttd-webconfig/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=openttd-webconfig</link>
		<comments>http://olex.biz/software/spiele/openttd-webconfig/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 15:07:02 +0000</pubDate>
		<dc:creator>Olexandr Savchuk</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[openttd]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[games]]></category>

		<guid isPermaLink="false">http://olex.biz/?p=246</guid>
		<description><![CDATA[A tool to configure an OpenTTD server via web interface. Tested with OpenTTD 1.0.4, Apache2 and PHP 5.2.4 on Windows and Ubuntu Linux. No reason it shouldn&#8217;t work on any other platform, given PHP. Project hosted at the OpenTTDCoop DevZone: http://dev.openttdcoop.org/projects/ottd-webconfig Tweet]]></description>
			<content:encoded><![CDATA[<p>
<div class="pie-gallery alignGalleryLeft">
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh3.ggpht.com/_fCjhR7xUM2U/TLHRL96-zsI/AAAAAAAACKE/xR7DzrsTBXo/1.jpg?imgmax=800" rel="lightbox[2010-9-0-17-2-56]"><img src="http://lh3.ggpht.com/_fCjhR7xUM2U/TLHRL96-zsI/AAAAAAAACKE/xR7DzrsTBXo/1.jpg?imgmax=144" alt="1.jpg" width="144" height="101" class="pie-img"/></a></p>
</div>
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh6.ggpht.com/_fCjhR7xUM2U/TLHRMao76kI/AAAAAAAACKI/m240B2b0tOM/2.jpg?imgmax=800" rel="lightbox[2010-9-0-17-2-56]"><img src="http://lh6.ggpht.com/_fCjhR7xUM2U/TLHRMao76kI/AAAAAAAACKI/m240B2b0tOM/2.jpg?imgmax=144" alt="2.jpg" width="144" height="114" class="pie-img"/></a></p>
</div>
</div>
<p>A tool to configure an <a href="http://olex.biz/blog/software/spiele/openttd-junctions/">OpenTTD</a> server via web interface.</p>
<p>Tested with OpenTTD 1.0.4, Apache2 and PHP 5.2.4 on Windows and Ubuntu Linux. No reason it shouldn&#8217;t work on any other platform, given PHP.</p>
<p>Project hosted at the <em>OpenTTDCoop DevZone</em>:<br />
<a href="http://dev.openttdcoop.org/projects/ottd-webconfig">http://dev.openttdcoop.org/projects/ottd-webconfig</a></p>
<div class="bottomcontainerBox" style="">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Folex.biz%2Fsoftware%2Fspiele%2Fopenttd-webconfig%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://olex.biz/software/spiele/openttd-webconfig/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://olex.biz/software/spiele/openttd-webconfig/"  data-text="OpenTTD WebConfig" data-count="horizontal" data-via="olex">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://olex.biz/software/spiele/openttd-webconfig/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A day in the life of a Programmer</title>
		<link>http://olex.biz/blog/day-in-programmers-life/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=day-in-programmers-life</link>
		<comments>http://olex.biz/blog/day-in-programmers-life/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 18:35:34 +0000</pubDate>
		<dc:creator>Olexandr Savchuk</dc:creator>
				<category><![CDATA[fun]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[translated]]></category>

		<guid isPermaLink="false">http://olex.biz/?p=220</guid>
		<description><![CDATA[Tweet]]></description>
			<content:encoded><![CDATA[<div class="pie-gallery alignGalleryLeft">
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh6.ggpht.com/_fCjhR7xUM2U/S5_LimX0pII/AAAAAAAABwA/Hu-3XaUmYPU/pdpIk.jpg" rel="lightbox[2010-2-2-19-20-0]"><img src="http://lh6.ggpht.com/_fCjhR7xUM2U/S5_LimX0pII/AAAAAAAABwA/Hu-3XaUmYPU/pdpIk.jpg?imgmax=200" alt="pdpIk.jpg" width="200" class="pie-img"/></a></p>
</div>
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh4.ggpht.com/_fCjhR7xUM2U/S5_LnB_UdiI/AAAAAAAABwE/AjPxMSOLkd0/300px-Challenge_vs_skill.svg.jpg?imgmax=800" rel="lightbox[2010-2-2-19-20-0]"><img src="http://lh4.ggpht.com/_fCjhR7xUM2U/S5_LnB_UdiI/AAAAAAAABwE/AjPxMSOLkd0/300px-Challenge_vs_skill.svg.jpg?imgmax=144" alt="300px-Challenge_vs_skill.svg.jpg" width="144" height="140" class="pie-img"/></a></p>
</div>
</div>
<div class="bottomcontainerBox" style="">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Folex.biz%2Fblog%2Fday-in-programmers-life%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://olex.biz/blog/day-in-programmers-life/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://olex.biz/blog/day-in-programmers-life/"  data-text="A day in the life of a Programmer" data-count="horizontal" data-via="olex">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://olex.biz/blog/day-in-programmers-life/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android App &#8211; Quoter</title>
		<link>http://olex.biz/android/quoter/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=quoter</link>
		<comments>http://olex.biz/android/quoter/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 10:01:24 +0000</pubDate>
		<dc:creator>Olexandr Savchuk</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fun]]></category>

		<guid isPermaLink="false">http://olex.biz/?p=202</guid>
		<description><![CDATA[Android Market: Quoter Read fun internet quotes from a variety of websites. Perfect entertaining while waiting in queues, public transport and similar. Features include: - Choosing which sites to read from - Reading latest quotes - Saving quotes for offline reading - Sharing quotes via SMS, email, Facebook etc. If you like my app, please [...]]]></description>
			<content:encoded><![CDATA[<p>
<div class="pie-gallery alignGalleryLeft">
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh6.ggpht.com/_fCjhR7xUM2U/TWZBbcFiUAI/AAAAAAAACSU/V8u04q4kGFk/quoter-1.0-0.jpg?imgmax=800" rel="lightbox[2011-1-4-12-33-49]"><img src="http://lh6.ggpht.com/_fCjhR7xUM2U/TWZBbcFiUAI/AAAAAAAACSU/V8u04q4kGFk/quoter-1.0-0.jpg?imgmax=144" alt="quoter-1.0-0.jpg" width="86" height="144" class="pie-img"/></a></p>
</div>
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh4.ggpht.com/_fCjhR7xUM2U/TWZBZuZrA1I/AAAAAAAACSE/qW8NXYUgkWY/quoter-1.0-2.jpg?imgmax=800" rel="lightbox[2011-1-4-12-33-49]"><img src="http://lh4.ggpht.com/_fCjhR7xUM2U/TWZBZuZrA1I/AAAAAAAACSE/qW8NXYUgkWY/quoter-1.0-2.jpg?imgmax=144" alt="quoter-1.0-2.jpg" width="86" height="144" class="pie-img"/></a></p>
</div>
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh4.ggpht.com/_fCjhR7xUM2U/TWZBaXFMt-I/AAAAAAAACSI/otjhz2Midqk/quoter-1.0-3.jpg?imgmax=800" rel="lightbox[2011-1-4-12-33-49]"><img src="http://lh4.ggpht.com/_fCjhR7xUM2U/TWZBaXFMt-I/AAAAAAAACSI/otjhz2Midqk/quoter-1.0-3.jpg?imgmax=144" alt="quoter-1.0-3.jpg" width="86" height="144" class="pie-img"/></a></p>
</div>
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh6.ggpht.com/_fCjhR7xUM2U/TWZBZZ06llI/AAAAAAAACSA/RW7xu4088Dc/quoter-1.0-1.jpg?imgmax=800" rel="lightbox[2011-1-4-12-33-49]"><img src="http://lh6.ggpht.com/_fCjhR7xUM2U/TWZBZZ06llI/AAAAAAAACSA/RW7xu4088Dc/quoter-1.0-1.jpg?imgmax=144" alt="quoter-1.0-1.jpg" width="86" height="144" class="pie-img"/></a></p>
</div>
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh4.ggpht.com/_fCjhR7xUM2U/TWZBa7JGdII/AAAAAAAACSM/YQ62gNxl8XE/quoter-1.0-4.jpg?imgmax=800" rel="lightbox[2011-1-4-12-33-49]"><img src="http://lh4.ggpht.com/_fCjhR7xUM2U/TWZBa7JGdII/AAAAAAAACSM/YQ62gNxl8XE/quoter-1.0-4.jpg?imgmax=144" alt="quoter-1.0-4.jpg" width="86" height="144" class="pie-img"/></a></p>
</div>
</div>
<p><a href="https://market.android.com/details?id=biz.olex.android.quoter">Android Market: Quoter</a> <a href="http://olex.biz/wp-content/uploads/2010/03/qrcode-1.png"><img src="http://olex.biz/wp-content/uploads/2010/03/qrcode-1.png" alt="Quoter QR Code" title="qrcode-quoter-s" width="140" height="140" class="alignright size-full wp-image-206" /></a><br />
Read fun internet quotes from a variety of websites. Perfect entertaining while waiting in queues, public transport and similar.</p>
<p>Features include:<br />
- Choosing which sites to read from<br />
- Reading latest quotes<br />
- Saving quotes for offline reading<br />
- Sharing quotes via SMS, email, Facebook etc.</p>
<p>If you like my app, please buy the <a href="https://market.android.com/details?id=biz.olex.android.quoter.donate">donate version</a> &#8211; it&#8217;s ad-free!</p>
<p>Any comments and suggestions are welcome here in the Market or per eMail.</p>
<p>Quote sources in English:<br />
- bash.org: latest, random, random >0, top100<br />
- qdb.us<br />
- quotebucket.org<br />
- fmylife.com</p>
<p>Quote sources in German:<br />
- german-bash.org: latest, random<br />
- ibash.de<br />
- swissbash.ch<br />
- abash.at<br />
- SMSvonGesternNacht<br />
- school-bash.org</p>
<p>Quote sources in Russian and Ukrainian:<br />
- bash.org.ru: latest, random, abyss, abyssbest, all with pagination support!<br />
- ibash.org.ru<br />
- ithappens.ru<br />
- zadolba.li<br />
- bash.bynets.org (bash.org.by)<br />
- ukrbash.org<br />
- killmepls.ru<br />
- nefart.ru</p>
<div class="bottomcontainerBox" style="">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Folex.biz%2Fandroid%2Fquoter%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://olex.biz/android/quoter/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://olex.biz/android/quoter/"  data-text="Android App &#8211; Quoter" data-count="horizontal" data-via="olex">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://olex.biz/android/quoter/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Android App: Darmstadt student canteens</title>
		<link>http://olex.biz/blog/android-mensa/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=android-mensa</link>
		<comments>http://olex.biz/blog/android-mensa/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 21:34:30 +0000</pubDate>
		<dc:creator>Olexandr Savchuk</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://olex.biz/?p=149</guid>
		<description><![CDATA[So I&#8217;ve got myself a new and shiny HTC Magic as a replacement for the old and dying Touch. And then I thought: hmm, Android is an open platform, and apps are natively written in Java. I know Java. Why not try to write something? A good idea soon came from a friend: a client [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve got myself a new and shiny HTC Magic as a replacement for the old and dying Touch. And then I thought: hmm, Android is an open platform, and apps are natively written in Java. I know Java. Why not try to write something?</p>
<p>A good idea soon came from a friend: a client for the menu of the Mensa, university&#8217;s cafeteria of sorts. So one can look, while walking from the lectures (or sitting in them), what there is to eat today, and whether one doesn&#8217;t rather want to walk straight home. And so, a day, lots of coffee and a lot of googling later, I present you this wonderous Android app to see and download:</p>
<p>
<div class="pie-gallery alignGalleryLeft">
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh6.ggpht.com/_fCjhR7xUM2U/Su38nCrEQDI/AAAAAAAABgM/s25WYAzN0UA/mensa-screen1.jpg?imgmax=800" rel="lightbox[2009-10-0-22-33-7]"><img src="http://lh6.ggpht.com/_fCjhR7xUM2U/Su38nCrEQDI/AAAAAAAABgM/s25WYAzN0UA/mensa-screen1.jpg?imgmax=144" alt="mensa-screen1.jpg" width="95" height="144" class="pie-img"/></a></p>
</div>
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh3.ggpht.com/_fCjhR7xUM2U/Su38nencqNI/AAAAAAAABgQ/v2cwtCOsvPY/screen2.jpg?imgmax=800" rel="lightbox[2009-10-0-22-33-7]"><img src="http://lh3.ggpht.com/_fCjhR7xUM2U/Su38nencqNI/AAAAAAAABgQ/v2cwtCOsvPY/screen2.jpg?imgmax=144" alt="screen2.jpg" width="96" height="144" class="pie-img"/></a></p>
</div>
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh5.ggpht.com/_fCjhR7xUM2U/Su38nceeb5I/AAAAAAAABgU/eFUODEy6RZo/screen3.jpg?imgmax=800" rel="lightbox[2009-10-0-22-33-7]"><img src="http://lh5.ggpht.com/_fCjhR7xUM2U/Su38nceeb5I/AAAAAAAABgU/eFUODEy6RZo/screen3.jpg?imgmax=144" alt="screen3.jpg" width="96" height="144" class="pie-img"/></a></p>
</div>
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh3.ggpht.com/_fCjhR7xUM2U/Su38nke_1UI/AAAAAAAABgY/CYEVKBEMmhw/screen5.jpg?imgmax=800" rel="lightbox[2009-10-0-22-33-7]"><img src="http://lh3.ggpht.com/_fCjhR7xUM2U/Su38nke_1UI/AAAAAAAABgY/CYEVKBEMmhw/screen5.jpg?imgmax=144" alt="screen5.jpg" width="95" height="144" class="pie-img"/></a></p>
</div>
<div class="pie-item" style="margin:3px 3px 0px 0px;">
<p class="pie-img-wrapper"><a href="http://lh5.ggpht.com/_fCjhR7xUM2U/Su3-gUemWhI/AAAAAAAABgc/GrtPEhZGH-w/screen1.jpg?imgmax=800" rel="lightbox[2009-10-0-22-33-7]"><img src="http://lh5.ggpht.com/_fCjhR7xUM2U/Su3-gUemWhI/AAAAAAAABgc/GrtPEhZGH-w/screen1.jpg?imgmax=144" alt="screen1.jpg" width="96" height="144" class="pie-img"/></a></p>
</div>
</div>
<p><!--<br />
The app is not on the market, since I can't be bothered to put it there. And at the install it says it wants access to your phone status and SD card data: I assure you it is the app's own will, I did not make it do that. The permission to use internet connection is intended, obviously, but that's all it does.--></p>
<p>The app is available from the Android Market, and can be found easiest by scanning the following QR Code (if you don&#8217;t have the Barcode Scanner app, go and install it from the Market now, it&#8217;s a must on Android):<br />
<img src="http://stuff.olex.biz/mensa-qr.png" alt="QR Code: Mensen Darmstadt" /></p>
<div class="bottomcontainerBox" style="">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Folex.biz%2Fblog%2Fandroid-mensa%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://olex.biz/blog/android-mensa/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://olex.biz/blog/android-mensa/"  data-text="Android App: Darmstadt student canteens" data-count="horizontal" data-via="olex">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://olex.biz/blog/android-mensa/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Programmer&#8217;s everyday life&#8230;</title>
		<link>http://olex.biz/fun/programmiereralltag/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=programmiereralltag</link>
		<comments>http://olex.biz/fun/programmiereralltag/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 13:25:06 +0000</pubDate>
		<dc:creator>Olexandr Savchuk</dc:creator>
				<category><![CDATA[fun]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://olex.biz/?p=47</guid>
		<description><![CDATA[Things you come across in code. Trust me, this happens more than you expect it to&#8230; // Magic. Do not touch. //When I wrote this, only God and I understood what I was doing //Now, God only knows /* This is O(scary), but seems quick enough in practice. */ Followed by four nested for-loops. doRun.run(); [...]]]></description>
			<content:encoded><![CDATA[<p>Things you come across in code. Trust me, this happens more than you expect it to&#8230;</p>
<p><code>// Magic. Do not touch.</code></p>
<p><code>//When I wrote this, only God and I understood what I was doing<br />
//Now, God only knows</code></p>
<p><code>/* This is O(scary), but seems quick enough in practice. */</code><br />
Followed by four nested for-loops.</p>
<p><code>doRun.run();  // ... "a doo run run".</code></p>
<p><code>/* You are not meant to understand this */</code></p>
<p><code>// Replaces with spaces the braces<br />
// in cases where braces in places cause stasis<br />
   $str = str_replace(array("\{","\}")," ",$str);</code></p>
<p><code>options.BatchSize = 300; //Madness? THIS IS SPARTA!</code></p>
<p><code>last = first; /* Biblical reference */</code></p>
<p><code>double penetration; // ouch</code></p>
<p><em>via <a href="http://stackoverflow.com/questions/184618/what-is-the-best-comment-in-source-code-you-have-ever-encountered-closed">stackoverflow.com</a></em></p>
<div class="bottomcontainerBox" style="">
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Folex.biz%2Ffun%2Fprogrammiereralltag%2F&amp;layout=button_count&amp;show_faces=false&amp;width=85&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=85px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://olex.biz/fun/programmiereralltag/"></g:plusone>
			</div>
			<div style="float:left; width:95px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://olex.biz/fun/programmiereralltag/"  data-text="Programmer&#8217;s everyday life&#8230;" data-count="horizontal" data-via="olex">Tweet</a>
			</div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://olex.biz/fun/programmiereralltag/feed/langswitch_lang/en/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

