Coding Classes and apps
This page collects some code I developed along the years.
Hey, there's some trivial stuff about web services and being not at the top of performance, but it can be used as introductory example for newbies.
Please, let me know about bugs and/or suggestions for further improvement: this is the free spirit of Open Source.
C++ Js Javascript   General Purpose PHP   General Purpose PHP & MySQL PHP
C++    [14 files]
   Sinus Progress Bar Simple progress bar where the indicator is a sinuisoidal curve. Jan 18th 2008 18.09 Kb DOWNLOAD (317) 2014-12-19 01:24:52
   Ray Tracer Given a grid point approximating a surface, the light reflection over that surface is computed through Lambertian or Phong shading. Jan 18th 2008 3.07 Kb DOWNLOAD (106) 2013-11-26 18:18:46
   Mobius This class allows several operations with Mobius Maps. It may help to lessen operations with Kleinian groups, for example. Jan 18th 2008 5.04 Kb DOWNLOAD (279) 2013-11-26 18:18:47
   Coords Remapper Coordinates conversion from a discrete planar grid into another of arbitrary dimensions. Jan 18th 2008 2.04 Kb DOWNLOAD (112) 2014-10-11 09:05:16
   Zlib 0.93 Zlibrary for handling zip archives. Compiled for Visual C++. Jan 18th 2008 50.02 Kb DOWNLOAD (96) 2014-10-01 09:48:05
   Complex A class handling complex numbers. Arithmetic operations, algebraic (norm, radius, argument, conjugation, ...) and transcendental functions are also featured. Jan 18th 2008 3.06 Kb DOWNLOAD (142) 2014-11-21 16:15:19
   Quaternion A class handling quaternions. Arithmetic operations, algebraic (norm, radius, argument, conjugation, ...) and transcendental functions are also featured. Jan 18th 2008 2.08 Kb DOWNLOAD (465) 2014-10-20 13:32:12
   Geometrical Assistant Geometric manipulations of points (axonometries, perspective, mapping 3D to 2D, rotations in 3D) are performed. Jan 18th 2008 6.07 Kb DOWNLOAD (200) 2014-10-20 15:12:59
   Palette Builder Color Palette management in RGB or CMYK.
  • Palette generation via preset gradients;
  • Color Cycling;
  • Palette Acquisition from BMP, GIF and FractInt files;
  • Color codes conversion into the following models: XYZ6011, XYZ709, YCC, CMY, ITU, YUV, YIQ, YES, YCbCr, SMPTECRGB, SMPTE240M, HSV, HLS, HSI.
  • Jan 18th 2008 8.02 Kb DOWNLOAD (223) 2013-10-17 20:23:19
       Photo Click Partial or full screen capturing. Jan 18th 2008 1.07 Kb DOWNLOAD (219) 2014-02-17 11:13:17
       Libpng-0.71_1 Compiled version of PNG library for Visual C++. Jan 18th 2008 47.01 Kb DOWNLOAD (79) 2014-06-14 13:23:58
       Prompt Edit Simulation of a DOS prompt-like window for text commands.
    See this example.
    Jan 18th 2008 4.00 Kb DOWNLOAD (85) 2014-08-14 10:54:25
       Image Allocator This class allocates space (indexed or with arbitrary number of channels) for images in memory. The problem is not so trivial, since they shall be packed according to the system architecture. Jan 18th 2008 1.01 Kb DOWNLOAD (132) 2013-05-23 14:32:43
    Js    [9 files]
       Form Validator
    This class checks forms data by adding easy rules based upon regular expressions, so that developers have not to write specific code to handle the form. Usage is immediate and the only effort required is to customize the output function, as the given example shows.
    Nov 8th 2008 2.06 Kb DOWNLOAD (742) 2014-11-20 19:56:15
       Encryptowords The famous game where you have to discover the cross words by guessing their letters. You can set up the words and always update the game. Jan 18th 2008 3.03 Kb DOWNLOAD (153) 2014-12-02 17:31:44
       Complex Numbers This is the javascript class for handing complex numbers calculations in Javascript. The code supports conjugation, complex rotation, radial format, simple arithmetics operations, trigonometric, log and exp, hyperbolic, inverse trigonometric operations, inverse trigonometric and hyperbolic operations, stereographic projection, circle inversion. Jun 27th 2013 3.09 Kb DOWNLOAD (22) 2014-12-19 01:25:24
       Color table Opens a pop-up window where user can pick up colors from default palette or customize favorite shades. In addition, it supports color conversion from RGB into color models such as CMY, HSI, YUV, YES and more ... Oct 19th 2011 16.05 Kb DOWNLOAD (32) 2014-06-08 12:44:43
       Countdown This is a small application performing countdown with several additional features. Jan 18th 2008 9.08 Kb DOWNLOAD (2454) 2014-12-19 01:25:33
       Delayed command This function delays the command associated to a keyboard event. It could be useful while the user is typing inside an edit box for querying a database, so that one avoids to start querying each time a key is pressed and then the database server to be stressed after repeating commands. As the typing is over, the function is run.
    I'm not sure yet, but this trick could be exported to other situations where a delay is required.
    Ott 3th 2011 1.08 Kb DOWNLOAD (18) 2014-12-19 01:25:45
       Dateclass Class performing date manipulations. Refer to the analogous code in the PHP section for further information. May 14th 2009 3.09 Kb DOWNLOAD (337) 2014-11-30 20:37:21
       Calendar Shows the calendar scheme of a given date, with weekdays. Month and Year can be both switched, as well as the Italian or foreign start weekday. The selected date can be sent to the input edit.
    This is useful while compiling forms.
    Sep 13th 2009 10.05 Kb DOWNLOAD (2006) 2014-11-30 20:37:49
       Tab Master This class dynamically sets the TABINDEX property for a given sequence of controls. So developers have not to tediously set'em all along the web page any more.
    It could be useful for forms with a large number of controls.
    Jul 8nd 2008 1.07 Kb DOWNLOAD (368) 2014-12-19 01:25:54
    Javascript   General Purpose    [7 files]
       OBJ position How often do you need to know the viewport coordinates of an element inside a web page?
    For example, to place a layer/div below an edit box?
    You can track down: left, top, right, bottom, width and height.
    Ago 27th 2011 1.02 Kb DOWNLOAD (225) 2014-07-14 04:00:44
       Partita IVA (For Italians only) Controlla che la sintassi della partita IVA sia corretta. Dec 26th 2008 0.05 Kb DOWNLOAD (62) 2014-11-20 20:08:27
       Web Page Dimensions Two functions for computing page size, either with or without scrolling. Dec 26th 2008 1.01 Kb DOWNLOAD (380) 2014-12-19 01:26:06
       String object Library of Functions A library of additional functions embedding into the original javascript String object and featuring
    • replacement of all occurrances (supports arrays);
    • accents and HTML entities management;
    • data type conversion and recognition;
    • slashes management, stripping Tags out;
    • Euclidean distance between strings.
    • ... and more operations.
    Mar 9th 2009 2.09 Kb DOWNLOAD (351) 2014-03-20 19:17:06
       Calculate Age Calculates the age from a given birth date. Feb 07th 2009 3.05 Kb DOWNLOAD (174) 2014-11-30 20:42:34
       Opacity Set opacity value to a given object, given the related ID. Dec 26th 2008 0.08 Kb DOWNLOAD (115) 2014-10-26 11:15:59
       Number - Library of functions for numbers manipulation A library of functions to handle numerical (integer and float) values: rounding and truncation, data type conversion. Mar 25th 2009 0.09 Kb DOWNLOAD (163) 2014-10-26 11:15:05
    PHP   General Purpose    [1 file]
       PHP web functions Library of Web functions in PHP. Currently featuring:
    1. retrieves client IP address;
    2. retrieves client MAC address;
    MAY 07th 2009 0.09 Kb DOWNLOAD (377) 2014-12-19 01:26:25
    PHP & MySQL    [3 files]
       MySQL Babel 0.0.1 Translates database queries from native language to proper SQL syntax, provided that a dictionary exists. I published one article on the features of this class (see publications page ). The supported dictionaries are currently: Italian, French, German, English and Mexican.
    This is project is still at an early stage: issues are several and the collaboration of more and more developers is welcomed, expecially translators.
    Suggested applications: enabling users to input an arbitrary query or for teaching SQL language.
    Jan 18th 2008 152.09 Kb DOWNLOAD (306) 2014-09-25 11:50:24
       Mass posting This is a backend manager performing mass posting to group(s) of e-mail addresses. The data archival relies upon MySQL database management. E-mail can be also posted with an arbitrary number of attachments. The implementation is quite easy: just follow the instructions therein. Jan 18th 2008 186.03 Kb DOWNLOAD (234) 2013-06-27 17:14:07
       MyBackup Simple interface to save your database into files. Administrators might not want to let users access to all PhpMyAdmin functionalities, but just to a sufficient bunch of resources. It is not intended to clone PhpMyAdmin interface. MyBackup also provides the chance of exporting portions of data into files by means of filtering SQL queries.
    P.S.: Multi-languages are supported. Italian and English are currently available. If you like to include your native language and share it together with the community, it will be appreciated.
    Jun 17th 2008 35.07 Kb DOWNLOAD (391) 2014-12-02 17:32:34
    PHP    [17 files]
       CFile The work on this class is in progress.
    Help me to improve it, please and we'll get something very useful for everybody.


    I needed something that worked fine, almost like the class CFile of MFC in Visual C++.
    I coded this class which basically does the same, even if not with the same efficiency, due to PHP limitations anyway.
    Developers can read and write data in both text and binary mode, so that they can manage strings, numbers (integer, float, double) and arrays. They can also move the file pointer back and forth for any need.

    The attached examples cover simple file management, reading of file header structures (jpeg and bmp, here). Although they are rather naive, the goal of these examples is just to show the features of this class.
    Aug 23th 2011 402.07 Kb DOWNLOAD (480) 2014-12-20 18:35:27
       Anagrams This is a class computing the pure anagrams of a given input words or by setting up preset rules. Sep 29th 2008 3.02 Kb DOWNLOAD (262) 2014-10-22 19:31:49
       Your Voice A system manager to leave messages (with emoticons) in your site. Jan 18th 2008 120.06 Kb DOWNLOAD (236) 2014-11-30 20:44:29
       Slider Performs sliding of pictures Jan 18th 2008 7.02 Kb DOWNLOAD (274) 2014-09-25 11:51:28
       Codice Fiscale This is a class for Italian programmers.
    You might also be interested in downloading one CSV including names, codes and phone prefix for almost all Italian places.
    Jan 18th 2008 66.02 Kb DOWNLOAD (131) 2014-09-25 11:51:38
       CAP CAP is the Italian homologous concept of ZIP postal code. Data are thus related to Italy, but anyone may manage the code for other countries. Jan 18th 2008 98.04 Kb DOWNLOAD (105) 2014-09-25 11:51:46
       RTF generator Based on the developments by Michele Brodoloni and by Maury Miranda Marques, I did some further advancements for this PHP class for generating RTF documents. This project is in progress. Jun 18th 2011 6.09 Kb DOWNLOAD (66) 2014-10-13 10:53:07
       Guestbook Record the messages of visitors in your web-site. Jan 18th 2008 15.04 Kb DOWNLOAD (477) 2014-11-30 20:41:30
       IP location Find the ISO 3166-1 country code associated to the input IP address by querying the RIPE database. Aug 8th 2008 0.06 Kb DOWNLOAD (390) 2014-09-25 11:52:12
       Primes Factory Handles primes in several ways. Jan 18th 2008 43.05 Kb DOWNLOAD (89) 2014-09-25 11:52:26
       Calendar A calendar is displayed on the screen. A backend form allows maintainers to set up some sort of agenda of appointments, displayed as top down window at the given date or if the related link is clicked. Nov 19th 2008 16.01 Kb DOWNLOAD (3120) 2014-12-05 16:39:54
       FTPeasy This class handles multiple FTP connections at once for performing any FTP operation through a set of easy commands. For example, developers may want to upload files to multiple servers (to a main and to a backup server). Jan 18th 2008 7.01 Kb DOWNLOAD (1006) 2014-12-06 12:50:03
       Counter Simple Web access counter Jan 18th 2008 12.01 Kb DOWNLOAD (332) 2014-09-25 11:52:52
       Cifra Translates base 10 numbers into different bases, also including semi-positional Roman base. Jan 18th 2008 5.09 Kb DOWNLOAD (81) 2014-09-25 11:52:57
       Dateclass This class handles dates and time in several terms. See the related example included inside the package. Nov 22th 2010 14.08 Kb DOWNLOAD (816) 2014-11-30 20:45:30
       INI files manager INIzialization files are plain text files, endowed with a prescribed syntax and structure. They represent a widely used solution to store settings in Windows based systems, but this method is system indipendent and can be exported to any platform. This class parses one such file structure and performs read/write operations. Ott 20th 2010 4.08 Kb DOWNLOAD (373) 2014-10-17 17:42:20
       D-vote You can easily implement voting management system and rate the choices with bars. Jan 18th 2008 12.08 Kb DOWNLOAD (264) 2014-12-02 17:33:24