27 08 2005
Découvert par hasard ce matin : la cérémonie d'ouverture du SICAF 2003 (Seoul International Cartoon & Animation Festival) par Ferenc Cakó, qui recrée la Genèse avec du sable. C'est magique !
La Genèse par Ferenc Cakó (19Mo)
26 08 2005
This is somewhat old news, but it seems people are still bitten by this problem. In some cases, osCommerce MS2 outputs SELECT queries with a negative LIMIT, eg:
SELECT whatever FROM mytable LIMIT -20,20
More and more servers come with MySQL 4.1. Unfortunately, LIMIT no longer accepts negative arguments and you get this strange message:
1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1
Continue reading "Compatibility with MySQL 4.1"
25 08 2005
Comme son nom l'indique, l'utilitaire MBM5 (Motherboard Monitor 5) surveille un certain nombre de paramètres de fonctionnement de l'ordinateur, dont des températures, des tensions, des vitesses de rotation,...
Le logiciel enregistre ces paramètres dans un fichier journal, qu'il peut transférer par FTP. Le fichier est au format CSV, la première ligne comporte les intitulés des champs, la seconde les données les plus récentes et ensuite des données plus anciennes. Voici à quoi il ressemble :
;;;CPU;Eau;Disque;Fan 1;
25/08/2005;22:52:04;1614 MHz;53 C;38 C;51 C;1500 RPM;
25/08/2005;22:51:34;1614 MHz;53 C;38 C;51 C;1452 RPM
Le contenu est configurable.
J'ai écrit un plugin Serendipity qui lit le fichier journal, téléchargé par MBM5. Le plugin affiche théoriquement les températures, mails il est très configurable et peut afficher n'importe quel paramètre du fichier (dans la version actuelle, le nombre est fixé à trois).
Continue reading "Un plugin Serendipity pour MBM5"
23 08 2005
En feuilletant un article dans un Pour la Science ou La Recherche récent, je suis retombé sur le thème de l'évolution et Stephen Jay Gould. Me trouvant souvent démuni face à des arguments créationnistes, j'ai décidé de lire Le Pouce du panda, un recueil d'articles paru en 1982.
Je me suis mis en appétit avec un petit Penguin 60s, une collection qui tire son nom à la fois du soixantième anniversaire de la maison d'édition et du prix de l'ouvrage, 60 pence. Il s'agit de Adam's navel and other essays, un recueil de quatre articles dont l'article éponyme Adam's navel, et Male Nipples and Clitoral Ripples, un titre très anglais pour une lecture jouissive (sic).
Adam's navel est une critique d'Omphalos, un livre de Philip Henry Gosse, paru en 1857, qui défend une création divine avec l'apparence de pré-existence — les dents de l'hippopotame sont ainsi créées usées, sinon le pauvre animal n'aurait pu fermer la gueule et serait rapidement mort de faim :
But what is so desperately wrong about Omphalos? Only this really (and perhaps paradoxically): that we can devise no way to find out whether it is wrong — or, for that matter, right. Omphalos is the classical example of an utterly untestable notion, for the world will look exactly the same in all its intricate detail whether fossils and strata are prochronic or products of an extended history.
Et plus clairement au paragraphe suivant :
Science is a procedure for testing and rejecting hypotheses, not a compendium of a certain knowledge. Claims that can be proved incorrect lie within its domain (as false statements to be sure, but as proposals that meet the primary methodological criterion of testability). But theories that cannot be tested in principle are not part of science.
(C'est moi qui souligne)
15 08 2005
Mes feuilles de style CSS commencent systématiquement par une remise à zéro des espacements. Je suis tombé par hasard sur deux billets sur le sujet, CSS Negotiation and a Sanity Saving Shortcut et un plus récent Global White Space Reset. Le second mentionne le correctif pour Firefox. Curieusement je suis tombé sur ce bug pour la première fois la semaine dernière !
/* Reset defaults */ * { padding:0; margin:0; } /* Compensate for Firefox */ select { min-width:1.5em; }
Le premier billet mentionne aussi une façon élégante d'invoquer la feuille de style, qui présente les avantages suivants :
- Pas de scintillement au chargement (FOUC) avec IE.
- La spécification de deux média empêche Netscape 4 de charger le CSS.
- ... et d'autres plus mineurs
<link rel="stylesheet" href="/style/main.css" type="text/css" media="screen, projection" />
Enfin, il offre une opinion sur la manière d'appeler le CSS pour Internet Explorer. La première suggestion est parfaite, la seconde raisonnable — je vais l'essayer pour évaluer son côté pratique. Quant à la troisième, le filtrage pour IE5, elle me paraît carrément over the top. À confirmer !
/* IE ignore cette règle */ * html foo {bar: none;}
14 08 2005
The problem
osCommerce stores the static text (ie not the products description) in PHP files. The files are located in the includes/languages directory; the main file is <language>.php, page files are in subdirectory <language>/<page_name>.php.
Advantages include fast loading and the possible inclusion of logic (actually, only index.php does this).
But it also makes it more difficult for translators. Of course the translated text must respect the PHP syntax! In practice, you have to add a backslash \ before single quotes. You get lots of single quotes in French.
Another practical difficulty is that the language files are deep in the code structure. This offers one more way to non-technically oriented users to mess things up. And they would rather spend time selling stuff, not wading in PHP.
Continue reading "Changing the format of the language files"
13 08 2005
I've set up a site to experiment with various layouts: MS3 layouts here.
Well, layouts is somewhat audacious, as there is but one today... But there will be more! I will analyze the comments on my osCommerce blog entry and add layouts. The requirements and a few comments are included in the page. I won't repeat them here.
Fell free to download the HTML and CSS — If you want to submit a CSS that uses the current markup, mail it to me; if you require a different markup, mail both HTML and CSS, I will upload them and report here. Please don't post entire files in the comments, as it makes very hard reading.
Please note the HTML and CSS validate. I would like to keep it that way.
Note to self: check with Harald if we're not using XHTML instead.
12 08 2005
Pas de nouveau passage de Googlebot/2.1 ce matin, mais la liste des liens apparaît sur google.com. Si l'on peut généraliser, ll faut donc compter deux à trois jours après le premier scan complet.
Le PageRank est toujours à 0 par contre. Il y a une prévision (ou une prédiction ?) de mise à jour pour le 16 août. La page d'accueil de Goélette est passée de 6 à 5 la dernière fois — pas d'évolution du site depuis plusieurs mois. Après la mise à jour d'avant-hier, j'espère que ça va remonter.
09 08 2005
Le site a été mis en ligne le 7 août vers 10 heures. Il comporte deux sous-domaines, www.goelette.info qui est vide, et xtian.goelette.info avec ce blog.
www.goelette.info sur lequel aucun lien ne pointe, a vu passer son premier robot dans la nuit du 8 août:
64.246.165.180 - - [08/Aug/2005:05:47:34 +0200] "GET /robots.txt HTTP/1.1" 404 216 "http://www.whois.sc/" "SurveyBot/2.3 (Whois Source)"
64.246.165.180 - - [08/Aug/2005:05:47:35 +0200] "GET / HTTP/1.1" 206 21 "http://www.whois.sc/goelette.info" "SurveyBot/2.3 (Whois Source)"
et le second à 8h53 :
65.196.71.100 - - [08/Aug/2005:08:53:07 +0200] "GET / HTTP/1.0" 200 21 "-" "Mnogosearch-3.1.21" Seule source possible, les DNS.
Avant-hier vers 10 heures, j'ai mis un lien vers xtian.goelette.info sur http://www.goelette.net/ sur une page avec un PageRank de 5. Google est passé une première fois hier :
66.249.71.14 - - [09/Aug/2005:07:26:58 +0200] "GET /robots.txt HTTP/1.0" 404 49998 "-" "Googlebot/2.1 (+http://www.google.com/bot.html)"
66.249.71.14 - - [09/Aug/2005:07:26:59 +0200] "GET / HTTP/1.0" 200 50000 "-" "Googlebot/2.1 (+http://www.google.com/bot.html)"
Aujourd'hui, retour de Googlebot/2.1, pour ce qui semble être une indexation complète du site., une cinquantaine de requêtes entre 6 heures et 8 heures. Pour le moment, un seul lien apparaît sur google.com
Note to self: add a robots.txt to prevent "File does not exist" errors.
08 08 2005
Extrait du questionnaire paru dans Octopus n°56.
9. Un plongeur peut flotter comme en apesanteur car (plusieurs réponses possibles)
- L'eau est environ 800 fois plus dense que l'air
- Il ne s'arrête pas de nager
- Comme les poissons, il a une poche de gaz
- La densité de l'alcool qu'il a dans le sang est inférieure à celle de l'eau
J'attends le numéro suivant avec impatience pour avoir les réponses !
07 08 2005
The MS3 default template will use a CSS based layout. I will not go over advantages and disadvantages of CSS vs. tables, this has been amply debated over the years. Let's say CSS Zen Garden is testimony to the versatility of CSS2 layouts.
We have also decided the contents of the page should come first in the HTML:
Also we're not using javascript for positioning.
Continue reading "CSS layout for the default template"
06 08 2005
... devant le Point Éphémère
05 08 2005
This function will return the content type of the cart, usually for shipping purposes. It can be 'physical', 'virtual' or 'mixed' (some physical and some virtual products).
Here is a drop-in replacement for get_content_type() in class shopping_cart.php. In my opinion, functions longer than one screen (that's 50 lines for me) need to be rewritten, so I did (a long time ago). And, no, there's no point in upgrading. The logic is easy to understand if you're familiar with the ternary operator.
How do we know if a product is virtual? We check if there's a downloadable file. Admittedly somewhat restrictive, you can't download gift certificates but they would probably qualify as virtual for shipping purposes.
For osCommerce Hackers: The point of having the download file at the attributes level is to allow for a non downloadable (eg box) version.
Continue reading "get_content_type() in class shopping_cart.php"
05 08 2005
I'm usually dropping in a few utility functions in all PHP projects. dump() is used for easy debugging of complex data structures. You can also use it on a production site by setting the third parameter to true; then watch the output of tail -f /tmp/php_dump.log.
Continue reading "Utilities: dump(), redirect(), and _POST and _GET filtering"
03 08 2005
Un peu d'entraînement au mois d'août.
Continue reading "Natation cet été"
01 08 2005
"dealing with non-engineering management:"
| Kirk: |
"How long to re-fit?" |
| Scotty: |
"Eight weeks. But you don't have eight weeks, so I'll do it for you in two." |
| Kirk: |
"Do you always multiply your repair estimates by a factor of four?" |
| Scotty: |
"How else to maintain my reputation as a miracle worker?" |
| Kirk: |
"Your reputation is safe with me." |
Star Trek III: The Search For Spock
|