<?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>Hristo Georgiev - Portfolio</title>
	<atom:link href="http://bateto.com/bateto/feed/" rel="self" type="application/rss+xml" />
	<link>http://bateto.com/bateto</link>
	<description>My Projects and About Me</description>
	<lastBuildDate>Tue, 13 Sep 2011 13:57:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Project Spikefinity</title>
		<link>http://bateto.com/bateto/spikefinity/</link>
		<comments>http://bateto.com/bateto/spikefinity/#comments</comments>
		<pubDate>Sat, 10 Sep 2011 11:06:35 +0000</pubDate>
		<dc:creator>Hristo Georigiev</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[.net framework]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[controls]]></category>
		<category><![CDATA[demos]]></category>
		<category><![CDATA[installation]]></category>

		<guid isPermaLink="false">http://portfolio.net/?p=395</guid>
		<description><![CDATA[Project Spikefinity was created with experimental and learning purposes during my work in Telerik together with one workmate. It contained almost every aspect of the production of a collection of WPF controls. The covered aspects that this project covered are: &#8230; <a href="http://bateto.com/bateto/spikefinity/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Project Spikefinity was created with experimental and learning purposes during my work in Telerik together with one workmate. It contained almost every aspect of the production of a collection of WPF controls.<span id="more-395"></span></p>
<p>The covered aspects that this project covered are:</p>
<ul>
<li>Simple collection of five controls for WPF both for .Net 3.5 and .Net 4.0</li>
<li>Automated building infra structure of the project</li>
<li>Documentation of the controls</li>
<li>Extendable demo previewer both for .Net 3.5 and .Net 4.0</li>
<li>Collection of over ten demos of the controls</li>
<li>Installation of the controls</li>
<li>Simple Visual Studio add-in, that showed information about the installed controls.</li>
</ul>
<p>The main task of the project was to create installation package that is suitable both for .Net 3.5 and .Net 4.0 Framework. Until that moment separated installation packages were used for the both Frameworks.</p>
]]></content:encoded>
			<wfw:commentRss>http://bateto.com/bateto/spikefinity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kepler&#8217;s laws site</title>
		<link>http://bateto.com/bateto/keplers-laws-site/</link>
		<comments>http://bateto.com/bateto/keplers-laws-site/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 23:05:34 +0000</pubDate>
		<dc:creator>Hristo Georigiev</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[physics]]></category>

		<guid isPermaLink="false">http://portfolio.net/?p=358</guid>
		<description><![CDATA[Site dedicated to Kepler&#8217;s laws. It includes a model, which solves differential equation in real time to visualize the planetary movement. This project was highly rated in many contests. It was one of the prerequisites to have an interview in &#8230; <a href="http://bateto.com/bateto/keplers-laws-site/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Site dedicated to Kepler&#8217;s laws. It includes a model, which solves differential equation in real time to visualize the planetary movement.<br />
<center><img src="/bateto/wp-content/flash/img/kepler.jpg" /></center><br />
<span id="more-358"></span><br />
This project was highly rated in many contests. It was one of the prerequisites to have an interview in the national television BTV, dedicated on the young talents of Bulgaria.<br />
I developed this project as own initiative in the winter of 2008.</p>
]]></content:encoded>
			<wfw:commentRss>http://bateto.com/bateto/keplers-laws-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prosveta School Book</title>
		<link>http://bateto.com/bateto/prosveta-school-book/</link>
		<comments>http://bateto.com/bateto/prosveta-school-book/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 22:59:35 +0000</pubDate>
		<dc:creator>Hristo Georigiev</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[biology]]></category>
		<category><![CDATA[chemistry]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[school book]]></category>

		<guid isPermaLink="false">http://portfolio.net/?p=354</guid>
		<description><![CDATA[Part of the schoolbook in science for elementary schools by publishing house Prosveta. The project contains over 500 multimedia and interactive content, revealing the principles of chemistry, biology and physics. I participated in this project as a contributor in the &#8230; <a href="http://bateto.com/bateto/prosveta-school-book/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Part of the schoolbook in science for elementary schools by publishing house Prosveta. The project contains over 500 multimedia and interactive content, revealing the principles of chemistry, biology and physics.<br />
<center><img src="/bateto/wp-content/flash/img/multimedia-book.jpg" /></center><br />
<span id="more-354"></span><br />
I participated in this project as a contributor in the flash animations, drawing of the pictures, voice recording and many more &#8230; The project is from summer 2008.</p>
]]></content:encoded>
			<wfw:commentRss>http://bateto.com/bateto/prosveta-school-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lissajous figures simulation</title>
		<link>http://bateto.com/bateto/lissajous-figures/</link>
		<comments>http://bateto.com/bateto/lissajous-figures/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 22:25:14 +0000</pubDate>
		<dc:creator>Hristo Georigiev</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[mathematics]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[physics]]></category>

		<guid isPermaLink="false">http://portfolio.net/?p=348</guid>
		<description><![CDATA[This is a simulation of the famous Lisaju figures. The Lissajous figures could be observed could be observed if we have independent oscillations in two different coordinates (let they be x and y). More about these figures, read here.]]></description>
			<content:encoded><![CDATA[<p>This is a simulation of the famous Lisaju figures.<br />
<span id="more-348"></span><br />
<center style="z-index:1;"><br />
<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" id="game"><param name="movie" value="/bateto/wp-content/flash/Lisaju.swf" /><param name="quality" value="high"/><param name="width" value="600"/><param name="height" value="300"/><embed src="/bateto/wp-content/flash/Lisaju.swf" quality="high" name="game" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="600" height="300"></embed></object><br />
</center><br />
The Lissajous figures could be observed could be observed if we have independent oscillations in two different coordinates (let they be x and y). More about these figures, <a href="http://en.wikipedia.org/wiki/Lissajous_curve">read here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bateto.com/bateto/lissajous-figures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Musical Organ</title>
		<link>http://bateto.com/bateto/musical-organ/</link>
		<comments>http://bateto.com/bateto/musical-organ/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 22:13:39 +0000</pubDate>
		<dc:creator>Hristo Georigiev</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://portfolio.net/?p=343</guid>
		<description><![CDATA[Simple musical oragan, which was developed as a demonstration to the project Revival Sound Generator. The sounds, that the applicaition uses, are recorded using indeed this major project. See It]]></description>
			<content:encoded><![CDATA[<p>Simple musical oragan, which was developed as a demonstration to the project Revival Sound Generator. The sounds, that the applicaition uses, are recorded using indeed this major project.<br />
<center><a href="/bateto/wp-content/flash/organ.zip">See It</a></center></p>
]]></content:encoded>
			<wfw:commentRss>http://bateto.com/bateto/musical-organ/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stack Implementation</title>
		<link>http://bateto.com/bateto/stack-implementation/</link>
		<comments>http://bateto.com/bateto/stack-implementation/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 08:05:58 +0000</pubDate>
		<dc:creator>Hristo Georigiev</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[data structures]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mathematics]]></category>

		<guid isPermaLink="false">http://portfolio.net/?p=306</guid>
		<description><![CDATA[The stack is linear data structure, in which the first added element should be taken last from the stack. In this manner, the stack obeys to the Last-in-last-out (LIFO) policy. Theoretically, the stack can store any kind of abstract data &#8230; <a href="http://bateto.com/bateto/stack-implementation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><center><img src="/bateto/wp-content/algorithms/stack.jpg" /></center><br />
The stack is linear data structure, in which the first added element should be taken last from the stack. In this manner, the stack obeys to the Last-in-last-out (LIFO) policy.<span id="more-306"></span> Theoretically, the stack can store any kind of abstract data types as elements, but there are two basic operations &#8211; <em>push</em> and <em>pop</em>. </p>
<p>The <strong>push </strong>operation adds an element to the top of the stack. That way, the access to the lower elements is removed and the stack could be initialized if it is empty.</p>
<p>The <strong>pop</strong> operation retrieves and removes the first element from the top of the stack. This is element is returned by this operation. That way, elements from under levels could be accessed or to come to an empty stack.</p>
<p>The nature of the push and pop operations adds to the elements of the stack natural order. The elements are removed in reverse order of their addition (pushing) to the stack. That is why the lower elements are those that are for longer time staying at the stack.</p>
<p>Here is my implementation of queue:</p>
<div class="codesnip-container" >
<div class="java codesnip" style="font-family:monospace;"><span class="co3">/**<br />
&nbsp;* Stack implementation<br />
&nbsp;* @author Hristo Georgiev<br />
&nbsp;*/</span><br />
<span class="kw1">public</span> <span class="kw1">class</span> xStack<span class="sy0">&lt;</span>T<span class="sy0">&gt;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw1">private</span> <span class="kw1">final</span> <span class="kw4">int</span> INITIAL_ARRAY_LENGTH <span class="sy0">=</span> <span class="nu0">4</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="kw1">private</span> <span class="kw4">int</span> size<span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="kw1">private</span> <span class="kw4">int</span> count<span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="kw1">private</span> T<span class="br0">&#91;</span><span class="br0">&#93;</span> stack<span class="sy0">;</span></p>
<p>&nbsp; &nbsp; <span class="co3">/**<br />
&nbsp; &nbsp; * Constructor of empty stack<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; <span class="kw1">public</span> xStack<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">count</span> <span class="sy0">=</span> <span class="sy0">-</span><span class="nu0">1</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">size</span> <span class="sy0">=</span> INITIAL_ARRAY_LENGTH<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">stack</span> <span class="sy0">=</span> <span class="br0">&#40;</span>T<span class="br0">&#91;</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="kw1">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Object</span></a><span class="br0">&#91;</span><span class="kw1">this</span>.<span class="me1">size</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="co3">/**<br />
&nbsp; &nbsp; * Push an element in the head of the stack<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">void</span> push<span class="br0">&#40;</span>T element<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">count</span><span class="sy0">++;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span><span class="kw1">this</span>.<span class="me1">count</span> <span class="sy0">&gt;=</span> <span class="kw1">this</span>.<span class="me1">size</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">resizeArray</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; stack<span class="br0">&#91;</span><span class="kw1">this</span>.<span class="me1">count</span><span class="br0">&#93;</span> <span class="sy0">=</span> element<span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="co3">/**<br />
&nbsp; &nbsp; * Pop an element from the head of the stack<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; <span class="kw1">public</span> T pop<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span><span class="sy0">!</span>isEmpty<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="kw1">this</span>.<span class="me1">stack</span><span class="br0">&#91;</span><span class="kw1">this</span>.<span class="me1">count</span><span class="sy0">&#8211;</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><span class="kw1">else</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="kw2">null</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="co3">/**<br />
&nbsp; &nbsp; * Checks if the stack is empty<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">boolean</span> isEmpty<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span><span class="kw1">this</span>.<span class="me1">count</span> <span class="sy0">==</span> 0<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="kw2">true</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="kw2">false</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="kw1">private</span> <span class="kw4">void</span> resizeArray<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; T<span class="br0">&#91;</span><span class="br0">&#93;</span> newStack <span class="sy0">=</span> <span class="br0">&#40;</span>T<span class="br0">&#91;</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="kw1">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Object</span></a><span class="br0">&#91;</span>2<span class="sy0">*</span><span class="kw1">this</span>.<span class="me1">size</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">arraycopy</span><span class="br0">&#40;</span><span class="kw1">this</span>.<span class="me1">stack</span>, 0, newStack, 0, <span class="kw1">this</span>.<span class="me1">size</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">stack</span> <span class="sy0">=</span> newStack<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">size</span> <span class="sy0">*=</span> <span class="nu0">2</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://bateto.com/bateto/stack-implementation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Queue Implementation</title>
		<link>http://bateto.com/bateto/queue-implementation/</link>
		<comments>http://bateto.com/bateto/queue-implementation/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 08:05:40 +0000</pubDate>
		<dc:creator>Hristo Georigiev</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[data structures]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://portfolio.net/?p=304</guid>
		<description><![CDATA[The queue is defined type of linear data structure, in which the elements are stored in ordered sequence. The most important operations are the adding of an element at the back end of the sequence (enqueue) and the extraction of &#8230; <a href="http://bateto.com/bateto/queue-implementation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The queue is defined type of linear data structure, in which the elements are stored in ordered sequence. The most important operations are the adding of an element at the back end of the sequence (enqueue) and the extraction of the element from the front end of the sequence (dequeue).<span id="more-304"></span> The queue is an example for the First-In-First-Out(FIFO) data structure types. The first element that is enqueued will be also the first that is taken from the queue. </p>
<p>There could be made an analogy between the practical meaning of the word queue. For example, lets take an queue from people waiting at front of a kiosk to buy a ticket. Then we should order at the rear and to wait our turn. That is when we go to the front of the queue and there is nobody before us (if there was someone, then he had been served already). Then we could be served and to leave the queue.</p>
<p><center><img src="/bateto/wp-content/algorithms/queue.jpg" /></center></p>
<p>Here is my implementation of queue:</p>
<div class="codesnip-container" >
<div class="java codesnip" style="font-family:monospace;"><span class="co3">/**<br />
&nbsp;* This class implements a half-static queue<br />
&nbsp;* @author Hristo Georgiev<br />
&nbsp;*/</span><br />
<span class="kw1">public</span> <span class="kw1">class</span> xQueue<span class="sy0">&lt;</span>T<span class="sy0">&gt;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw1">private</span> <span class="kw1">final</span> <span class="kw4">int</span> INITIAL_ARRAY_LENGTH <span class="sy0">=</span> <span class="nu0">4</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="kw1">private</span> <span class="kw1">final</span> <span class="kw4">int</span> INITIAL_POSITION <span class="sy0">=</span> <span class="nu0">0</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="kw1">private</span> <span class="kw4">int</span> size<span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="kw1">private</span> <span class="kw4">int</span> count<span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="kw1">private</span> <span class="kw4">int</span> position<span class="sy0">;</span></p>
<p>&nbsp; &nbsp; <span class="kw1">private</span> T<span class="br0">&#91;</span><span class="br0">&#93;</span> queue<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="co3">/**<br />
&nbsp; &nbsp; * Constructor of empty queue<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; <span class="kw1">public</span> xQueue<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">count</span> <span class="sy0">=</span> <span class="sy0">-</span><span class="nu0">1</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">size</span> <span class="sy0">=</span> INITIAL_ARRAY_LENGTH<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">position</span> <span class="sy0">=</span> INITIAL_POSITION<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">queue</span> <span class="sy0">=</span> <span class="br0">&#40;</span>T<span class="br0">&#91;</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="kw1">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Object</span></a><span class="br0">&#91;</span><span class="kw1">this</span>.<span class="me1">size</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="co3">/**<br />
&nbsp; &nbsp; * Enqueue an element to the queue<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">void</span> enqueue<span class="br0">&#40;</span>T element<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">count</span><span class="sy0">++;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span><span class="kw1">this</span>.<span class="me1">count</span> <span class="sy0">&gt;=</span> <span class="kw1">this</span>.<span class="me1">size</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">resizeArray</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; queue<span class="br0">&#91;</span><span class="kw1">this</span>.<span class="me1">count</span><span class="br0">&#93;</span> <span class="sy0">=</span> element<span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="co3">/**<br />
&nbsp; &nbsp; * Dequeue an element to the queue<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; <span class="kw1">public</span> T dequeue<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span><span class="sy0">!</span>isEmpty<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="kw1">this</span>.<span class="me1">queue</span><span class="br0">&#91;</span>position<span class="sy0">++</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><span class="kw1">else</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="kw2">null</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="co3">/**<br />
&nbsp; &nbsp; * Checks if the queue is empty<br />
&nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">boolean</span> isEmpty<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span><span class="kw1">this</span>.<span class="me1">position</span> <span class="sy0">==</span> <span class="kw1">this</span>.<span class="me1">size</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="kw2">true</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="kw2">false</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">private</span> <span class="kw4">void</span> resizeArray<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; T<span class="br0">&#91;</span><span class="br0">&#93;</span> newQueue <span class="sy0">=</span> <span class="br0">&#40;</span>T<span class="br0">&#91;</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="kw1">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Object</span></a><span class="br0">&#91;</span>2<span class="sy0">*</span><span class="kw1">this</span>.<span class="me1">size</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">arraycopy</span><span class="br0">&#40;</span><span class="kw1">this</span>.<span class="me1">queue</span>, 0, newQueue, 0, <span class="kw1">this</span>.<span class="me1">size</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">queue</span> <span class="sy0">=</span> newQueue<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">size</span> <span class="sy0">*=</span> <span class="nu0">2</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://bateto.com/bateto/queue-implementation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xpath Tester</title>
		<link>http://bateto.com/bateto/xpath-tester/</link>
		<comments>http://bateto.com/bateto/xpath-tester/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 15:34:29 +0000</pubDate>
		<dc:creator>Hristo Georigiev</dc:creator>
				<category><![CDATA[PHP and MySQL]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xpath]]></category>

		<guid isPermaLink="false">http://portfolio.net/?p=299</guid>
		<description><![CDATA[This a web-based development tool, which could be use to test and validate various xpath queries. The xml document could be given as text field or as a url to a online document in the Internet. See it This project &#8230; <a href="http://bateto.com/bateto/xpath-tester/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This a web-based development tool, which could be use to <strong>test and validate various xpath queries</strong>. The xml document could be given as text field or as a url to a online document in the Internet.<br />
<a href="/bateto/wp-content/php/xpath-tester/"><center><br />
<h1>See it</h1>
<p></center></a><span id="more-299"></span><br />
This project was created as a test tool in my practical work with various XML and HTML documents. I had to write various XPath queries and it actually helped a lot <img src='http://bateto.com/bateto/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
You can see the implementation <a href="/bateto/wp-content/php/xpath-tester/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bateto.com/bateto/xpath-tester/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Revival Sound Generator</title>
		<link>http://bateto.com/bateto/revival-sound-generator/</link>
		<comments>http://bateto.com/bateto/revival-sound-generator/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 14:54:39 +0000</pubDate>
		<dc:creator>Hristo Georigiev</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[.net framework]]></category>
		<category><![CDATA[contest]]></category>
		<category><![CDATA[generator]]></category>

		<guid isPermaLink="false">http://portfolio.net/?p=283</guid>
		<description><![CDATA[Powerful desktop application, which generates complex signals in real-time and outputs them to the audio card. The parameters of the signal are changeable, even when emitting. This project was very high valued at many contests, including an international contest in &#8230; <a href="http://bateto.com/bateto/revival-sound-generator/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Powerful desktop application, which <strong>generates complex signals in real-time and outputs them to the audio card</strong>. The parameters of the signal are changeable, even when emitting. This project was very high valued at many contests, including an international <em>contest in Denmark</em>.<br />
<center><a href="/bateto/rsg" target="_blank" ><img src="/bateto/wp-content/net/img/revival-sound-generator.jpg" title="Revival Sound Generator Documentation"/>Documentation</a></center><span id="more-283"></span><br />
It was created as a project for one <em>code competition</em>. The task of the competition was to develop a console line application that generates square waves from the sound card. This project was moved even forward, and the result was the Revival Sound Generator. It is my own work and was created in summer 2008. The documentation of this project could be found <a href="/bateto/rsg" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bateto.com/bateto/revival-sound-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pascal Triangle</title>
		<link>http://bateto.com/bateto/pascal-triangle/</link>
		<comments>http://bateto.com/bateto/pascal-triangle/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 11:15:28 +0000</pubDate>
		<dc:creator>Hristo Georigiev</dc:creator>
				<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Mathematics]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[mathematics]]></category>

		<guid isPermaLink="false">http://portfolio.net/?p=256</guid>
		<description><![CDATA[The Pascal Triangle could be received when we put the binominal coefficients in a triangle array &#8211; double indexed sequence, as the length of a row is as long as the index of the row itself. This triangle is named &#8230; <a href="http://bateto.com/bateto/pascal-triangle/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The Pascal Triangle could be received when we put the binominal coefficients in a triangle array &#8211; double indexed sequence, as the length of a row is as long as the index of the row itself. <span id="more-256"></span>This triangle is named after the French mathematician Biez Pascal. However it was studied many centuries before him in different countries.<br />
<center>
<pre>
1
1   1
1  2  1
1  3  3  1
1  4  6  4  1
1  5 10 10 5 1
1 6 15 20 15 6 1
</center></pre>
<p>The rows in the Pascal&#8217;s Triangle are consecutively numbered with start at the top.  The elements of each row are numbered from left as beginning with 0 and usually are ordered according the neighbouring rows.<br />
The constructing of the triangle could be made as follows. At row 0 we put only the number 1. After that to receive the elements of the next rows, we sum the neighbouring numbers at top left and top right. If one of the numbers is missing, then it is replaced with 0 instead. For example the first number at the first row is 1, and when we sum the numbers 1 and 3 at third row we receive the number 4 at the fourth row.</p>
<h3>Code</h3>
<p>A example class in Java, that could calculate the Pascal Triangle and the &#8220;reduced&#8221; Pascal Triangle is:</p>
<div class="codesnip-container" >
<div class="java codesnip" style="font-family:monospace;"><span class="kw1">public</span> <span class="kw1">class</span> PascalTriangle <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw1">private</span> <span class="kw4">int</span><span class="br0">&#91;</span><span class="br0">&#93;</span> lastRow<span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="kw1">private</span> <span class="kw4">int</span> row<span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="kw1">private</span> <span class="kw4">int</span> mod<span class="sy0">;</span></p>
<p>&nbsp; &nbsp; <span class="kw1">public</span> PascalTriangle<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span> <span class="kw1">this</span><span class="br0">&#40;</span>0<span class="br0">&#41;</span><span class="sy0">;</span> <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">public</span> PascalTriangle<span class="br0">&#40;</span><span class="kw4">int</span> mod<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">mod</span> <span class="sy0">=</span> mod<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">reset</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw1">final</span> <span class="kw4">void</span> reset<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">row</span> <span class="sy0">=</span> <span class="nu0">0</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">lastRow</span> <span class="sy0">=</span> <span class="kw1">new</span> <span class="kw4">int</span><span class="br0">&#91;</span>1<span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">lastRow</span><span class="br0">&#91;</span>0<span class="br0">&#93;</span> <span class="sy0">=</span> <span class="nu0">1</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">int</span><span class="br0">&#91;</span><span class="br0">&#93;</span> getRow<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">int</span><span class="br0">&#91;</span><span class="br0">&#93;</span> newRow <span class="sy0">=</span> <span class="kw1">new</span> <span class="kw4">int</span><span class="br0">&#91;</span><span class="sy0">++</span>row<span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; newRow<span class="br0">&#91;</span>0<span class="br0">&#93;</span> <span class="sy0">=</span> <span class="nu0">1</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; newRow<span class="br0">&#91;</span>row<span class="sy0">-</span>1<span class="br0">&#93;</span> <span class="sy0">=</span> <span class="nu0">1</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>mod<span class="sy0">==</span>0<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span><span class="br0">&#40;</span><span class="kw4">int</span> j<span class="sy0">=</span><span class="nu0">1</span><span class="sy0">;</span>j<span class="sy0">&lt;</span>row<span class="sy0">-</span><span class="nu0">1</span><span class="sy0">;</span>j<span class="sy0">++</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRow<span class="br0">&#91;</span>j<span class="br0">&#93;</span> <span class="sy0">=</span> <span class="br0">&#40;</span>lastRow<span class="br0">&#91;</span>j<span class="sy0">-</span>1<span class="br0">&#93;</span><span class="sy0">+</span>lastRow<span class="br0">&#91;</span>j<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span><span class="br0">&#40;</span><span class="kw4">int</span> j<span class="sy0">=</span><span class="nu0">1</span><span class="sy0">;</span>j<span class="sy0">&lt;</span>row<span class="sy0">-</span><span class="nu0">1</span><span class="sy0">;</span>j<span class="sy0">++</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRow<span class="br0">&#91;</span>j<span class="br0">&#93;</span> <span class="sy0">=</span> <span class="br0">&#40;</span>lastRow<span class="br0">&#91;</span>j<span class="sy0">-</span>1<span class="br0">&#93;</span><span class="sy0">+</span>lastRow<span class="br0">&#91;</span>j<span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">%</span>mod<span class="sy0">;</span></p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">this</span>.<span class="me1">lastRow</span> <span class="sy0">=</span> newRow<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> newRow<span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://bateto.com/bateto/pascal-triangle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

