Thursday, June 14, 2007

Saladrex is bored

My server and network machine Saladrex is really bored. It barely reaches a CPU workload of 1%. Therefore I decided to help him out: I downloaded and installed BOINC via ports and it is now constantly calculating things for the FightAIDS@home project. It is really depressing though... I use BOINCView to monitor it's working and it tells me that Saladrex is able to make 538 MFLOPS. My Core 2 Duo machine Scylandara makes 766 MFLOPS but is only running on half work load. Here are some statistics:

BoxCPU(s)MemoryMFLOPS (at 50%)MFLOPS (at 100%)
ScylandaraCore 2 Duo @ 2,3 GHz1GB DDR27661632
SaladrexIntel Pentium 4 @ 1,8GHZ512MB DDR-SDRN/A538

And here we go:

Monday, June 11, 2007

TODO tags in Qt 3.8.x

I recently tried to rescale a QPixmap containing a PNG with alpha values via resize(). Do you think it worked? No it didn't:
QPixmap::resize: TODO: resize alpha data
I tried to overlay a battery icon with a fully transparent image just containing a blue bar which I tried to resize according to the percent of battery power left. Ha! Now I have to crop the image to the bar and place it directly in the image... damn.

Friday, June 1, 2007

I screwed with my MySQL

I have some problems with my MySQL client on my workstation though. Everytime I wish to connect to my MySQL server it wrongly assumes the IP of my workstation instead of the remote peer and connects to the wrong one. Though when I ping the server manually and through the error dialog of the MySQL Administrator the IP is correct. Is this normal?

Saturday, May 26, 2007

Remains CD

I got my hard copy of Muddasheeps Remains today. It was packed with some nice artwork, which I am going to show off in a few days: My sister took our camera to Pullman City, therefore I was not able to take a picture of it, yet.

Tuesday, May 15, 2007

Turning off the bell in FreeBSD

It's that simple:

$ echo hw.syscons.bell=0 >> /etc/sysctl.conf
$ sysctl hw.syscons.bell=0

Monday, May 7, 2007

HuaWeiClient under FreeBSD

I recently got mailed up by an Chinese student who wished to run the HuaWeiClient under FreeBSD. Though he could not compile it for two reasons:

A wrong pragma pack in the global.h header file. GCC 3.4.6 did not like it:
#pragma pack(push)
#pragma pack(1)

As GCC suggested:
warning: malformed '#pragma pack(push[, id], )' - ignored

I corrected it:
#pragma pack(push, 1)

And the code used some Linux specific ioctl() code named SIOCGIFHWADDR to get the mac address of the interfaces.
if (!(ioctl (fd, SIOCGIFHWADDR, (char *) &buf[i])))

I replaced it with the proper sysctl() calls:
if ( sysctl(mib, 6, 0, &len, 0, 0) == 0 )
buf = new char[len];
if ( sysctl(mib, 6, buf, &len, 0, 0) == 0 )
ifm = reinterpret_cast(buf);
sdl = reinterpret_cast(ifm+1);
ptr = reinterpret_cast(LLADDR(sdl));
// Now copy it into our destination buffer
for ( int j = 0; j < 6; ++j )
infoarray[i].macaddr[j] = (int)ptr[j];

I know... the struct keyword is not necessary or may be even not pure C++... but it is my style; go with it.
The patches are available for download here. Just download the original software from the SorceForge project site and extract it. Then download my patches and extract them into the directory where your HuaWeiClient sources are located and type the following into a shell:
$ patch global.h < global.h.patch
$ patch networkoperation.cpp < networkoperation.cpp.patch

After you have finished patching the source files, compile it as usual. By typing:
$ qmake
$ make

If the patches do not work for you, please feel free to contact me.

Sunday, May 6, 2007

HQ:Amen Kitty

Ha, Ha, Ha, staying alive, staying alive; Ha, Ha, Ha, staying alive, staying alive... >)

Sadistic Kitty