Integrate Doctrine 2.0.1 with Zend Framework 1.11.3

Hello readers! The most frequently visited and linked article on my blog is by far the tutorial, how to integrate Doctrine 2 with Zend Framework 1.09. However – it is written in german and since I published it, a couple of new versions of both libraries were released. So I decided to rewrite it in english and adjust it so that it fits the most up-to-date versions of both Doctrine and the Zend Framework.

I will presume you know more or less exactly what these software packages do, and how to use them. Also, I assume that you are able to set up a virtual host by yourself. You should be familiar with how to use a command line, too!
Continue reading ‘Integrate Doctrine 2.0.1 with Zend Framework 1.11.3′

On the accelerometer of the HTC Desire

It has been a looong time since I wrote my last blog entry, please excuse me. I haven’t been busy or anything, it was just lazyness. Since I recently got one _real_ comment among all the spam saying, it would be nice if I wrote in english, I will do that from now on.

So I started diving into Android development last autumn and today, just for fun, I tried to use some sensors included in my phone. (HTC Desire running Android 2.3.1)

My idea was to use the accelerometer along with the orientation measurement to measure both the distance the phone was moved and also it’s trajectory. Both values, of course, relative to the starting point of the motion.
Continue reading ‘On the accelerometer of the HTC Desire’

ESPResSo gefällig?

Anmerkung vorab: Dies ist eine Kopie meines Artikels im artofcode.de Blog.

Als kleinen Einstand für das artofcode.de Blog möchte ich Euch physikalisch interessierten Lesern heute die Software Bibliothek ESPResSo an einem Beispiel vorstellen. Wir werden eine beliebig lange Kette von Teilchen simulieren (d.h. ihre Bewegungsgleichung numerisch integrieren), die mit Federn untereinander verbunden sind und uns sowohl die Energiebilanz als auch die Bewegung der Teilchen anschauen.
Continue reading ‘ESPResSo gefällig?’

Doctrine 2 Beta 1 ins Zend Framework 1.10 integrieren

Update 21.08.2010 – Ich habe soeben ein Update für die neuste Doctrine Beta hochgeladen!

Sooo. Einige Leser hatten mich gefragt, wann ich meine Zend Framework Integrations-Anleitung denn auf die Beta 1 von Doctrine updaten würde.

Das mache ich in den nächsten Tagen noch, sobald ich Zeit finde. Heute habe ich allerdings schon ein kleines Projekt gestartet: Den zf-doctrine-integrator (Zend Framework Doctrine Integrator).

Prinzipiell besteht das ganze Projekt, welches derzeit auf google code gehostet ist, aus einem Shellscript und den nötigen Dateien zur Integration von Doctrine 2 Beta 1 ins Zend Framework 1.10. Das Shellscript erstellt euch automatisch ein Projekt mit den ZF und Doctrine Bibliotheken, lädt die nötigen Dateien zur Integration aus dem Repository herunter und erstellt automatisch eine vhost Datei.

Das erspart euch bei der Projekterstellung die Arbeit, den Code zur Integration aus alten Projekten oder irgendwelchen Tutorials zu kopieren, außerdem könnt ihr so sicher stellen, immer die aktuellsten ZF und Doctrine Versionen zu nutzen.

Das ganze ist mehr oder weniger überhaupt nicht getestet. Ich würde mich sehr freuen, wenn ihr einfach mal ausprobiert, ob das tool bei euch läuft. Issues könnt ihr auf der Projektseite direkt posten. Die Systemvoraussetzungen und eine (in Zukunft) ausführliche Dokumentation findet ihr im Wiki.

Mini Blog in PHP

Auf phpgangsta.de gibt es einen kleinen Wettbewerb, wer die kleinste Blogsoftware schreibt.

Das klingt nach einer interessanten Aufgabe, derer ich mich eben mal gewidmet habe.

Größe derzeit: 165 Byte (unix: 148 Byte) grauenvoller Code!

Auseinanderwurschteln könnt ihr das selbst, in schön gibts nur die endgültige Version.

ohne unix befehle (165 Byte)

<?extract($_GET);$i='><input';$x=join('',file(c));if($p==p)echo"<form$i name=t$i name=c$i type=submit>";if($t)fwrite(fopen(c,w),"<hr>$t(".date(c).")<p>$c$x");echo$x;

mit unix befehlen (148 Byte)

<?extract($_GET);$d=date(c);$i='><input';$x=`cat c`;if($p==p)echo"<form$i name=t$i name=c$i type=submit>";if($t)`echo '<hr>$t($d)<p>$c$x'>c`;echo$x;