- Add all my latest presentations.

This commit is contained in:
Derick Rethans
2006-03-30 17:07:17 +00:00
parent b85626c8c6
commit 1410163171
56 changed files with 792 additions and 65 deletions

47
ezc-webdeal.xml Normal file
View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<presentation
template="css"
navmode="html"
navbarbackground="#4373b4"
navbartopiclinks="0"
navColor="#f1fbff"
logo1=""
stylesheet="presentations/slides/perf/ezp.css"
backgroundfixed="1" >
<topic>Component Libraries</topic>
<title>eZ components - RAD for PHP</title>
<event>Webdeal</event>
<location>Oslo, Norway</location>
<date>March 23th, 2006</date>
<speaker>Derick Rethans</speaker>
<email>dr@ez.no</email>
<slide>slides/ezc/title-ezc-webdeal.xml</slide>
<!-- introduction -->
<slide>slides/toolbox/goals-library.xml</slide>
<slide>slides/toolbox/goals-process.xml</slide>
<slide>slides/toolbox/documentation.xml</slide>
<slide>slides/toolbox/dependencies.xml</slide>
<!-- overview -->
<slide>slides/ezc/overview.xml</slide>
<slide>slides/ezc/install-download.xml</slide>
<slide>slides/ezc/install-pear.xml</slide>
<slide>slides/ezc/example-configuration-manager.xml</slide>
<slide>slides/ezc/example-archive.xml</slide>
<slide>slides/ezc/example-execution.xml</slide>
<slide>slides/ezc/example-database-instance.xml</slide>
<slide>slides/ezc/example-database-query.xml</slide>
<slide>slides/ezc/example-persistentobject.xml</slide>
<slide>slides/ezc/example-mail.xml</slide>
<!-- what's next? -->
<slide>slides/ezc/future-1.1.xml</slide>
<slide>slides/ezc/questions.xml</slide>
</presentation>

44
php6-unicode-webdeal.xml Normal file
View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<presentation
template="css"
navmode="html"
navbarbackground="#4373b4"
navbartopiclinks="0"
navColor="#f1fbff"
logo1=""
stylesheet="presentations/slides/perf/ezp.css"
backgroundfixed="1" >
<topic>Localization and Internationalization</topic>
<title>PHP 6 and Unicode</title>
<event>Webdeal</event>
<location>Oslo, Norway</location>
<date>March 23rd, 2006</date>
<speaker>Derick Rethans</speaker>
<email>dr@ez.no</email>
<url>http://derickrethans.nl/talks.php</url>
<slide>slides/clustering/title.xml</slide>
<!-- OTHER STUFF -->
<slide>slides/php6/big-cleanup.xml</slide>
<slide>slides/php6/new-stuff.xml</slide>
<!-- UNICODE -->
<slide>slides/i18nl10n/what-languages.xml</slide> <!-- what is the problem actually? -->
<slide>slides/i18nl10n/challenges2.xml</slide>
<slide>slides/i18nl10n/sorting.xml</slide>
<slide>slides/i18nl10n/php-can-do-it-now.xml</slide>
<slide>slides/i18nl10n/goals-1.xml</slide>
<slide>slides/i18nl10n/unicode-semantics.xml</slide>
<slide>slides/i18nl10n/string-types.xml</slide>
<slide>slides/i18nl10n/string-literals.xml</slide>
<slide>slides/i18nl10n/script-encoding-pragma.xml</slide>
<slide>slides/i18nl10n/characters-not-bytes.xml</slide>
<slide>slides/i18nl10n/upgrading-locale.xml</slide>
<slide>slides/i18nl10n/locale-example.xml</slide>
<slide>slides/i18nl10n/locale-example-arrays.xml</slide>
<slide>slides/i18nl10n/unicode-extensions.xml</slide>
<!-- EXIT -->
<slide>slides/i18nl10n/when.xml</slide>
<slide>slides/i18nl10n/resources.xml</slide> <!-- resources -->
</presentation>

View File

@@ -1,4 +1,4 @@
# Comment for the section
[db]
# This is ofcourse not my real password...
password=noneofyourbusiness
password=blåbærsyltetøy

View File

