Post to WordPress in Perl (xmlrpc)

Filed under: Perl tips — vincent @ 23:29

Today, I had to enable a custom program to inject posts in a WordPress blog. Since WordPress implements not less than 3 differents APIs to this effect, through XMLRPC, the choice of the technology was easy: Perl and xmlrpc.

The task was complicated by the fact that the page was only accessible by passing through an HTTP Basic Authentication.

(more…)


Get the element from a hash

Filed under: Perl tips — vincent @ 15:02

I’ve tripped on this simple question:
Having a perl hash %h, and knowing that is has only one element, how to get to this element as easily / as efficiently as possible? Of course, we suppose here that you don’t know the key corresponding to this element…
(more…)


Setup of Toshiba 6100 Pro for GNU/Linux

Filed under: Linux — vincent @ 00:00

Cipher Brain has bought a Toshiba 6100 Pro to load it primarily with GNU/Linux. Please find here a few tips about setting it up.

Update: after having had a horrible experience with Toshiba Support, spread on more than two monthes, numerous phone calls, faxes and letter (concerning another notebook), and a lot of hardware problems with this notebook (including two power supply faillures in one month, broken display, defective hard-disk and keyboards problem), I’ve given up with Toshiba. I’ll let this information here, in the hope that it will be of any use to somebody.

Personally, I can’t recommend anymore usage of Toshiba notebook computers.
(more…)


Usage of pbyacc

Filed under: Perl tips — vincent @ 00:00

Yacc, and its GNU replacement Bison is a parser generator, i.e. a program to generate some routines which can parse some text and data according to a user-specified grammar.The basic Yacc documentation is availlable on the net, or with man yacc. We detail here only some points.
(more…)


Localisation problems

Filed under: Java Tips — vincent @ 00:00

After upgrading to Mandrake Linux 9.1, I got the next errors when compiling, but only with one account on my machine: [javac] error: compiler message file broken: key=compiler.err.sun.io.MalformedInputException arguments=null, null, null, null, null, null, null The problem seems to come from some bad locale related to UTF-8, or unknown locale,.. I first solved it (a bit radically) by running the following script, which empties every variable having a reference to ‘UTF-8′:

for i in $( set | grep UTF-8 | cut -f1 -d= ) ; do export $i=; done

This completely removes any locale information from the system.

The proper way to change that is to edit the file ~/.i18n. You can find here the content of my new ~/.i18n, which solves nicely the problem.

LC_TELEPHONE=en_US.ISO-8859-1
LC_PAPER=en_US.ISO-8859-1
LC_NAME=en_US.ISO-8859-1
LC_CTYPE=en_US.ISO-8859-1
LANGUAGE=en_US.ISO-8859-1:en_US:en
LC_NUMERIC=en_US.ISO-8859-1
LC_MEASUREMENT=en_US.ISO-8859-1
LC_MONETARY=en_US.ISO-8859-1
LC_TIME=en_US.ISO-8859-1
LANG=en_US.ISO-8859-1
LC_IDENTIFICATION=en_US.ISO-8859-1
LC_ADDRESS=en_US.ISO-8859-1
LC_MESSAGES=en_US.ISO-8859-1
LC_COLLATE=en_US.ISO-8859-1

« Previous Page