May 23, 2009

The Panther, by Rainer Maria Rilke

I was walking along for some... brunch and suddenly thought of that poem. No idea why. THAT poem. The one poem that, as a 12-year-old (or so), I chose to memorize. I was never one to do homework, let alone anything I didn't absolutely have to do. But this stuck. And even when I hadn't thought of it for many years I never forgot those words:

Der Panther von Rainer Maria Rilke
Im Tiergarten von Paris

Sein Blick ist vom Vorübergehn der Stäbe
so müd geworden, dass er nichts mehr hält.
Ihm ist, als ob es tausend Stäbe gäbe
Und hinter tausend Stäben keine Welt.

Der weiche Gang geschmeidig starker Schritte,
der sich im allerkleinsten Kreise dreht,
ist wie ein Tanz von Kraft um eine Mitte,
in der betäubt ein großer Wille steht.

Nur manchmal hebt der Vorhang der Pupille
sich lautlos auf -. Dann geht ein Blick hinein,
geht durch der Glieder angespannten Stille -
und hört im Herzen auf zu sein.


I realised that I absolutely pity anyone who doesn't understand the true beauty of the original German words. I got back to my computer and just couldn't find a translation that I thought did the piece any justice so here is my attempt (I tried to stay close to the original):

The Panther by Rainer Maria Rilke
In the Zoological Garden of Paris

His gaze has, from the passing of the bars,
gotten so tired that nothing captures it anymore.
To him it is, as if there were a thousand bars
and behind a thousand bars no world.

The soft stride of smooth strong steps,
that spins round in the tiniest circle,
is like a dance of strength around a center,
in which, numbly, a great will stands.

Only sometimes the curtain of the pupil
rises silently. — Then an image enters,
goes through the limbs’ tense silence —
and in the heart ceases to exist.

May 10, 2009

PHP/MySQL lesson #X+1

I've been on holiday and one way for me to relax is working on my website. Yes. That's right. Programming is relaxing.

So I've been struggling with this image gallery of mine... Not very relaxing! I wanted to upload images into my database and found a script tutorial for that easily enough. Done. Voila!

Then I wanted to display many of the images from my database at the same time. On my webpage. How the hell does that work??? I know how to search for them but how do I display the blob?

I searched the web again and found script after script but none of them were working! I looked for errors in the code (oh and there were errors!), tried moving things around, nothing helped. The error messages just changed... I was getting error messages, seeing a blank page... the highlight was seeing blank squares that were supposed to be images!

Turns out the code was working just fine...

But nobody told me that the table with the images isn't supposed to carry any other information (like tags for example)! As soon as I removed all the non-essential columns in my images table the script started working. Hooray!

So ONLY include the columns: id, name, size, type and content (or data, as some tutorials preferred to call it). Nothing else!

Rant over. I hope some poor soul finds this and is saved some trouble...

PS: If I'm getting something wrong please tell me. I am one of those who don't mind not knowing how a script works as long as it works. I'd love to actually study this stuff but I have other priorities.