- 2010
-
2009
- December
-
November
-
Page layout Ideas/JS/Flash
11/26/09
This is a living article and contains urls which I find interesting and Might incorporate one day into something.
1. http://www.marriott.com/default.mi
-
php quote in mysql like perl
11/23/09
mysql_real_escape_string()
<?php
// Connect
$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')
OR die(mysql_error());
// Query
$query = sprintf("SELECT * FROM users WHERE user='%s' AND pass -
After Registration Email
11/19/09
$content = "
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'
'http://www.w3.org/TR/html4/loose.dtd'>
<html>
<head>
<title>TotalESL</title>
<meta http-equiv='Content-Type' content='te -
PHP Sending Mail
11/19/09
Code below works without errors
<?php
$Name = "Da Duder"; //senders name
$email = "email@adress.com"; //senders e-mail adress
$recipient = "PersonWhoGetsIt@emailadress.com"; //recipient
$mail_body = "The text for the mail...&q -
PHP random password generator
11/19/09
<?php
function generatePassword($length=9, $strength=0) {
$vowels = 'aeuy';
$consonants = 'bdghjmnpqrstvz';
if ($strength & 1) {
$consonants .= 'BDGHJLMNPQRSTVWXZ';
}
if ($strength & 2) {
$vowels .= &quo -
PERL OOP - Destructors
11/17/09
If constructors can have arbitrary names, then why not destructors? Because while a constructor is explicitly called, a destructor is not. Destruction happens automatically via Perl's garbage collection (GC) system, which is a quick but somewhat lazy reference-based GC system. To know what to c -
PERL OOP - Inheritance
11/17/09
Like the special per-package variables recognized by Exporter (such as @EXPORT, @EXPORT_OK, @EXPORT_FAIL, %EXPORT_TAGS, and $VERSION), the @ISA array must be a package-scoped global and not a file-scoped lexical created via my(). Most classes have just one item in their @ISA array. In this case, we -
PERL OOP - Constructor
11/17/09
sub new {
my $self = {};
$self->{NAME} = undef;
$self->{AGE} = undef;
$self->{PEERS} = [];
bless ($self);
return $self;
} -
Autovivification
11/17/09
Autovivification is a distinguishing feature of the Perl programming language involving the dynamic creation of data structures. Autovivification is the automatic creation of a variable reference when an undefined value is dereferenced. In other words, Perl autovivification allows a programmer to re -
Left, Right, Inner Join
11/17/09
If I do a LEFT JOIN, I get all records that match in the same way and IN ADDITION I get an extra record for each unmatched record in the left table of the join - thus ensuring (in my example) that every PERSON gets a mention:
mysql> select name, phone, selling
from demo_people le -
Exporting symbols
11/17/09
There are rare occasions when you do want to export methods or variable names into the calling package. I only do this occasionally for static helper methods I need very, very often. In order to export symbols, inherit from the Exporter class and fill the @EXPORT array with the symbols you'd li -
Difference between 'use' and 'require'
11/17/09
USE
Imports some semantics into the current package from the named
module, generally by aliasing certain subroutine or variable
names into your package. It is exactly equivalent to
BEGIN { require Module; import Module LIST; }
except that Module *must* b -
Change Preferred language in Different Browsers
11/17/09
Firefox
1. Select menu [Tools]
2. Select menu item [Options].
3. Select tab [General].
4. Click button [Languages].
5. Click drop-down-box [Select a language to add..]
6. Mark a language e.g. English (United Ki -
GEO IP Database
11/11/09
http://ipinfodb.com/ip_database.php -
Perl Cookies
11/10/09
Adding a cookie
use CGI;
$query = new CGI;
$cookie = $query->cookie(-name=>'MY_COOKIE',
-value=>'BEST_COOKIE=chocolatechip',
-expires=>'+4h',
-path=>'/');
print $query->header(-cookie=>$ -
Perl get date time fast - localtime
11/08/09
my @postdate = localtime;
my $postdate = sprintf("%4d%02d%02d",$postdate[5]+1900,$postdate[4]+1,$postdate[3]);
-
Page layout Ideas/JS/Flash
- October
- September
- August
- 2008

Calendar



