<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-104542749526218103</id><updated>2011-11-27T16:31:58.493-08:00</updated><category term='flash'/><category term='templates'/><category term='math'/><category term='freesoftware'/><category term='java'/><category term='mylyn'/><category term='web'/><category term='kubuntu'/><category term='books'/><category term='dynamic'/><category term='programming'/><category term='java ubuntu jdk7 eclipse'/><category term='kbgoffice'/><category term='holyday'/><category term='openfest'/><category term='plasma'/><category term='fmi'/><category term='nopaste'/><category term='kde'/><category term='jar'/><category term='student'/><category term='C++'/><category term='mustsee'/><category term='firefox'/><category term='ТУ'/><category term='trac'/><category term='Linux'/><category term='IRC'/><category term='script'/><category term='video'/><category term='Qt'/><category term='sofia'/><category term='eclipse'/><category term='vim'/><category term='mozilla'/><category term='web 3.0'/><category term='nvidia'/><category term='university'/><category term='reloading'/><title type='text'>Nikolavp's Blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>37</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-8272830692960814452</id><published>2011-09-28T04:46:00.000-07:00</published><updated>2011-09-28T08:10:01.787-07:00</updated><title type='text'>Moved from Ubuntu to Arch</title><content type='html'>&lt;div&gt;&lt;b&gt;Intro&lt;/b&gt;&lt;/div&gt;After 3 years with Ubuntu on my laptop &lt;a href="http://www.lapwik.com/hp-compaq_6730s"&gt;HP 6730s&lt;/a&gt;, I finally decided to switch to something faster and more reliable(I will talk about this some more)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Some history&lt;/span&gt;:&lt;br /&gt;I was an old Gentoo user before and I was using it on my desktop machine. After I got my laptop though I knew that Gentoo is not so suitable for laptops(the compilation is killing them) so Ubuntu seemed like a nice choice. Something that just works out of the box is so important for laptops - i.e. I don't want to configure my wireless for hours.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;The problems I had with Ubuntu:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;It tries to hide the system from me. This really annoys me - I want to be able to configure my system by hand sometimes and don't want to find out that some service that I don't know about, started by Ubuntu, is autoediting my config files every now and then :(&lt;/li&gt;&lt;li&gt;The performance is bad - as I am mostly working with java applications and I feel them slow. I am not sure who is to blame for this but the other computers I have deployed on are working better.&lt;/li&gt;&lt;li&gt;It's not using a rolling release model which makes me pray and fix my machine every new release.&lt;/li&gt;&lt;li&gt;Some packages are old because of the "official" release model.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;So after the latest problems which I had with NetworkManager i finally decided to switch to something better. I couldn't find why, but my machine was booting like 2 minutes and messages poped up, telling me it's because of the network manager.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So far Arch seems stable, far faster(you cannot imagine), boots in 30 seconds with all services up. It just feels right.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-8272830692960814452?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/8272830692960814452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=8272830692960814452' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/8272830692960814452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/8272830692960814452'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2011/09/moved-from-ubuntu-to-arch.html' title='Moved from Ubuntu to Arch'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-1221478718296807414</id><published>2010-05-22T05:19:00.000-07:00</published><updated>2010-05-22T05:39:55.718-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java ubuntu jdk7 eclipse'/><title type='text'>Installing jdk7 in Ubuntu</title><content type='html'>&lt;p&gt;Today i wanted to try the new version of jdk and see how is the project going. Last time i checked it was too buggy to setup so i was a bit of disappointed. As I using ubuntu on my laptop i wanted to check if my distro is providing a development package for the new vm but that wasn't the case :(. Luckily the jdk project provides some nice prepackaged binaries you can install yourself over &lt;a href="http://dlc.sun.com.edgesuite.net/jdk7/binaries/index.html"&gt;here&lt;/a&gt;. After getting the binaries for my architecture(x64) and unpacking the archive i got a jdk1.7.0 directory. In ubuntu it pretty easy to set your platform default options and the tool for this is update-alternatives. Here are the commands if you have Ubuntu:&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Move the directory to the jvm directory where it should reside:&lt;/br&gt;&lt;br /&gt;&lt;pre class="prettyprint lang-bash"&gt;sudo mv jdk1.7.0/ /usr/lib/jvm &lt;/pre&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Check how many alternatives you have:&lt;/br&gt;&lt;br /&gt;&lt;pre class="prettyprint lang-bash"&gt;sudo update-alternatives --config java&lt;/pre&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Install the new alternative: &lt;/br&gt;&lt;br /&gt;&lt;pre class="prettyprint lang-bash"&gt;sudo update-alternatives --install /usr/bin/java java &lt;br /&gt;/usr/lib/jvm/jdk1.7.0/jre/bin/java 2&lt;/pre&gt;&lt;br /&gt;&lt;/br&gt;&lt;br /&gt;where 2 should be the next unused index from the last command. So if you have 2 java alternatives your new installation should have index 3&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Set the platform default to be the new option:&lt;/br&gt;&lt;br /&gt;&lt;pre class="prettyprint lang-bash"&gt;update-alternatives --config java&lt;/pre&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Now all your java applications will use the new jdk. I cannot tell the difference but as I work more with eclipse and other java tools i will be make my opinions and might share them here :)&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Happy coding&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-1221478718296807414?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/1221478718296807414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=1221478718296807414' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/1221478718296807414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/1221478718296807414'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2010/05/installing-jdk7-in-ubuntu.html' title='Installing jdk7 in Ubuntu'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-4374367857639742403</id><published>2009-09-22T09:08:00.001-07:00</published><updated>2009-09-22T09:13:05.727-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='kubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Installing flash 64bit on Kubuntu jaunty</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;p&gt;Maybe some of you know that kubuntu/ubuntu is providing 32 bit flash player and is using nspluginwrapper if you are using an 64 OS. Here the nspluginwrapper is making problems, it is making my machine unresponsible if I am watching 3 flash sites at the time and so on. I am also suspecting that it is the reason firefox crashes sometimes on some flash movies.&lt;/p&gt; &lt;p&gt;So here is the workarround. On the official website of adobe there is no 64 option so we have to dig a little more. We push a search on google and &lt;a href='http://labs.adobe.com/downloads/flashplayer10.html'&gt;here is what we get &lt;/a&gt;. It seems that there is some 64bit support so we scroll down the page and find a download link. Here is the whole procedure for installing the 64bit flash :):&lt;/p&gt; &lt;br/&gt;&lt;br/&gt;&lt;pre&gt;&lt;br /&gt;       wget -c http://download.macromedia.com/pub/labs/&lt;br /&gt;       flashplayer10/libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz&lt;br /&gt;       tar zxvf libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz&lt;br /&gt;       mkdir -p ~/.mozilla/plugins&lt;br /&gt;       mv libflashplayer.so ~/.mozilla/plugins&lt;br /&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;NB. Make sure that you uninstall any previous version of the flash player :)&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=52cd7226-0452-8fc0-a3b9-67195690fcae' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-4374367857639742403?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/4374367857639742403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=4374367857639742403' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/4374367857639742403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/4374367857639742403'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2009/09/installing-flash-64bit-on-kubuntu.html' title='Installing flash 64bit on Kubuntu jaunty'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-97463299951167513</id><published>2009-08-29T13:13:00.001-07:00</published><updated>2009-08-29T13:15:36.889-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='video'/><category scheme='http://www.blogger.com/atom/ns#' term='mustsee'/><category scheme='http://www.blogger.com/atom/ns#' term='web 3.0'/><title type='text'>Did you know movie and Kevin Kelly's web 3.0</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;p&gt;Have you already used &lt;a href='http://twine.com'&gt;twine&lt;/a&gt;, if not check it out. It is like a social bookmarking system and i am using it lately extensively for getting the latest information about the semantic technologies and the next generation web 3.0. After using it for about a week or two it starts to "know you" and recommend useful information based on your interest. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;For example today i got &lt;a href='http://www.penn-olson.com/2009/08/26/technology-social-wows-all-in-one-video/'&gt;this video&lt;/a&gt; with "&lt;b&gt;Did you know&lt;/b&gt;" stuff which is mostly mentioning things about the internet but there are some nice facts about the population in &lt;b&gt;USA, India&lt;/b&gt;. It is really interesting i think :). &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Check &lt;a href='http://www.youtube.com/watch?v=J132shgIiuY'&gt;this video&lt;/a&gt; also which was in the web 3.0 twine section of mine. This is Kevin Kelly and he is talking about web 3.0 and how he sees the WWW 20 years from now. It is a must see :)&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=55e0d2a2-6af5-8344-9600-c5f319127185' alt='' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-97463299951167513?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/97463299951167513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=97463299951167513' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/97463299951167513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/97463299951167513'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2009/08/did-you-know-movie-and-kevin-kelly-web_29.html' title='Did you know movie and Kevin Kelly&amp;#39;s web 3.0'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-1177428501676735590</id><published>2009-08-14T10:14:00.001-07:00</published><updated>2009-08-29T13:15:57.828-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dynamic'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='jar'/><category scheme='http://www.blogger.com/atom/ns#' term='reloading'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Reloading jars at Runtime</title><content type='html'>I haven't blogged in a while but now i have some time :). This week I had to dynamically reload some jars from a directory and i searched the net about the problem. I will show the implementation that I finally came up with. The problem with the dynamically loading external jars is that they should not be in the CLASSPATH because the system classloader is making some optimizations(cache) of the currently loaded classes and doesn't search again in the CLASSPATH if it has already instantiated the class. So to make the jars dynamically loadable we have to make our own ClassLoader or we can use the URLClassLoader which is part of the JavaSE. The idea is that every time we load the class we should use a new object of the URLClassLoader so we don't use the cache. And also we should have an interface so we can cast our instantiated object or the alternative is to use reflection and the Method class. But enough words here is the implementation:&lt;br /&gt;1. The Interface :&lt;br /&gt;&lt;pre class="prettyprint"&gt;package org.nikolavp;&lt;br /&gt;&lt;br /&gt;public interface Reloadable&lt;br /&gt;{&lt;br /&gt; public void method();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;2. The Class which will reload our class by a given name:&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;import java.io.File;&lt;br /&gt;import java.net.MalformedURLException;&lt;br /&gt;import java.net.URL;&lt;br /&gt;import java.net.URLClassLoader;&lt;br /&gt;&lt;br /&gt;import org.nikolavp.Reloadable;&lt;br /&gt;&lt;br /&gt;public class ClassReloader&lt;br /&gt;{&lt;br /&gt; public static Reloadable reload(String className) {&lt;br /&gt;  Reloadable obj = null;&lt;br /&gt;  URL jar = null;&lt;br /&gt;  try {&lt;br /&gt;   jar = new File("jars/somejar.jar").toURI().toURL();&lt;br /&gt;  } catch (MalformedURLException e) {&lt;br /&gt;   e.printStackTrace();&lt;br /&gt;  }&lt;br /&gt;  URLClassLoader loader = new URLClassLoader(new URL[] { jar }, ClassLoader.getSystemClassLoader());&lt;br /&gt;  try {&lt;br /&gt;   Class&lt;?&gt; clazz = loader.loadClass(className);&lt;br /&gt;   obj = (Reloadable) clazz.newInstance();&lt;br /&gt;  } catch (ClassNotFoundException e) {&lt;br /&gt;   e.printStackTrace();&lt;br /&gt;  } catch (InstantiationException e) {&lt;br /&gt;   e.printStackTrace();&lt;br /&gt;  } catch (IllegalAccessException e) {&lt;br /&gt;   e.printStackTrace();&lt;br /&gt;  }&lt;br /&gt;  return obj;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;3. The Main class to test our work:&lt;br /&gt;&lt;pre class="prettyprint"&gt;&lt;br /&gt;import org.nikolavp.Reloadable;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class Main&lt;br /&gt;{&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;  while (true) {&lt;br /&gt;   Reloadable object = ClassReloader.reload("MyClassFromSomeJar");&lt;br /&gt;   object.method();&lt;br /&gt;   try {&lt;br /&gt;    Thread.sleep(10 * 1000);&lt;br /&gt;   } catch (InterruptedException e) {&lt;br /&gt;    e.printStackTrace();&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Assume that MyClassFromSomeJar exist in the jars/somejar.jar &lt;br /&gt; you can now make changes to the&lt;br /&gt;code in the external jar and see the results :) &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Conclusion: This is one of the areas where java really shines. Try doing that with static languages like C/C++ :)&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="zemanta-pixie"&gt;&lt;img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=7d07d2ce-7a12-8013-84c5-fd2a7211886a" /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-1177428501676735590?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/1177428501676735590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=1177428501676735590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/1177428501676735590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/1177428501676735590'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2009/08/reloading-jars-at-runtime.html' title='Reloading jars at Runtime'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-1994108044520643188</id><published>2009-05-18T03:17:00.001-07:00</published><updated>2009-08-11T04:34:59.365-07:00</updated><title type='text'>How to install kbgoffice qt4</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I finally had the time to play a little bit with the build system of kbgoffice and the qt4 port i forked a year ago. Now the program can be installed with a simple make install rule from the build directory. To be able to compile it you will need a compiler, the qt4 header files and development tools. For example on my kubuntu it needs:&lt;br/&gt;&lt;br/&gt;&lt;ol&gt;&lt;li&gt;build-essential&lt;/li&gt;&lt;li&gt;qt4-dev-tools&lt;/li&gt;&lt;li&gt;cmake&lt;/li&gt;&lt;li&gt;subversion(to get the source)&lt;br/&gt;&lt;/li&gt;&lt;/ol&gt;You can get all that with a simple command &lt;b&gt;&lt;i&gt;sudo aptitude install build-essential qt4-dev-tools cmake subversion &lt;/i&gt;&lt;/b&gt;. After satisfying all the dependencies you need to get the source code with &lt;br/&gt;&lt;b&gt;&lt;i&gt;svn co http://svn.assembla.com/svn/kbgoffice/trunk kbgoffice&lt;/i&gt;&lt;/b&gt;&lt;br/&gt;go to the kbgoffice directory, create a new build directory, compile&lt;br/&gt;&lt;i&gt;&lt;b&gt;cd kbgoffice;mkdir build;cd build;cmake ../;make&lt;/b&gt;&lt;/i&gt;&lt;br/&gt;and if you wаnt to install the program&lt;br/&gt;&lt;i&gt;&lt;b&gt;sudo make install&lt;/b&gt;&lt;/i&gt;&lt;br/&gt;Then to startup the program just type kbgoffice in the konsole or the terminal client you are using &amp;lt;Alt+F2&amp;gt; works fine too. Have fun :D.&lt;br/&gt;&lt;u&gt;&lt;br/&gt;I didn't find how to make an uninstall rule so there is no make uninstall option for now. To delete the files installed, just delete the /usr/local/share/bgoffice directory and the /usr/local/bin/kbgoffice executable file :).&lt;/u&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=55b39261-a999-82b1-8b34-c3842a30fc88' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-1994108044520643188?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/1994108044520643188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=1994108044520643188' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/1994108044520643188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/1994108044520643188'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2009/05/how-to-install-kbgoffice-qt4.html' title='How to install kbgoffice qt4'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-4233275497964383050</id><published>2009-05-07T14:00:00.001-07:00</published><updated>2009-05-07T14:00:28.836-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Installing ati drivers for HP Compaq 6730s</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I have a new laptop HP Compaq 6730s. It seems that the drivers from the official kubuntu repository are not working :(. After I installed xorg-driver-fglrx and wanted to restart X - it locked. So I had to revert the xorg.conf from safe mode. Today I had the time and tried again with the official binaries from ATI and for now they seem to work really well. I enjoy the desktop effects from time to time and I can finally watch video with a mode different from sdl :). The new laptop is really faster than the nc8000 which I had up to now. I can now open 2-3 different windows of eclipse with different perspectives in each and work really fast :). Almost everything that I tested work in the laptop like wireless, microphone, camera, video, audio so if you want to buy a laptop that is supported by Linux 6730s is a nice choice.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-4233275497964383050?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/4233275497964383050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=4233275497964383050' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/4233275497964383050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/4233275497964383050'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2009/05/installing-ati-driver-for-hp-compaq.html' title='Installing ati drivers for HP Compaq 6730s'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-4699244348789305264</id><published>2009-05-04T13:44:00.001-07:00</published><updated>2009-05-07T13:53:28.349-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Sparse matrix multiply dummy algorithm</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Today almost the half an hour I was trying to write that algorithm which multiplies two sparse matrix. At the end this is what I've got. The matrix is represented as a linkedlist of triples, because this is how they want it in our university. There were some mistakes in the code like Sparce is not with "s", but those are pretty much syntax mistakes and i didn't want to make changes for our teacher :).&lt;br /&gt;&lt;pre class='prettyprint'&gt;public NumericMatrix multWith(SparseMatrix mat) throws CannotMult,&lt;br /&gt;			OutOfMatrixRange {&lt;br /&gt;		if (!canMult(mat))&lt;br /&gt;			throw new CannotMult();&lt;br /&gt;		SparseMatrix result = new SparseMatrix(this.rows, mat.columns);&lt;br /&gt;		if (body.isEmpty() || mat.body.isEmpty())&lt;br /&gt;			return result;&lt;br /&gt;		Iterator&amp;lt;Triple&amp;gt; itForThis = this.body.iterator();&lt;br /&gt;&lt;br /&gt;		while (itForThis.hasNext()) {&lt;br /&gt;			Triple thisElement = itForThis.next();&lt;br /&gt;			Iterator&amp;lt;Triple&amp;gt; itForMat = mat.body.iterator();&lt;br /&gt;			while (itForMat.hasNext()) {&lt;br /&gt;				Triple thatElement = itForMat.next();&lt;br /&gt;				if (thatElement.i &amp;gt; thisElement.j)&lt;br /&gt;					break;&lt;br /&gt;				if (thisElement.j == thatElement.i) {&lt;br /&gt;					double value = result.elementAt(thisElement.i,&lt;br /&gt;							thatElement.j);&lt;br /&gt;					result.setElement(thisElement.i, thatElement.j, value&lt;br /&gt;							+ thisElement.element * thatElement.element);&lt;br /&gt;				}&lt;br /&gt;			}&lt;br /&gt;		}&lt;br /&gt;		return result;&lt;br /&gt;	}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Sorry for the bad code representation but blogspot was hiding some of the code with the template :(. All in all the code is not so nice but it was the only thing that came up and worked so I am posting it here if someone need it, because there wasn't good simple code for that algorithm. I didn't have the time to look at performance libraries and how they implement that, but I read some interesting stuff on wikipedia.com. I didn't know that there was an algorthm that can multiply two Ordinary matrices in O(n^2.376). Take a look at the &lt;a href='http://en.wikipedia.org/wiki/Coppersmith%E2%80%93Winograd_algorithm'&gt;page&lt;/a&gt;. If you find some free materials about the algorithm please let me know I will be glad to look into it, because I might need it for some graphic stuff I will be doing next year :)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;UPDATE:&lt;/b&gt; Fixed some stuff and chan the name to SparseMatrix to be really normal :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-4699244348789305264?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/4699244348789305264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=4699244348789305264' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/4699244348789305264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/4699244348789305264'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2009/05/public-numericmatrix.html' title='Sparse matrix multiply dummy algorithm'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-4017242170147308401</id><published>2009-05-04T03:36:00.001-07:00</published><updated>2009-05-04T03:41:01.061-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='student'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='sofia'/><title type='text'>ScribeFire - my new blogger editor</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;font face='sans-serif'&gt;      This is the first time i write from ScribeFire - my new choice for blog editor. I tried almost every client out there for Linux(since i am using kubuntu) and they were all buggy for me. For example&lt;br/&gt;&lt;/font&gt;&lt;ul&gt;&lt;li&gt;&lt;font face='sans-serif'&gt;I didn't manage to configure &lt;a href='http://kblogger.pwsp.net/'&gt;kblogger-kde4&lt;/a&gt; - the damn thing couldn't find my posts and entries&lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font face='sans-serif'&gt;&lt;a href='http://kblogger.pwsp.net/'&gt;Blogtk&lt;/a&gt; didn't even start - it wanted gtkhtml2 which python couldn't find and after I installed it I got a ValueError in a property named "name" and I was too tired to look at the code. &lt;/font&gt;&lt;/li&gt;&lt;li&gt;&lt;font face='sans-serif'&gt;Divel - which I didn't like at all :)&lt;br/&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div align='justify'&gt;&lt;font face='sans-serif'&gt;     I just installed ScribeFire and i didn't have a problem with it and I also like the interface it has mostly anything. It seems that the browser will really become my desktop in a year or two. I am not sure why, but the homepage is not working for ScribeFire. Fortunately i managed to configure the plugin and it is working really nice. The interface is pretty slick and the I can see the KISS principle everywhere :).&lt;/font&gt;&lt;/div&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class='zemanta-pixie'&gt;&lt;img src='http://img.zemanta.com/pixy.gif?x-id=9171bf18-22c0-8444-95b2-fa4b39b5c83b' class='zemanta-pixie-img'/&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-4017242170147308401?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/4017242170147308401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=4017242170147308401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/4017242170147308401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/4017242170147308401'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2009/05/scribefire-my-new-blogger-editor.html' title='ScribeFire - my new blogger editor'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-1649365980108733460</id><published>2009-04-21T01:38:00.000-07:00</published><updated>2009-04-21T02:03:47.785-07:00</updated><title type='text'>Vrapper - a new way to develop inside Eclipse</title><content type='html'>Yesterday while I was again searching for nice tools and plugins for eclipse which is what I use for my day to day programming now, I found that there is a new project that want to provide vim like input scheme in eclipse. I was pretty skeptical at first because i have already tried &lt;br /&gt;&lt;ul&gt;&lt;br /&gt;    &lt;li&gt;&lt;a href="http://eclim.sourceforge.net/"&gt;Eclim&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;&lt;a href="http://vimplugin.org/"&gt;Vimplugin&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;and wasn't happy from the results at all. Eclim is not bad in the last release but it is trying to make vim a full blown IDE monster which is not what i want. I just want to edit my files with the keystrokes that I am used to, but the problem is that i am now used to some of the eclipse keystrokes - &amp;lt;Ctrl&amp;gt;&amp;lt;Shift&amp;gt;o , &amp;lt;Ctrl&amp;gt;&amp;lt;Space&amp;gt; and &amp;lt;Ctrl&amp;gt;&amp;lt;Shift&amp;gt;f come to my mind. If you are like me then you are lucky - enter &lt;a href="http://vrapper.sourceforge.net/home/"&gt;Vrapper&lt;/a&gt; . The project is pretty new, but it does just what I want. Macros and find/replaces are missing for now(you can invoke the latter with &amp;lt;Ctrl&amp;gt;f in eclipse) but all in all most of the stuff is working fine like:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;    &lt;li&gt;the &lt;b&gt;h&lt;/b&gt;, &lt;b&gt;j&lt;/b&gt;, &lt;b&gt;k&lt;/b&gt;, &lt;b&gt;l&lt;/b&gt; moving keys &lt;/li&gt;&lt;br /&gt;    &lt;li&gt;&lt;b&gt;cw&lt;/b&gt;, &lt;b&gt;dw&lt;/b&gt;, &lt;b&gt;A&lt;/b&gt;, &lt;b&gt;dd&lt;/b&gt; and &lt;b&gt;cc&lt;/b&gt;&lt;br /&gt;    &lt;li&gt;&lt;b&gt;u&lt;/b&gt; and  &lt;b&gt;&amp;lt;Ctrl&amp;gt;r&lt;/b&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;so if you are a long time vim user and you are trying to get used to eclipse or you are using it for something try the plugin. In my opinion it is the best solution out there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-1649365980108733460?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/1649365980108733460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=1649365980108733460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/1649365980108733460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/1649365980108733460'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2009/04/yesterday-while-i-was-again-searching.html' title='Vrapper - a new way to develop inside Eclipse'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-8786814869284473157</id><published>2008-11-03T06:50:00.000-08:00</published><updated>2009-04-21T00:36:20.023-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sofia'/><category scheme='http://www.blogger.com/atom/ns#' term='openfest'/><title type='text'>Openfest2008 part I</title><content type='html'>Yesterday I promised that I will be blogging about OpenFest2008, because I was too tired back then. &lt;p&gt;All in all the event was pretty nice organized, there were free drinks like beer(I enjoyed it many times :P ), coffee, tea. I really liked some of the lectures like the one about scalability from yesterday. The lecture about wordpress was nice and I learned many things from it like what is available when you are building a site with that size and what are the right decisions. I hope that they will upload some of the videos soon and some photos :).   &lt;/p&gt;&lt;br /&gt;&lt;p&gt;I was a bit of disappointed from one of the lectures because it made me feel pretty stupid - the guy was explaining parallel programming and he was claiming that if you are  using separated processes the OS won't make more than 2 CPU work in parallel in other words if you use threads you are lost. I can only thanks gateway and tarator from lunux-bg for clearing that to me by saying that it is not true.&lt;/p&gt;&lt;br /&gt;I also missed some of the lectures explaining heartbeat2 - when there is some time I will check out their site for some information. The thing is that there were two halls and it was impossible not to miss something interesting. For example while they were giving the second lecture about heartbeat2 I decided to listen to the guy from vbox7.com, because I found it more practical - he was explaining what they were doing for those 4-5 years and how they solved the scalability problem and not only.&lt;br /&gt;&lt;br /&gt;Note: Part II might not be written at all&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-8786814869284473157?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/8786814869284473157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=8786814869284473157' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/8786814869284473157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/8786814869284473157'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/11/openfest2008-part-i.html' title='Openfest2008 part I'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-3006681548454138438</id><published>2008-11-02T13:47:00.000-08:00</published><updated>2008-11-02T13:50:41.072-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fmi'/><category scheme='http://www.blogger.com/atom/ns#' term='openfest'/><category scheme='http://www.blogger.com/atom/ns#' term='math'/><title type='text'>Late in the evening</title><content type='html'>It's pretty late here. I just entered my room, because I was at the OpenFest today and after that I met some friends. Look forward to read about the OpenFest tomorrow, because I am too tired to write the whole story and I actually don't have the time. Tomorrow there are lectures in FMI and Diskrete Math is too important to be missed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-3006681548454138438?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/3006681548454138438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=3006681548454138438' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/3006681548454138438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/3006681548454138438'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/11/late-in-evening.html' title='Late in the evening'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-2850241954717381538</id><published>2008-10-27T12:53:00.000-07:00</published><updated>2008-10-27T13:03:04.825-07:00</updated><title type='text'>Openfest2008</title><content type='html'>From last week i finally have internet here in Sofia and things are becoming much better. This year there will be again an &lt;a href="http://www.openfest.org"&gt;Openfest&lt;/a&gt; here in Bulgaria. I hope, that I won't miss it this time. Last year I couldn't visit the fest and there weren't any uploaded videos out there in the net. I can see that the site is now updated so i will watch the uploaded videos when i have time. This week is full of nice events. First there is a new course in TU sofia which will describe the philosophy of Open source - more information &lt;a href=" http://www.fosscourse.org/wiki/Начална_страница"&gt;here&lt;/a&gt;. Next there will be two nice lectures in our faculty:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.fmi.uni-sofia.bg/news_html/lekciya-ot-prof-masahiro-sova-yaponiya"&gt;Queue Machines as Next Generation Computer Systems"&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.fmi.uni-sofia.bg/news_html/za-seminara-bazi-ot-danni-i-bazi-ot-znaniya-1"&gt;“Web 2.0 demos with DB2”&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-2850241954717381538?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/2850241954717381538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=2850241954717381538' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/2850241954717381538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/2850241954717381538'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/10/openfest2008.html' title='Openfest2008'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-6163820354810402736</id><published>2008-10-10T12:52:00.001-07:00</published><updated>2008-10-10T13:04:48.673-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='student'/><category scheme='http://www.blogger.com/atom/ns#' term='university'/><title type='text'>I am now a student :)</title><content type='html'>Sorry that I haven't been writing lately but I am now living in Student city and there a don't have a computer with Internet connection. I will bring my laptop maybe this week so I will finally have one. The first week was not so bad - I had lectures on Algebra and Discrete mathematics. All in all I think that I will be "OK" with those, but we will see what the time will show. I will try to write more often from now on.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-6163820354810402736?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/6163820354810402736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=6163820354810402736' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/6163820354810402736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/6163820354810402736'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/10/i-am-now-student.html' title='I am now a student :)'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-8959554907869926641</id><published>2008-09-24T05:50:00.000-07:00</published><updated>2008-09-24T05:54:47.537-07:00</updated><title type='text'>The speech of Steeve Jobs</title><content type='html'>This speech is a must see. You can find it &lt;a href="http://vbox7.com/play:2226528b"&gt;here&lt;/a&gt; - the link is with BG subtitles, but i am sure that if you search in google you can find the original version or translated to your language. The speech is too good to be explained in a comment, so I will just leave the link. I knew some of the things, but his thinking is really nice and I hardly recommend the video :). The link is also in my bookmarks already :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-8959554907869926641?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/8959554907869926641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=8959554907869926641' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/8959554907869926641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/8959554907869926641'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/09/speech-of-steeve-jobs.html' title='The speech of Steeve Jobs'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-2107660060904534862</id><published>2008-09-23T09:28:00.000-07:00</published><updated>2008-09-23T09:56:57.794-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='plasma'/><title type='text'>Nice plasma shortcut</title><content type='html'>Today while i was looking at kdevelop4 to see the new stuff i clicked &lt;br /&gt;&amp;lt;Ctrl&amp;gt;&amp;lt;F12&amp;gt; accidentally and plasma showed up in front of me. I am using this shortcut more and more and it is really a huge fun. For example to see what's the time or notes on the Desktop. The new folder view also :). The little things made the difference once more :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-2107660060904534862?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/2107660060904534862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=2107660060904534862' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/2107660060904534862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/2107660060904534862'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/09/nice-plasma-shortcut.html' title='Nice plasma shortcut'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-5113788311770471354</id><published>2008-09-18T03:03:00.000-07:00</published><updated>2008-09-18T03:18:53.065-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='kbgoffice'/><category scheme='http://www.blogger.com/atom/ns#' term='trac'/><category scheme='http://www.blogger.com/atom/ns#' term='mylyn'/><title type='text'>Trac and Eclipse</title><content type='html'>Yesterday I wanted to integrate &lt;a href="http://trac.edgewall.org/"&gt;Trac&lt;/a&gt; tasks from the &lt;a href="http://trac.assembla.com/kbgoffice/report/1"&gt;kbgoffice&lt;/a&gt; task list in my IDE. I was sure that eclipse should have that feature so I search in &lt;a href="http://google.com/"&gt;google&lt;/a&gt; and found that indeed there is a connector for Trac in mylyn-extras. Well i wanted to find an update site for that but it seems there isn't any. So i downloaded the the extras version from the &lt;a href="http://www.eclipse.org/mylyn/downloads/"&gt;main download page&lt;/a&gt; and installed it locally.&lt;br /&gt;&lt;br /&gt;It seems that eclipse is getting really mature since last time i did that i had bad problems with dependencies not resolved and things like that. Now it included the package as just another update site source, so the package manager can resolve dependencies if any.&lt;br /&gt;&lt;br /&gt;All in all the plugin is not really what i was hoping for. I had some tasks from mylyn throughout the project and wanted to synchronize those but i couldn't. Also the trac tasks when opened just open a browser which is not really what i was hoping for(i wanted to get a nice view which should look like a normal mylyn task). It is better than opening an external browser and searching for the task you want though, but not the best and i hope they fix it for the next release.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-5113788311770471354?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/5113788311770471354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=5113788311770471354' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/5113788311770471354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/5113788311770471354'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/09/trac-and-eclipse.html' title='Trac and Eclipse'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-2569722948753110503</id><published>2008-09-01T09:40:00.001-07:00</published><updated>2009-05-04T13:41:17.247-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IRC'/><category scheme='http://www.blogger.com/atom/ns#' term='templates'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>C++ can have nasty syntax sometimes</title><content type='html'>Hmm today on IRC in the channel ##C++ @ Freenode someone posted the following code&lt;br /&gt;&lt;pre class="prettyprint"&gt;/*In g++ this does not work*/&lt;br /&gt;template&lt;size_t _a=""&gt;&lt;br /&gt;struct hello&lt;br /&gt;{&lt;br /&gt; hello(){};&lt;br /&gt; ~hello(){};&lt;br /&gt; template&lt;size_t _b=""&gt;&lt;br /&gt; int world()&lt;br /&gt; {&lt;br /&gt;  return _b+_a;&lt;br /&gt; }&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;template&lt;size_t _a=""&gt;&lt;br /&gt;void try_hello()&lt;br /&gt;{&lt;br /&gt; hello&lt;_a&gt; h;&lt;br /&gt; h.world&lt;_a+1&gt;();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/size_t&gt;&lt;/size_t&gt;&lt;/size_t&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;so i tried to help the person telling him that he should use a typename before  h.world&lt;_a+1&gt;(); because it can ambitious for the compiler. It turns out that the right solution was&lt;br /&gt;&lt;pre&gt;h.typename world&lt;_a+1&gt;();&lt;/pre&gt;&lt;br /&gt;someone asked why is &lt;pre&gt;world&lt;_a+1&gt;()&lt;/pre&gt; ambitious for the compiler and seldon said that the compiler can't know the type of world in that context. Well but world is explicitly called with &lt;pre&gt;&lt;_a+1&gt;&lt;/pre&gt;. Hmm the problem is that when the compiler see that expression it assume that &lt;pre&gt;&lt;&lt;/pre&gt;&lt;br /&gt;after world is the operator less than. Oh that really started to hurt my brain :D. Maybe the syntax of C++ is getting really complicated with the years. I think that the new standards won't get rid of those, because they can't. Too much code have been written already to work that way :(&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-2569722948753110503?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/2569722948753110503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=2569722948753110503' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/2569722948753110503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/2569722948753110503'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/09/hmm-today-on-irc-in-channel-c-freenode.html' title='C++ can have nasty syntax sometimes'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-213575971318112860</id><published>2008-08-30T02:46:00.001-07:00</published><updated>2008-08-30T02:59:09.194-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='holyday'/><category scheme='http://www.blogger.com/atom/ns#' term='books'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Back from the vacation</title><content type='html'>Hmm yesterday i finally came back from the vacation in the mountain. I prefer it instead of the sea, because the sea is too dirty in the last years. As you maybe know i live in Bulgaria and it is near the Black sea which is pretty much aweful. Most of the time i was fishing swimming in a nice Pool near &lt;a href="http://www.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=100789870492295989353.000455aa4b7201cd48d24&amp;z=17"&gt;Ribarica&lt;/a&gt;. I also almost read Code complete second edition which is pretty old book but is still adequate for most of the tips. The author is one of those writers which make you think about every single word without making you bored of the book ;). It is language independent - there are examples in VB(which i don't know but you can understand the idea of the examples with no problem), C#, Java, C++, C. One thing is for sure - the mountain was damn better than the dirty sea :).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-213575971318112860?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/213575971318112860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=213575971318112860' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/213575971318112860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/213575971318112860'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/08/hmm-yesterday-i-finally-came-back-from.html' title='Back from the vacation'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-7698889495809515066</id><published>2008-08-18T05:34:00.000-07:00</published><updated>2008-08-18T05:38:46.362-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kbgoffice'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Qt'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'></title><content type='html'>Yesterday i finally managed to port kbgoffice completely to Qt4, so everyone with no qt3support can compile it. I am not happy with what i got however. The code is really bad and there are no testcases so i might write those for now. With no tests the development is really hard. I might use the test framework provided with Qt which really rocks. The program is also hard coded with a class named Properties which is really broken, because it seems that when they wrote the program there was no QSettings class which is times better :).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-7698889495809515066?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/7698889495809515066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=7698889495809515066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/7698889495809515066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/7698889495809515066'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/08/yesterday-i-finally-managed-to-port.html' title=''/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-4781756918367550187</id><published>2008-08-14T04:02:00.000-07:00</published><updated>2008-08-14T04:05:03.721-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'></title><content type='html'>Hmm lately I started using eclipse more and more. It seems they made it to not crash so much with the new release. I am pretty happy with it for C++ development it seems to own. I am not sure but i think that I am even more productive with it now than with vim. I have used the 3.2 version but it was full crap back then ;). Besides it is written in java it is worth looking in it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-4781756918367550187?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/4781756918367550187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=4781756918367550187' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/4781756918367550187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/4781756918367550187'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/08/hmm-lately-i-started-using-eclipse-more.html' title=''/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-8529140568811529195</id><published>2008-08-13T06:06:00.001-07:00</published><updated>2008-08-13T06:14:37.624-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>Supress some warning in vim</title><content type='html'>Maybe you know that vim parses the output from the compiler so it can jump to the right line which cause the error(:h quickfix for more info). Well it seems that the default compiler options parse even warning which are sometimes pretty annoying. There were some warning for depracated conversion from the compiler because of xmp files. Well i am sure that i don't want to see those. So here is what i have in my ~/.vim/ftplugin/cpp.vim for some time: &lt;pre&gt;let &amp;errorformat = "%-G%f\:%l\:\ warning\:\ deprecated\ conversion\ from\ string%.%#\,".&amp;errorformat&lt;/pre&gt;&lt;br /&gt;I know that maybe this only works for gcc, but it is a start. You can get more info about the erroformat  with :h errorformat in vim. Happy vimming :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-8529140568811529195?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/8529140568811529195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=8529140568811529195' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/8529140568811529195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/8529140568811529195'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/08/supress-some-warning-in-vim.html' title='Supress some warning in vim'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-4890014145882030459</id><published>2008-08-12T12:07:00.000-07:00</published><updated>2008-08-12T12:17:19.902-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kbgoffice'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>kbgoffice again working(sort of)</title><content type='html'>The code for kbgoffice is working already on my machine. It is not really ported to Qt4, because right now it relays on the qt3support which will not be there and for good ;). There are also some annoying bugs(I will see where they came from, so keep calm :P). The instructions to compile the code(notice there is no target to install it for now) are in the INSTALL file. To get the code you will need subversion. Search google if you don't know how to get it. The command to checkout the code is &lt;pre&gt;svn co http://svn.assembla.com/svn/kbgoffice/trunk kbgoffice;cd kbgoffice&lt;/pre&gt; now &lt;pre&gt;cat INSTALL&lt;/pre&gt; and follow the instructions. You will also need the dictionary files which you can find over &lt;a href="http://bgoffice.sourceforge.net/"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-4890014145882030459?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/4890014145882030459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=4890014145882030459' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/4890014145882030459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/4890014145882030459'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/08/code-for-kbgoffice-is-working-already.html' title='kbgoffice again working(sort of)'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-751337099044160313</id><published>2008-08-11T15:34:00.000-07:00</published><updated>2008-08-11T15:54:03.454-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kbgoffice'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'></title><content type='html'>Today at the Bulgarian linux forum someone asked to port the kbgoffice program to KDE4. I have used the damn thing pretty much so I decided to go for it. After 2 hours of fighting with compiler errors it finally compiled but most of the code is just commented out so I got a prototype... I started to look at the classes this night and I see some bad code :(. Not sure why but many people still write ugly C++ code. The idea of the whole program is rather nice and the design is cool but there are some things that drive me nuts. For example the author reads the config file everytime he needs to save/read a property which is not efficient at all. I will try to fix some of the problems and I hope I will have the time for that. I will post a snippet which bit me today while I was working on the damn thing.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;div style="background-color: #1e1e27 ;color: #cfbfad"&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;1 &lt;/font&gt;&lt;/span&gt;&lt;font color="#409090"&gt;#include &lt;/font&gt;&lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;lt;iostream&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;2 &lt;/font&gt;&lt;/span&gt;&lt;font color="#409090"&gt;#include &lt;/font&gt;&lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;lt;cstdlib&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;3 &lt;/font&gt;&lt;/span&gt;&lt;font color="#409090"&gt;#include &lt;/font&gt;&lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;lt;ifstream&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;4 &lt;/font&gt;&lt;/span&gt;&lt;font color="#409090"&gt;#include &lt;/font&gt;&lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;lt;string&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;5 &lt;/font&gt;&lt;/span&gt;&lt;font color="#409090"&gt;#include &lt;/font&gt;&lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;lt;map&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;6 &lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;7 &lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;8 &lt;/font&gt;&lt;/span&gt;&lt;font color="#ff8bff"&gt;int&lt;/font&gt;&amp;nbsp;main (&lt;font color="#ff8bff"&gt;int&lt;/font&gt;&amp;nbsp;argc, &lt;font color="#ff8bff"&gt;char&lt;/font&gt;&amp;nbsp;&lt;font color="#ff8bff"&gt;const&lt;/font&gt;* argv[])&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;9 &lt;/font&gt;&lt;/span&gt;{&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;10 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::map&amp;lt;std::string, std::string&amp;gt; myMap;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;11 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::ifstream iofile(&lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;quot;example.txt&amp;quot;&lt;/font&gt;&lt;/span&gt;);&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;12 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::string key;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;13 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::string value;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;14 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#808bed"&gt;while&lt;/font&gt;(! iofile.eof()){&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;15 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;getline(iofile,key);&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;16 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#ff8bff"&gt;int&lt;/font&gt;&amp;nbsp;position = key.find(&lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;quot;=&amp;quot;&lt;/font&gt;&lt;/span&gt;);&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;17 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#808bed"&gt;if&lt;/font&gt;&amp;nbsp;(position == std::string::npos)&lt;span style="background-color: #6e2e2e"&gt;&lt;font color="#ffffff"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;18 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#808bed"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;19 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;value = key;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;20 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;value.erase(&lt;font color="#f0ad6d"&gt;0&lt;/font&gt;,(position+&lt;font color="#f0ad6d"&gt;1&lt;/font&gt;));&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;21 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;key.erase(key.begin()+position, key.end());&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;22 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::cout &amp;lt;&amp;lt; &lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;quot;The key is &amp;quot;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;lt;&amp;lt; key &amp;lt;&amp;lt; &lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;quot; and the value is &amp;quot;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;lt;&amp;lt; value &amp;lt;&amp;lt; std::endl;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;23 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;24 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#808bed"&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color="#f0ad6d"&gt;0&lt;/font&gt;;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;25 &lt;/font&gt;&lt;/span&gt;}&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;26 &lt;/font&gt;&lt;/span&gt;&lt;font color="#cd8b00"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::string home = getenv(&amp;quot;HOME&amp;quot;);&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;27 &lt;/font&gt;&lt;/span&gt;&lt;font color="#cd8b00"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::ofstream file(&amp;quot;example.txt&amp;quot;, std::ios::app | std::ios::out);&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;28 &lt;/font&gt;&lt;/span&gt;&lt;font color="#cd8b00"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;file &amp;lt;&amp;lt; &amp;quot;WithSplash=0\n&amp;quot;;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;29 &lt;/font&gt;&lt;/span&gt;&lt;font color="#cd8b00"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;file.close();&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Well where is the problem with that you ask :? The answer is &lt;a href="http://www.parashift.com/c++-faq-lite/input-output.html#faq-15.5"&gt;here &lt;/a&gt; so we change the code to this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;div style="background-color: #1e1e27 ;color: #cfbfad"&gt;&lt;font face="monospace"&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;1 &lt;/font&gt;&lt;/span&gt;&lt;font color="#409090"&gt;#include &lt;/font&gt;&lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;lt;iostream&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;2 &lt;/font&gt;&lt;/span&gt;&lt;font color="#409090"&gt;#include &lt;/font&gt;&lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;lt;cstdlib&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;3 &lt;/font&gt;&lt;/span&gt;&lt;font color="#409090"&gt;#include &lt;/font&gt;&lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;lt;fstream&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;4 &lt;/font&gt;&lt;/span&gt;&lt;font color="#409090"&gt;#include &lt;/font&gt;&lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;lt;string&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;5 &lt;/font&gt;&lt;/span&gt;&lt;font color="#409090"&gt;#include &lt;/font&gt;&lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;lt;map&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;6 &lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;7 &lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;8 &lt;/font&gt;&lt;/span&gt;&lt;font color="#ff8bff"&gt;int&lt;/font&gt;&amp;nbsp;main (&lt;font color="#ff8bff"&gt;int&lt;/font&gt;&amp;nbsp;argc, &lt;font color="#ff8bff"&gt;char&lt;/font&gt;&amp;nbsp;&lt;font color="#ff8bff"&gt;const&lt;/font&gt;* argv[])&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;&amp;nbsp;9 &lt;/font&gt;&lt;/span&gt;{&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;10 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::map&amp;lt;std::string, std::string&amp;gt; myMap;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;11 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::ifstream iofile(&lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;quot;example.txt&amp;quot;&lt;/font&gt;&lt;/span&gt;);&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;12 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::string key;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;13 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::string value;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;14 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#808bed"&gt;while&lt;/font&gt;( getline(iofile,key) ){&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;15 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#ff8bff"&gt;int&lt;/font&gt;&amp;nbsp;position = key.find(&lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;quot;=&amp;quot;&lt;/font&gt;&lt;/span&gt;);&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;16 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#808bed"&gt;if&lt;/font&gt;&amp;nbsp;(position == std::string::npos)&lt;span style="background-color: #6e2e2e"&gt;&lt;font color="#ffffff"&gt;&amp;nbsp;&lt;/font&gt;&lt;/span&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;17 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#808bed"&gt;break&lt;/font&gt;;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;18 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;value = key;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;19 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;value.erase(&lt;font color="#f0ad6d"&gt;0&lt;/font&gt;,(position+&lt;font color="#f0ad6d"&gt;1&lt;/font&gt;));&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;20 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;key.erase(key.begin()+position, key.end());&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;21 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::cout &amp;lt;&amp;lt; &lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;quot;The key is &amp;quot;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;lt;&amp;lt; key &amp;lt;&amp;lt; &lt;span style="background-color: #404040"&gt;&lt;font color="#ffcd8b"&gt;&amp;quot; and the value is &amp;quot;&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;lt;&amp;lt; value &amp;lt;&amp;lt; std::endl;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;22 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;23 &lt;/font&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#808bed"&gt;return&lt;/font&gt;&amp;nbsp;&lt;font color="#f0ad6d"&gt;0&lt;/font&gt;;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;24 &lt;/font&gt;&lt;/span&gt;}&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;25 &lt;/font&gt;&lt;/span&gt;&lt;font color="#cd8b00"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::string home = getenv(&amp;quot;HOME&amp;quot;);&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;26 &lt;/font&gt;&lt;/span&gt;&lt;font color="#cd8b00"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;std::ofstream file(&amp;quot;example.txt&amp;quot;, std::ios::app | std::ios::out);&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;27 &lt;/font&gt;&lt;/span&gt;&lt;font color="#cd8b00"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;file &amp;lt;&amp;lt; &amp;quot;WithSplash=0\n&amp;quot;;&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;span style="background-color: #2e2e2e"&gt;&lt;font color="#8b8bcd"&gt;28 &lt;/font&gt;&lt;/span&gt;&lt;font color="#cd8b00"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;file.close();&lt;/font&gt;&lt;br&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;/pre&gt;&lt;br /&gt;and we are ready to continue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-751337099044160313?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/751337099044160313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=751337099044160313' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/751337099044160313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/751337099044160313'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/08/today-at-bulgarian-linux-forum-someone.html' title=''/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-8199110105918801587</id><published>2008-08-09T09:13:00.001-07:00</published><updated>2008-08-09T09:17:24.656-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>The Aurora project.</title><content type='html'>Maybe you've heard about the Aurora project from mozilla labs, well I wasn't and I was impressed from the videos over &lt;a href="http://www.jroller.com/desmax/entry/mozilla_aurora"&gt;here&lt;/a&gt;. It seems that maybe the Web will outperform the Desktop some day. I hope that it doesn't happen so soon, because I really like the Desktop more and most of the applications I use today are Desktop based(mostly Qt/KDE).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-8199110105918801587?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/8199110105918801587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=8199110105918801587' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/8199110105918801587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/8199110105918801587'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/08/maybe-youve-heard-about-aurora-project.html' title='The Aurora project.'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-6578896596372221687</id><published>2008-08-08T00:47:00.000-07:00</published><updated>2008-08-08T00:54:47.867-07:00</updated><title type='text'>Book organizing over the internet</title><content type='html'>Hmm today I noticed that we at home have too many books. For example I want to read a novel and I am not sure if we have that or not and where it stays on those shelves and in bookcases. Enter &lt;a href="http://books.google.com"&gt;books.google.com&lt;/a&gt; with My Library support. Now i only need to organize those a little :). Another nice open software for that is &lt;a href="http://periapsis.org/tellico/"&gt;Tellico&lt;/a&gt; (yes I use KDE). I will have to choose one of them for the job.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-6578896596372221687?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/6578896596372221687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=6578896596372221687' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/6578896596372221687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/6578896596372221687'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/08/book-organizing-over-internet.html' title='Book organizing over the internet'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-3601521574907678185</id><published>2008-08-05T14:23:00.000-07:00</published><updated>2008-08-05T14:26:53.035-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='nopaste'/><category scheme='http://www.blogger.com/atom/ns#' term='script'/><title type='text'>Nopaste.vim update</title><content type='html'>Today i posted an improved version of nopaste in the scripts database at vim.org You can find the script &lt;a href="http://www.vim.org/scripts/script.php?script_id=2328"&gt;here&lt;/a&gt;. It will help you paste code/text in rafb.net/paste to use it on IRC or some other chat programs. For me it was really useful so i made it public.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-3601521574907678185?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/3601521574907678185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=3601521574907678185' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/3601521574907678185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/3601521574907678185'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/08/today-i-posted-improved-version-of.html' title='Nopaste.vim update'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-6336190492735526886</id><published>2008-08-04T08:40:00.000-07:00</published><updated>2008-08-05T08:49:35.651-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Problem with file endings</title><content type='html'>Today I had the same problem with mixed file endings. It seems that many editors are still dealing bad with that on different platforms, so you get different line endings. This times instead of manually dealing with the problem I googled and it seems that there is a nice workaround, you just need to type &lt;pre&gt;:%s/\r//&lt;/pre&gt; and you are done. This will take care of you, I also have ff=unix in most of my files and in my vimrc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-6336190492735526886?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/6336190492735526886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=6336190492735526886' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/6336190492735526886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/6336190492735526886'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/08/problem-with-file-endings.html' title='Problem with file endings'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-5937025782687790180</id><published>2008-08-03T14:27:00.000-07:00</published><updated>2008-08-04T08:46:37.042-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>NERDTree</title><content type='html'>Hmm today i finally found a nice TreeExplorer for vim. I was looking for something like this for so long. &lt;ul&gt;&lt;li&gt;It had to be plugable to the UI and not clutter it&lt;/li&gt;&lt;br /&gt;&lt;li&gt;It had to &lt;b&gt;list&lt;/b&gt; the files in a directories of my project&lt;/li&gt;&lt;br /&gt;&lt;li&gt;I wanted to be able to open the files from there to the right side of the window as antoher buffer/tab&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;There are many plugins out there that solve some of the problems/requirements in the list, but they were not complete. I have tried project(this one was good), the built in explorer, some other explorers, which names i cannot remember :D. &lt;br /&gt;&lt;br /&gt;Enter &lt;a href="http://www.vim.org/scripts/script.php?script_id=1658"&gt;NERDTree&lt;/a&gt; . That is one of the plugins that saves your day. I just put &lt;pre&gt;map &amp;lt;F6&amp;gt; :NERDTreeToggle&lt;CR&gt;&lt;/pre&gt; in my vimrc and now when i hit F6 i have a list of the files in my home directory. I go to that window with either the mouse or &amp;lt;C-W&amp;gt; w and now i can use the neat features of the plugin. &lt;pre&gt;? - get help&lt;br /&gt;C - make the directory your ROOT&lt;br /&gt;o - open/close the directory(this shows the files also in the &lt;br /&gt;    directory as a list&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;When you finish don't forget to hit F6 again :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-5937025782687790180?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/5937025782687790180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=5937025782687790180' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/5937025782687790180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/5937025782687790180'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/08/hmm-today-i-finally-found-nice.html' title='NERDTree'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-1526848910854917368</id><published>2008-08-03T00:22:00.000-07:00</published><updated>2008-08-04T08:46:11.768-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Don't trust garbage collectors</title><content type='html'>I recently read &lt;a href=http://bootstrapping.wordpress.com/2007/02/16/memory-management-is-still-your-responsibility/&gt;This blog post&lt;/a&gt; and the author has a nice point about garbage collectors. When we program in languages with that feature we should not blindly trust the automatic memory management for &lt;b&gt;everything&lt;/b&gt;. Most of the time it is ok, but sometimes you have to think about memory management in those languages too. &lt;br /&gt;In the blog post Tahseen Ur Rehman gives an example with a thread which was holding some references to the objects so they could not be deleted, so the users were getting OutOfMemoryErrors. The author also warn us that we should &lt;b&gt;not&lt;/b&gt; trust the lie &lt;br /&gt;&lt;br /&gt;&lt;div style="color: #fff;margin: 8px"&gt;“In some programming languages, memory management is the programmer’s responsibility. &lt;br /&gt;… … &lt;br /&gt; An alternate approach to memory management that is now commonly utilized, especially by most modern object-oriented languages, is automatic management by a program called a garbage collector“&lt;/div&gt;&lt;br /&gt;There is also a nice example in Effective Java with the same point. So next time when we want to do something &lt;i&gt;smart&lt;/i&gt; with the language, we should think if it is ok for the garbage collector and it will be able to do it's job. I find that most of the time those kind of errors are found in concurrent programs and &lt;i&gt;hacky&lt;/i&gt; arrays.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-1526848910854917368?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/1526848910854917368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=1526848910854917368' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/1526848910854917368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/1526848910854917368'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/08/i-recently-read-this-blog-post-and.html' title='Don&apos;t trust garbage collectors'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-8513539541489180466</id><published>2008-07-31T13:59:00.000-07:00</published><updated>2008-09-27T12:48:37.590-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>A little benchmark with C++ and Java in the game.</title><content type='html'>Today i just wanted to make a benchmark and see which is faster java or C++. There are rumors over the internet that java is or will be faster than c++ some day. So today I decided to try compare the speed of those languages. We all know arrays and how bad they can be sometimes if you are not careful with them in C++, because&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;They don't know it's size&lt;/li&gt;&lt;br /&gt;&lt;li&gt;You cannot extend it if you reach the limit&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The name of an array converts to a pointer to its first element at the slightest provocation(there are nice examples for this point &lt;a href="http://www.research.att.com/%7Ebs/bs_faq2.html#arrays"&gt;here&lt;/a&gt;)&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;So with one word arrays are not nice. Java provides some fixes for those, because there an array know it's size and there are no pointers :). But what if we use a higher level abstractions from STL? Will std::vector beat the Java arrays? Here is the code:&lt;br /&gt;main.cpp:&lt;br /&gt;&lt;div style="background-color: rgb(0, 0, 0);"&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;span style="color:#409090;"&gt;#include &lt;/span&gt;&lt;span style="background-color: rgb(64, 64, 64);"&gt;&lt;span style="color:#ffcd8b;"&gt;&amp;lt;vector&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#409090;"&gt;#include &lt;/span&gt;&lt;span style="background-color: rgb(64, 64, 64);"&gt;&lt;span style="color:#ffcd8b;"&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#ff8bff;"&gt;int&lt;/span&gt; main(&lt;span style="color:#ff8bff;"&gt;int&lt;/span&gt; argc, &lt;span style="color:#ff8bff;"&gt;char&lt;/span&gt;* argv[]){&lt;br /&gt;&lt;br /&gt;    std::vector&amp;lt;&lt;span style="color:#ff8bff;"&gt;int&lt;/span&gt;&amp;gt; Vec(10000);&lt;br /&gt;&lt;br /&gt;    &lt;span style="color:#808bed;"&gt;for&lt;/span&gt;(&lt;span style="color:#ff8bff;"&gt;int&lt;/span&gt; x = &lt;span style="color:#f0ad6d;"&gt;0&lt;/span&gt;;x &amp;lt; Vec.size();x++){&lt;br /&gt;&lt;br /&gt;        Vec[x] =x;&lt;br /&gt;&lt;br /&gt;        std::cout &amp;lt;&amp;lt; Vec[x] &amp;lt;&amp;lt; std::endl;&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Main.java&lt;br /&gt;&lt;div style="background-color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;span style="color:#ff8bff;"&gt;class&lt;/span&gt; Main{&lt;br /&gt;&lt;br /&gt;    &lt;span style="color:#ff8bff;"&gt;public&lt;/span&gt; &lt;span style="color:#ff8bff;"&gt;static&lt;/span&gt; &lt;span style="color:#ff8bff;"&gt;void&lt;/span&gt; main(&lt;span style="color:#ffcd8b;"&gt;String&lt;/span&gt; []args){&lt;br /&gt;&lt;br /&gt;        &lt;span style="color:#ff8bff;"&gt;int&lt;/span&gt; Vec[] = &lt;span style="color:#808bed;"&gt;new&lt;/span&gt; &lt;span style="color:#ff8bff;"&gt;int&lt;/span&gt;[&lt;span style="color:#f0ad6d;"&gt;10000&lt;/span&gt;];&lt;br /&gt;&lt;br /&gt;        &lt;span style="color:#808bed;"&gt;for&lt;/span&gt; (&lt;span style="color:#ff8bff;"&gt;int&lt;/span&gt; x = &lt;span style="color:#f0ad6d;"&gt;0&lt;/span&gt;;x &amp;lt; Vec.length;x++){&lt;br /&gt;&lt;br /&gt;            Vec[x] = x;&lt;br /&gt;&lt;br /&gt;            System.out.println(x);&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;So we compile with &lt;pre&gt;g++ -O2 -fomit-frame-pointer main.cpp &amp;amp;&amp;amp; javac Main.java&lt;/pre&gt;&lt;br /&gt;and let's run them through time :)&lt;br /&gt;&lt;pre&gt;nikolavp@Nikolavp:~$ time ./a.out &gt; /dev/null&lt;br /&gt;&lt;br /&gt;real    0m0.010s&lt;br /&gt;user    0m0.004s&lt;br /&gt;sys     0m0.004s&lt;br /&gt;nikolavp@Nikolavp:~$ time java Main &gt; /dev/null&lt;br /&gt;&lt;br /&gt;real    0m0.196s&lt;br /&gt;user    0m0.140s&lt;br /&gt;sys     0m0.052s&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;So C++ with vector which is supposed to be a higher level abbstraction outperformed Java's "safe" arrays. The next time you want to write something in Java think a little bit is it really worth the machines ;). Don't get me wrong Java have it's place and it made the whole world a better place, but don't convince me, that it will be faster(or is faster now) than C++... It just never will.&lt;br /&gt;&lt;br /&gt;&lt;code class="prettyprint"&gt;#include &lt;iostream&gt;&lt;br /&gt;using namespace std;&lt;br /&gt;int main(){&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;code class="prettyprint"&gt;&lt;br /&gt;for(var i=0;i&lt;1000;i++)&lt;br /&gt;{&lt;br /&gt; go("http://orkut.com")&lt;br /&gt; enter("Email","myemail@gmail.com")&lt;br /&gt; enter("password","secret")&lt;br /&gt; sleep(600)&lt;br /&gt; click("sign in")&lt;br /&gt; sleep(600)&lt;br /&gt; go("http://www.orkut.com/GLogin.aspx?cmd=logout")&lt;br /&gt; sleep(60)&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-8513539541489180466?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/8513539541489180466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=8513539541489180466' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/8513539541489180466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/8513539541489180466'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/07/today-i-just-wanted-to-make-benchmark.html' title='A little benchmark with C++ and Java in the game.'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-6712878056484724512</id><published>2008-07-31T12:04:00.000-07:00</published><updated>2008-07-31T12:53:22.593-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='freesoftware'/><category scheme='http://www.blogger.com/atom/ns#' term='nvidia'/><title type='text'>Nvidia and KDE4.1 problem solved.</title><content type='html'>Today, while I was using the KDE 4.1 I noticed that is a bit slower than it was before with 3.5. So after a little searching(one query in gogle) on the net I found &lt;a href="http://techbase.kde.org/User:Lemma/KDE4-NVIDIA"&gt;this&lt;/a&gt; page which just saved my day. I can now say that KDE is faster than ever it was. I can't believe they managed to make the damn thing even faster :). Nice work guys, keep it up!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-6712878056484724512?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/6712878056484724512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=6712878056484724512' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/6712878056484724512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/6712878056484724512'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/07/nvidia-and-kde41-problem-solved.html' title='Nvidia and KDE4.1 problem solved.'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-701592583656086155</id><published>2008-07-25T14:59:00.000-07:00</published><updated>2008-07-31T12:10:59.430-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Nice way to keep the lines indented in vim</title><content type='html'>Here is one more vim tipp. I just put a new keybinding to my .vimrc file, thanks to \amethyst from #vim@freenode.net :). Here it is &lt;pre&gt;inoremap &amp;lt;expr&amp;gt; &amp;lt;CR&amp;gt; (col("$")==col(".") ? "\&amp;lt;ESC&amp;gt;=a{\&amp;lt;C-O&amp;gt;o" : "\&amp;lt;CR&amp;gt;")&lt;/pre&gt; This will indent the whole block before the line if you hit &amp;lt;CR&amp;gt; on the end of the code you are writing in insert mode. If you are not at the end of the line you will get the default behaviour of &amp;lt;CR&amp;gt;. I was not sure how to implement that, but \amethyst really helped me on IRC. Once more this shows the power of chatting with experienced people who know the project very well. Viva open source :).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-701592583656086155?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/701592583656086155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=701592583656086155' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/701592583656086155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/701592583656086155'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/07/here-is-one-more-vim-tipp.html' title='Nice way to keep the lines indented in vim'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-8832738390149980685</id><published>2008-07-23T12:04:00.000-07:00</published><updated>2008-09-24T04:12:20.492-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='Qt'/><title type='text'>Highlight for Qt classes in vim</title><content type='html'>Maybe some of you like me like to use a sophisticated library for C++ development. My choice is Qt. I really like to have highlighting for most of the classes so here is my &lt;a href="http://nikolavp.googlepages.com/cpp.vim"&gt;~/.vim/syntax/cpp.vim&lt;/a&gt;. This will highlight all of the Qt classes as built in structures of the language, which is really nice. I just copied all of the classes from the Qt's web site ;).&lt;br /&gt;&lt;br /&gt;UPDATE:&lt;br /&gt;Today Vidas Katinas send me the modified version so i have updated the link. I have also added a checking for a variable. I am also using stl lately so here is the installation guide if you use them both:&lt;br /&gt;&lt;pre&gt;mkdir -p ~/.vim/after/syntax/cpp&lt;br /&gt;wget -c http://nikolavp.googlepages.com/cpp.vim -O ~/.vim/after/syntax/cpp/qt.vim&lt;br /&gt;wget -c http://www.vim.org/scripts/download_script.php?src_id=8628 -O ~/.vim/after/syntax/cpp/stl.vim&lt;/pre&gt;&lt;br /&gt;Now if you want to disable the Qt highlighting just put that somewhere in your vimrc file &lt;pre&gt;let g:qt_syntax=0&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If for example you want to disable the syntax for the current file(it is too slow ot whatever) type this &lt;pre&gt;:let g:qt_syntax=0&lt;br /&gt;:e&lt;/pre&gt; and &lt;pre&gt;:e!&lt;/pre&gt; if you have made changes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-8832738390149980685?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/8832738390149980685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=8832738390149980685' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/8832738390149980685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/8832738390149980685'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/07/highlight-for-qt-classes-in-vim.html' title='Highlight for Qt classes in vim'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-7574409071908291041</id><published>2008-07-23T03:47:00.000-07:00</published><updated>2008-07-31T15:32:28.661-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Making abbreviations persistent in vim</title><content type='html'>If you are like me, most of the time you make more mistakes in vim, because your mind is little slower than you fingers. Enter abbreviations which is a really neat feature in vim :). You just have to type&lt;pre&gt;:iabbrev wrongstring wantedstring&lt;/pre&gt; in command mode and the next time you type the word wrong vim  will fix it. So where is the problem? The problem is that when you type that in command mode it is not persistent between sessions. I really wanted to save those save somehow in a file. So here is the solution :) &lt;pre&gt;&lt;br /&gt;function! Abbreviate(input, output) &lt;br /&gt;python &lt;&lt; EOF&lt;br /&gt;def appendAbb():&lt;br /&gt;    import os&lt;br /&gt;    import vim&lt;br /&gt;    home = os.getenv("USERPROFILE") or os.getenv("HOME")&lt;br /&gt;    home += "/myvimfiles/abbs.vim"&lt;br /&gt;    Abbs = open(home, "a")&lt;br /&gt;    inputstr = vim.eval("a:input")&lt;br /&gt;    outputstr = vim.eval("a:output")&lt;br /&gt;    abbreviation = "iabbrev " + str(inputstr) + " " + str(outputstr)+ "\n"&lt;br /&gt;    Abbs.write(abbreviation)&lt;br /&gt;EOF&lt;br /&gt;:py appendAbb()&lt;br /&gt;let abbrevation = "iabbrev ". expand(a:input). " ". expand(a:output)&lt;br /&gt;execute abbrevation&lt;br /&gt;endfunction&lt;br /&gt;command! -nargs=+ Abb :call Abbreviate(&amp;lt;f-args&amp;gt;)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Put that in your ~/.vimrc file and you are done :). You should change /myvimfiles/abbs.vim to the file with abbreviations you would like to use. If it is in a special directory not in your runtimepath you should also put source "path/to/the/file" in vimrc :). Now next time you want to correct a type just type &lt;pre&gt;:Abb wrongstring correctstring&lt;/pre&gt; and that's all ;)&lt;br /&gt;Happy vimming&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-7574409071908291041?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/7574409071908291041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=7574409071908291041' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/7574409071908291041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/7574409071908291041'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/07/if-you-are-like-me-most-of-time-you.html' title='Making abbreviations persistent in vim'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-2474976465412695310</id><published>2008-07-21T11:49:00.001-07:00</published><updated>2008-07-27T03:23:32.994-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Renaming a variable in gvim</title><content type='html'>Some of you may be missing the nice IDE's and their neat features when you are editing in gvim. I was myself a long time Eclipse user, but I found that it doesn't make me more productive, but just eat the resources of my machine. I missed the renaming variable feature in gvim for some time now. Today this is over I was reading the manual of vim and found what I was looking for. We all know the substitute command, but I was not sure how to replace the variable with one command for all files in the project. So here is what I have now in my .vimrc:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;    fun! BuffersRenameVar(cword, newvar)&lt;br /&gt;        let word = a:cword&lt;br /&gt;        let newvar = a:newvar&lt;br /&gt;        let replace = ":bufdo %s/\\\&lt;"&lt;br /&gt;        let replace .= expand(word)&lt;br /&gt;        let replace .= "\\&gt;/"&lt;br /&gt;        let replace .= expand(newvar)&lt;br /&gt;        let replace .= "/gce"&lt;br /&gt;        execute replace&lt;br /&gt;    endfun&lt;br /&gt;    map &amp;lt;leader&amp;gt;brn mR:call BuffersRenameVar("&lt;c-r&gt;&lt;c-w&gt;", "nvname")&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You just hit \brn for buffer rename and have to change the "nvname"&lt;br /&gt;with the new name of the variable and that's all :). This will ask you&lt;br /&gt;to rename every appearance of the variable in all open buffers. Don't&lt;br /&gt;forget to open all all your files in vim. This will also put a global&lt;br /&gt;mark named "R" so you can continue your work. Happy vimming&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-2474976465412695310?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/2474976465412695310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=2474976465412695310' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/2474976465412695310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/2474976465412695310'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/07/renaming-variable-in-gvim.html' title='Renaming a variable in gvim'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-104542749526218103.post-1328187287200693603</id><published>2008-07-19T09:06:00.000-07:00</published><updated>2008-07-22T02:12:09.040-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ТУ'/><category scheme='http://www.blogger.com/atom/ns#' term='math'/><title type='text'>6.00 in TU Sofia</title><content type='html'>I finally will manage to go to university because I've got 6 on one of the exams here in Bulgaria. Finally all of that math will be over for now :).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/104542749526218103-1328187287200693603?l=nikolavp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nikolavp.blogspot.com/feeds/1328187287200693603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=104542749526218103&amp;postID=1328187287200693603' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/1328187287200693603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/104542749526218103/posts/default/1328187287200693603'/><link rel='alternate' type='text/html' href='http://nikolavp.blogspot.com/2008/07/600.html' title='6.00 in TU Sofia'/><author><name>Nikola Valentinov Petrov</name><uri>http://www.blogger.com/profile/14017819580026769822</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
