Freitag, 9. Mai 2008

Ruby on Rails

Hi,

I wanted to try the Ruby on Rails framework for quite a period now, but the problem was, that with the new version 2.0 the documentation quality got worse. Why? Well, there were nearly now docs and tutorial for the new version.
Fortunately I found some, finaly.
There is a Screencast from Akita here, which is nice and gives a quick overview on whats new, but without knowing the old version, this does not help much.
But here we got a fine and very simple tutorial, which starts from the beginning and with the new version.

Just wanted to tell everybody ;-)

cu

Mittwoch, 7. Mai 2008

Wilhelma Stuttgart

Hi,
neulich war ich in Stuttgart in der Wilhelma. Freunde von weiter her sind gekommen und ich wollte was mit denen machen, also dachte ich, da die ein kleines Kind haben, "geh ma in den Zoo nach Stuttgart."
Ich war sehr enttäuscht. Weniger von dem was es zu sehen gibt, aber von der Orga:
Zuerst zocken die einen an der Kasse ab, aber das ist man im Süden ja eh gewohnt. Für 3,6 Euro kann man sich einen Führer in der gewünschten Sprache kaufen. Wir dachten, "quatsch, die spar ma uns, steht ja eh alles angeschrieben."
War auch nicht verkehrt gedacht, dummerweise waren die Beschriftungen, mal von der übigkeit ganz abgesehen, nur in deutscher Sprache. Dumm, besonders wenn die Freunde nun mal kein Deutsch sprechen.
Ausserdem gibt es da nur selten einen Plan, wo alles ist. Ich habe nur 3 gesehen, es gibt sicher mehr, aber ich hatte erwartet es gibt mehr. Die Beschilderung ist ganz ok. Für deutsche verhältnise natürlich unter aller Sau, aber man findet schon alles was man sehen will, natürlich nur wenn man deutsch kann.

Fazit: Die Wilhelma ist eine Abzocke. Die wollen fast 12 Euro für den Eintritt und dann muss man sich noch für 3,6 Euro den Führer kaufen. Ich war echt sauer, denn ich komme recht gut herum und habe bischer, in änlich großen locations immer eine englische Erklärung und Beschilderung gefunden. Dabei könnten die auch nur auf spanisch, französich, polnisch und italienisch sein.

Was hindert die daran, die englischen Texte auszudrucken, denn da sind sie ja, da sie im Führer stehen.

naja, ich war jedenfalls enttäuscht und werde mit anderen Freunden auch nicht hingehen.

Hab jetzt noch ein anderen Besucherkommentar gefunden

Dienstag, 6. Mai 2008

Centering verticaly part 2

Hi,
pitty, but the last attempt did not work with IE7.
A quick hack is presented here. The body[id] syntax was dropped, as IE7 does understand and the css definitions are seperated, where one part is in the well known conditional comment, understood just by IE.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Verticaly and horizontaly centering</title>
<style type="text/css">
html, body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
html {
overflow: hidden;
}
body {
text-align: center; /*horizontal center in IE*/
}
body[id] {
display: table;
}
#table {
position: absolute;
top: 50%;
left: 50%;
}
#table[id] {
position: static;
display: table-cell;
vertical-align: middle;
}
#cell {
text-align: left;
background: #9f9;
position: relative;
top: -50%;
left: -50%;
height: 300px;
width: 500px;
overflow: auto;
margin: 0 auto 0 auto;
padding: 0.5em;
}
#cell[id] {
position: static;
}
</style>

<!--[if IE]>
<style type="text/css">
#table {
position: absolute !important;
display: block !important;
}

#cell {
position: relative !important;
}

</style>
<![endif]-->

</head>
<body id="body">
<div id="table">
<div id="cell">
<p>The div box with the green background ist now centered verticaly and horizontaly in IE lte 7 and Firefox<br/>
The css definitions had to be made conditioned for IE. The old solution with syntax like <b>body[id]</b> does not work with IE7, as the trick was that IE does not understand this syntax, but IE7 does.<br/>
Probably there is a finer solution to this, but as I got no time now, I can't experiment with that stuff.<br/>
This attempt, however, works just fine.
<br/>
And if we put some more text in this div, we will have a scroll bar just for this one.<br/>
I also added some padding to this div, just to look a little better.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br/>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</div>
</div>
</body>
</html>

Donnerstag, 24. April 2008

Centering verticaly

Hi,

I was searching for that stuff some years ago, but there was no option to center a div in the body verticaly in those times.
But know there is a nice solution, at least a solution, to make this formating.
I had tome hints from here.



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Verticaly and horizontaly centering</title>
<style type="text/css">
html, body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
html {
overflow: hidden;
}
body {
text-align: center; /*horizontal center in IE*/
}
body[id] {
display: table;
}
#table {
position: absolute;
top: 50%;
left: 50%;
}
#table[id] {
position: static;
display: table-cell;
vertical-align: middle;
}
#cell {
text-align: left;
background: #9f9;
position: relative;
top: -50%;
left: -50%;
height: 300px;
width: 500px;
overflow: auto;
margin: 0 auto 0 auto;
padding: 0.5em;
}
#cell[id] {
position: static;
}
</style>
</head>
<body id="body">
<div id="table">
<div id="cell">
<p>The div box with the green background ist now centered verticaly and horizontaly in IE lte 6 and Firefox<br/>
The css definition like <b>body[id]</b> mean: every body element with an id attribute.<br/>
This will not be interpreted by the IE lte 6, so we can use this syntax to make different definition for IE, and the rest of the browsers.
<br/>
And if we put some more text in this div, we will have a scroll bar just for this one.<br/>
I also added some padding to this div, just to look a little better.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br/>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</div>
</div>
</body>
</html>

