This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS `stati` ( | |
`id_stati` int(16) NOT NULL auto_increment, | |
`sigla_stati` varchar(5) default NULL, | |
`nome__stati` varchar(128) default NULL, | |
PRIMARY KEY (`id_stati`), | |
KEY `PRIMARY_KEY` (`id_stati`) | |
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; | |
INSERT INTO `stati` (`id_stati`, `sigla_stati`, `nome__stati`) VALUES | |
(1, 'AF', 'Afghanistan'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
function generatePassword($length=9, $strength=0) { | |
$vowels = 'aeuy'; | |
$consonants = 'bdghjmnpqrstvz'; | |
if ($strength & 1) { | |
$consonants .= 'BDGHJLMNPQRSTVWXZ'; | |
} | |
if ($strength & 2) { | |
$vowels .= "AEUY"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isEmail(email) { | |
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; | |
if(reg.test(email) == false) { | |
return false; | |
} | |
else | |
{ | |
return true; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function codiceFISCALE(cfins) | |
{ | |
var cf = cfins.toUpperCase(); | |
var cfReg = /^[A-Z]{6}\d{2}[A-Z]\d{2}[A-Z]\d{3}[A-Z]$/; | |
if (!cfReg.test(cf)) | |
{ | |
return false; | |
} | |
var set1 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#Requires PHP 5.3.0 | |
define("CONSUMER_KEY", "consumer_key"); | |
define("CONSUMER_SECRET", "consumer_secret"); | |
define("OAUTH_TOKEN", "access_token"); | |
define("OAUTH_SECRET", "access_secret"); | |
function oauth_gen($method, $url, $iparams, &$headers) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- phpMyAdmin SQL Dump | |
-- version 2.6.0-pl3 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generato il: 18 Apr, 2007 at 04:00 PM | |
-- Versione MySQL: 3.23.58 | |
-- Versione PHP: 4.3.11 | |
-- | |
-- Database: `test` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- phpMyAdmin SQL Dump | |
-- version 2.6.0-pl3 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generato il: 18 Apr, 2007 at 04:00 PM | |
-- Versione MySQL: 3.23.58 | |
-- Versione PHP: 4.3.11 | |
-- | |
-- Database: `test` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- phpMyAdmin SQL Dump | |
-- version 2.6.0-pl3 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generato il: 18 Apr, 2007 at 04:00 PM | |
-- Versione MySQL: 3.23.58 | |
-- Versione PHP: 4.3.11 | |
-- | |
-- Database: `test` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
CREATE DEFINER=`root`@`localhost` FUNCTION `jaro_winkler_similarity`( | |
in1 varchar(255), | |
in2 varchar(255) | |
) RETURNS float | |
DETERMINISTIC | |
BEGIN | |
#finestra:= search window, curString:= scanning cursor for the original string, curSub:= scanning cursor for the compared string | |
declare finestra, curString, curSub, maxSub, trasposizioni, prefixlen, maxPrefix int; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$mime = array( | |
"323" => "text/h323", | |
"acx" => "application/internet-property-stream", | |
"ai" => "application/postscript", | |
"aif" => "audio/x-aiff", | |
"aifc" => "audio/x-aiff", | |
"aiff" => "audio/x-aiff", | |
"asf" => "video/x-ms-asf", | |
"asr" => "video/x-ms-asf", |
OlderNewer