Skip to main content

a silhouette of a person's head and shoulders, used as a default avatar

casting from base classes

After visiting Schwetzingen I designed the following C++ question for today:

C++ has two reasonable options to cast from a base class to a sub class. These options are the static_cast operator and the dynamic_cast operator. Explain the differences between these two operators and compare their advantages and disadvantages.

Explain why one cannot use the dynamic_cast operator to cast from a base class that does not have a virtual function.

Explain why one cannot use the static_cast operator to cast from a virtual base class.

the avatar of Flavio Castelli

QtCanvas

Finally qtcanvas classes are available for Qt 4 series

This isn’t the final version of qtcanvas, it’s only a backport of the original classes shipped with Qt3.

So what’s the difference between this qtcanvas and qt3canvas (available only through Qt3 support with Qt4)? Simple this version works with all open-source versions of Qt >= 4.1.0!!

In this way you can use qtcanvas also under windows (before it wasn’t possible with the open-source edition).

I’ve tried qtcanvas under Mac OS X Tiger, Gnu-Linux and Windows XP and they work fine.

the avatar of Flavio Castelli

Gentoo documentation checker

gen-docheck is a useful tool for the gentoo italian translation team. gen-dockeck compares the version number of english document and italian translation.

In this way you can watch the status of one or more guides, keeping the translations updated.

Features:

  • mail notification support (straight to guide’s translator or to a specified address)
  • filter guides using regular expressions

Requirements:

gen-dockeck requires:

Synopsis:

gen-docheck syntax: gen-docheck [--help] [--man] [--config configuration file] for more informations read the man page: gen-docheck --manan

Configuration file:

gen-docheck support also configuration files.

This is an example:

#mail sender
sender = gentoo_doccheck@gentoo.orgThis email address is being protected from spam bots, you need Javascript enabled to view it  
#check only guides mathing these names (use "." to match all, "," to separate names)
checkonly = diskless,macos
#checkonly = .  
#send mail notify to translator
mailnotify = 0  
#send all mail notify to this address
force_mail_destination = flavio.castelli@gmail.com  
# smtp server
smtp = smtp.tiscali.it  
# debug smtp commands
smtpdebug = 0

Usage:

You can automate gen-docheck adding it to cron.

Here’s an example:

0 10 * * 0 /home/micron/gen\-docheck/gen\-docheck.pl --config /home/micron/gen\-docheck/gen\-docheck.conff

In this way you’ll run gen-docheck every sunday at 10:00 AM

Download

The code can be found inside of this git repository.

the avatar of Flavio Castelli

Howto edit multime id3 tags from command line

Goal

id3medit is a simple script for tagging all mp3/ogg files present in a directory.

Requirements:

id3medit relies on id3v2, a command-line tool for editing id3v2 tags file names must be in format: ’## - trackname.ext’. Where ## is track’s number, and ext is file’s extension (mp3 or ogg in case insensitive format)

Synopsis:

id3medit syntax is: id3medit artist album year(*) genre(*) Where * denotes optional arguments You can obtain genre identification number in this way: id3v2 -L | grep -i genre

Example

id3v2 -L | grep -i rock

   1: Classic Rock
  17: Rock
  40: Alt. Rock
  47: Instrum. Rock
  56: Southern Rock
  78: Rock & Roll
  79: Hard Rock
  81: Folk/Rock
  91: Gothic Rock
  92: Progress. Rock
  93: Psychadel. Rock
  94: Symphonic Rock 
  95: Slow Rock
 121: Punk Rock
 141: Christian Rock

Code

{% gist 2469919 %}

the avatar of James Willcox

Firefox Rules

So Firefox 1.5 is out, sporting a new canvas tag. Hopefully we will see all kinds of sweet innovative stuff using it. Here is my contribution:

Update: I also changed my little bugzilla greasemonkey script to work with Firefox 1.5. You can get that at the usual place, here.

a silhouette of a person's head and shoulders, used as a default avatar

More languages

We're in the last stages of preparation for the launch of the opensuse.org wiki in three more languages: german, spanish, and french.

To keep us busy, we have more languages already in the queue for the next batch of wiki instances. I'm confident that these won't need as much time and effort as the first 3. And a big thank you to you translators out there for all your help!

Also, the famous SUSE Linux support database will reincarnate as a part of the wiki Real Soon Now. Watch the announcement list for details!

the avatar of James Willcox

vengeance is mine

If you have ever used the Novell Bugzilla you no doubt noticed that it likes to log you out after a short while. Usually for me it’s at least two additional clicks after clicking on a bug link before I can actually see the bug. It annoyed me enough tonight that I wrote a greasemonkey script to ease the pain. You can get it here. Just log in once manually after loading the script so it can store your user/pass, and it should do it for you after that.

Update: I just put a newer version of the script up. It will log you in even if the page you’re trying to view is not locked out to anonymous users. Also added some lame feedback so you know what it’s doing.

a silhouette of a person's head and shoulders, used as a default avatar

Tired

One more package update, one more bug to comment on, one bugfix to prepare for inclusion. One release party to survive ;-) and then - Crete, here I come.

I really need a vacation. There will be no network, and I won't take a camera. See you all in 2.5 weeks.

a silhouette of a person's head and shoulders, used as a default avatar

Offline weekend


Add classes and concerts, tunes and songs, long session nights, old friends and little sleep. Stir and simmer for three days. Enjoy without distractions from the world beyond the castle walls.

a silhouette of a person's head and shoulders, used as a default avatar

Motivate the nation!

There is a new motivation campaign for Germany. Or germans. I am not sure I understand its purpose, but at least they built the website with OpenCMS, which is of course always commendable in anything done by the government. On the downside, they managed to screw up browser detection so that the site stays completely blank in Firefox. Oh well.