Thursday, December 07, 2006

debian update removes packages

I have a debian testing server and make from time to time some updates to be up to date.

But i discovered a interesting behavior, sometimes after an update i am missing packages. Yesterday samba was missing again.

apt-get install samba did the thing, but hey? what the fu$%!! Why are packages missing after an update?

Strange!

Monday, November 20, 2006

damn Windows Word Charset

Although i thought i may have some more time working than eventually fixing some weird IE 6 Bugs i found one which held me up all day.

It looks like IE 6 sends illegal (malformed) HTTP POST request from forms which held some non ISO chars.

The thing is: i was able to find this site which helped me identify what my bug was, but then i traced it to one simple char.

It was one of Microsoft Word fu%$&ing Chars for - which where copied through to the textArea and so IE 6 was unable to work properly.

In the end two Microsoft Products were creating a Problem because they are unable to work correctly together.

If i wouldn't be such a nice guy i would curse the inventor of Words Charset!!

Firefox 2 missing Addons

Firefox 2 has been out for some time now and there are still some Addons which have not been updated from their authors.

But since there is a big community there are several updates from other people to get the add on running on FF 2.

Tuesday, November 14, 2006

svn your system

After my friend used subversion also for the linux system for quite some time now i thought i give it finally a try.

Installing svn or importing the system was not the problem, but how am i able to add the system into svn without having to checkout at the end.

Goggling with the right words i found this.

The Trick is to add the directories by hand into the svn with mkdir and then checkout the empty directory into your system. Then all you have to do is to add all files and directories and commit everything:

# svn mkdir file:///root/svn-repository/etc
-m "Make a directory in the repository to correspond to /etc"
# cd /etc
# svn co file:///root/svn-repository/etc .
# svn add *
# svn ci -m "Initial version of my config files"

Monday, November 13, 2006

Firefox will not start after installing SiteAdvisor

Today my Firefox did not start which was quite annoying for a Monday morning. The Safe Mode feature of FF was very helpful since i easily was able to find the course of the problem.

I have installed the SiteAdvisor extension from McAfee and after some googling i found this Article.

On Friday i changed my Proxy Settings from Direct Connection to Automatic (we had some problems with our servers) and forgot to undo this...

quite annoying "Feature" of the Extension.

Tuesday, October 31, 2006

debian update => uninstalled samba?

I did not update my etch installation for a longer time so i thought it's time to run the update...

The long list of updates was another indication of the long time i missed updating, but i looked it through and started the process.

After it was finished i had a problem with my network directories.. there were no network directories anymore... so i looked the status of samba, not running.
Ok then start it up, nothing in return... status, nothing... what the f*** ??

After some research (which did not get me any conclusion) i tried to get the version by using
apt-show-versions samba

but it returned that samba is not installed... what?

apt-get install samba and it runs smooth as before. But why the hack was it uninstalled when i tried to update it?

Friday, September 29, 2006

MACHINE_CHECK_EXCEPTION

Yesterday my pc welcomed me with a blue screen including the the failure: page_fault_in_nonpaged_area

Somehow it has problems with my ati Drivers so i had to restart,... and switch harddisks (since somehow windows change them) and after some hard works (hours and hours, some restarts in safe mode and ubuntu) i was able to get windows loading again...

I deinstalled all software i installed lately, downgraded my ati driver to a version which worked over some months and updatet my chipset and bios... and nothing worked..

All i was able was to change the message to a machine_check_exception... Googling about it i found out it could be with jre or daemon tools or something else...
Of course there was also some information that the harddisc may be defect, but since it was more or less new i did not think about that it could be a problem...

But since i had the same drive again (i had them working as raid 1 until some months ago) i mirrored the defect disc to it and restarted with the new drive...

No problems anymore.. now i finally found out why i had so much trouble running them as raid ...

Thursday, September 28, 2006

hdcp compliant

I feel like in a humorous story.. well all you can do at a certain point is just laugh.

Some months ago i bought a new Sapphire X1600 Graphic Card (ATI), a HDMI cable and an Adapter for DVI to HDMI so i could connect my Beamer to the Card through HDMI.

