<?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>Dmitry Kalashnikov &#187; Software</title>
	<atom:link href="http://klimb.com/blog/category/software/feed" rel="self" type="application/rss+xml" />
	<link>http://klimb.com/blog</link>
	<description></description>
	<lastBuildDate>Thu, 26 Jan 2012 18:56:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Microsoft Award</title>
		<link>http://klimb.com/blog/2010/05/07/microsoft-award</link>
		<comments>http://klimb.com/blog/2010/05/07/microsoft-award#comments</comments>
		<pubDate>Fri, 07 May 2010 20:55:04 +0000</pubDate>
		<dc:creator>Dmitry</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://klimb.com/blog/?p=726</guid>
		<description><![CDATA[Today is a special day &#8212; I was awarded for my work (related to NIC Teaming) and I am enjoying this day thoroughly :)
Some thoughts: the people I work with are &#8230; scary smart, and at the same time very kind (a rare combination).
I am very fortunate to have both: opportunity and means to contribute.
Thank [...]]]></description>
			<content:encoded><![CDATA[<p>Today is a special day &#8212; I was awarded for my work (related to <a href="http://en.wikipedia.org/wiki/Link_aggregation">NIC Teaming</a>) and I am enjoying this day thoroughly :)<br />
Some thoughts: the people I work with are &#8230; scary smart, and at the same time very kind (a rare combination).<br />
I am very fortunate to have both: opportunity and means to contribute.</p>
<p>Thank you!</p>
<p><img class="alignnone size-full wp-image-727" title="Dmitry_Kalashnikov_Microsoft_Award_2010" src="http://klimb.com/blog/wp-content/uploads/2010/05/Dmitry_Kalashnikov_Microsoft_Award_2010.jpg" alt="Dmitry_Kalashnikov_Microsoft_Award_2010" width="599" height="655" /></p>
]]></content:encoded>
			<wfw:commentRss>http://klimb.com/blog/2010/05/07/microsoft-award/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Sieve (of Eratosthenes) algorithm for generating prime numbers</title>
		<link>http://klimb.com/blog/2010/01/24/sieve-of-eratosthenes-algorithm-prime-numbers</link>
		<comments>http://klimb.com/blog/2010/01/24/sieve-of-eratosthenes-algorithm-prime-numbers#comments</comments>
		<pubDate>Sun, 24 Jan 2010 22:06:21 +0000</pubDate>
		<dc:creator>Dmitry</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://klimb.com/blog/?p=602</guid>
		<description><![CDATA[A prime number is divisible by 1 or by itself. To generate prime numbers to 20 we&#8217;ll use Sieve (of Eratosthenes) algorithm, which is really simple to explain:
Strike out all multiples of 2&#8217;s:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Strike out all multiples [...]]]></description>
			<content:encoded><![CDATA[<p>A prime number is divisible by 1 or by itself. To generate prime numbers to 20 we&#8217;ll use Sieve (of Eratosthenes) algorithm, which is really simple to explain:</p>
<p>Strike out all multiples of 2&#8217;s:<br />
<br />1 2 3 <strike>4</strike> 5 <strike>6</strike> 7 <strike>8</strike> 9 <strike>10</strike> 11 <strike>12</strike> 13 <strike>14</strike> 15 <strike>16</strike> 17 <strike>18</strike> 19 <strike>20</strike></p>
<p>Strike out all multiples of 3&#8217;s:<br />
<br />2 3 5 7 <strike>9</strike> 11 13 <strike>15</strike> 17 19</p>
<p>And so on. Here is a C# code that does exactly that:</p>
<pre name="code" class="c-sharp">
private static void PrintPrimesTo(int num) {
            var primes = new bool[num + 1];

            // init candidates
            for (int i = 2; i &lt;= num; i++) { primes[i] = true; }

            // cross-out 2's:
            //   2, 4, 6, 8, 10...
            // cross-out 3's:
            //   9, 12, 15...
            for (int i = 2; (i * i) &lt;= num; i++ ) {
                Console.WriteLine("Crossing out {0}'s to {1}:", i, num);

                for (int j = i * i; j &lt;= num; j = j + i) {
                    Console.WriteLine(" * crossing-out: {0}", j);
                    primes[j] = false;
                }
            }

            Console.WriteLine("Results: prime numbers between 2 and {0}:", num);
            for (int i = 2; i &lt;= num; i++) {
                if (primes[i]) Console.WriteLine(" * {0} ", i);
            }
        }
</pre>
<p><span id="more-602"></span><br />
Sample output from calling PrintPrimesTo(100):</p>
<pre>
Crossing out 2's to 20:
 * crossing-out: 4
 * crossing-out: 6
 * crossing-out: 8
 * crossing-out: 10
 * crossing-out: 12
 * crossing-out: 14
 * crossing-out: 16
 * crossing-out: 18
 * crossing-out: 20
Crossing out 3's to 20:
 * crossing-out: 9
 * crossing-out: 12
 * crossing-out: 15
 * crossing-out: 18
Crossing out 4's to 20:
 * crossing-out: 16
 * crossing-out: 20
Results: prime numbers between 2 and 20:
 * 2
 * 3
 * 5
 * 7
 * 11
 * 13
 * 17
 * 19
</pre>
]]></content:encoded>
			<wfw:commentRss>http://klimb.com/blog/2010/01/24/sieve-of-eratosthenes-algorithm-prime-numbers/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>How to display song lyrics on iPhone/iPod</title>
		<link>http://klimb.com/blog/2009/12/05/how-to-display-song-lyrics-on-iphoneipod</link>
		<comments>http://klimb.com/blog/2009/12/05/how-to-display-song-lyrics-on-iphoneipod#comments</comments>
		<pubDate>Sat, 05 Dec 2009 21:11:44 +0000</pubDate>
		<dc:creator>Dmitry</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://klimb.com/blog/2009/12/05/how-to-display-song-lyrics-on-iphoneipod</guid>
		<description><![CDATA[Did you know your iPhone/iPod software can display lyrics for songs?
Adding lyrics to your songs

You just need to make sure your mp3 files have &#8220;lyrics property&#8221; populated.
On your computer, open iTunes, right click on a song and choose &#8220;Get Info&#8221;. You should see this dialog:


Now click on &#8220;Lyrics&#8221; tab and add your text.
You can copy [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know your iPhone/iPod software can display lyrics for songs?</p>
<p><span style="color:#366092"><strong>Adding lyrics to your songs</strong><br />
</span></p>
<p>You just need to make sure your mp3 files have &#8220;lyrics property&#8221; populated.</p>
<p>On your computer, open iTunes, right click on a song and choose &#8220;Get Info&#8221;. You should see this dialog:</p>
<p><img src="http://klimb.com/blog/wp-content/uploads/2009/12/120509_2111_Howtodispla1.png" alt="" /><span style="font-family:Times New Roman; font-size:12pt"><br />
</span></p>
<p>Now click on &#8220;Lyrics&#8221; tab and add your text.</p>
<p>You can copy and paste lyrics text from websites, such as:</p>
<ul>
<li><a href="http://lyrics.wikia.com/Main_Page"><span style="color: blue; text-decoration: underline;">http://lyrics.wikia.com/Main_Page</span></a><span style="font-family:Times New Roman; font-size:12pt"><br />
</span></li>
</ul>
<p>(Also, if you look around you&#8217;ll find software that will automatically add lyrics to all of your songs)</p>
<p><span style="color:#366092"><strong>How to view lyrics on iPhone:</strong><br />
</span></p>
<p>Once you&#8217;ve added lyrics to your songs and synced your phone, here is how you view it: when the song is playing, simply tab the screen once and it will overlay lyrics over album art!</p>
<p><img src="http://klimb.com/blog/wp-content/uploads/2009/12/120509_2111_Howtodispla2.png" alt="" /><span style="font-family:Times New Roman; font-size:12pt"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://klimb.com/blog/2009/12/05/how-to-display-song-lyrics-on-iphoneipod/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Regex Notes</title>
		<link>http://klimb.com/blog/2006/12/15/regex-notes</link>
		<comments>http://klimb.com/blog/2006/12/15/regex-notes#comments</comments>
		<pubDate>Fri, 15 Dec 2006 20:29:57 +0000</pubDate>
		<dc:creator>Dmitry</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://klimb.com/blog/?p=29</guid>
		<description><![CDATA[Regular expressions (regex) let you search for a particular pattern. Regex consist of literal characters, and special characters, also called meta characters. Regex syntax has 2 modes, one inside of character classes, which is inside [ ] and one outsided of character classes.
Character classes []:  Regex inside [] are in different mode and have [...]]]></description>
			<content:encoded><![CDATA[<p>Regular expressions (regex) let you search for a particular pattern. Regex consist of literal characters, and special characters, also called meta characters. Regex syntax has 2 modes, one inside of character classes, which is inside [ ] and one outsided of character classes.<span id="more-29"></span>
<pre>Character classes []:  Regex inside [] are in different mode and have different syntax. It matches a  single character specified as a list, range or class shortcut.  03[-./]19[-./]76  Will match the above date delimited by a dot or a hyphen.  Inside [] the dot is no longer a meta-character, its matched literally!  Negation Operator ^  f[^u]  matches something with f, followed by any character other then u  Character classes shortcuts  \d [0-9] digit  \D non digit  \w [a-zA-Z0-9_] part of word  \W non word  \s [ \t\n\r\f\v] whitespace  \S non whitespaceAlternation:  | operator is 'or'  Jeff(re|er|izz)y  =&gt; Jeffrey, Jeffery, JeffizzyConditionals:  (?if then | else)  if the "if" part is true, "then" expression is attmpted, otherwise  "else" is attempted  (?if then)  else condition is optional, so is the pipe character prefixing itAnchors:  ^  beg of line  $  end of line  \b word boundary  \B non-word boundary  Ruby:  \A begining of a string  \Z end of string (or before newline at the end)  \z end of stringOptional Items:  ? optionally matches a character before it, or you can specify a group() of  characters before it:  colou?r  will match color and colour  4(th)?  will match 4 and 4thRepetitions:  +            s1 or more times  *            0 or more times  ?            1 or 0 times  {n}          match exactly n times  {min, max}   min to max times  {min,}       at least min  {,max}       at most max (ruby)Backreferences:  First matched group ():    sed, vi: \1    ruby: $1    php: $m[1]    python, java: m.group(1)    c#: m.Groups[1]  Group zero is typically the entire matchEscape:  \. will escape dot meta characterMore Info:  http://www.regular-expressions.info/</pre>
]]></content:encoded>
			<wfw:commentRss>http://klimb.com/blog/2006/12/15/regex-notes/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Making of Klimb, Rock Climbing Training Software</title>
		<link>http://klimb.com/blog/2006/11/24/making-of-klimb-rock-climbing-training-software</link>
		<comments>http://klimb.com/blog/2006/11/24/making-of-klimb-rock-climbing-training-software#comments</comments>
		<pubDate>Fri, 24 Nov 2006 02:52:36 +0000</pubDate>
		<dc:creator>Dmitry</dc:creator>
				<category><![CDATA[Climbing]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://klimb.com/blog/?p=11</guid>
		<description><![CDATA[When I was in college, I had two computer classes in which we had to do a major final project. One of them was on relational databases and another on Java/Swing GUI programming. I also needed some kind of journaling software to keep track of my climbing and training. I wanted something that helped me [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Making Of Klimb, Rock Climbing Training Software" href="http://klimb.com/blog/?p=11"><img title="Klimb Screenshot" src="http://www.klimb.com/img/krps/klimb_screen1.png" alt="Klimb Screenshot" width="136" height="88" align="left" /></a>When I was in college, I had two computer classes in which we had to do a major final project. One of them was on relational databases and another on Java/Swing GUI programming. I also needed some kind of journaling software to keep track of my climbing and training. I wanted something that helped me visualize my progress and help me train more efficiently. So, I made Klimb, the very first Rock Climbing Training software. It helped me pass my classes, train smarter for comps and make some cash on the side!</p>
<p><span id="more-11"></span> <strong>Design </strong><br />
I&#8217;ve considered many different technologies, and I decided to make it into a desktop application that runs on people&#8217;s computer instead of my server, because of possible heavvy processing of journal data for graphing and all kinds of liability. So Klimb had the following basic components:</p>
<ul>
<li><a title="Hypersonic RDBM Engine" href="http://www.hsqldb.org/">Hypersonic RDBM Engine</a></li>
<li><a title="IzPack Installer" href="http://www.izforge.com/izpack/">IzPack Installer</a> (see Klimb reference)</li>
<li>Java Core, Swing GUI</li>
<li><a title="JFreeChart" href="http://www.jfree.org/jfreechart/">JFreeChart</a> graphing library</li>
<li>Obfiscator Plugin to scramble the source code</li>
<li>Ant builid scripts</li>
<li>License-checking module/activator</li>
</ul>
<p>In about a year after this software was released and I made a little money, I released it under GPL (General Public License) and removed the license-checking code and obfiscation.</p>
<p><span style="font-weight: bold">Aftermath</span><br />
I am really glad I did this project, it gave me a chance to improove my Java skills. I got so familiar with Java Swing that I made GUI &#8220;by hand&#8221;, without any builders or tools. I also discovered many issues people don&#8217;t normally think of when they&#8217;re writing software, such as license checking, protection against decompilation of byte code, deployment to multiple operating systems, and marketing.</p>
<p><strong>Screenshots</strong></p>
<p><img src="http://klimb.com/img/krps/klimblg.jpg" alt="" /></p>
<p><img src="http://klimb.com/img/krps/klimblgexersizes.jpg" alt="" /></p>
<p><img src="http://klimb.com/img/krps/klimblgstrength.jpg" alt="" /></p>
<p><strong>Downloads</strong></p>
<ul>
<li><a title="Source Code" href="http://www.klimb.com/projects/krps/klimb_src_02.04.2006.tgz">Source Code</a>, from 2/4/2006 (for programmers)</li>
<li><a title="Klimb Installer" href="http://www.klimb.com/projects/krps/InstallKlimb.jar">Klimb Installer</a> (for regular users)</li>
</ul>
<p><strong>Instructions</strong><br />
After you download the installer, double click on it. If it doesn&#8217;t run or Windows thinks its a zip file, it means you don&#8217;t have Java installed (JRE, Java Runtime Environment) or JAR-type files are associated with some other program like WinZip. JRE is available for free and you can <a title="download it here" href="http://www.java.com/en/download/index.jsp">download it here</a>. Either way, if you just install Sun&#8217;s JRE, all of your java software will run faster and Klimb installer will launch on double click. If you do have &#8220;java&#8221; already installed, I&#8217;d replace it with Sun&#8217;s version. It will also re-associate JAR files back to JVM.</p>
<p>To be honest, I avoid using Windows as much as I can. I own a couple of really nice Intel Macs and a PC Laptop, that I use primarly for Visual Studio and FreeBSD. So, if you&#8217;re on UNIX, or if all else fails, you can launch the installer by typing<br />
[code]<br />
# java -jar InstallKlimb.jar<br />
[/code]<br />
on your terminal.</p>
<p>I hope you enjoy this software, please make post of what you though of it, or about your training experience in general.</p>
<p>Don&#8217;t forget to have fun while you train,</p>
<p>-D</p>
]]></content:encoded>
			<wfw:commentRss>http://klimb.com/blog/2006/11/24/making-of-klimb-rock-climbing-training-software/feed</wfw:commentRss>
		<slash:comments>1680</slash:comments>
		</item>
	</channel>
</rss>

