- 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
Saturday 26 May 2007
GRUB Error 17
Thursday 24 May 2007
Master's Thesis presentation
(Presentation may not be visible in some browsers under Linux)
Wednesday 16 May 2007
100% CPU usage caused by atieventsd process
Wednesday 2 May 2007
Javascript Timer object for active pages/tabs
var TimerJob = Class.create();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 :)
TimerJob.prototype = {
/*PeriodicalExecuter*/ pe : null,
//numbers of seconds to wait
/*int*/ sec : 600,
//flag set after countdown finishes
/*bool*/ finished : false,
// Initializes the timer
initialize : function(){
this.pe = new PeriodicalExecuter(this.execute.bind(this),1);
window.onblur = this.abort.bindAsEventListener(this);
},
// Stops the timer countdown if page/tab looses focus
// Handles window.onblur event
abort : function(evt){
$('informer').innerHTML = "abort";
window.onblur = '';
window.onfocus = this.resume.bindAsEventListener(this);
this.pe.stop();
},
// Resumes the timer countdown when page/tab gains focus
// Handles window.onfocus event
resume : function(evt){
if(this.finished){
window.onfocus = '';
window.onblur = '';
}else{
this.pe = new PeriodicalExecuter(this.execute.bind(this),1);
window.onfocus = '';
window.onblur = this.abort.bindAsEventListener(this);
}
},
// Restarts the timer countdown
restart : function(){
this.pe.stop();
this.pe = new PeriodicalExecuter(this.execute.bind(this),1);
window.onblur = this.abort.bindAsEventListener(this);
},
// Action executed by timer each second
execute : function(_pe){
$('informer').innerHTML = this.sec;
this.sec--;
if(this.sec <= 0){
this.pe.stop();
alert("It is time!!!");
this.finished = true;
window.onblur = '';
window.onhelp = '';
}
},
}
Any questions?
PS. The code has been tested on Opera 9.2 and FF 1.5 (Ubuntu Dapper Drake)
Wednesday 25 April 2007
Object Oriented Javascript
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
Accessing CDATA section in XML DOM from Javascript
<page>I was trying to access the CDATA section the way I access all the text nodes:
<uri>http://www.somepage.com/page1.html</uri>
<content>
<!--[CDATA[
<p>Paragraph 1</p>
<p>Paragraph 2 <a href="lnk.html">lnk</a></p>
]]-->
</content>
</page>
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:
xmlDocument.getElementsByTagName('content')[0].childNodes[1].nodeValue;
I'm using this for parsing a server response returned by AJAX Request (invoked using prototype.js library). I am not an expert here but I guess it may differ between XML DOM implamantations.
Tuesday 17 April 2007
5th Annual Conference on Teaching & Learning: Learning Technologies
Adapting informal sources of knowledge to e-Learning.
Authors: Czaja Filip, Dobrzański Jarosław, Jankowski JacekThe 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.
References:
1. DTI 2006 - Beyond eLearning: practical insights from the USA
2. http://didaskon.corrib.org
3. www.foafrealm.org
Playing .wmv files in Ubuntu
- Open
/etc/apt/sources.list
- Add lines:
- Dapper Drake:
deb http://mirror.ubuntulinux.nl dapper-seveas all
deb-src http://mirror.ubuntulinux.nl dapper-seveas all - Edgy:
deb http://mirror.ubuntulinux.nl edgy-seveas all
deb-src http://mirror.ubuntulinux.nl edgy-seveas all
- Dapper Drake:
- Update list of repositories:
sudo apt-get update
- Install the package:
sudo apt-get install w32codecs
- Open your files and watch :)
Solution found here and here.
Monday 16 April 2007
Didn't get the iPod
Don't you think I deserve a price for this poster? :)
Related links:
Faculty of Engineering Research Day 2007
My Abstract
All submitted abstracts
Monday 9 April 2007
Tables on multiple pages with 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.Package installation precedure:
- Download set of additional packages tools.zip from www.ctan.org.
- Extract package's content
- Enter folder with extracted files and run command
latex tools.ins
to create *.sty files - Copy *.sty to folder with latex plugins. In my case it's
/usr/share/texmf-tetex/tex/latex
. - Refresh latex files db by running command
texhash
\begin{longtable}{c|l|p{5cm}}
\hline
content of cell 1 (centered) &
content of cell 2 (aligned left) &
content of cell 3 (multiplerows, 5cm width) \\
\hline
\end{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
Task scheduling in J2SE / J2EE with 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)
- different triggering modes (e.g. Cron like one)
- predefined set of triggers e.g. minutely, daily etc.
- it's for free (Apache License 2.0)
Check it out at: www.opensymphony.com/quartz/
Wednesday 21 March 2007
Managing Wi-Fi with kNetworkManager
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 procedure
here. 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
Default browser in KDE
- Attempt #1
First I tried recommended method:sudo update-alternatives --config x-www-browser
At 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 #2
Ok. Let's try to find it somewhere in system settings. I found something like this:System Settings > KDE Components > Default Applications > Web Browser
This must be it! Oh, it's so easy! No, wait a second - it still doesn't work with Thunderbird :\ - Attempt #3
Following 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 > html
You 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 Apllications
Quick switch back to KDE and...
Ladies & Gentleman - we have a WINNER! I mean it works ;)
Useful links:
1. This guy had the same problem.
2. I've found solution here.
Monday 12 March 2007
Amarok
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
First negative impressions
Linux sucks! ;) Ok, maybe not really, but...
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:
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.
Saturday 10 March 2007
KDE
Changing GNOME to KDE:
- Download & install KDE packages with all their dependencies (around 350MB) using Synaptic Package Manager.
System > Administration > Synaptic Package Manager
- Reboot the system.
- When the login screen appears choose:
Menu > Session Type > KDE.
After couple hours spent with KDE and some changes in default look and components configuration I can say KDE suits me, although the default style seems to be little bit to "candy" for me.
My Desktop looks now like this:
Let's get started
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.
Now we are ready to go!
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.
Now we are ready to go!
Friday 9 March 2007
Switching to Linux
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 technical
issues related to Linux installation and usage. The secondary goal of this blog is to improve my english by practice.
The purpouse of this blog is to gather my knowledge about technical
issues related to Linux installation and usage. The secondary goal of this blog is to improve my english by practice.
Subscribe to:
Posts (Atom)