Je cultive des herbes dans mon sous-sol avec ma conjointe
Je m’amuse bien!

How to disable the ENTER key in Java for a JTextArea or others components..
This example uses a JTextArea but theorically applies to any JComponent…
Action doNothing = new AbstractAction() {
public void actionPerformed(ActionEvent e) {
//do nothing
}
};
JTextArea ta = new JTextArea();
ta.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0), doNothing);
Can be used on any component with any keys… Link to the sun’s site:
http://java.sun.com/docs/books/tutorial/uiswing/misc/keybinding.html
Lorenz, python, matplotlib, scipy et numpy… Beau mélange!
Je m’amuse avec l’attracteur de lorenz ces temps-ci:
Tout ça grâce à Python et ces nombreuses librairies sympathiques et conviviales!
Bon j’avoue que je ne comprend rien à la théorie des attracteurs mais j’apprend tranquillement grâce à ces petits jeux!
La partie math du script vient du site suivant: http://www.martinlaprise.info/2010/02/28/visualizing-the-lorentz-attractor-with-vtk. Bon VTK est plutôt compliqué et matplotlib est bien plus hot! donc je l’ai adapté. J’ai aussi fait une animation avec le dessins des projections sur chaque plan… Amusant!
voici le code en python sur pastebin: http://pastebin.com/0JNaQ8mM.
Dépendances:
- python
- matplotlib
- scipy
- numpy
- wxwidget (c’est optionnel.. si vous ne l’installer pas, enlever la ligne « WXAgg »…

