Author Archives: Thomas Cokelaer

PyQt4: example of TableWidget usage

The following simple example (inspired by saltycrane example shows how to build a simple application that pops up a table with PyQt4 and its TableWidget class. import sys from PyQt4.QtCore import * from PyQt4.QtGui import *   data = {’col1′:[’1′,’2′,’3’], … Continue reading

Posted in Python | Tagged , , | 3 Comments

proper CSS style for HTML table

When using table in HTML, you should use CSS style. Indeed, the old way that consists of setting attributes within the table (and td/tr/th) tag is deprecated. Therefore this old code <table width="400" border="3" cellpadding="5" cellspacing="2"> <tr bgcolor="#DDDDDD"> <td width="100" … Continue reading

Posted in Computer Science | Tagged | Leave a comment

Running SSH commands (remotely)

Consider a login on ta Host machine. To run a command (let us try a simple ls to list the current directory), just type: ssh -X login@IPhostMachine lsssh -X login@IPhostMachine ls In practice, commands are longer and you would rather … Continue reading

Posted in Linux | Tagged | 1 Comment

RPM usage

In order to check which version of a RPM package is installed, type (e.g., for the motif package): rpm -qa | egrep ‘motif’rpm -qa | egrep ‘motif’

Posted in Linux | Tagged | Leave a comment

HTML: how to include another HTML file

To include another HTML document within a n HTML document, use this command: <! –#include virtual="temp.xml"–><! –#include virtual="temp.xml"–> the main HTML file should have a shtml extension.

Posted in Computer Science | Tagged | Leave a comment

Differences between Class and ID in CSS style

The key thing is that an ID identifies a specific element within a page and therefore must be unique. Classes mark elements as members of a group and can be used multiple times. So why not always using Class over … Continue reading

Posted in Computer Science | Tagged , | Leave a comment

stty command and prompt issue

Under Linux, the sheel command (or prompt) may behave strangly after some unusual command. I do not have any example off hand but typically, the escape key will not work anymore, or special characters. In the worst case what you … Continue reading

Posted in Linux | Leave a comment

Photos from Devon, UK

[coolEye search=Devon2011 how=album puser=cokelaer width=500 height=500 source=picasa]

Posted in photos | Leave a comment

How to add adsense in wordpress

In order to incorporate ads from adsense into your wordpress blog, you can use/install a dedicated plugin that will manage your adsense ID for you. However, you can also do it yourself, which may be more robust on the long … Continue reading

Posted in wordpress | Tagged | Leave a comment

FEDORA: ec-incosolata font missing

Being developer of some R packages, I have to convert some R manual file using pdflatex. Under FEDORA, the conversion seems to work but some fonts are missing. It was not easy to figure out how to fix this issue. … Continue reading

Posted in Linux | Tagged , | 1 Comment