No ritmo da terraAfter only 2 hours playing in Jessé's Studio on last Monday we could record this song named No ritmo da Terra.

It was originally composed by Jessé Gomes and performed by him, me and the basist Loraint Vianés.

I have already played with Jessé many times but with Loraint it was the first time.

Also the song was unkown for me and Loraint until the day, so I guess the resulting recording turned pretty ok.

Music

More songs are coming with Joel Dias projects Stereo Mangangá – a mix of brazilian rithms, funk, raggae and others waves.

phpSorTable Project   October 22nd, 2008

!!! NOTICE: this package is out of date! I have implemented another package, phpSortable, wich has been always updated and bug fixed. phpSortTable is now phpSorTable!!! hier the LAST VERSION. phpSortTable is a Class that shows MySQL QueryResults in a HTML Table. As the name SortTable says, the shown table displays also the columns headers as links, so the query result of a table can be sorted. Furthermore it gives the possibility to link the single rows with diferents other scripts types, like for editing, deleting, inserting and so on. And if there are too many results to be displayed, the phpSortTable class also gives the user the possibility to select how much rows have to be displayed. The table can also be "navigated" with the "last" and "next" links.

 

phpSortTable phpSortTable class in use
Hier an example on how it works => Companies List.

Features:

  • displays a MySQL table content in a HTML table.
  • only predefined columns of the MySQL table are displyed.
  • sorts tables rows ascending and descending with the selected column.
  • limits the amount of displayed rows (5, 10, 20, 30, or 50).
  • displays “last” and “next” links for table navigation, if are more rows to be shown.
  • user defined links for edit and delete of single rows, if desired.
  • formating of single columns with a given format-function.
  • links for adding new entries.
  • dialog for edit and delete links with a user defined message.
  • user defined default rows number.
  • user defined WHERE clause for filtering results from table.
  • user defined CSS file for table formating.
  • column as links that can attach the current id of the row or the row data.

I still working on this class and its documentation, but it already works with a basic functionallity.

Documentation:

The last documentation version was released on 15.04.07 and is delivered with the .zip file.

There is also an online documentation hier – phpSortTable Doc.

Hier is the last review I´ve been working:

File Listing:

phpSortTable directory:

  • php_sort_table.php: the phpSortTable class.
  • php_sort_column.php : help class for the phpSortTable class.
  • img directory : hier are the image files for the edit and delete links, so as for ASC and DESC arrows.
  • example directory : some examples on using this class.

Planed features:

  • multiple keys feature for differents colums as links

Do you want to use this class and still havin questions? Leave your question here as a comment. I`ll be glad to help you.

This class is free for all kind of use. You can use it, change it and distribute. Feel free!

PHPClasses Trackback link:

Chamrousse 2007/2008   January 25th, 2008

Another snowboard trip.

This time in France, with Asterix, Croisaint and a lot of cheese.

Chamrousse is a place for winter vacations on the Savoy Alpes and a very nice place to chill out. Then there is not much to do there but snowboard, eat and play cards with good freinds after that with a good Bavaria beer.

Here is the gallery with the photos.

Chamrousse

 

I was trying to use the Hibernate lazy loading functionality with my Spring web application and had some problems, as usual for all newbies :P First, I couldn´t show list of objects that are aggregated to one main object in a many-to-one or in a one-to-one association. On trying to show the main object, the aggregated objects are retrieved as the View is being build. At this point the session is already closed, so it throws an sessionNotFound Exception. The solution for this is to use the OpenSessionInViewFilter Filter of the Spring Framework to keep the Session "alive" until the View has being built. In this case I needed to declare the Filter in my web.xml file like this:

    <!– Hibernate OpenSession Filter –>
    <filter>
        <filter-name>openSessionInViewFilter</filter-name>
        <filter-class>
            org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
        </filter-class>
        <init-param>
            <param-name>singleSession</param-name>
            <param-value>true</param-value>
        </init-param>
        <init-param>
            <param-name>sessionFactoryBeanName</param-name>
            <param-value>sessionFactory</param-value>
        </init-param>
    </filter>
   
    <filter-mapping>
        <filter-name>openSessionInViewFilter</filter-name>
        <url-pattern>*.htm</url-pattern>
    </filter-mapping>

It works very well, if you are only reading data from the database.

But if you want to change some entries retrieved from the db, you will receive a failure message like  "Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove ‘readOnly’ marker" from transaction definition."

To solve this problem, it is needed to overwrite the openSessionInViewFilter methods getSession and closeSession. This can be done declaring another class, that extends the Sping class OpenSessionInViewFilter for the filter. This is the class I´m using:

import org.springframework.orm.hibernate3.support.OpenSessionInViewFilter;
import org.hibernate.*;
import org.springframework.dao.*;

public class MySessionFilter extends OpenSessionInViewFilter {
    /*
     * The default mode is FlushMode.NEVER
     *
     * @see org.springframework.orm.hibernate.support.OpenSessionInViewFilter#getSession(net.sf.hibernate.SessionFactory)
     */
    protected Session getSession(SessionFactory sessionFactory)
                        throws DataAccessResourceFailureException {
        Session session = super.getSession(sessionFactory);
        session.setFlushMode(FlushMode.COMMIT);   
        return session;
    }
   
    /**
    * we do an explicit flush here just in case we do not have an automated flush
    */
    protected void closeSession(Session session, SessionFactory factory) {
        session.flush(); 
        super.closeSession(session, factory); 
    }
}

After writing this class the reference to the filter class should be updated in the web.xml file.

<filter>
        <filter-name>openSessionInViewFilter</filter-name>
        <filter-class>
            MySessionFilter
        </filter-class>

</filter>

Now it is possible to retrieve data and update them only when it is needed using the lazy load ability.

Photosfari in Hamburg   August 19th, 2007

On the 18.07.07 we had another Photosafari with the Olympus people.

There we could play with a lot of obejctive types and test the Olympus SLR Cameras. It was very exciting, to play with the imagination and try to put it on pictures.

Hier are some results of mine…

Kid

Two new photo Galleries   August 14th, 2007

I´ve added 2 new photo galleries to my album:

- Lüneburger Heide with the people of Olympus and my loyal Mosquetieurs Fran and Katja on 11.08.07. The weather was not the best for a photoshooting, but we made it happen.

- Brombergersee with the nice people: Tony, Natalia, Kathe, Christian, Alex and Marcellita on 12.08.07. Nice place in a hot summer day!

Geburtstag 2007   February 11th, 2007

Zum geburtstag gab es Kuchen.

Alena und Karo haben den schönen Kuchen aus dem Foto für mich gebacken. Er war sehr lecker!

Geschenke gab es auch! Von Fran, Katja, Chivo, Sandy und Magda.

Mails und Anrufe aus Brasilien und Frankreich haben mich auch erreicht an dem Tag.

Es hat mir alles sehr gut gefallen.

Danke an alle!!!

Weggy_Cake

Saalbach 01/07   January 21st, 2007

Einige Fotos vom Urlaub in Saalbach sind hier online.

Jo Mai! Geiler Urlaub!

Saalbach 01/07

Portugal 08/06   August 29th, 2006

Trotz allen Abturners war das ein schöner Sommerurlaub.

Hier die Fotos aus unsere Reise ins Fadoland.

Fadoland