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]
   Geometrical Assistant Geometric manipulations of points (axonometries, perspective, mapping 3D to 2D, rotations in 3D) are performed. Jan 18th 2008 6.07 Kb DOWNLOAD (212) 2016-11-02 23:19:16
   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 (285) 2016-11-02 23:18:40
   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 (111) 2017-07-21 00:19:08
   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 (138) 2016-11-02 23:20:06
   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 (227) 2016-11-02 23:19:22
       Zlib 0.93 Zlibrary for handling zip archives. Compiled for Visual C++. Jan 18th 2008 50.02 Kb DOWNLOAD (102) 2016-11-02 23:19:01
       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 (146) 2016-11-02 23:19:06
       Coords Remapper Coordinates conversion from a discrete planar grid into another of arbitrary dimensions. Jan 18th 2008 2.04 Kb DOWNLOAD (115) 2016-11-02 23:18:47
       Sinus Progress Bar Simple progress bar where the indicator is a sinuisoidal curve. Jan 18th 2008 18.09 Kb DOWNLOAD (334) 2017-10-16 03:57:54
       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 (471) 2016-11-02 23:19:11
       Prompt Edit Simulation of a DOS prompt-like window for text commands.
    See this example.
    Jan 18th 2008 4.00 Kb DOWNLOAD (88) 2016-11-02 23:19:53
       Libpng-0.71_1 Compiled version of PNG library for Visual C++. Jan 18th 2008 47.01 Kb DOWNLOAD (85) 2016-11-02 23:19:35
       Photo Click Partial or full screen capturing. Jan 18th 2008 1.07 Kb DOWNLOAD (223) 2016-11-02 23:19:27
    Js    [9 files]
       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 (157) 2016-03-24 00:59:16
       Dateclass Class performing date manipulations. Refer to the analogous code in the PHP section for further information. May 14th 2009 3.09 Kb DOWNLOAD (344) 2016-04-20 04:55:30
       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 (39) 2017-12-12 17:47:59
       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 (2035) 2017-03-18 17:10:44
       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 (42) 2017-12-16 09:35:20
       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 (374) 2017-08-04 09:07:08
       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 (24) 2016-03-01 11:18:30
       Countdown This is a small application performing countdown with several additional features. Jan 18th 2008 9.08 Kb DOWNLOAD (2525) 2017-12-22 11:43:06
       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 (757) 2017-12-31 14:13:22
    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 (236) 2018-03-13 12:59:09
       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 (173) 2018-03-13 13:04:16
       Web Page Dimensions Two functions for computing page size, either with or without scrolling. Dec 26th 2008 1.01 Kb DOWNLOAD (388) 2018-03-13 13:04:54
       Opacity Set opacity value to a given object, given the related ID. Dec 26th 2008 0.08 Kb DOWNLOAD (120) 2018-03-13 13:06:02
       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 (360) 2018-03-13 13:06:29
       Calculate Age Calculates the age from a given birth date. Feb 07th 2009 3.05 Kb DOWNLOAD (191) 2017-04-25 05:44:59
       Partita IVA (For Italians only) Controlla che la sintassi della partita IVA sia corretta. Dec 26th 2008 0.05 Kb DOWNLOAD (65) 2016-11-02 23:20:21
    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 (404) 2017-08-11 21:53:36
    PHP & MySQL    [3 files]
       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 (406) 2017-11-05 17:08:25
       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 (241) 2016-11-02 23:21:28
       MySQL Babel 0.0.1
    PHP Classes Certificate
    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 (310) 2016-11-09 20:45:24
    PHP    [17 files]
       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 (832) 2017-10-19 15:34:01
       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 (138) 2016-11-02 23:22:05
       Primes Factory Handles primes in several ways. Jan 18th 2008 43.05 Kb DOWNLOAD (91) 2016-11-02 23:22:45
       D-vote You can easily implement voting management system and rate the choices with bars. Jan 18th 2008 12.08 Kb DOWNLOAD (272) 2017-09-17 15:58:29
       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 (1014) 2017-09-17 15:57:45
       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 (403) 2017-08-28 22:18:47
       Counter Simple Web access counter Jan 18th 2008 12.01 Kb DOWNLOAD (336) 2017-08-04 09:05:50
    PHP Classes Certificate
    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 (269) 2017-08-11 21:54:09
       Guestbook Record the messages of visitors in your web-site. Jan 18th 2008 15.04 Kb DOWNLOAD (481) 2017-08-11 21:54:57
       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 (3145) 2017-11-27 13:26:58
       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 (378) 2016-11-02 23:23:17
       Cifra Translates base 10 numbers into different bases, also including semi-positional Roman base. Jan 18th 2008 5.09 Kb DOWNLOAD (86) 2017-08-28 22:18:27
       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 (114) 2016-11-02 23:22:11
       Your Voice A system manager to leave messages (with emoticons) in your site. Jan 18th 2008 120.06 Kb DOWNLOAD (241) 2016-11-02 23:21:53
       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 (82) 2017-12-20 14:07:19
       Slider Performs sliding of pictures Jan 18th 2008 7.02 Kb DOWNLOAD (277) 2016-11-02 23:22:01
       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 (714) 2018-03-18 06:24:04