Both, Beamer and Graphic Card can HDTV so why don't use it.. that were my thoughts... but in reality nothing works as expected. All i was able to get is 800x600 and that's not funny.

So i first asked ATI (in the Support Ticket function which registration is a hard try itself) and they told me (after some typiing) to ask the Beamer manufacturer.

Ok i asked Panasonic (since i have a PT AE 700) how i can resolve this and they told me the Beamer can HDTV but only with HDCP and therefore the Card has to be HDCP compliant.

Good argument, i thought so i went back to ATI who returned: The Cards are not HDCP compliant... *grrr*
Ok, looked again at Sapphire's site and voila there is some misterous sentence which does not really say it can HDCP but it also does not say it can't... so i asked Sapphire about it.

They told me that the ASIC (chipset) is compliant but the firmware not and i have to asked another company about it... ?? what the heck??

Ok, let's just asked for fun how it is going to end:
I asked if there is a way for a standard user (please without soldering gun) to update the firmware and the first reaction was that sapphire lacks of the licence and they will ask them if they want to buy it first...

?What?? I don't quite understand.. but then i got another answer:
I checked with HKG and they said that to-date the drivers are still not yet compliant. Hopefully future drivers will resolve, we have been promised for over a year now.
Now i had to laugh since HDCP is the reason for the movie companies to use HDTV and therefore every peace of equipment has to be HDCP compliant.. all but not the graphic cards..

One more note: ATI told me that the only product they have released so far which is HDCP compliant is the X1950 series cards.. (do they have got the new firmware?)

Wednesday, August 09, 2006

ie6 floates just the background...

I had the problem that the background in a floated environment was not shown in ie 6 and clear:both was not helping much.

Pinpointing the problem down over 1 hour i found the reason in the width of the floated div. It was exact 1 px wider than ie liked it. So if i set it 1 px smaller the background as shown right, if i set it 1 px wider the content is also moved down. (since we are talking about 2 boxes floated, and the right one is the problem).

So it seems like ie is floating the background and the content separately.

I looked also in IE 7 (Vista Beta) and the problem is there also... and i found what seems like the peekaboo bug??..

Since i am really in a hurry and don't have time i have to postpoint writing a testcase for it.

Sunday, July 30, 2006

Win XP Shares

Since i had my part of Harddisk failures i implemented a backup system (rsync and cron) to my linux server to prevent any dataloss. But i had some error messages and never got the time to look into that matter, until today.

I was never sure if it is a Windows or a samba problem but first what my script does:
1.) connect a windows share through samba mount.
2.) backup via rsync the data to my linux system
3.) disconnect.

So everythin i have to do is to share a directory under xp and that's all... or is it not. Working through my google results i learned that there are some difficulties to think of. First: i don't like the guest account and i left it disabled. I just used the "easy" sharing model of xp and that worked fine.

