CODE ARCHIVE

Years of coding.

Articoli tecnici, tutorial di programmazione, frammenti di codice e file sorgente condivisi nel corso degli anni.

KNOWLEDGE & EXPERIENCE

Knowledge worth sharing.

Una raccolta di soluzioni di programmazione, sperimentazioni e conoscenze tecniche condivise durante il mio percorso di sviluppatore.

34Articoli
23Categorie
283Tag

ARTICLES

Articoli pubblicati

  1. Useful extension methods for the String .Net class and string manipulation, with support of IntelliSense

    Hi to all, I wrote this .NET module that extends String class with useful methods to modify alphanumeric characters and symbols. It fully integrates with the compiler so You are able to recognize extension methods by IntelliSense…

    Leggi l'articolo originale
  2. Updated version of CryptographyHelper class for .NET Framework 4

    This updated version of mine “CryptographyHelper” wrapper/helper class supports .NET Framework 4 . With this vb.net class you can easly encrypt/decrypt strings using a robust symmetric Rijndael algorithm or you can get also MD5 o…

    Leggi l'articolo originale
  3. MySqlHelper VB.NET class - easly execute commands against a MySQL database

    Hi all, with the following free .net helper class you can easly execute SQL commands against a MySQL database, execute stored procedures, get or programmatically update tables/DataSet objects and convert to and from MySQL datetim…

    Leggi l'articolo originale
  4. Multilingual applications with VB.NET

    In this simple tutorial you'll learn how to manage different languages for a vb.NET application and the simplest way to access programmatically to the string values in the resource compiled files (*.resx) created by Visual Studio…

    Leggi l'articolo originale
  5. How to remove accent marks and german umlauts from URLs and Strings in .NET

    I wrote two functions in .NET to remove easly any accent and umlaut marks from a string and to get the equivalent non-accented string, this is very useful to normalize URLs; for example, with the StripAccentMarks() method, from "…

    Leggi l'articolo originale
  6. How to stringify an object in Javascript: converting an object to a padded & well-formatted string or simply inline

    I wrote a function to convert an object in a string (stringification) without using a JSON library; you can convert an object to a well formatted string with padding or simply to an unique line: function stringify(object, padding…

    Leggi l'articolo originale
  7. Javascript isArray() function

    Javascript does not provide a function to recognize if a variable is an array or not; you can make a "typeof" of the variable however u'll get an 'object' datatype, as in the following code var myarray = [1, 2, 3]; var myobject =…

    Leggi l'articolo originale
  8. Easy-to-use and strong Encrypt/Decrypt PHP functions

    I wrote those two following PHP functions to encrypt and decrypt strings easly and with a stronger encryption module than the other examples on the net (please, note that "strong" does not equals "secure"!); Happy encryption/decr…

    Leggi l'articolo originale
  9. PHP Date or Datetime to MySQL Datetime and viceversa

    Two useful PHP functions to convert normal date/datetime ("25.12.2010 12:10:00" or "25.12.2010") to MySQL datetime (like "2010-12-25 12:10:00" or "2010-12-25 00:00:00"); You can get back a date/datetime from MySQL datetime too: f…

    Leggi l'articolo originale
  10. How to draw a shadow for a bitmap (Drop Shadow Effect in VB.NET / ASP.NET)

    I wrote a vb.net subroutine to draw easly a shadow for a Bitmap object; It is possible get a charming shadow in different ways... Normal black shadow to the bottom right corner Red shadow to the bottom right corner Shadow to the …

    Leggi l'articolo originale
  11. VBScript Class to create easly Associative Arrays in ASP like in PHP

    I've posted a project at Source Forge with an ASP/VBScript class to create easly associative arrays like in PHP; visit http://sourceforge.net/projects/asp-assoc-array/ It is possible also load in an associative-array the data com…

    Leggi l'articolo originale
  12. How to use Associative Arrays in ASP

    First of all, You need to download the "Asp Associative Array class" then include the file "AssociativeArrayClass.asp" in your asp page. Right now, You can start declaring associative arrays in ASP with the following syntax: Dim …

    Leggi l'articolo originale
  13. How to populate an ASP Associative Array with records from MySQL / Access database Table

    In this example, You can learn how to populate an ASP Associative Array with the records of a database table (MS Access or MySQL); then, how to programmatically manage well structured data without any extra SQL. Before to start: …

    Leggi l'articolo originale
  14. How to export an ASP Associative Array to XML

    "Asp Associative Array Class" provides a method to easly export all items to a well formatted XML string. For example, You can create a new *.ASP file : <!--#include file="AssociativeArrayClass.asp" --> <% Dim Person, God Set Per…

    Leggi l'articolo originale
  15. Base64 encoding / decoding functions in VbScript / Classic ASP

    With the following functions Base64Encode(sText) and Base64Decode(ByVal vCode), You can easly encode/decode a text in/from base64 in VBScript/Classic ASP: Function Base64Encode(sText) Dim oXML, oNode Set oXML = CreateObject("Msxm…

    Leggi l'articolo originale
  16. Convert a DateTime string to a Unix timestamp in VbScript / Classic ASP

    To convert a datetime string value like "YYYY-MM-DD HH:MM:SS" to a Unix timestamp (the seconds from 01/01/1970 to the input datetime) You can use a conversion function as the following: Function ConvertToUnixTimeStamp(input_datet…

    Leggi l'articolo originale
  17. Set “top,left” of an element with the position relative to the parent in jQuery

    The .offset([coordinates]) method set the coordinates of an element but only relative to the document. Then how can we set coordinates of an element but relative to the parent? The.position() method get only "top,left" values rel…

    Leggi l'articolo originale
  18. Single line "if" statement in VBScript (like in C# or PHP)

    The "single line if statement" exists in C# and VB.NET as in many other programming and script languages in the following format lunchLocation = (dayOfTheWeek == "Tuesday") ? "Fuddruckers" : "Food Court"; The conditional ternary …

    Leggi l'articolo originale
  19. How to parse and process HTML/XML in PHP

    Simple HTML DOM is a great open-source parser: simplehtmldom.sourceforge It treats DOM elements in an object-oriented way, and the new iteration has a lot of coverage for non-compliant code. There are also some great functions li…

    Leggi l'articolo originale
  20. Create an Excel file in C# without Microsoft Office or Third party plugins

    What I'm about to say seems paradoxical, but the reality is that in open environments (as in PHP for example) it is often easier and we have less problems in creating or converting files in proprietary systems, compared to what h…

    Leggi l'articolo originale