Saturday, 26 May 2007

Ever since I've added a new partition between my windows and linux partitions I get GRUB Error 17 after installing/updating some essential linux core elements. It is happening because GRUB config file gets overridden with a default one. I don't know how to solve this problem but I do know how to recover in an easy way. I've copied the /boot/grub/menu.lst file (grub configuration) to my home directory. Every time I get Error 17 after choosing Linux in my GRUB menu I:

Reboot the system

When GRUB menu appears I select linux option and press 'e' for editing

I set correct parameters

Press 'b' for booting

When system loads I override /boot/grub/menu.lst with the stored one from my home folder

Thursday, 24 May 2007

Here is one of the presentations describing my current work. It is basically a simple digest of the theoretical part of my Master's Thesis. If you are interested in my other presentations you can take a look at my slideshare profile.

Wednesday, 16 May 2007

When I was checking yesterday the performance of my system I noticed that the system monitor shows permanent 100% CPU usage. It was quite weird because there where no other applications running. I clicked on the 'processes' tab and I found out that a process called 'atieventsd' was using all the possible CPU load. The process is related to ATI drivers. I searched through ubuntu fora I I found the solution for this problem in couple places (it seems that it affects many Ubuntu Dapper Drake users). For me worked this one

Wednesday, 2 May 2007

Sometimes you want to fire an event on a webpage with a certain delay. There are couple ways to do that. Today I'm gonna present a JS Timer object, which waits a given amount of seconds after it's creation till it raises an alert. In addition out timer will work only when the page is active. If it looses a focus the timer stops. It resumes when it gains it back. Here is my code with some comments:

The code above uses protoype.js library, which I already mentioned several times. Let me explain a little bit how it works. Initialize() method is a constructor, which starts the countdown. PeriodicalExecuter is an object from prototype.js library, which name explains everything :) Each second execute() method is invoked, which sets the number of seconds left in the page element identified by id 'informer'. Every time the page looses it focus (window.onblur) the abort() method is invoked which stops the countdown. When it gains focus back (window.focus) the resume() method is invoked. When the counter reaches 0 alert is raised and we don't care about focus or other stuff any more :)

Any questions?

PS. The code has been tested on Opera 9.2 and FF 1.5 (Ubuntu Dapper Drake)

Wednesday, 25 April 2007

I'm using a lot of Javascript in the project I'm currently working on. I don't really like it but it can be very useful sometimes. In order to make it easier I try to use the object oriented approach. Protoype.js library supports creating of an object oriented code by extending regular javascript objects with some additional functionality. You can find good examples at prototype's homepage but I also recommend this tutorial.

Having some background in a "real" OOP languages I did not have many difficulties with creating OO JS code. I did have, however, some problems with understanding how it works - I'm still not 100% sure about it ;). The issue I'm talking about is related to the scope of methods. I found myself trying to access some object's properties from the body of the methods, that could work in different context. If you have the same problem I would recommend reading the description of bind() method, that is introduced by prototype library.

It is also possible to write OO JS code without using prototype.js. There are good tutorials available here and here.

Saturday, 21 April 2007

I had a hard time figuring out how to access CDATA Section in XML DOM using JavaScript. I read many different comments on that but I have not find a satisfying answer. Let's take a look at an xml example:

I was trying to access the CDATA section the way I access all the text nodes:

xmlDocument.getElementsByTagName('content')[0].firstChild.nodeValue;

Unfortunately it doesn't work. I was wondering what am I doing wrong. I run some tests and discovered that the <content> node has actually 3 children (I thought it has only 1). The first and third childNodes are empty text nodes; the middle one is the CDATASection node I was trying to access. So the final code looks like this:

Adapting informal sources of knowledge to e-Learning.

The amount of information sources and the available data is growing dramatically fast nowadays. It is very difficult time for teachers to keep up with changes (especially in information domain) and to find new and appropriate sources of information. This problem also affects e-Learning. Contemporary e-Learning systems deliver predefined, rigid courses which usually do not take into account user specific conditions, like wishing to broaden his or her knowledge in wide range of domains at the same time. Without constant maintenance, electronic courses are also getting outdated. Moreover, all of the current solutions seem to underestimate the potential of informal learning [1].

According to researches, over eighty per cent of possessed knowledge is acquired from informal sources of information like wikis, blogs and digital libraries [1]. These Web 2.0 platforms allow community collaboration, sharing knowledge and ideas. In addition, they are continuously developed to better serve users. Semantic description of available sources not only interconnects them but also allows machines to reason about their content. Consequently, artifacts can be easily accessed, browsed and harvested for further use.

Following the presented idea, we introduce Didaskon [2], a framework for automated composition of a learning path for a student. The selection and workflow scheduling of learning objects is based on their description, semantically annotated specification of user profiles, anticipated knowledge after course completion and technical details of the client’s platform. User profile is described with FOAFRealm Ontology [3], a part of FOAFRealm project. It is based on FOAF metadata that provides functionality to manage identities and share resources with friends.

Having in mind statistics about acquiring knowledge, we decided that Didaskon shall derive both from formal and informal sources of information. It should collect relevant data from wikis or blogs and process it so that it can be used in a form of learning objects, which enriches and improves the process of learning.

Monday, 16 April 2007