Ok, so where is the Problem: The Problem is when you are sharing directories under a folder that is not accessible by everyone (for example, individual folders under "Documents and
Settings").

Although i clicked on share this Directory and User have all rights, windows don't give you this rights. You have to disable the "easy sharing" model and then go to the folder permissions (of the shared directory) and on the security Tab.

There you can find a setting which tells that if there are permission settings on the parent directory (which there are for Documents and Settings) it will use them instead of anything else. Which meant: Nobody has rights on that Directory except the User who owns the individual parent folder...

%$&!! only windows can be so complicated. That's why i like linux. You tell the right permission to a folder and that's all, nothing more....

So all you have to do is to disable that parent overwrite.. (or to be exact: enable the overwrite parent settings checkbox).

Now i don't get any permission denied errors anymore!

Saturday, July 22, 2006

Monkey Island

My collegues and i were talking about it over months before we finally could agree on a date, but we did and just 5 minutes ago we got through: Playing Monkey Island 1 once more over my video beamer with the cordless mouse and keyboard from my colleque.

Here is an image from the test (if it works on the beamer):

sync your google calendar with your ipod

I just bought a black 60 GB iPod for myself. (I was looking forward it a long time) Of course one of my first questions was: how will i get my google calendar data to my ipod.

Well i found a small program which does that, but the catch is, you have to do it manually when your ipod is connected.
As a programmer i would hope that iTunes would be more flexible than just standard Outlook connection.

Here is the Program: The Calendar works fine, but i was not able to sync my Contacts with that other tool:
http://johnny.matthews.googlepages.com/getcals

Wednesday, July 19, 2006

ide troubles

After i got my Raid Array working i had another Problem with the debian kernel i upgraded (kernel-image-2.6.8-11-amd64-k8), my ide harddisk was not working..

Tracking the problem i found that there were no hd devices in /dev. I checked the config of the kernel and the kernel uses ide as a module. Ok, now all i had to do is to load the right module.

Since i was not very familiar with installing specific modules, or knowing which module was the right i had some troubles getting it working. ide-cd and ide-disk were loaded, still something was missing.

Today i found it: ide-generic. After loading it with modprobe everything was there in /dev and i was able to mount the disk. Now all i had to do is to add it in /etc/modules.

Sunday, July 16, 2006

Promise Raid at Linux

For two days now i have been tracking a problem on my new server. Grub was not able to read the updates debian at the menu.list. I was triing almost everything, but everytime i booted, the Menu from Grub did not change, until i found the Problem this night.

The Reason i had so much trouble was that the Promise (378) Raid Array was not recognized right by sarge. So every change i made was written to the second Disk, while the first Disk was the one i booted from...

After some research i found out that Promise has stopped supporting drivers for their controllers after kernel 2.4.22 (or so.) So the only good way is to create a linux software raid instead.

Took some time to get that information.

If you want to create a Raid 1 system with mdadm you can try that:
mdadm --create /dev/md0 --chunk=64 --level=raid1 --raid-devices=2 /dev/hda1 /dev/hdc1

Some times /dev/md0 is not there yet, so you can either add it manually or add --auto to the mdadm string and it will create it automatically.

Thursday, June 08, 2006

Oblivion Patch is out

Waiting for it for a long time it is finally out. Bethesda released the Patch for Oblivion:
http://www.theelderscrolls.com/
It has a lot of Bugfixes, unfortunately they did not add this Fix into it which gets the fence Fathis Ules back to the Imperial City after the Quest in Chorrol. (Needed for the Thieves Guild Quests).

iTunes@home

I used to work with winamp for a long time so i never thought about iTunes before. But now i am triing to build my own Music Database so i can hear my music in every part of my Home and Working with Winamp did get a little confused and complicated.

A collegue of mine uses iTunes and after some talking i installed it and imported my Files into it. And here the odysee started. Importing my Files didn't run as smoothly as i expected since iTunes seems to have a problem importing Files which have a Filename that is too big.

Unfortunately the Filename should be very small, after that iTunes just cuts the Name and if the Filename is bigger than a certain point it just does not import the file.
Since i used the Term "Artist - Album Name - Audiotitle - Track#.mp3" i had some difficulties.

But after i found out about that problem it got a little easier.. although i had to import many of my CD's from scratch since the Tags were not right.
Working with iTunes has some very good advantages and it really helps finding your music very quick. I like the search engine..

So the next step was to find a iTunes Server for my linux server: http://wiki.mt-daapd.org
It works great, but has several disadvantages i want to share with...

If you use a iTunes Library on your PC and want to add the Files to the Server there is no Possible way to just move them in iTunes. Also if you have another PC which shares the Music iTunes does not support copiing or moving between them. (Possible becouse they don't want you to copy music to a third person which is not allowed by law.. buy the music you want to hear instead.)

One way which works fine for me is to tell the iTunes of my PC to use as source the same iTunes directory my server uses. (Which is not a big deal with samba..)
Now i am able to import all the other CD's of mine (not a small amount) and to share it even in the farthest away room where we have our roleplaying meeting every second week.

Maybe some time in the Future i find a way to import Music from any iTunes to my server, until then i try to find a way to connect to my server from any point i am over a secure line so i am able to here my music wherever i am (and have a internet connection)..

Thursday, April 27, 2006

labeling the world

Using labels for any form has become a standard habitat for me. From time to time i get angry when i am using some form on the internet which does not know about labels.. so you have to click right on the element.. not left... ah...sh*$$ not right.. now i have it ;-(

At first i did not think much about it but now, it's always an indicator if the site i am looking at is well programmed or not.

Unfortunately css3 is not starting early enough and we have to keep with css 2.1 and Windows without Cleartype activated.. which means the designers want graphics everywhere .. even in a form. (From time to time).

Using Firefox as my primary Browser i did not detect the error at first, but it looks like IE does not like images in labels.. which means, it does not work.
<label for="foo"><img .... /></label>

I don't know if it's a bug in IE or it is not in the specification for html, so shouldn't work at all.. but i tested it also with IE 7 Beta 2.. it does not work.

Wednesday, April 26, 2006

googles personalized home

Today i got a call in the morning that we need a module for the personalized home at google and it's urgent.

Well of course i knew about the personalized home feature, but i did not have any time to look how to implement something for my own.. until now.

And it is really easy, just look at the guide from google. It's just a xml File with the Data in it. Ingenious, although there is a little problem involved.

I don't know why, but when i tried testing my module i got an error until i found a server which correspond with google. I looked into the groups and all i could find was someone from israel having the same problem, but no answer.


After some testing all i could find out is that google does not like certain websites. Best is you use a server at US.

Tuesday, April 25, 2006

javascript handling fileupload through popup

Since the dawn of Ajax everyone tries to implement it even more often than before.


I, for instance happen to work on an old project, which already uses ajax technology for about 2 years. There is a form where the user can enter data and at one part you can add additional information indefinetly by clicking on a button which generates a popup to add the data, then click on save and the data is in the form.

Everything was fine, until i had to also add files ... and that was a little tricky. Everyone knows
that you can't change the value of a file input field for security reasons. But i had to find a way the user can add a file in the popup and then it apears in the form.

The idea took about 12 Seconds.. the implementation took longer ;-)

In the Popup i have a js Routine that sends the data to the js Function of the Form. I changed it so it also sends the File Input field with it. (document.getElementById();)

The Form Function takes the data and build the new elements into the dom. Now i look for the File Input Field and if i get it, i just append it where i need it.

So i have the Input Filed moved from the popup into my Form with all the data it has in it. Now i can submit the Form and get the Files i added in the popup.

Friday, April 07, 2006

Oblivion Quest "GoFish" (Warining Spoiler)

Since i have some Problems with that Quest and after searching found that i am not the only one i thought i just write a post for it. But warning, it's a spoiler, so if you don't want to know stop right here.. or here... or here ;-)

The main Problem with that Quest is to find the right Slaughterfishes, becouse the Green Marker will not show it to you after you killed about 6 of them. It will still show the location where the dead ones swim.

I am not completely sure yet, since i have not finished it yet but most of the threads i read say they have just left and made some other quests. After they went back there were additional fishes.

My guess is, there aren't all 12 Fishes there at the same time. You have to wait until new ones have been bread, only i don't know how long it takes and if you need at least one or two fishes alive for it.
I don't think they added it, but it would be funny if you killed all fishes in that water and there are no more fishes, since there are no descendeds any more.

I already killed all the ones i found and now i wait and go for some other quests, maybe the main quest, which i did'nt follow yet. If there are another Fishes then, we know.

Tuesday, March 28, 2006

Oblivion Teaser

Yesterday i got oblivion and well.. it's just great! I am not really able to tell much more, but in time i may write some impressions.

Until now i just played the tutorial and my first dungeon.. and the only thing that stopped me was my wife towing me into bed so i am able to work the next day ;-)