@@ -4,7 +4,7 @@ return array (
array (
'db' =>
array (
'password' => 'noneofyourbusiness',
'password' => 'blåbærsyltetøy',
),
),
'comments' =>

15
slides/ezc/future-1.1.xml Normal file
View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<slide>
<title>What's Next?</title>
<subtitle>Additions for eZ components 1.1</subtitle>
<blurb>New components:</blurb>
<list>
<bullet>*DatabaseSchema*: DDL manipulation</bullet>
<bullet>*Feed*: RSS/ATOM feeds</bullet>
<bullet>*Mail*: Parsing mail</bullet>
<bullet>*PersistentObject*: Integration with Database Schema</bullet>
<bullet>*Template*: Templating Engine</bullet>
<bullet>*URL*: Obtaining parameters from URLs and creating them</bullet>
</list>
</slide>

View File

@@ -5,7 +5,7 @@
<blurb>New components:</blurb>
<list>
<bullet>*Template*: Well, uh, templating</bullet>
<bullet>*Template*: Templating Engine</bullet>
<bullet>*DatabaseSchema*: DDL manipulation</bullet>
<bullet>*Feed*: RSS/ATOM feeds</bullet>
<bullet>*Mail*: Parsing mail</bullet>

View File

@@ -12,7 +12,7 @@ pwd]]></example>
<blurb>Setup:</blurb>
<example result='1'><![CDATA[<?php
ini_set( 'include_path', '/tmp/ezcomponents-1.0:.' );
ini_set( 'include_path', '/home/httpd/ezcomponents/trunk:.' );
require 'Base/src/base.php';
function __autoload( $className )

View File

@@ -0,0 +1,13 @@
<slide fontsize="3.5em">
<title>Welcome!</title>
<break lines="8"/>
<image align="center" filename="components.png" pdf-scale="0.7"/>
<break/>
<blurb class="event">RAD for PHP</blurb>
<break lines="3"/>
<blurb class="event-presenter">Derick Rethans - dr@ez.no</blurb>
<break/>
<break/>
<blurb class="pres-url-small">http://files.derickrethans.nl/ezc-webdeal.pdf</blurb>
</slide>

View File

@@ -4,7 +4,7 @@
<list>
<bullet>Native Unicode strings</bullet>
<bullet>A clear separation between Binary, Native (Encoded) Strings and Unicode Strings</bullet>
<bullet>A clear separation between Binary / Native (Encoded) Strings and Unicode Strings</bullet>
<bullet>Unicode string literals</bullet>
<bullet>Updated language semantics</bullet>
<bullet>Where possible, upgrade the existing functions</bullet>

View File

@@ -5,10 +5,10 @@
<example result="1"><![CDATA[<?php
i18n_loc_set_default("nl");
echo i18n_strtotitle("het ijsselmeer (ijsselmeer) is ßaf"), "<br/>\n";
echo strtotitle("het ijsselmeer (ijsselmeer) is ßaf"), "<br/>\n";
i18n_loc_set_default("tr");
echo i18n_strtotitle("het ijsselmeer (ijsselmeer) is ßaf"), "\n";
echo strtotitle("het ijsselmeer (ijsselmeer) is ßaf"), "\n";
?>]]></example>
</slide>

View File

@@ -2,8 +2,9 @@
<slide fontsize="3.5em">
<title>Resources</title>
<break lines="4"/>
<link fontsize="2.4em" leader="Collation: " href="http://www.dbazine.com/db2/db2-disarticles/gulutzan1" target="_new"/>
<link fontsize="2.4em" marginleft="0em" leader="This presentation: " href="http://derickrethans.nl/talks.php" target="_new"/>
<link fontsize="3em" marginleft="0em" leader="Questions?: " href="dr@ez.no" target="_new"/>
<list>
<bullet>*PDM notes*: http://php.net/~derick/meeting-notes.html</bullet>
<bullet>*This presentation*: http://derickrethans.nl/talks.php</bullet>
<bullet>*Questions*: dr@ez.no</bullet>
</list>
</slide>

View File

@@ -6,7 +6,7 @@
<blurb>Interpreting an iso-8859-1 script as UTF-8:</blurb>
<example result="1"><![CDATA[<?php
declare(encoding="iso-8859-1");
$str = "blå = ";
$str = "blå = ";
var_inspect($str);
?>]]></example>
<break lines="3"/>
@@ -14,7 +14,7 @@
<blurb>Interpreting an UTF-8 script as UTF-8:</blurb>
<example result="1"><![CDATA[<?php
declare(encoding="utf-8");
$str = "blå = ";
$str = "blå = ";
var_inspect($str);
?>]]></example>
<!--

View File

@@ -3,15 +3,11 @@
<title>String Types</title>
<list>
<bullet>*binary*: Used to represent binary data, for example the contents of a JPEG file.</bullet>
<bullet>*string*: Used to represent binary data, for example the contents of a JPEG file or a "native" string.</bullet>
</list>
<example>. P N G . . . . . . . . I H D R
89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52</example>
<break/>
<list>
<bullet>*string*: Native string, encoded with the current script's encoding. For backwards compatibility.</bullet>
</list>
<example>B l å b æ r ø l
62 6C C3 A5 62 C3 A6 72 C3 A8 6C</example>
<break/>

View File

@@ -3,8 +3,8 @@
<title>i18n Extensions</title>
<list>
<bullet>*i18n_core*: always enabled, functions to set the locale, the
locale aware string functions. String searching API.</bullet>
<bullet>*ext/unicode*: always enabled, functions to set the locale, the
locale aware string functions. String searching and collation API.</bullet>
<bullet>*i18n_regexp*: Unicode aware regular expressions</bullet>
<bullet>*i18n_translit*: PECL/translit extension, integrated with ICU's
transliteration</bullet>

View File

@@ -4,7 +4,7 @@
<list>
<bullet>With an INI setting: %unicode_semantics%</bullet>
<bullet>It can be turned on "per-request"</bullet>
<bullet>It can be turned on "per-vhost"</bullet>
<bullet>(Almost) no behavioral changes when it's not enabled</bullet>
<bullet>The setting does not mean you won't have any Unicode strings</bullet>
</list>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<slide fontsize="6em">
<title>What is this about anyway?</title>
<title>What is so important about Unicode anyway?</title>
<list>
<bullet>There is more than one country in the world</bullet>

View File

@@ -5,6 +5,6 @@
<list>
<bullet>When it is ready.</bullet>
<bullet>Development version is in CVS.</bullet>
<bullet>Release: hopefully next year.</bullet>
<bullet>Release: hopefully at the end of 2006.</bullet>
</list>
</slide>

View File

@@ -1,6 +1,6 @@
<style title="Default" type="text/css">
body {
font-size: 10pt;
font-size: 8pt;
margin-left:290px;
margin-right:0em;
margin-bottom:0em;
@@ -24,7 +24,7 @@ font-family: verdana, tahoma, arial, helvetica, sans-serif;
z-index: 99;
}
div.navbar_title, div.navbar_title a, div.subtitle {
font-size: 32px;
font-size: 26px;
color: #698fe5;
text-decoration: none;
text-align: left;
@@ -33,13 +33,13 @@ div.navbar_title, div.navbar_title a, div.subtitle {
}
div.subtitle {
margin-top: 5px;
font-size: 24;
font-size: 18px;
font-weight: normal;
font-style: italic;
}
div.navbar_nr a {
font-size: 16px;
font-size: 13px;
color: #77a;
text-decoration: none;
position: fixed;
@@ -56,55 +56,61 @@ overflow: -moz-scrollbars-vertical;
}
ul.pres {
list-style: circle;
font-size: 24pt;
font-size: 18pt;
}
ul.numbered
{
font-size: 20pt;
margin-right: 40px;
list-style-type: decimal;
}
ul.level2 {
list-style: circle;
font-size: 20pt;
font-size: 16pt;
margin-left: 40px;
margin-top: -15px;
}
li.pres_bullet {
font-size: 28pt;
li.pres_bullet, div.link {
font-size: 20pt;
margin-right: 40px;
}
li.pres_bullet_nr {
font-size: 28pt;
font-size: 20pt;
margin-right: 40px;
list-style-type: decimal;
}
ul.large div li.pres_bullet
{
font-size: 40pt;
font-size: 26pt;
}
ul.small div li.pres_bullet
{
font-size: 20pt;
font-size: 16pt;
}
div.title_blurb {
font-size: 80px;
font-size: 64px;
text-align: center;
font-weight: bold;
}
div.small_blurb {
font-size: 24px;
font-size: 18px;
}
div.blurb, div.bit_larger_output_text {
font-size: 28pt;
font-size: 20pt;
width: 100%;
}
div.bit_larger_output_text {
margin-top: 10px;
margin-top: 8px;
}
div.x_small_blurb {
@@ -112,45 +118,46 @@ div.x_small_blurb {
}
div.large_blurb {
font-size: 32pt;
font-size: 26pt;
}
div.large_blurb_center {
font-size: 48px;
font-size: 38px;
text-align: center;
}
div.quote {
font-size: 48px;
font-size: 32px;
text-align: center;
margin-left: 40px;
margin-right: 40px;
}
div.quote_attr {
font-size: 32px;
font-size: 24px;
text-align: right;
margin-right: 40px;
}
div.xx_large_blurb_center {
font-size: 80px;
font-size: 64px;
text-align: center;
}
div.q_mark {
text-align: center;
font-size: 480px;
font-size: 384px;
}
div.shadow, code {
font-size: 18px; width: 640px;
font-size: 14px; width: 640px;
}
div.example code, div.highlight code, div.bit_larger, div.bit_larger code, div.bit_larger_output {
background: #eee;
font-size: 23px;
font-size: 16px;
width: 100%;
font-weight: bold;
}
div.example, div.highlight, div.bit_larger, div.bit_larger_output {
margin-left: 20px;
@@ -158,7 +165,7 @@ div.example, div.highlight, div.bit_larger, div.bit_larger_output {
}
div.large code, div.large {
font-size: 32px;
font-size: 26px;
background: #eee;
font-weight: bold;
margin-left: 20px;
@@ -174,26 +181,27 @@ div.code_small, div.code_medium, div.code_large, div.example {
background: #eee;
}
div.code_small code {
font-size: 12px;
font-size: 10px;
}
div.code_medium code, div.code_medium pre {
font-size: 20px;
font-size: 16px;
}
div.code_large code, div.code_large pre {
font-size: 24px;
font-size: 18px;
}
div.example pre {
font-size: 23px;
font-size: 16px;
font-weight: bold;
}
div.event, div.event-date, div.event-presenter {
text-align: center;
font-size: 32pt;
font-size: 26pt;
}
div.pres-url-small {
text-align: center;
font-size: 24pt;
font-size: 18pt;
}
img.spaced {
@@ -204,6 +212,6 @@ img.spaced {
}
table {
font-size: 20pt;
font-size: 16pt;
}
</style>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<slide fontsize="6em">
<title>The Big Cleanup</title>
<subtitle>Removing functionality</subtitle>
<list>
<bullet>%register_globals%</bullet>
<bullet>%magic_quotes%</bullet>
<bullet>%safe_mode%</bullet>
<bullet>%zend.ze1_compatibility% mode</bullet>
<bullet>%dl()%</bullet>
</list>
</slide>

14
slides/php6/new-stuff.xml Normal file
View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<slide fontsize="6em">
<title>New Stuff</title>
<subtitle>Adding functionality</subtitle>
<list>
<bullet>64 bit integer</bullet>
<bullet>%goto%</bullet>
<bullet>late static binding</bullet>
<bullet>default opcode cache (APC)</bullet>
<bullet>%E_STRICT% on by default</bullet>
<bullet>*Full Unicode support*</bullet>
</list>
</slide>

BIN
slides/time/date-info.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -4,7 +4,7 @@
<subtitle>Timezone Support</subtitle>
<list>
<bullet>Bundled timezone database with 533 zones</bullet>
<bullet>Bundled timezone database with 538 zones</bullet>
<bullet>Not dependent on timezone abbreviations</bullet>
<bullet>Timezones have the format: Continent/Location or Continent/Location/Sublocation - Like: Europe/Amsterdam, America/Indiana/Knox</bullet>
</list>

BIN
slides/time/indiana.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

View File

@@ -3,8 +3,8 @@
<title>Problems</title>
<subtitle>Daylight Savings Time (Indiana)</subtitle>
<image align="right" filename="indiana.png"/>
<blurb>Three different rules:</blurb>
<image align="right" filename="indiana.gif"/>
<blurb>(Currently) Three different rules:</blurb>
<list>
<bullet>Most counties: Eastern, no DST</bullet>
<bullet>Counties |ff5555|close| to Chicago and Evansvile: Central, DST</bullet>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>Timezone Database</title>
<list>
<bullet>Timezones change quicker than PHP releases</bullet>
<bullet>pecl extension: timezonedb</bullet>
<bullet>Can be used to override the built-in timezones with new rules</bullet>
</list>
<break lines="3"/>
<image filename="date-info.png" align="center"/>
</slide>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>Timezone and Date tips</title>
<list>
<bullet>Store date/time in a timezone agnostic way: GMT</bullet>
<bullet>Use a "Unix" timestamp, perhaps as string: %date("U");%</bullet>
</list>
</slide>

View File

@@ -3,7 +3,7 @@
<title>Timezones Utilities</title>
<subtitle>Abbreviations and Identifiers</subtitle>
<blurb>All supported timezone idenfiers:</blurb>
<blurb>All supported timezone identifiers:</blurb>
<example result="1"><![CDATA[<?php
$ids = timezone_identifiers_list();
echo "Number of identifiers: ", count($ids), "<br/>";
@@ -12,13 +12,15 @@
?>]]></example>
<break lines="2"/>
<blurb>All supported timezone idenfiers:</blurb>
<blurb>All supported timezone identifiers:</blurb>
<example result="1"><![CDATA[<?php
$abbrs = timezone_abbreviations_list();
echo "<pre>\n";
foreach ($abbrs as $abbr => $id) {
printf("%-4s %6d %d %s\n", strtoupper($abbr),
$id['offset'], $id['dst'], $id['timezone_id']);
foreach ($abbrs as $abbr => $ids) {
foreach ($ids as $id) {
printf("%-6s %6d %d %s\n", strtoupper($abbr),
$id['offset'], $id['dst'], $id['timezone_id']);
}
}
?>]]></example>
</slide>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide fontsize="6em">
<title>Analyzing Running Scripts</title>
<list>
<bullet>DBGp, common Debugging protocol</bullet>
<bullet>Cross-language: PHP, Python, Perl...</bullet>
<bullet>Supported in Xdebug 2</bullet>
<bullet>Clients: Komodo, Maguma Workbench, TruStudio (PHP Eclipse Plugin) and many other smaller ones</bullet>
</list>
<break lines="4"/>
<blurb>Let's demo this...</blurb>
</slide>

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>Debugging With Request Variables</title>
<image filename="request-vars.png" align="center"/>
<break lines="2"/>
<blurb>%xdebug.dump.GET=*%</blurb>
<blurb>%xdebug.dump.POST=username,password%</blurb>
<break/>
<blurb>Also for: COOKIE, ENV, FILES, REQUEST, SERVER and SESSION</blurb>
</slide>

View File

@@ -0,0 +1,19 @@
<pre>
<?php
require 'ezc_mail_setup.php';
error_reporting(E_ALL);
$parser = new ezcMailParser();
$set = new ezcSingleFileSet( dirname(__FILE__).'/ezcmailtest.mail' );
echo "Memory: ", xdebug_memory_usage(), " bytes\n\n";
$mail = $parser->parseMail( $set );
foreach( $mail as $mailPart )
{
echo "From: {$mailPart->from->email}\n";
echo "Subject: {$mailPart->subject}\n";
}
unset( $mail );
echo "\nMaximum Memory: ", xdebug_peak_memory_usage(), " bytes\n";
?>

View File

@@ -0,0 +1,12 @@
# Settings for the site itself
[site]
title=Example site
# Database settings used for all connections
[db]
host=localhost
user=root
# Storing passwords in INI files is not a good idea,
# is it?
password=42
connection_retries=five

View File

@@ -0,0 +1,179 @@
<?php
ini_set( 'include_path', '/home/httpd/ezcomponents/trunk:.' );
require 'Base/src/base.php';
function __autoload( $className )
{
ezcBase::autoload( $className );
}
class ezcMailPrettyPrinter
{
private static $indentLevel = 0;
private static $indentString = " ";
private static $lineBreak = "\n";
static public function printMail( ezcMail $mail )
{
echo "\n";
self::printAddresses( $mail->to, "To" );
self::printAddresses( array( $mail->from ), "From" );
echo self::indent( "[Subject] => " . $mail->subject . "\n" );
if( is_object( $mail->body ) )
{
self::printPart( $mail->body, "Body" );
}
}
static public function printAddresses( $addresses, $varName )
{
foreach( $addresses as $addr )
{
echo self::indent( "[$varName] => " . get_class( $addr ) . " object\n{\n" );
self::$indentLevel++;
echo self::indent( "[name] => {$addr->name}\n" );
echo self::indent( "[email] => {$addr->email}\n" );
self::$indentLevel--;
echo self::indent( "}\n" );
}
}
static public function printPart( ezcMailPart $part, $varName )
{
$class = get_class( $part );
echo self::indent( "[$varName] => " . $class . " object\n{\n" );
self::$indentLevel++;
switch( $class )
{
case 'ezcMailFile':
self::printFile( $part );
break;
case 'ezcMailText':
self::printText( $part );
break;
case 'ezcMailMultipartMixed':
self::printMultipartMixed( $part );
break;
case 'ezcMailMultipartAlternative':
self::printMultipartAlternative( $part );
break;
default:
throw new Exception( "Pretty printing of $class is not implemented" );
break;
}
self::$indentLevel--;
echo self::indent( "}\n" );
}
static public function printText ( ezcMailText $text )
{
echo self::indent( "[text] => {$text->text}\n" );
echo self::indent( "[charset] => {$text->charset}\n" );
echo self::indent( "[subType] => {$text->subType}\n" );
}
static public function printFile ( ezcMailFile $file )
{
echo self::indent( "[fileName] => {$file->fileName}\n" );
echo self::indent( "[mimeType] => {$file->mimeType}\n" );
echo self::indent( "[contentType] => {$file->contentType}\n" );
}
static public function printMultipartMixed( ezcMailMultipartMixed $mixed )
{
// var_dump( $mixed );
echo self::indent( "[parts] => array\n{\n" );
$counter = 0;
self::$indentLevel++;
foreach( $mixed->getParts() as $part )
{
self::printPart( $part, $counter );
$counter++;
}
self::$indentLevel--;
echo self::indent( "}\n" );
}
static public function printMultipartAlternative( ezcMailMultipartAlternative $mixed )
{
// var_dump( $mixed );
echo self::indent( "[parts] => array\n{\n" );
$counter = 0;
self::$indentLevel++;
foreach( $mixed->getParts() as $part )
{
self::printPart( $part, $counter );
$counter++;
}
self::$indentLevel--;
echo self::indent( "}\n" );
}
private static function indent( $text )
{
if ( self::$indentLevel == 0 )
return $text;
$textArray = explode( self::$lineBreak, $text );
$newTextArray = array();
foreach ( $textArray as $text )
{
if ( trim( $text ) != '' )
{
$textLine = str_repeat( self::$indentString, self::$indentLevel ) . $text;
}
else
{
$textLine = $text;
}
$newTextArray[] = $textLine;
}
return implode( self::$lineBreak, $newTextArray );
}
}
class ezcSingleFileSet implements ezcMailParserSet
{
private $fp = null;
public function __construct( $file )
{
$fp = fopen( $file, 'r' );
if( $fp == false )
{
throw new Exception( "Could not open file $file for testing." );
}
$this->fp = $fp;
}
public function getNextLine()
{
if( feof( $this->fp ) )
{
if( $this->fp != null )
{
fclose( $this->fp );
$this->fp = null;
}
return null;
}
$next = rtrim( fgets( $this->fp ), "\r\n" );
if( $next == "" && feof( $this->fp ) ) // eat last linebreak
{
return null;
}
return $next;
}
public function nextMail()
{
return false;
}
}
?>

View File

@@ -0,0 +1,12 @@
From ikkesvar@posten.no Wed Mar 22 10:28:02 2006
Date: Wed, 22 Mar 2006 11:23:18 +0100 (CET)
From: ikkesvar@posten.no
To: komplett@derickrethans.nl
X-Bogosity: No, tests=bogofilter, spamicity=0.357882, version=0.96.0
Subject: Melding om pakke som leveres av posten
Posten har en en Servicepakke til deg. Den kan hentes på postkontor
SKIEN SENTRUM. Pakkenummeret er 370702051011795701. Du kan spore den
på www.posten.no. Dette er en automatisk generert mail fra Posten
Norge AS. Spørsmål eller synspunkter på tjenesten kan rettes til:
Posten Kundeservice på telefon 810 00 710. Hilsen Posten Norge AS

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>How Many Functions</title>
<example result="1"><![CDATA[<?php
echo xdebug_get_function_count();
?>]]></example>
<div effect="hide">
<break lines="3"/>
<example result="1"><![CDATA[<?php
echo xdebug_get_function_count();
?>]]></example>
</div>
</slide>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>How Much Memory Does It Use</title>
<example filename="dr_mail_test.php" result="1"/>
</slide>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>How Much Time Does It Take</title>
<example filename="xdebug_time_index.php" result="1"/>
</slide>

View File

@@ -0,0 +1,21 @@
<slide>
<title>Installing Xdebug</title>
<subtitle>Compiling</subtitle>
<blurb>With PEAR:</blurb>
<list class="numbered">
<bullet>pear install xdebug-beta</bullet>
</list>
<blurb>Without PEAR:</blurb>
<list class="numbered">
<bullet>wget http://xdebug.org/files/xdebug-2.0.0beta5.tgz</bullet>
<bullet>tar -xvzf xdebug-2.0.0beta5.tgz</bullet>
<bullet>cd xdebug-2.0.0beta5</bullet>
<bullet>phpize</bullet>
<bullet>./configure</bullet>
<bullet>make</bullet>
<bullet>make install</bullet>
</list>
</slide>

View File

@@ -0,0 +1,10 @@
<slide>
<title>Installing Xdebug</title>
<subtitle>Enabling</subtitle>
<list>
<bullet>in php.ini add: %zend_extension=/full/path/to/xdebug.so%</bullet>
<bullet>Use %zend_extension_ts% for threaded compiles of PHP (Windows build f.e.)</bullet>
<bullet>Use %zend_extension_debug% for debug builds of PHP</bullet>
</list>
</slide>

View File

@@ -0,0 +1,9 @@
<slide>
<title>Installing Xdebug</title>
<subtitle>Gotchas</subtitle>
<list>
<bullet>%--enable-versioning% prevent Xdebug from loading</bullet>
<bullet>Zend's extensions (optimizer, debugger, cache) prohibit Xdebug (and other non-Zend zend-extensions) from loading</bullet>
</list>
</slide>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 67 KiB

View File

@@ -1,12 +1,9 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide fontsize="6em">
<title>Protection</title>
<break lines="7" />
<image filename="infinite.png" align="right"/>
<example class="code_large" fontsize="1.7em">
xdebug.max_nesting_level=4</example>
</slide>

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>Help By Error Messages</title>
<image filename="stacktrace3a.png" align="center"/>
<blurb>... is kinda useles.</blurb>
<div effect="hide">
<break lines="2"/>
<image filename="stacktrace3b.png" align="center"/>
<blurb>%xdebug.collect_params=1% and %xdebug.show_local_vars=1%</blurb>
</div>
</slide>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide fontsize="6em">
<title>What Code Do I Use</title>
<image filename="codecoverage.png" align="center"/>
<break/>
<blurb>Available functions:</blurb>
<break/>
<example class="code_large">xdebug_start_code_coverage();
xdebug_get_code_coverage();
xdebug_stop_code_coverate();</example>
<break/>
</slide>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
<title>Protection</title>
<list>
<bullet>Stack overflow in PHP</bullet>
<bullet>Infinite recursion</bullet>
</list>
<break/>
<blurb>Xdebug protects with:</blurb>
<break/>
<example class="code_large">xdebug.max_nesting_level=4</example>
<break/>
<image filename="infinite.png" align="center"/>
</slide>

View File

@@ -0,0 +1,12 @@
<slide>
<title>I Do Not Need a Debugger</title>
<subtitle>... yes you do</subtitle>
<list>
<bullet>printf(), var_dump() and echo are good enough</bullet>
<bullet>*Xdebug*: Open Source debugger for PHP</bullet>
<bullet>It's about 4 years old</bullet>
<bullet>Version 2 will be out "soonish"</bullet>
<bullet>Even works on Windows</bullet>
</list>
</slide>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide fontsize="6em">
<title>Execution trace</title>
<image filename="tracefile-ezc.png" align="center"/>
<break/>
<blurb>Available settings:</blurb>
<break/>
<example class="code_large">xdebug.auto_trace=1
xdebug.trace_output_dir=/tmp
xdebug.collect_params=1
xdebug.collect_return=1
xdebug.trace_options=1</example>
<break/>
</slide>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<slide fontsize="6em">
<title>Pretty Printing Variables</title>
<image filename="var_dump.png" align="center"/>
<break lines="2"/>
<blurb>%&amp;lt;?php%</blurb>
<blurb>%xdebug_var_dump();%</blurb>
<blurb>%?&gt;%</blurb>
</slide>

View File

@@ -0,0 +1,18 @@
<pre>
<?php
ini_set('include_path', '/home/httpd/ezcomponents/trunk');
require_once 'Base/src/base.php';
function __autoload( $className )
{
ezcBase::autoload( $className );
}
$cfg = ezcConfigurationManager::getInstance();
$cfg->init( 'ezcConfigurationIniReader', dirname( __FILE__ ) . '/examples' );
echo "Time Index: ", xdebug_time_index(), "\n";
$pw = $cfg->getSetting( 'settings', 'db', 'password' );
echo "The password is <$pw>.\n";
echo "Time Index: ", xdebug_time_index(), "\n";
?>

35
srm-ez-internal.xml Normal file
View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<presentation
template="css"
navmode="html"
navbarbackground="#4373b4"
navbartopiclinks="0"
navColor="#f1fbff"
logo1=""
stylesheet="presentations/slides/perf/ezp.css"
backgroundfixed="1" >
<topic>SRM</topic>
<title>SRM</title>
<location>Skien, Norway</location>
<date>Jun 10, 2005</date>
<speaker>Derick Rethans</speaker>
<email>dr@ez.no</email>
<slide>slides/ze-xdebug/title.xml</slide>
<slide>slides/phpperform/extern_srm.xml</slide>
<slide>slides/srm/banana.xml</slide>
<slide>slides/srm/online3.xml</slide>
<slide>slides/srm/online4.xml</slide>
<slide>slides/srm/remote-resource.xml</slide>
<slide>slides/srm/design.xml</slide>
<slide>slides/srm/design2.xml</slide>
<slide>slides/srm/interact.xml</slide>
<slide>slides/srm/remote-banana.xml</slide>
<slide>slides/srm/remote-banana-diagram.xml</slide>
<slide>slides/srm/remote-pizza.xml</slide>
</presentation>

61
time-qc2006.xml Normal file
View File

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<presentation
template="css"
navmode="html"
navbarbackground="#4373b4"
navbartopiclinks="0"
navColor="#f1fbff"
logo1=""
stylesheet="presentations/slides/perf/ezp.css"
backgroundfixed="1" >
<topic>Localization and Internationalization</topic>
<title>What Time is It?</title>
<event>PHP Quebec 2006</event>
<location>Montreal, Canada</location>
<date>March 31st, 2006</date>
<speaker>Derick Rethans</speaker>
<email>dr@ez.no</email>
<url>http://derickrethans.nl/talks.php</url>
<slide>slides/perf/title.xml</slide>
<!-- INTRODUCTION -->
<slide>slides/time/what-is-time.xml</slide>
<slide>slides/time/what-is-time2.xml</slide>
<slide>slides/time/problems-string-representation.xml</slide>
<slide>slides/time/problems-timezones.xml</slide>
<slide>slides/time/problems-timezone-abbr.xml</slide>
<slide>slides/time/problems-dst.xml</slide>
<slide>slides/time/problems-dst2.xml</slide>
<slide>slides/time/problems-dst3.xml</slide>
<!-- PHP - CURRENT -->
<slide>slides/time/current-functions.xml</slide>
<slide>slides/time/current-limitations.xml</slide>
<!-- PHP - IMPROVEMENTS -->
<slide>slides/time/improvements-overview.xml</slide>
<slide>slides/time/improvements-formats.xml</slide>
<slide>slides/time/improvements-timezones.xml</slide>
<!-- PHP - CODE EXAMPLES -->
<slide>slides/time/basic-parse-time.xml</slide>
<slide>slides/time/basic-parse-time-new.xml</slide>
<!-- DATE EXAMPLES -->
<slide>slides/time/date-format.xml</slide>
<slide>slides/time/date-modify.xml</slide>
<slide>slides/time/basic-using-zones.xml</slide>
<slide>slides/time/default-timezone.xml</slide>
<slide>slides/time/timezone-object-1.xml</slide>
<slide>slides/time/timezone-object-2.xml</slide>
<slide>slides/time/date-timezone.xml</slide> <!-- set/get -->
<slide>slides/time/timezone-utilities-1.xml</slide>
<slide>slides/time/timezone-utilities-2.xml</slide>
<slide>slides/time/timezone-database.xml</slide>
<!-- TIPS -->
<slide>slides/time/timezone-tips.xml</slide>
<!-- EXIT -->
<slide>slides/time/resources.xml</slide> <!-- resources -->
</presentation>

40
xdebug-qc2006.xml Normal file
View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<presentation
template="css"
navmode="html"
navbarbackground="#4373b4"
navbartopiclinks="0"
navColor="#f1fbff"
logo1=""
stylesheet="presentations/slides/perf/ezp.css"
backgroundfixed="1" >
<topic>Debugging</topic>
<title>Xdebug</title>
<event>PHP Quebec 2006</event>
<location>Montreal, Canada</location>
<date>March 30th, 2006</date>
<speaker>Derick Rethans</speaker>
<email>dr@ez.no</email>
<url>http://files.derickrethans.nl/xdebug-qc2006.pdf</url>
<slide>slides/xdebug/title.xml</slide>
<!-- INTRODUCTION -->
<slide>slides/xdebug/why-debugger.xml</slide>
<slide>slides/xdebug/how-to-install.xml</slide>
<slide>slides/xdebug/how-to-install2.xml</slide>
<slide>slides/xdebug/how-to-install3.xml</slide>
<slide>slides/xdebug/why-crash.xml</slide> <!-- max nesting, function trace -->
<slide>slides/xdebug/where-error.xml</slide>
<slide>slides/xdebug/debug-req-vars.xml</slide>
<slide>slides/xdebug/xdebug-var-dump.xml</slide>
<slide>slides/xdebug/how-much-time.xml</slide>
<slide>slides/xdebug/how-much-memory.xml</slide>
<slide>slides/xdebug/wtf-happens.xml</slide>
<slide>slides/xdebug/which-code-do-i-use.xml</slide>
<slide>slides/xdebug/how-many-functions.xml</slide>
<slide>slides/xdebug/profiling.xml</slide>
<slide>slides/xdebug/profiling2.xml</slide>
<slide>slides/xdebug/analyse-running-script.xml</slide>
<slide>slides/xdebug/resources.xml</slide>
</presentation>