iPhone Screen Orientation: Portrait and Landscape 
http://www.evotech.net/blog/2009/09/iph ... landscape/

[ add comment ] ( 1 view )   |  permalink  |   ( 3 / 75 )
Private Messaging System  
http://www.pixel2life.com/publish/tutor ... ng_system/

[ add comment ]   |  permalink  |   ( 3 / 103 )
Page layout Ideas/JS/Flash 
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


[ add comment ] ( 2 views )   |  permalink  |   ( 2.8 / 65 )
php quote in mysql like perl 
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 password='%s'",
mysql_real_escape_string($user),
mysql_real_escape_string($password));
?>

[ add comment ] ( 3 views )   |  permalink  |  related link  |   ( 3.1 / 88 )
After Registration Email 
$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='text/html; charset=utf-8'>
</head>

<body>

<table width='600' border='0' cellspacing='2' cellpadding='2'>
<tr>
<td align='left' class='textbig'><strong>Dear ".$username.":</strong><br><br>
Thank you for joining TotalESL.com, First Stop for Your Second Language Needs. <br>Please note your account information <br />
<br />
<table width='100%' border='0' cellspacing='2' cellpadding='2'>
<tr valign='top'>
<td width='140' align='left' class='text'> <strong>Username:</strong></td>
<td align='left' class='text'>".$username."</td>
</tr>
<tr valign='top'>
<td align='left' class='text'><strong>Password:</strong></td>
<td align='left' class='text'>".$password."</td>
</tr>
<tr valign='top'>
<td align='left' class='text'><strong>IM/Chat Username:</strong></td>
<td align='left' class='text'>".$username."</td>
</tr>
</table>
<br></td>
</tr>
<tr>
<td class='text' align='left'>Congratulations! You may to proceed and use our member features:<br>
</td>
</tr>
<tr>
<td class='text' align='left'>&nbsp;</td>
</tr>
<tr>
<td class='text' align='left'>Thank you.
<br />
<br />
Admin
<br />
TotalESL.com <a href='http://www.totalesl.com'><br />
http://www.totalesl.com</a></td>
</tr>
</table>
<br>

</body>
</html>";

[ 1 comment ] ( 12 views )   |  permalink  |   ( 3 / 87 )
PHP Sending Mail 
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..."; //mail body
$subject = "Subject for reviever"; //subject
$header = "From: ". $Name . " <" . $email . ">\r\n"; //optional headerfields

mail($recipient, $subject, $mail_body, $header); //mail command :)
?>

[ add comment ] ( 7 views )   |  permalink  |  related link  |   ( 2.9 / 76 )
PHP random password generator 
<?php

function generatePassword($length=9, $strength=0) {
$vowels = 'aeuy';
$consonants = 'bdghjmnpqrstvz';
if ($strength & 1) {
$consonants .= 'BDGHJLMNPQRSTVWXZ';
}
if ($strength & 2) {
$vowels .= "AEUY";
}
if ($strength & 4) {
$consonants .= '23456789';
}
if ($strength & 8) {
$consonants .= '@#$%';
}

$password = '';
$alt = time() % 2;
for ($i = 0; $i < $length; $i++) {
if ($alt == 1) {
$password .= $consonants[(rand() % strlen($consonants))];
$alt = 0;
} else {
$password .= $vowels[(rand() % strlen($vowels))];
$alt = 1;
}
}
return $password;
}

?>

[ add comment ] ( 1 view )   |  permalink  |  related link  |   ( 3 / 68 )
PERL OOP - Destructors  
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 call, Perl insists that the destructor be named DESTROY. Perl's notion of the right time to call a destructor is not well-defined currently, which is why your destructors should not rely on when they are called.

Why is DESTROY in all caps? Perl on occasion uses purely uppercase function names as a convention to indicate that the function will be automatically called by Perl in some way. Others that are called implicitly include BEGIN, END, AUTOLOAD, plus all methods used by tied objects, described in the perltie manpage.

[ add comment ]   |  permalink  |   ( 3 / 62 )
PERL OOP - Inheritance 
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 have what's called ``single inheritance'', or SI for short.

Consider this class:
package Employee;
use Person;
@ISA = ("Person");
1;

Not a lot to it, eh? All it's doing so far is loading in another class and stating that this one will inherit methods from that other class if need be. We have given it none of its own methods. We rely upon an Employee to behave just like a Person.

[ add comment ]   |  permalink  |   ( 3 / 65 )
PERL OOP - Constructor 
sub new {
my $self = {};
$self->{NAME} = undef;
$self->{AGE} = undef;
$self->{PEERS} = [];
bless ($self);
return $self;
}

[ add comment ]   |  permalink  |  related link  |   ( 2.8 / 78 )

<<First <Back | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Next> Last>>