The only thing i want is a safe deposit ingame so i can keep their my precious stones and other things.

Now another adware: if you like some information about alcemy go to Darliandor's Alchemy Lab.

Saturday, March 25, 2006

Don Quijote's way of life

Working in a webdeisgn firm i always thought there is a place for design and programming standards. When i started there was just design and some barbarous programming. I was not very happy about it but i adapted.

A couple of years ago we had a high peak for programming standards due to a new programmer in the team that changed our complete behavior. Standards were right and fundamental and the firm tried to have both, high design standards and high programming standards. I always thought that would be a good thing and i always thought that both can live together.

But since then some things have changed. Our lead programmer left the firm and i was the one in charge about programming standards. I always tried to be like a rock and getting at least the standards of capital importance in every project.

But it seems i was more like don quijote fighting with windmills. At least from my part of view the firms path is just design, and if comfortable we also like some standards, but that's not important.

My problem is: I like to work and i want to make projects which i am proud of. Unfortunately that means i also want to use standards whenever possible and try to even more enhance our goal to maintaine maximum accessibility.

But to what end? I am tired of telling why we should also program a textonly version, or why we should let people increase their font size, as they wish.

For the first time I found myself thinking if i should leave the company or just stop using standards, and just doing my job without pride, without fun. Using them only in private little projects and do whatever they want.

