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