Well I'm fresh after Faculty of Engineering Research Day 2007. Surprisely I didn't get the iPod for the best poster. I didn't even get a digital picture frame. I actually got nothing but wine and cheese :) It cames out that not only the quality of the posters counted but also the research idea itself. Here is my one page abstract explaining a little bit of my current work.

Monday, 9 April 2007

It is Easter break so I have finally some time to write my Master's Thesis ("Delivering accessible information from soical semantic information sources through adaptive hypermedia" - yeah, I don't understand it either :D ). Anyway, I'm using latex with TeXclipse. Yesterday I tried to create my first ever table using latex.

There is a latex directive "tabular", which I was trying to use. Problem with my table was that it was quite long and had to be spread on multiple pages. Tabular does not support this kind of long tables and it simply cuts the table at the end of the page.

I've found example using "longtable" directive for creating tables on multiple pages but I did not have appropriate package installed. I followed this instruction and installed necessary packages. Now it is enough to declaire use of this package \usepackage{longtable} and create a longtable.

PS. Longtable directive helped me with my problem but it still doesn't work as I expected. If a single cell contains a lot of text in multiple rows, so it takes more than one page to render it, it is also cut at the end of the page. I don't know how to fix it (yet :>).

Monday, 26 March 2007

Recently I had to implement a module that would execute a given task once a day. At first I wanted to use Timer class but than I found Quartz. Quartz is a library for task scheduling for JAVA/J2EE. It is very easy to configure and use. Here are some features that I like:

works in both J2SE and J2EE

different jobs storing modes (memory or DB)

jobs can be declared in XML (no need to compile the code after changes)

Wednesday, 21 March 2007

I use Wi-Fi connection at work. I've also got one at home recently. I was looking for a tool for managing wireless networks. I wanted it to be easy in use and configuration, just like at Windows. I've found kNetworkManager. It seems to meet all of my expectations.

I faced some problems at the beginning - it simply didn't want to manage my networks :) I've solved the problem by removing all the lines describing network devices in /etc/network/interfaces

You can find description (in polish) of installation procedurehere. It also contains tips how to configure password manager so you are not ask for the network password every time you log in.

Tuesday, 13 March 2007

I'm an Opera user, so I would like it to be my default web browser. This short note is about setting a default browser in Kubuntu in general. I experienced some problems trying to make it work.

Attempt #1First I tried recommended method:sudo update-alternatives --config x-www-browserAt first I thought it worked fine, but first use of Thunderbird proved me wrong. This command works mainly for KDE applications, which thunderbird is not (it opens Firefox by default).

Attempt #2Ok. Let's try to find it somewhere in system settings. I found something like this:System Settings > KDE Components > Default Applications > Web BrowserThis must be it! Oh, it's so easy! No, wait a second - it still doesn't work with Thunderbird :\

Attempt #3Following instructions from 'Opera help' for KDE environment I tried to associate .html and .htm files with Opera:In Koqueror menu bar choose:Settings > Configure Konqueror > File Associations > text > htmlYou can set there the order in which the application for a given type should be chosen.Didn't help.

Attempt #4 (successful!!!)OK, last try. I'm serious - it's now or never! I switched to Gnome for a moment and set the default browser from there:System -> Preferences -> Preferred ApllicationsQuick switch back to KDE and...Ladies & Gentleman - we have a WINNER! I mean it works ;)

Monday, 12 March 2007

I love it! Only for the Amarok itself it was worth to switch to Ubuntu. It is nothing revolutionary, but its features are exactly what I need to enjoy my media collection. It can also deal with last.fm streams, which makes it even more useful.

The coolest feature for me is possibility to control the player using the mouse scroll over the Amarok's tray icon.

scroll up/down - volume up/down

ctrl + scroll up/down - previous/next song

scroll click - pause/play

Oh, I forgot to mention about keyboard shortcuts used for controlling the player that are working also when player's window is not active.

I spent some time on customising my Ubuntu but there are still many things I had in Windows working which I miss in Linux a lot:

Open Pandora - there is no Open Pandora player for Linux. I did not find any alternatives as well.

Mic in webcam - my Ubuntu can't handle the mic build in USB webcam (Logitech Quickcam Pro 3000). It is probably easy to set up but I'm pretty lazy :P

Azureus - actually Azureus is a Java torrent client, so it should be portable. But I just can't get it working correctly on Ubuntu. I use poor kTorrent instead.

Flash in Opera - I'm facing the same problem I experienced using Opera 8.x on Windows: Flash player doesn't work right in Opera. Banners and adds don't close when I click "X", application menus don't work etc.. It can be really annoying! I hope next versions will have this bug fixed.

I've chosen Ubuntu 6.06 Dapper Drake as my Linux distribution. It is supposed to be a ready-to-use system, so it should be pretty simple to start with.

The installation went very smooth indeed. After launching the system from bootable CD a graphical enviroment appears. Click the 'install' shortcut to start the installation process. The process itself is very simple, it requires to set only basic parameters and click 'Next' several times. All the hard work the systems does for you.

Friday, 9 March 2007

I've finally decided to join the exclusive comunity of Linux users. As much as I like Windows and the easy of use it offers I also realize that every selfrespecting software developer has to know the Linux basics.

The purpouse of this blog is to gather my knowledge about technicalissues related to Linux installation and usage. The secondary goal of this blog is to improve my english by practice.