I found myself asking if i lost something or just found something i don't want to loose anymore..
I found myself asking why do we work all day triing to use standards, doing things "right".. when there is no recommendation, no one that we see it was the right thing to do.

I may sound depressive.. well i am, but where should we go from here... Triing to better our techiques to build more websites which use all standards and have maximum accessability or not..

Is the war worth fighting for?

Wednesday, March 22, 2006

A Tribute to Raid

Since i was having some difficulties while changing my motherboard with onboard Raid and maybe someone has the same problems i wanted to post this little story.

I had an Asus A8V board with Promise Raid onboard and used it with two SATA 160GB Harddisks in a Raid 1 (mirror) Array. It was working fine and i was getting used to how the Promise Bios works.

Unfortunately the Mainboard was AGP and i needed an upgrade to PCIe.. so i bought the Asus A8N-E with onboard Raid from VIA.

The first impression was good. I activated the Raid controller, set the two SATA ports to Raid and looked into the Raid Bios. Raid was found and worked "Healthy"... Very good, i thought and started up, since Windows was already on the harddisks....

But Windows is not as easy as i hoped for which the bluescreen told me even in Safe Mode. Now i had two options.. try to boot somehow and backup all data (160GB is a little too much) or just disconnect one drive from the array and boot up with one harddisk. Install everything on that and then copy everything i need (like profile) from the disconnected drive.

At this moment i loved Raid 1, since i did not have to backup everything.. i had a backup. To make the story short: i disabled the Raid, installed everything on one disk, connected the second drive and copied everything from one disk to another.

Then things got wired. I reactivated Raid and the Bios told me the Array was healthy.. that could not be since the data on both disks differ... I tried to boot, but it did not (which i later discovered was my fault since Windows never installed a raid driver, becouse it was disabled)..

The Bios was also very wired since there is an option for rebuild an Array, but when you press R for rebuild you can choose a disk from the Array.. but no info what will happen. Am i choosing the master disk or the disk which is going to be rebuild? The documentation on this part is .. well there is no documentation.. All it says is: then press enter and the rebuild process will start...

Very good.. really... Who wrotes crap like that? Did people actually get paid for manuals which don't help?

The best part, after you choose a disk nothing happen...absolutely nothing.. With the Promise Bios you see a progress Bar and everything.. but here.. nothing..

After i realized that windows could not even start without the raid driver i was finally able to boot and then something happend i did not think of.. automatically in windows a info tray window appeard telling me the reconstruction of the array is in progress...

Ahhhh... now it's rebuilding the array... in windows.

So at the end i have to say i made some mistakes and should just have installed the Raid Driver in Windows to make everything work.
But i also have to say that VIA should rebuild their Bios so people are able to make this things in the Bios.. doing that kind of things in Windows is.. well it's not only bad.. it's ..unthinkable....

Wednesday, March 15, 2006

Battle for Middle Earth 2 Review