Dienstag, 22. April 2008

Python and UTF-8 files

Hi,
gestern wollte ich eine Datei mit python schreiben. Die Datei musste aber utf-8 encoded sein. So etwas reicht nicht:


s = u'Hier ein utf-8 string'
f = file('some_file.html','w')
f.write(s)
f.close()



statt dessen muss man folgendes machen:


import codecs
u'Hier ein utf-8 string'
f = codecs.open('some_file.html','w','utf8')
f.write(s)
f.close()



fertig.
Will ich an dieser Stelle nur mal festhalten.

Alles andere zu utf-8 gibt es noch hier:
http://evanjones.ca/python-utf8.html

Sonntag, 13. April 2008

Serverinstallation Debian

Hi,
nachdem der k&m jetzt alle meine Hardwarekomponenten hatte, bin ich meine Bestellung abholen gegangen. Bestellt wurde ein komplett neues System:

Hardware:
- Asus Mainboard m2n-vm DVI (spezifikationen)
- AMD Sempron 64 Le-1150 Sprata 2000MHz
- 1024MB Infineon/Qimonda PC2-6400 CL5/CL6
- 3.5" Samsung 80GB HD080HJ/P/82GJ 7200U/m 8MB (2mal)
- Samsung (Bulk) SH-S203N/P SATA weiss LightScribe

Plus Netzteil, Kabel und was noch nötig ist. Eine Gehäuse hab ich bei mir im Schrank gefunden ;-)
Beim Zusammenbauen gab es im Prinzip keine Probleme.

Installation:
Eine Entscheidung für das Betriebssystem ist eigentlich recht einfach: Debian!
Nun gibt es aber nicht nur Debian, sondern auch Ubuntu Server, welches als Ubuntu 6.06 Server Edition bis 2011 Supportet wird.

Debian Etch:
Ist zur Zeit die Stable von Debian. Hab die Netinstall CD gebrannt und los gehts. Es bootet, aber meint, nachdem Sprache und Tastaturlayout ausgewählt sind, dass es kein CDROM gibt. Es handelt sich dabei um ein SATA DVD-ROM, und offenbar macht das Probleme. Hab dann in einem Forum gefunden, dass die Bootoption "expert generic.all_generic_ide=1" dieses Problem beheben sollte, hat es aber nicht.
... Ok, was jetzt?

Ubuntu Server 6.06 LTS:
Genau das gleiche Problem. Forumsuche waren auch erfolglos. Anscheinend kann er den SATA Controller selbst nicht erkennen. Was mir jetzt natürlich wenig bringt...

Ubuntu Server 7.10:
Kommt für mich nicht in Frage. Der alte Server lief jetzt seit 2001, oder so. Ist glaub noch Debian woody drauf. 7.10 ist nur bis 2009 supportet, was mir zu kurz ist...

Debian Lenny (test):
Erkennt ein CD-Laufwerk, aber bricht dann bei der Installation ab. Gleich am Anfang, mit irgend einer Bootstrap Fehlermeldung.
Da Lenny noch Beta ist, ist da vielleicht was faul, und deshalb werd ich dem erst mal nicht weiter nachgehen.

Zurück zu Etch:
Nun habe ich ein IDE CD-Rom angeschlossen, welches gefunden wird. Dafür wird das Onboard Ethernet Device nicht erkannt. Das ist natürlich ärgerlich.

Das Selbe übrigens für Ubuntu 6.06.

Jetzt hab ich mal die Lenny XFCE heruntergeladen und siehe da: Es geht. Vielleicht war nur die andere Lenny CD beschädigt?

Der Plan ist ein Linux Softwareraid (Raid 1 ) zu machen. Ich werde mich dabei an diese Anleitung halten.

Das mit dem Raid hat super geklappt. Ich hatte am Anfang schon befürchtet, dass man zumindest das verzeichnis /boot auf eine eigene Partition knallen muss, die nicht im Raid sein sollte. Aber es ist jetzt alles Raid1. Bzw. es sind 4 Raid1 MDs.

Es ist jetzt recht spät. Fast 4 Uhr, und ich war ab 13 Uhr unterwegs auf einem Gig mit stinky pete. Hab jetzt noch kurz das Raid1 zeugs fertig gemacht, damit ich morgen mit dem einrichten des Servers für das Büro wo er stehen soll weitermachen kann.... nachdem ich ausgeschlafen habe.
Das ist dann zunächst nur SAMBA, aber hab daran schon lange nix gemacht, und in den letzten 5 Jahren hat sich sicher was getan.
Morgen also ein nächster Bericht über das alles... vielleicht.

Mittwoch, 26. März 2008

Seems it didn't work

There is something I'm searchin' for in all those TV-shows like Star trek, Highlander and the like, but the answer 's never there, not even in the last Episode. The Answer I'm waiting for is sort of the answer to life itself, or at least the purpose of the universe.
But I can't find that on TV. I'll have to start searchin' by myself, but it's a lot of work, damn.

Provided that nobody has ever encountered the answer, at least nobody I now off, the intention of finding it frustrates me, since mankind is quite old and there were many who tried to find it.
But I think I should try. I'm thinking about live and the universe since a very long time, but somewhere on the road I simply forgot about it. Though I can now remember saying myself to forget it, because life should get easier than, so the idea then.
Well, it seems it didn't work out very well. I still need to know what's out there. I hope that resuming asking my old curiosity will be back. I'm missing it badly.
Ok, let's see