2008-07-10

Annoying Brother printer margin

This is one of those posts where desperate Linux users share their most annoying experience with Bugs/Errors/ConfigurationAttempts, and how they fixed it, with the world.

Today I've printed out half a bug to fix an error with Brother my DCP-115C Printer. (But I think that all printers using the MFC-210C drivers will have the error in a similiar way) They have this little annoyance that the print margin is not correct for the used paper format. The top was cut off, but I've seen a lot of users that complaining about left, right and bottom margins as well.

But luckily this is easy to fix:

  1. Make sure that CUPS uses the right paper format. E.g. Letter is often the default format while europeans use A4 instead.
  2. Excecute this as root:
    brprintconfij2 -P MFC210C -reso 600 -pt A4
    This will lauch some brother configuration script which will helped in my case and as far as I could tell from google, it helped others as well. :-)

2008-06-12

Why do I have two instances of X running?


I just don't get it. Is this normal for openSuse 10.3?

2008-06-09

Is Ogg-Video really that slow?

I recently downloaded Big Buck Bunny and as a free software enthusiast like I am, I chose the 1920x1080p-ogg-Version of the Clip. However, I was not able to see the movie because it was just so terribly slow. I counted seconds until the next picture was shown...

I first wondered whether my System (Core Due T2300 with 1GB RAM) was too old to handle that high-res videos therefore I tried the 1280x720p version which worked, the cpu load was still relatively high though.

At last, just out of curiosity, I downloaded the 1920x1080p-mp4-Version and expected the roughly the same results as with the ogg-Version. But the performance was completely out of my expectations. I was able the see movie without a problem and the cpu load was even lower then the low-res ogg-Version!

And now I wonder if this performance difference is caused by the fact that the ogg-developers needed to work around some of patents in the development of ogg, or is there some other reason?

2008-04-21

VBA and comparing Dates

Right now I've been busy developing a Office 2003 Macro which analyzes and merges multiple Txt-Files into Excel. And while doing so I came across a pretty odd situation, because to me it seems that VBA is not able to correctly compare two dates, as the following screenshot shows.
The Screenshot clearly shows that LastDate is not greater than estimatedDate. But still, the debugger stops at the breakpoint within the if clause. And as you can see, the only way I found out to avoid false negatives was to perform a second check with DateDiff to get the amount of seconds between the two dates. Because luckily this works as expected.

2008-03-22

USB is not as standartized as I had thought

Yesterday I tried to fix the front USB-Connectors of a Computer I set up a month before. The mainboard of the machine had died and so I needed to replace it with a different board. However after that the front USB-Connectors did not work.

Looking at the two manuals clearly revealed that both boards use different layouts for their extra USB-Connectors. (The little pins on the picture)

 The old Layout      The new Layout
|-----------------| |-----------------|
| Cable+ | GND | | Cable+ | Cable+ |
| Data- | Cable- | | Data- | Data- |
| Data+ | Data+ | | Data+ | Data+ |
| Cable- | Data- | | Cable- | Cable- |
| GND | Cable+ | | | GND |
|-----------------| |-----------------|
Luckily this was easy to fix as I just had to change the pin-order of the connector. But I'm still a little bit sad that I had to do so as it damages the nice plug'n'play-image of USB that it had in my mind. Because I was of the opinion that those connectors were standardized and "plug'n'play" as well.

Update:
Oops, I forgot to whish everybody frohe Ostern and happy holidays.

2008-03-21

Linux Sound driver for Asus A7N8X (Targa Edition)

I've spent all evening trying to get the onboard sound of the Asus A7N8X to work. I need to mention that this board is no ordinary Asus A7N8X. It is the Targa Edition which has a modified Southbridge (nForce2 TM MCP-T instead of a normal nForce2 TM MCP). Right now, no "stock" dirver shipped with openSuse 10.3 and Ubuntu 7.10 has been working.

So if anybody has got a clue on how to get this thing working, please leave a comment.

2007-12-23

System.IO.StreamReader + complex file processing = Headaches (Part 2)

Yes I know, and I'm terribly sorry that I've took so long to write the continuation of that blog-post. Nevertheless, here it is.

But at first I'd like to sum up the results of the last post:

  • StreamReader is not the right choice for this task.
  • Seeking does not work.
  • The index is completely useless and contains wrong data.
However the good News is that a small and clean facade1 pattern can fix all of this. The Facade can be a simple as this:
class FacadeReader

fields:
An internal position marker, as well as a real FileStream and
StreamReader.

Method ReadLine:
Read the next Line from the StreamReader and then add the
byte-count of the new line + the line feed character(s) to the
internal position marker

Method Seek(position):
Seek on the underlying stream, call
StreamReader.DiscardBufferedData() and last but not least store
the given position at this.position.
That few lines would be enough to make the application run. It is fairly fast and has the big advantage that it's simple to implement (no need to cope with all the low level stuff). Amazing, isn't it?

Oh, I almost forgot: Happy Christmas everybody! :-)

1 Or is this a decorator, am unsure about this.