
A small reminder on how to align text in python
To content | To menu | To search
Tuesday, September 18 2012
By Pierre-Yves on Tuesday, September 18 2012, 15:45 - Général

A small reminder on how to align text in python
Monday, June 18 2012
By Pierre-Yves on Monday, June 18 2012, 18:40 - Bioinformatique

We (b8e5n and I) have been fighting for too long for this, so there it is dear lazy web.
Using the eclipse JPA (Java Persistence API) to connect to a MySQL database you might experienced some troubles.
Using the following piece of code:
transaction = manager.getTransaction();
transaction.begin();
try {
// Add here your logic
transaction.commit();
} finally {
if (transaction.isActive()) {
transaction.rollback();
}
}
We kept running into the fact that the rollback never happened. The commit was performed or at least started and if something was going wrong at the database level (like an already existing primary key), the data already commited to the database would remain in there.
So yay for the half-commited data :-s
It took us a while but we finally ended up finding the solution on a lost corner of the web:
** Please take special note for MySQL database users: do make sure that your tables are InnoDB tables instead of MyISAM. If not, rollback will not occur.
Switching from MyISAM to InnoDB solved the problem for us, the transaction is either fully commited or not at all.
Hope this can help.
Tuesday, March 13 2012
By Pierre-Yves on Tuesday, March 13 2012, 15:53 - Bioinformatique

Small python optimization that I should really follow
Friday, August 19 2011
By Pierre-Yves on Friday, August 19 2011, 13:52 - Général

A small example on basic parallel programming in python
By Pierre-Yves on Friday, August 19 2011, 13:47 - Général

Un petit exemple basique de programmation parrallèle avec python
Wednesday, August 17 2011
By Pierre-Yves on Wednesday, August 17 2011, 10:42 - Général

The new version of repoquery can do nice things.
By Pierre-Yves on Wednesday, August 17 2011, 10:41 - Général

La nouvelle version de repoquery permet de faire des choses amusantes.
Monday, January 31 2011
By Pierre-Yves on Monday, January 31 2011, 09:27 - Général

A simple pygtk R console with callback
Une petite interface en pygtk pour R avec affichage des sorties de R dans la fenêtre
Sunday, April 25 2010
By Pierre-Yves on Sunday, April 25 2010, 20:07 - Général
How to configure your trackpoint to emulate mouse wheel on Fedora 13
Comment configurer le troisième bouton de votre trackpoint pour émuler la roulette de la souris sous Fedora 13
Friday, September 11 2009
By Pierre-Yves on Friday, September 11 2009, 00:17 - Général
Configurer un trackpoint pour remplacer la molette de la souris
Configure a trackpoint to emulate a mouse wheel
Saturday, July 25 2009
By Pierre-Yves on Saturday, July 25 2009, 13:34 - Général
How to encrypt an usb key under Fedora
Comment chiffrer sa clé usb sous Fedora
Saturday, January 5 2008
By Pierre-Yves on Saturday, January 5 2008, 19:33 - Général
A small trick to merge pictures
Une petite astuce pour regrouper des images en un fichier