Posted in english, programming on Aug 9th, 2009
This article is to make a simple example on how you can manage SOAP Messages with Attachements in PHP and, in particular, I’ll describe how to use the PEAR::SOAP package to transmit files associated to a SOAP message as attachments in their native format in a multipart MIME structure for transport (SOAP Messages with Attachments [...]
Read Full Post »
Posted in english, programming on Apr 10th, 2009
Very often I found on the web ContentProvider examples based on a SQLite table that describes, as a constraint, to have a column named _id to be used as primary key. Also the official Android Dev Guide introducing in Creating a Content Provider tells to
Be sure to include an integer column named “_id” (with [...]
Read Full Post »
Posted in english, programming on Jan 17th, 2009
Yesterday I was googling to find the algorithm to covert a netmask (in the dotted decimal format like 255.255.255.0) in corresponding cidr to manage a database migration, but I can't find it. So I wrote it in PHP.
The following function takes a valid netmask in the dotted decimal format as a string in input and [...]
Read Full Post »
Posted in english, programming on Dec 27th, 2008
If you need to copy an XML document to another filtering it from a specific element node, a good solution could be the use of XSL. The starting point is the so called "identity" template as introduced with an example in the XSLT Recommendation itself:
PLAIN TEXT
XML:
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
[...]
Read Full Post »
Posted in english, programming on Nov 29th, 2008
I recently solved a problem common to many heavy used web application following an idea of a friend of mine.
The problem is how to efficently manage the sessions of a web application when the number of them is high (500,000 for example) and the use of them his quite frequent (˜50,000 pages/day in my case).
A [...]
Read Full Post »
Posted in english, programming on Sep 10th, 2008
If you want to delete, for example, only .bak files throughout a directory tree you can try with the following command:
$ find . -name *.bak -exec rm {} \;
Using the same approach you can solve more complex problems. For example you can delete recursively all directories older than one week:
$ find . -mtime +7 -type [...]
Read Full Post »
Posted in english, programming on May 23rd, 2008
The version 10.5 (Leopard) of Mac OS hides under the skin some very useful tools for developers. In particular for Java developers, you can find:
Java 5 SDK (as default)
Java 1.4 SDK
Maven 2.0.6
Ant 1.7.0
These tools are sufficient to develop and build complex Java applications but in some cases, the choices made by Apple to install them [...]
Read Full Post »
Posted in programming on Jan 29th, 2008
Dando per scontato che tutti sappiano che cos'è il PRBM, finalmente mi sono deciso a correggere i bachi segnalati sulla versione 0.6.9, alcuni dei quali probabilmente prensenti da molto tempo. Ecco quindi che rilascio la versione 0.6.10 (codename ''cinquina'') che va a fissare i seguenti problemi:
Le schede dei fiori importate dal raccoglitore inseriscono un errore [...]
Read Full Post »
Posted in programming on Apr 9th, 2007
L'obbiettivo di questo articolo è descrivere il percorso che ho fatto per installare un ambiente per l'esecuzione di applicazioni PHP sotto Mac OS X. Il mio obbiettivo è quello di poter eseguire applicazioni PHP sia a linea di comando sia sul web server interno.
L'approccio è quello di minimizzare gli interventi sistemistici e di configurazione per [...]
Read Full Post »
Posted in english, programming on Mar 10th, 2007
Trac has a great module to support notification about ticket changes via email. Starting from the 0.10 version of Trac the TracNotification module has some new configuration options that give to the administrator or project manager a good control on who should be notified and when.
By the way Trac lacks, in my opinion, of [...]
Read Full Post »