I happen to get a look at the game through a friend of mine and was like in the demo impressed by the stability of the game.

When playing BTFM 1 the game was a little laggy, meaning you had problems navigating through the menu since the animation of the "eye" made everything uneasy. But they improved everything and also the game itself runs good. And that on the same machine where i had problems with the first game.

Another goodie are the new Races, Goblins and Elves. Two Races, Rohan and Gondor, has been put together and are just called Men. And they added more Weight on Heroes by allowing the User to create their own Heroe. This is really nice, becouse you can adjust a little the look of the Heroe and some stats. But it is also limited, since a friend of mine created a Harradrim which was able to disguise and kill a Person in an instance, but was also very slow. There was no indication how quick he will be and there is no way of changing the speed.

As a rpg playing gamer i would expect another advanced button to change more stats, but that's just a love to have, not a need to have.

What's really bothering me is that when you capture a building you use the Flag of the building. That Idea is great, but what i don't like is that when you move the cursor over the Flag you see the same cursor which was used in C&C Generals... hello? That should not have been necessary.

As in BTFM1 the Maps have not very improved. There is only on Map for 8 Players and most of the Maps have moved from BTFM1 to 2. What's good is they added a nice Minas Tirith, Helms Deep Map and some other cool locations. We already started searching for new maps, especially which needed a little more water.. I would like an Osgiliath Map for 8 Players with a huge Water Part in it.

Another good invention is that you can build your own Walls, which means you can make your own minas tirith if you'd like (i usually do) ...

But speaking of Walls, there is one catch i definetly don't like. Every good race is able to build a Wall, every single one. On the bad side there is only Isengard... hello? Did they hear about the lack gate? You know the one from Moria...

It's really anoying since you can't stop a group of Horseriders with some Archtowers. But with a wall they would have some problems. Looking at the Races in General it's like in BTFME 1, the good have a greater advantage like healing, they can build fountain, walls, legolas...

My conclusion is: if you had liked BTFME1 it is not bad to buy BTFME2. They have improved much, but i don't know if BTFME2 would kept me from playing C&C Generals Zero Hour in the Future..

Thursday, March 09, 2006

oblivion - will there be a generate button?

Hi!

As many others i am already waiting for the release. A friend of mine made a site for it: http://oblivion.melian.cc


But that's not why i started the post. I was thinking while looking at the screenshots, that the trees and nature are completely generated by the computer. So when i start the game it will generate my version of oblivion. But will it remember it or will it generate it new every time i enter the game or dungeon or.. i don't know, like diablo 2 the map.

I thought of running through the forest in circles becouse everything is generated over and over again and you have no point of reference (except of a map) where you have to go..

Playing Gothic 2 we started to memorize which plants we find on which sites.. like a specific tree... now what? The tree is there but the plant not... the tree and the plant are moved 50 meters to the west.. the plant is there but the tree not..
That's a new way of playing scottland yard.

The other way would be that the forest is generated only one time after creating a new character, specific to the hardware you have installed. But then, what if you change it to a better one, will you still see the old version. Will there be a generate button to recreate the forest?

Let the question enter yourself and think of it as activity for the break until the game is in your hands.

googlemaps api

As i was thinking the other day why shouldn't somebody try to use the googlemaps engine, or sort of it for fantasy worlds, it just happen to be me one week later ;-)

My first approach was to try to understand the engine just by examing their code and the dominspector... but after a while of searching i found something great. You can use the googlemaps api from google themselves. Just create your onw code and voila everything is working..

http://www.google.com/apis/maps/

Also there are a mass of tutorials and helps how to work with the api and how to add custom maps, although they only think of adding just parts of the map and not a completely new map.

http://www.mapki.com/index.php?title=Main_Page

http://www.econym.demon.co.uk/googlemaps/index.htm

I would also recommend looking into the Google Group for the Api for help. There is always something you can work with.

Happy mapping!

Wednesday, February 15, 2006

Honeymoon

Now something intechnical.. since i wrote most times something about php, css or mysql ;-)

