#
"Politik und Kirche sind dasselbe. Sie halten die Menschen in Unwissen."
Bob Marley

 

Hardening WordPress: Basic generator obfuscation

As previously noted, here another part of my Hardening WordPress series. This time I’ll show you the really basic technique of how you can obfuscate at least the generator-tag for your blog.
    »more…

Hardening WordPress the geek way

My Wordpress installation was hacked several times, and all because I was too lazy to use basic protection and hardening mechanisms. After some time I decided to investigate more on the security of my blog and applied some well known protection techniques as well as some really geeky dirty hacks right in the database.
    »more…

Hibernate DataViewObjects

When working with Hibernate and nested domain object models, it can be a performance problem when trying to display several (including nested) properties in a view. Usually for such cases the use of view objects is practical.
This is the first scetch of my idea to automate population of view objects with hibernate.
    »more…

Javascript Dateformatting

I just recognized that there is no convenient method in Javascript to format a date-object to a string with the help of a dateformat-pattern, like in java.text.SimpleDateFormat. So I have writen a simple method, which just does this, including most important patterns.
    »more…

Spring Acegi/Security auto-login

Usefull and thus noted:
In one of my current workprojects I had a registrationform the user filled. After formvalidation, I wanted to login the user automatically. This can be achieved in Spring / Acegi quite easy:
    »more…

Java Collections

Derzeit arbeite ich viel mit Java 1.5. Durch das Interface Iterable kann man hier die kurze Schleifenvariante

Collection c = ...
for (final Object o:c){
  ...
}

einsetzen, die genauso auch für Arrays funktioniert.
Was jedoch nicht geht, ist das Hinzufügen von Arrays in Collections via collection.addAll(anArray);.
Hier hilft meine kleine Utilityklasse Collections weiter, die auch die Collection zurück liefert.
Zwei Dinge, die man bei java.util.Collections leider nicht bedacht hat…
    »more…

Hibernate Deeper OrderBy

Hibernate unterstützt in der Criteria API bei der Angabe von Properties für Criterions oder auch Sortierungen lediglich die Angabe von Properties der Tiefe 1.
Beispielsweise ist criteria.addOrder(Order.asc("id")) möglich, jedoch criteria.addOrder(Order.asc("parent.id")) oder gar criteria.addOrder(Order.asc("parent.parent.id")) nicht möglich.
Um diese Abbilden zu können, muss man sich einiger Joins oder Aliase bedienen.
Im folgenden wird dies anhand der Sortierung gelöst.
    »more…

Spring Hibernate Snipplets

Few snipplets making the usage of hibernate with annotations within spring easier.
    »more…