How to install kbgoffice qt4

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:

  1. build-essential
  2. qt4-dev-tools
  3. cmake
  4. subversion(to get the source)

You can get all that with a simple command sudo aptitude install build-essential qt4-dev-tools cmake subversion . After satisfying all the dependencies you need to get the source code with
svn co http://svn.assembla.com/svn/kbgoffice/trunk kbgoffice
go to the kbgoffice directory, create a new build directory, compile
cd kbgoffice;mkdir build;cd build;cmake ../;make
and if you wаnt to install the program
sudo make install
Then to startup the program just type kbgoffice in the konsole or the terminal client you are using <Alt+F2> works fine too. Have fun :D .

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 :) .

Installing ati drivers for HP Compaq 6730s

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.

Sparse matrix multiply dummy algorithm

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 :) .

public NumericMatrix multWith(SparseMatrix mat) throws CannotMult, 
   OutOfMatrixRange {
   if (!canMult(mat)){
       throw new CannotMult();
   }
   SparseMatrix result = new SparseMatrix(this.rows, mat.columns);
   if (body.isEmpty() || mat.body.isEmpty()){
       return result;
   }
   Iterator<Triple> itForThis = this.body.iterator();
 
   while (itForThis.hasNext()) {
       Triple thisElement = itForThis.next();
       Iterator<Triple> itForMat = mat.body.iterator();
       while (itForMat.hasNext()) {
           Triple thatElement = itForMat.next();
           if (thatElement.i > thisElement.j){
               break;
           }
           if (thisElement.j == thatElement.i) {
               double value = result.elementAt(thisElement.i,
                       thatElement.j);
               result.setElement(thisElement.i, thatElement.j, value
                       + thisElement.element * thatElement.element);
           }
       }
   }
   return result;
}

Sorry for the bad code formatting but java is kind of verbose :( . 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 page. 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 :)

UPDATE: Fixed some stuff and chan the name to SparseMatrix to be really normal :)

ScribeFire – my new blogger editor

      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

  • I didn’t manage to configure kblogger-kde4 – the damn thing couldn’t find my posts and entries
  • Blogtk 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.
  • Divel – which I didn’t like at all :)
     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 :) .

Vrapper – a new way to develop inside Eclipse

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

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 – +o , +m and +f come to my mind. If you are like me then you are lucky – enter Vrapper. 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 +f in eclipse) but all in all most of the stuff is working fine like:

    • the h, j, k, l moving keys
    • cw, dw, A, dd and cc
    • u and +r

    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.

Openfest2008 part I

Yesterday I promised that I will be blogging about OpenFest2008, because I was too tired back then.

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 :) .

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.

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.

Note: Part II might not be written at all

Late in the evening

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.

Openfest2008

From last week i finally have internet here in Sofia and things are becoming much better. This year there will be again an Openfest 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 here. Next there will be two nice lectures in our faculty:

 

I am now a student :)

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.

The speech of Steeve Jobs

This speech is a must see. You can find it here – 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