I just got back this week from my honeymoon at Buenos Aires and i have to say, it was really lovely there. Living in the City, talking to people and dancing was really helping shutting down the normally technical problems ..

I should add i did not speak spanish, so i had to learn some words to make my way through, although they all speak english and there is always a way to comunicate, even without words...

Finally i managed to ask how much something costs in spanish, but the problem was, i did not understand what they were answering.. *lol*.. so i had to learn some new techniques to find it out without using english and without looking like someone who is not able to speak spanish...

But i managed and now i am going to take some lessons so i may do more than just ask a few questions.. I think this is one reason to travel to a foreign country, to learn about their culture, their language, their life... it's not always different then ours, but it's definetly fun!

Of course i also had some Troubles to realize that i am married now.. i mean nothing changed except now i have a wife... i mean a real Wife... well, let's take one step after another.. tomorrow i will realize that we will have to get some childrens some day.. ;-))

get rid of the white flashes when loading a flash

Everyone knows it... the little white flash when loading a flash into your website... and it get really on our nerves....

Well finally i managed to find a very little trick.. it is so easy i feel ashamed i did not come up with it further..

just add the wmode="transparent" to the object (and of course the same to the embed part) and you have no more flashes. Of course you should check if the background is working accordingly and does not add aditional problems..

Friday, January 20, 2006

PHP5 parent:: Object

Working with PHP5 getting you used to work with real Object Orientatet Classes. Extended Classes or using the parent:: Object in such an extended Class is nothing new.

But i did not know (till now) that it is possible to jump over an extended Class to that parent.

To explain what i mean we have this Example:

class foo {
protected $iFoo = 0;
protected function bar() {
$this->iFoo++;
echo "foo: {$this->iFoo}
";
}
}
class fooA extends foo {
protected function bar() {
$this->iFoo++;
echo 'fooA:';
parent::bar();
}
}
class fooB extends fooA {
public function bar() {
$this->iFoo++;
echo'fooB';
parent::bar();
}
}

$oFoo = new fooB();
$oFoo->bar();

In this example we have 3 Classes, each extended by the next. Normally calling $oFoo->bar(); will output: "fooBfooA:foo: 3" which indicates that it starts with the latest class fooB, then runs through fooA to foo.

But what if you need an extend on fooA, but you don't want to run through it, you just want to run through fooB->bar and then foo->bar, without fooA?

I thought there is no solution for it, but there is! If you just change the function in fooB, where it says: "parent::bar();" to "foo::bar();" it will jump directly to foo, without fooA and it is not static as you may first think!

The Result will display: "fooBfoo: 2"

Tuesday, January 10, 2006

PDF Bookmarks

When you think of PDF you automatically think of Adobe Acrobat. I use Acrobat since .. well i don't know but as long as i can remember. Normally i just take a quick look over a pdf, but nowadays it is getting more and more common to post free downloads of books as pdf's.

I found such a download about a PHP book which i thought to read over in time since i need it for work. After 10 pages (the index ;-) i had to make a break becouse of some work which had high priority and just wanted to bookmark the page i was on ... but i was unable to find such a feature...

After i had the work done i looked over Acrobat a couple of Times.. there is a bookmark Toolbar.. but where can i make myself a bookmark... well after some research in the help i found out i had to "upgrade" to Acrobat Writer.... Hello? I don't want to write PDF's ... i just want to make a Bookmark where i am.. like in the Book i read in the moment when driving to work or home by train....

I mean we are in the Year 2006... we have Browsers with Bookmarks, Winword with Bookmarks but why the hell not in Acrobat?

So i googled in the net to find some open source software... maybe there is something which is better or at least able to make personalized bookmarks.

Well i found Foxit, which is the quickest way to open PDF's i have ever seen. The Program is about 2.6 MB in size and does NOT need to install. It opened the PDF in notime... but unfortunately no Bookmark function.

Then i found a Hack from OReilly for Adobe Acrobat ... a Javascript which enables to make Bookmarks.

Unfortunately i did not find any Hack for Foxit, that would be ingenious.