cvs: presentations / perf-oscom4.xml wereldveroverend-oscom4.xml wereldveroverend-phpworks04.xml /slides/i18nl10n dominating-the-world.png
i10n-example.php iconv-function.xml iconv-html.xml iconv-solved.xml linguist.png locale-casing.xml locale-collation.xml locale-date.xml
locale-money.xml locale-numeric.xml locale-php.xml locales.xml mb-problems.xml pcre-utf8.xml resources-oscom4.xml title-oscom4.xml
title-phpworks04.xml trans-array1.xml trans-array2.xml trans-define1.xml trans-define2.xml trans-gettext1.xml trans-gettext2.xml trans-intro.xml
trans-linguist.xml trans-qt1.xml trans-qt2.xml utf8-encoding.xml wrong-http-header.xml /slides/perf accelerators.xml caches.png caching_eval.xml
compress.xml cpuusage.xml dso.png extern_squid.xml ezp.css groups.xml how_caching_works.png how_caching_works.xml how_ccache.png how_ccache.xml
htmloptimize.xml lifecycle.png lifecycle.xml livedocs.xml modgzip.xml optimize.xml pear_cache.xml phpzlib.xml prf_fileio.xml reduce.xml regex.xml
resources-oscom4.xml squeeze.xml static-und-squid.xml total_page_caching.png total_page_caching.xml what_caching.xml xdebug-trace-xgui.xml
/slides/xdebug ccoverage1.xml ccoverage2.xml ccoverage3.xml dbgp-breakpoint-types.xml dbgp-breakpoints.xml dbgp-common.xml dbgp-features.xml vim.xml
| From: | Derick Rethans | Date: | Mon, 13 Sep 2004 13:41:19 +0000 |
| Subject: | cvs: presentations / perf-oscom4.xml wereldveroverend-oscom4.xml wereldveroverend-phpworks04.xml /slides/i18nl10n dominating-the-world.png i10n-example.php iconv-function.xml iconv-html.xml iconv-solved.xml linguist.png locale-casing.xml locale-collation.xml locale-date.xml locale-money.xml locale-numeric.xml locale-php.xml locales.xml mb-problems.xml pcre-utf8.xml resources-oscom4.xml title-oscom4.xml title-phpworks04.xml trans-array1.xml trans-array2.xml trans-define1.xml trans-define2.xml trans-gettext1.xml trans-gettext2.xml trans-intro.xml trans-linguist.xml trans-qt1.xml trans-qt2.xml utf8-encoding.xml wrong-http-header.xml /slides/perf accelerators.xml caches.png caching_eval.xml compress.xml cpuusage.xml dso.png extern_squid.xml ezp.css groups.xml how_caching_works.png how_caching_works.xml how_ccache.png how_ccache.xml htmloptimize.xml lifecycle.png lifecycle.xml livedocs.xml modgzip.xml optimize.xml pear_cache.xml phpzlib.xml prf_fileio.xml reduce.xml regex.xml resources-oscom4.xml squeeze.xml static-und-squid.xml total_page_caching.png total_page_caching.xml what_caching.xml xdebug-trace-xgui.xml /slides/xdebug ccoverage1.xml ccoverage2.xml ccoverage3.xml dbgp-breakpoint-types.xml dbgp-breakpoints.xml dbgp-common.xml dbgp-features.xml vim.xml |
||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1060@lists.php.net to get a copy of this message | ||
derick Mon Sep 13 09:41:19 2004 EDT
Added files:
/presentations perf-oscom4.xml wereldveroverend-phpworks04.xml
/presentations/slides/i18nl10n dominating-the-world.png
i10n-example.php iconv-html.xml
linguist.png locale-casing.xml
locale-collation.xml locale-date.xml
locale-money.xml locale-numeric.xml
locale-php.xml locales.xml
resources-oscom4.xml
title-oscom4.xml
title-phpworks04.xml
trans-array1.xml trans-array2.xml
trans-define1.xml trans-define2.xml
trans-gettext1.xml
trans-gettext2.xml trans-intro.xml
trans-linguist.xml trans-qt1.xml
trans-qt2.xml
/presentations/slides/perf accelerators.xml caching_eval.xml
compress.xml cpuusage.xml
extern_squid.xml groups.xml
how_caching_works.png
how_caching_works.xml how_ccache.png
how_ccache.xml htmloptimize.xml
lifecycle.png lifecycle.xml livedocs.xml
modgzip.xml optimize.xml pear_cache.xml
phpzlib.xml prf_fileio.xml reduce.xml
regex.xml resources-oscom4.xml
total_page_caching.png
total_page_caching.xml what_caching.xml
Modified files:
/presentations wereldveroverend-oscom4.xml
/presentations/slides/i18nl10n iconv-function.xml iconv-solved.xml
mb-problems.xml pcre-utf8.xml
utf8-encoding.xml
wrong-http-header.xml
/presentations/slides/perf caches.png dso.png ezp.css squeeze.xml
static-und-squid.xml
xdebug-trace-xgui.xml
/presentations/slides/xdebug ccoverage1.xml ccoverage2.xml
ccoverage3.xml
dbgp-breakpoint-types.xml
dbgp-breakpoints.xml dbgp-common.xml
dbgp-features.xml vim.xml
Log:
- Commited presentations for:
OSCOM 4: Localization
OSCOM 4: Performance
php|works 4: Localization
http://cvs.php.net/diff.php/presentations/wereldveroverend-oscom4.xml?r1=1.1&r2=1.2&ty=u Index: presentations/wereldveroverend-oscom4.xml diff -u presentations/wereldveroverend-oscom4.xml:1.1 presentations/wereldveroverend-oscom4.xml:1.2 --- presentations/wereldveroverend-oscom4.xml:1.1 Tue Sep 7 02:58:40 2004 +++ presentations/wereldveroverend-oscom4.xml Mon Sep 13 09:41:18 2004 @@ -9,57 +9,58 @@ stylesheet="presentations/slides/perf/ezp.css" backgroundfixed="1" > <topic>Localization and Internationalization</topic> -<title>Multi-lingual development</title> -<event>php|works</event> -<location>Toronto, Canada</location> -<date>September 22th, 2004</date> +<title>World Domination</title> +<event>OSCOM4</event> +<location>Zürich, Switserland</location> +<date>September 30th, 2004</date> <speaker>Derick Rethans</speaker> <email>derick@php.net</email> -<url>http://pres.derickrethans.nl/wereldveroverend-phpworks04</url> -<slide>slides/i18nl10n/title.xml</slide> - +<url>http://pres.derickrethans.nl/wereldveroverend-oscom4</url> +<slide>slides/i18nl10n/title-oscom4.xml</slide> <!-- CHARSETS --> -<!--<slide>slides/i18nl10n/what-languages.xml</slide>--> <!-- what is the problem actually? --> -<slide>slides/i18nl10n/not-ascii.xml</slide> <!-- not everything is ascii --> <slide>slides/i18nl10n/latin.xml</slide> <!-- latin charsets --> <slide>slides/i18nl10n/convert.xml</slide> <!-- converting charsets (single byte) --> <slide>slides/i18nl10n/asian.xml</slide> <!-- asian charsets --> <slide>slides/i18nl10n/unicode.xml</slide> <!-- unicode and ucs2, ucs4 --> <slide>slides/i18nl10n/utf8.xml</slide> <!-- what does utf8 solve? --> -<slide>slides/i18nl10n/utf8-encoding.xml</slide> <!-- how does the encoding work? --> <!-- PROBLEMS and SOLUTIONS --> <slide>slides/i18nl10n/mb-problems.xml</slide> <!-- functions with utf8 chars --> <slide>slides/i18nl10n/iconv-solved.xml</slide> <!-- fixed with iconv --> -<slide>slides/i18nl10n/iconv-strpos.xml</slide> <!-- iconv* and other functions --> <slide>slides/i18nl10n/pcre-utf8.xml</slide> <!-- regular expressions, /u, mb_regexp */ --> <!-- CONVERSION and OUTPUT --> -<slide>slides/i18nl10n/iconv.xml</slide> <!-- iconv --> <slide>slides/i18nl10n/iconv-function.xml</slide> <!-- converting charsets with iconv --> <slide>slides/i18nl10n/iconv-ob-buffer.xml</slide> <!-- iconv ob_buffer --> -<slide>slides/i18nl10n/iconv-ob-buffer-multiple.xml</slide> <!-- multiple charsets and iconv conversion --> <slide>slides/i18nl10n/wrong-http-header.xml</slide> <!-- show problem with wrong http header --> <slide>slides/i18nl10n/correct-http-header.xml</slide> <!-- setting http header --> -<slide>slides/i18nl10n/</slide> <!-- transliteration to html --> -<slide>slides/i18nl10n/</slide> <!-- eZ transliteration ? --> +<!--<slide>slides/i18nl10n/</slide>--> <!-- eZ transliteration ? --> <!-- LOCALE ISSUES --> -<slide>slides/i18nl10n/</slide> <!-- string collation (ordering) --> -<slide>slides/i18nl10n/</slide> <!-- strupper/strlower --> -<slide>slides/i18nl10n/</slide> <!-- formatting a date --> -<slide>slides/i18nl10n/</slide> <!-- formatting numbers (also arabic numbers?) --> -<slide>slides/i18nl10n/</slide> <!-- formatting money --> +<slide>slides/i18nl10n/locales.xml</slide> +<slide>slides/i18nl10n/locale-collation.xml</slide> <!-- string collation (ordering) --> +<slide>slides/i18nl10n/locale-casing.xml</slide> <!-- strupper/strlower --> +<slide>slides/i18nl10n/locale-date.xml</slide> <!-- formatting a date --> +<slide>slides/i18nl10n/locale-numeric.xml</slide> <!-- formatting numbers (also arabic numbers?) --> +<slide>slides/i18nl10n/locale-money.xml</slide> <!-- formatting money --> +<slide>slides/i18nl10n/locale-php.xml</slide> <!-- PHP and locales --> <!-- TRANSLATIONS IN WEBSITES --> -<slide>slides/i18nl10n/</slide> <!-- with define --> -<slide>slides/i18nl10n/</slide> <!-- with gettext --> -<slide>slides/i18nl10n/</slide> <!-- xml based definition --> -<slide>slides/i18nl10n/</slide> <!-- lupdate --> -<slide>slides/i18nl10n/</slide> <!-- Qt Linguist --> -<slide>slides/i18nl10n/</slide> <!-- using the XML translations --> +<slide>slides/i18nl10n/trans-intro.xml</slide> <!-- intro --> +<slide>slides/i18nl10n/trans-define1.xml</slide> <!-- with define --> +<slide>slides/i18nl10n/trans-define2.xml</slide> <!-- with define --> +<slide>slides/i18nl10n/trans-array2.xml</slide> <!-- with array --> +<slide>slides/i18nl10n/trans-gettext1.xml</slide> <!-- with gettext --> +<slide>slides/i18nl10n/trans-gettext2.xml</slide> <!-- with gettext --> +<slide>slides/i18nl10n/trans-qt1.xml</slide> <!-- xml based definition --> +<slide>slides/i18nl10n/trans-linguist.xml</slide> <!-- Qt Linguist --> +<slide>slides/i18nl10n/trans-qt2.xml</slide> <!-- xml based definition --> <!-- EXIT --> -<slide>slides/i18nl10n/resources.xml</slide> <!-- resources --> +<slide>slides/i18nl10n/resources-oscom4.xml</slide> <!-- resources --> + +<!-- BONUS --> +<slide>slides/i18nl10n/utf8-encoding.xml</slide> <!-- how does the encoding work? --> +<slide>slides/i18nl10n/iconv-ob-buffer-multiple.xml</slide> <!-- multiple charsets and iconv conversion --> </presentation> http://cvs.php.net/diff.php/presentations/slides/i18nl10n/iconv-function.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/i18nl10n/iconv-function.xml diff -u presentations/slides/i18nl10n/iconv-function.xml:1.1 presentations/slides/i18nl10n/iconv-function.xml:1.2 --- presentations/slides/i18nl10n/iconv-function.xml:1.1 Tue Sep 7 02:58:40 2004 +++ presentations/slides/i18nl10n/iconv-function.xml Mon Sep 13 09:41:18 2004 @@ -15,11 +15,15 @@ $str = "© 2004, by Derick Rethans"; echo iconv('iso-8859-1', 'iso-8859-2', $str); ?>]]></example> + +<div effect="hide"> <blurb>output:</blurb> <example class="bit_larger_output">Notice: iconv() [function.iconv]: Detected an illegal character in input string in /home/httpd/pres2/display.php(461) : eval()'d code on line 3</example> <break lines="2"/> +</div> +<div effect="hide"> <blurb>iconv():</blurb> <example class="bit_larger"><![CDATA[<?php $str = "© 2004, by Derick Rethans"; @@ -28,6 +32,7 @@ <blurb>output:</blurb> <example class="bit_larger_output">Notice: iconv() [function.iconv]: Detected an illegal character in input string in /home/httpd/pres2/display.php(461) : eval()'d code on line 3 2004, by Derick Rethans</example> +</div> </slide> <!-- http://cvs.php.net/diff.php/presentations/slides/i18nl10n/iconv-solved.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/i18nl10n/iconv-solved.xml diff -u presentations/slides/i18nl10n/iconv-solved.xml:1.1 presentations/slides/i18nl10n/iconv-solved.xml:1.2 --- presentations/slides/i18nl10n/iconv-solved.xml:1.1 Tue Sep 7 02:58:40 2004 +++ presentations/slides/i18nl10n/iconv-solved.xml Mon Sep 13 09:41:18 2004 @@ -10,12 +10,14 @@ <break lines="4"/> +<div effect="hide"> <blurb>iconv_substr():</blurb> <example class="bit_larger" result="1"><![CDATA[<?php iconv_set_encoding('internal_encoding', 'utf8'); $str = "Vær sÃ¥ god!"; echo "The first 7 characters are: ", iconv_substr($str, 0, 7); ?>]]></example> +</div> </slide> <!-- http://cvs.php.net/diff.php/presentations/slides/i18nl10n/mb-problems.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/i18nl10n/mb-problems.xml diff -u presentations/slides/i18nl10n/mb-problems.xml:1.1 presentations/slides/i18nl10n/mb-problems.xml:1.2 --- presentations/slides/i18nl10n/mb-problems.xml:1.1 Tue Sep 7 02:58:40 2004 +++ presentations/slides/i18nl10n/mb-problems.xml Mon Sep 13 09:41:18 2004 @@ -10,6 +10,7 @@ <break lines="2"/> +<div effect="hide"> <blurb>substr() may mangle text:</blurb> <example class="bit_larger" result="1"><![CDATA[<?php $str = "Vær sÃ¥ god!"; @@ -17,12 +18,15 @@ ?>]]></example> <break lines="2"/> +</div> +<div effect="hide"> <blurb>wordwrap() wraps too early:</blurb> <example class="bit_larger" result="1"><![CDATA[<?php $str = "Vær sÃ¥ god!"; echo wordwrap($str, 6, '|'); ?>]]></example> +</div> </slide> <!-- http://cvs.php.net/diff.php/presentations/slides/i18nl10n/pcre-utf8.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/i18nl10n/pcre-utf8.xml diff -u presentations/slides/i18nl10n/pcre-utf8.xml:1.1 presentations/slides/i18nl10n/pcre-utf8.xml:1.2 --- presentations/slides/i18nl10n/pcre-utf8.xml:1.1 Tue Sep 7 02:58:40 2004 +++ presentations/slides/i18nl10n/pcre-utf8.xml Mon Sep 13 09:41:18 2004 @@ -14,6 +14,7 @@ <break lines="4"/> +<div effect="hide"> <blurb>preg_match() in UTF8 mode:</blurb> <example class="bit_larger" result="1"><![CDATA[<?php $str = "1978,Dérick,Rethans"; @@ -23,6 +24,7 @@ echo 'There was no match!', "<br/>\n"; } ?>]]></example> +</div> </slide> <!-- http://cvs.php.net/diff.php/presentations/slides/i18nl10n/utf8-encoding.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/i18nl10n/utf8-encoding.xml diff -u presentations/slides/i18nl10n/utf8-encoding.xml:1.1 presentations/slides/i18nl10n/utf8-encoding.xml:1.2 --- presentations/slides/i18nl10n/utf8-encoding.xml:1.1 Tue Sep 7 02:58:40 2004 +++ presentations/slides/i18nl10n/utf8-encoding.xml Mon Sep 13 09:41:18 2004 @@ -21,10 +21,10 @@ byte 2: 10xx xxxx byte 3: 10xx xxxx -å (0x529f) 110x xxxx 10xx xxxx 10xx xxxx +å (0x529f) 1110 xxxx 10xx xxxx 10xx xxxx 0101 0010 1001 1111 -> ---+ 0101 --00 1010 --01 1111 =============================== - 1100 0101 1000 1010 1001 1111 + 1110 0101 1000 1010 1001 1111 0xe5 0x8a 0x9f]]></example> </slide> <!-- http://cvs.php.net/diff.php/presentations/slides/i18nl10n/wrong-http-header.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/i18nl10n/wrong-http-header.xml diff -u presentations/slides/i18nl10n/wrong-http-header.xml:1.1 presentations/slides/i18nl10n/wrong-http-header.xml:1.2 --- presentations/slides/i18nl10n/wrong-http-header.xml:1.1 Tue Sep 7 02:58:40 2004 +++ presentations/slides/i18nl10n/wrong-http-header.xml Mon Sep 13 09:41:18 2004 @@ -4,7 +4,7 @@ <list> <bullet>Most sites don't set any Content-Type header</bullet> - <bullet>Browsers and/or digital environments will move more and more to UTF8 as default encoding</bullet> + <bullet>Browsers and/or digital environments will move more and more to UTF-8 as default encoding</bullet> </list> <blurb>Result:</blurb> <image class="spaced" filename="wrong-http-header.png"/> http://cvs.php.net/diff.php/presentations/slides/perf/caches.png?r1=1.1&r2=1.2&ty=u Index: presentations/slides/perf/caches.png http://cvs.php.net/diff.php/presentations/slides/perf/dso.png?r1=1.1&r2=1.2&ty=u Index: presentations/slides/perf/dso.png http://cvs.php.net/diff.php/presentations/slides/perf/ezp.css?r1=1.7&r2=1.8&ty=u Index: presentations/slides/perf/ezp.css diff -u presentations/slides/perf/ezp.css:1.7 presentations/slides/perf/ezp.css:1.8 --- presentations/slides/perf/ezp.css:1.7 Tue Sep 7 02:58:40 2004 +++ presentations/slides/perf/ezp.css Mon Sep 13 09:41:18 2004 @@ -48,12 +48,14 @@ div.mainarea { position: fixed; top: 150px; +width: 725px; } ul.pres { list-style: circle; font-size: 24pt; } + ul.level2 { list-style: circle; font-size: 20pt; @@ -65,13 +67,18 @@ font-size: 28pt; margin-right: 40px; } + +ul.large div li.pres_bullet +{ + font-size: 40pt; +} div.small_blurb { - font-size: 24px; + font-size: 24pt; } div.blurb, div.bit_larger_output_text { - font-size: 32px; + font-size: 28pt; width: 100%; } @@ -84,7 +91,12 @@ } div.large_blurb { - font-size: 32px; + font-size: 32pt; +} + +div.large_blurb_center { + font-size: 48px; + text-align: center; } div.xx_large_blurb_center { @@ -94,7 +106,6 @@ div.q_mark { text-align: center; - margin-left: 250px; font-size: 480px; } @@ -102,33 +113,24 @@ font-size: 18px; width: 640px; } -div.bit_larger, div.bit_larger code, div.bit_larger_output { +div.example code, div.bit_larger, div.bit_larger code, div.bit_larger_output { background: #ccc; font-size: 20px; width: 100%; } -div.bit_larger, div.bit_larger_output { +div.example, div.bit_larger, div.bit_larger_output { margin-left: 20px; margin-right: 20px; - width: 100%; } -div.code_small { +div.code_small, div.code_medium, div.code_large, div.example { background: #ccc; } div.code_small code { font-size: 12px; } - -div.code_medium { - background: #ccc; -} div.code_medium code, div.code_medium pre { font-size: 20px; -} - -div.code_large { - background: #ccc; } div.code_large code, div.code_large pre { font-size: 24px; http://cvs.php.net/diff.php/presentations/slides/perf/squeeze.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/perf/squeeze.xml diff -u presentations/slides/perf/squeeze.xml:1.1 presentations/slides/perf/squeeze.xml:1.2 --- presentations/slides/perf/squeeze.xml:1.1 Thu Jun 17 03:58:37 2004 +++ presentations/slides/perf/squeeze.xml Mon Sep 13 09:41:18 2004 @@ -2,10 +2,11 @@ <slide fontsize="6em"> <title>Say Squeeze</title> - <list> + <list class="large"> <li>Optimized %./configure%</li> <li>Memory Limit</li> <li>Shorter Path</li> + <li>Use ~include()~ in a smarter way</li> <li>Ramdisk</li> </list> http://cvs.php.net/diff.php/presentations/slides/perf/static-und-squid.xml?r1=1.2&r2=1.3&ty=u Index: presentations/slides/perf/static-und-squid.xml diff -u presentations/slides/perf/static-und-squid.xml:1.2 presentations/slides/perf/static-und-squid.xml:1.3 --- presentations/slides/perf/static-und-squid.xml:1.2 Thu Jun 17 08:12:03 2004 +++ presentations/slides/perf/static-und-squid.xml Mon Sep 13 09:41:18 2004 @@ -3,12 +3,12 @@ <title>Static Squids</title> <image filename="static.jpg" align="right" marginright="2em" /> - <list> - <li>Reverse Proxy</li> - <li>Tied into Apache</li> - <li>Static Generated</li> - <li>Huge Performance Boost</li> - <li>No 'Dynamic' Content</li> + <list class="large"> + <bullet>Reverse Proxy</bullet> + <bullet>Tied into Apache</bullet> + <bullet>Static Generated</bullet> + <bullet>Huge Performance Boost</bullet> + <bullet>No 'Dynamic' Content</bullet> </list> </slide> http://cvs.php.net/diff.php/presentations/slides/perf/xdebug-trace-xgui.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/perf/xdebug-trace-xgui.xml diff -u presentations/slides/perf/xdebug-trace-xgui.xml:1.1 presentations/slides/perf/xdebug-trace-xgui.xml:1.2 --- presentations/slides/perf/xdebug-trace-xgui.xml:1.1 Tue Jun 29 07:32:14 2004 +++ presentations/slides/perf/xdebug-trace-xgui.xml Mon Sep 13 09:41:19 2004 @@ -6,6 +6,6 @@ <li>Simple Tracefile Browser</li> </list> - <image align='center' marginright="3em" filename='xgui.png'/> + <image align='right' marginright="3em" filename='xgui.png'/> </slide> http://cvs.php.net/diff.php/presentations/slides/xdebug/ccoverage1.xml?r1=1.2&r2=1.3&ty=u Index: presentations/slides/xdebug/ccoverage1.xml diff -u presentations/slides/xdebug/ccoverage1.xml:1.2 presentations/slides/xdebug/ccoverage1.xml:1.3 --- presentations/slides/xdebug/ccoverage1.xml:1.2 Thu Sep 2 02:56:03 2004 +++ presentations/slides/xdebug/ccoverage1.xml Mon Sep 13 09:41:19 2004 @@ -4,7 +4,7 @@ <subtitle>Function To Test and Test Driver</subtitle> <blurb>Function to test (bigassfunction.php):</blurb> - <example><![CDATA[<?php + <example class="bit_larger"><![CDATA[<?php function test_parse_time($f) { if (preg_match("/[0-9]{12}/", $f)) { @@ -25,12 +25,11 @@ ?>]]></example> <break /> <blurb>Test driver (basic.t):</blurb> - <example><![CDATA[<?php + <example class="bit_larger"><![CDATA[<?php $text = realpath("tests/bigassfunction.php"); include $text; $formats = array('2004-08-17 21:20', '20040817 2120'); - foreach ($formats as $format) { test_parse_time($format); } http://cvs.php.net/diff.php/presentations/slides/xdebug/ccoverage2.xml?r1=1.2&r2=1.3&ty=u Index: presentations/slides/xdebug/ccoverage2.xml diff -u presentations/slides/xdebug/ccoverage2.xml:1.2 presentations/slides/xdebug/ccoverage2.xml:1.3 --- presentations/slides/xdebug/ccoverage2.xml:1.2 Thu Sep 2 02:56:03 2004 +++ presentations/slides/xdebug/ccoverage2.xml Mon Sep 13 09:41:19 2004 @@ -3,7 +3,7 @@ <title>Code Coverage</title> <subtitle>The Testing Application</subtitle> - <example><![CDATA[<?php + <example class="bit_larger"><![CDATA[<?php echo "Output:\n\n"; xdebug_start_code_coverage(); include 'tests/basic.t'; http://cvs.php.net/diff.php/presentations/slides/xdebug/ccoverage3.xml?r1=1.2&r2=1.3&ty=u Index: presentations/slides/xdebug/ccoverage3.xml diff -u presentations/slides/xdebug/ccoverage3.xml:1.2 presentations/slides/xdebug/ccoverage3.xml:1.3 --- presentations/slides/xdebug/ccoverage3.xml:1.2 Thu Sep 2 02:56:03 2004 +++ presentations/slides/xdebug/ccoverage3.xml Mon Sep 13 09:41:19 2004 @@ -5,9 +5,9 @@ <image align="right" filename="ccoverage-end.png"/> <blurb> - xdebug_start_code_coverage() -- starts collecting data - xdebug_stop_code_coverage() -- stops collecting data - xdebug_get_code_coverage() -- returns coverage data + xdebug_start_code_coverage() + xdebug_stop_code_coverage() + xdebug_get_code_coverage() </blurb> </slide> http://cvs.php.net/diff.php/presentations/slides/xdebug/dbgp-breakpoint-types.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/xdebug/dbgp-breakpoint-types.xml diff -u presentations/slides/xdebug/dbgp-breakpoint-types.xml:1.1 presentations/slides/xdebug/dbgp-breakpoint-types.xml:1.2 --- presentations/slides/xdebug/dbgp-breakpoint-types.xml:1.1 Thu Sep 2 02:56:03 2004 +++ presentations/slides/xdebug/dbgp-breakpoint-types.xml Mon Sep 13 09:41:19 2004 @@ -5,7 +5,7 @@ <blurb>Option explanation:</blurb> <break/> - <example><![CDATA[-a class name + <example class="bit_larger"><![CDATA[-a class name -f file name -m function name -n line number @@ -15,16 +15,16 @@ <break/> <blurb>Different breakpoint types:</blurb> - <blurb>- ~line~: on a file/line combination (req: *-f* and *-n*)</blurb> - <blurb>- ~call~: on function entrance (req: *-m*; opt: *-a*)</blurb> - <blurb>- ~return~: on function exit (req: *-m*; opt: *-a*)</blurb> - <blurb>- ~exception~: on exception of given name (req: *-x*)</blurb> - <blurb>- ~conditional~: when condition is met (req: *--* and *-f*; opt: *-n*)</blurb> + <blurb class="small_blurb">- ~line~: on a file/line combination (req: *-f* and *-n*)</blurb> + <blurb class="small_blurb">- ~call~: on function entrance (req: *-m*; opt: *-a*)</blurb> + <blurb class="small_blurb">- ~return~: on function exit (req: *-m*; opt: *-a*)</blurb> + <blurb class="small_blurb">- ~exception~: on exception of given name (req: *-x*)</blurb> + <blurb class="small_blurb">- ~conditional~: when condition is met (req: *--* and *-f*; opt: *-n*)</blurb> <break lines="2"/> <blurb>Extra options:</blurb> <break/> - <example><![CDATA[-o hit condition (>=, == or %) + <example class="bit_larger"><![CDATA[-o hit condition (>=, == or %) -g hit value]]></example> </slide> http://cvs.php.net/diff.php/presentations/slides/xdebug/dbgp-breakpoints.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/xdebug/dbgp-breakpoints.xml diff -u presentations/slides/xdebug/dbgp-breakpoints.xml:1.1 presentations/slides/xdebug/dbgp-breakpoints.xml:1.2 --- presentations/slides/xdebug/dbgp-breakpoints.xml:1.1 Thu Sep 2 02:56:03 2004 +++ presentations/slides/xdebug/dbgp-breakpoints.xml Mon Sep 13 09:41:19 2004 @@ -4,10 +4,10 @@ <subtitle>Section 7.6</subtitle> <blurb>Setting a breakpoint:</blurb> - <blurb>~%breakpoint_set *-t* [type] *-f* [filename] *-n* [lineno]%~</blurb> - <blurb>~% *-a* [classname] *-m* [functionname]%~</blurb> - <blurb>%breakpoint_set -i 4 -t line -f dbgp-example.php -n 3%</blurb> - <blurb>%breakpoint_set -i 5 -t call -m level1%</blurb> + <blurb class="small_blurb">~%breakpoint_set *-t* [type] *-f* [filename] *-n* [lineno]%~</blurb> + <blurb class="small_blurb">~% *-a* [classname] *-m* [functionname]%~</blurb> + <blurb class="small_blurb">%breakpoint_set -i 4 -t line -f dbgp-example.php -n 3%</blurb> + <blurb class="small_blurb">%breakpoint_set -i 5 -t call -m level1%</blurb> <break/> <blurb>response:</blurb> <example type="xml" class="code_large"><![CDATA[<response command="breakpoint_set" transaction_id="4" @@ -16,9 +16,9 @@ <break/> <blurb>Retrieving and deleting breakpoints:</blurb> - <blurb>%breakpoint_list -i 6%</blurb> - <blurb>%breakpoint_get -i 7 -d 3140002%</blurb> - <blurb>%breakpoint_remove -i 7 -d 3140001%</blurb> + <blurb class="small_blurb">%breakpoint_list -i 6%</blurb> + <blurb class="small_blurb">%breakpoint_get -i 7 -d 3140002%</blurb> + <blurb class="small_blurb">%breakpoint_remove -i 7 -d 3140001%</blurb> <break/> <blurb>response:</blurb> <example type="xml" class="code_large"><![CDATA[<response command="breakpoint_get" transaction_id="7"> http://cvs.php.net/diff.php/presentations/slides/xdebug/dbgp-common.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/xdebug/dbgp-common.xml diff -u presentations/slides/xdebug/dbgp-common.xml:1.1 presentations/slides/xdebug/dbgp-common.xml:1.2 --- presentations/slides/xdebug/dbgp-common.xml:1.1 Thu Sep 2 02:56:03 2004 +++ presentations/slides/xdebug/dbgp-common.xml Mon Sep 13 09:41:19 2004 @@ -13,12 +13,12 @@ <blurb>Command layout:</blurb> <blurb>%|229922|[cmd]| *-i* [tid] ..other options..% *--* data</blurb> - <break lines="2"/> + <break lines="1"/> <blurb>- Options always have the form: %*-[char]* value%</blurb> <blurb>- The %*-i*% transaction ID option is mandatory</blurb> <blurb>- Data, if available, must be base64 encoded</blurb> - <break lines="2"/> + <break lines="1"/> <blurb>Status reply:</blurb> <example type="xml" class="code_large"><![CDATA[<response command="status" transaction_id="1" status="starting" reason="ok"/>]]></example> http://cvs.php.net/diff.php/presentations/slides/xdebug/dbgp-features.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/xdebug/dbgp-features.xml diff -u presentations/slides/xdebug/dbgp-features.xml:1.1 presentations/slides/xdebug/dbgp-features.xml:1.2 --- presentations/slides/xdebug/dbgp-features.xml:1.1 Thu Sep 2 02:56:03 2004 +++ presentations/slides/xdebug/dbgp-features.xml Mon Sep 13 09:41:19 2004 @@ -9,8 +9,7 @@ <blurb>response:</blurb> <example type="xml" class="code_large"><![CDATA[<response command="feature_get" transaction_id="1" feature_name="encoding" supported="1"> - <![CDATA[UTF-8]]> -</response>]]></example> + <![CDATA[UTF-8]]></response>]]></example> <break/> @@ -25,6 +24,6 @@ <blurb>Features include:</blurb> <blurb>%language_name% [RO], %supports_async% [RO], - %max_children% [RW], %max_data% [RW], %max_depth% [RO], %show_hidden% [RW] and + %max_children%, %max_data%, %max_depth% [RO], %show_hidden% and %supports_postmortem% [RO].</blurb> </slide> http://cvs.php.net/diff.php/presentations/slides/xdebug/vim.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/xdebug/vim.xml diff -u presentations/slides/xdebug/vim.xml:1.1 presentations/slides/xdebug/vim.xml:1.2 --- presentations/slides/xdebug/vim.xml:1.1 Fri Mar 12 18:19:02 2004 +++ presentations/slides/xdebug/vim.xml Mon Sep 13 09:41:19 2004 @@ -3,13 +3,13 @@ <title>Vim Syntax</title> <blurb>~/.vim/filetype.vim</blurb> - <example fontsize="1.7em">augroup filetypedetect + <example class="bit_larger" fontsize="1.7em">augroup filetypedetect au BufNewFile,BufRead *.xt setf xt augroup END</example> <break lines="2"/> <blurb>~/.vim/syntax/xt.vim (http://xdebug.org/files/xt.vim)</blurb> - <example fontsize="1em">if version < 600 + <example class="bit_larger" fontsize="1em">if version < 600 syntax clear elseif exists("b:current_syntax") finish http://cvs.php.net/co.php/presentations/perf-oscom4.xml?r=1.1&p=1 Index: presentations/perf-oscom4.xml +++ presentations/perf-oscom4.xml <?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="0" > <topic>Performance</topic> <title>Speeding up PHP applications</title> <event>OSCOM 4</event> <location>Zürich, Switserland</location> <date>October 1st, 2004</date> <speaker>Derick Rethans</speaker> <email>derick@php.net</email> <url></url> <slide>slides/perf/title.xml</slide> <slide>slides/xdebug/questions.xml</slide> <slide>slides/perf/groups.xml</slide> <!-- SERVER OPTIMIZATION --> <slide>slides/perf/lifecycle.xml</slide> <slide>slides/perf/how_ccache.xml</slide> <slide>slides/perf/accelerators.xml</slide> <!-- Accelerators --> <slide>slides/perf/dso-nodso.xml</slide> <slide>slides/perf/squeeze.xml</slide> <!-- CACHING OPTIMIZATION --> <slide>slides/perf/what_caching.xml</slide> <slide>slides/perf/how_caching_works.xml</slide> <slide>slides/perf/pear_cache.xml</slide> <slide>slides/perf/caching_eval.xml</slide> <slide>slides/perf/total_page_caching.xml</slide> <slide>slides/perf/livedocs.xml</slide> <slide>slides/perf/static-und-squid.xml</slide> <slide>slides/perf/extern_squid.xml</slide> <!-- SQL OPTIMIZATION --> <!-- <slide>slides/hpp/mysql_opt.xml</slide> <slide>slides/hpp/mysql_opt2.xml</slide> <slide>slides/phpperform/visitation1.xml</slide> <slide>slides/phpperform/visitation2.xml</slide> <slide>slides/phpperform/visitation3.xml</slide> --> <!-- OPTIMIZING APPLICATIONS --> <slide>slides/perf/cpuusage.xml</slide> <slide>slides/perf/xdebug.xml</slide> <slide>slides/perf/xdebug-trace.xml</slide> <slide>slides/perf/xdebug-trace-xgui.xml</slide> <slide>slides/perf/xdebug-profile.xml</slide> <slide>slides/perf/prf_fileio.xml</slide> <slide>slides/perf/regex.xml</slide> <!-- BANDWIDTH OPTIMIZATION --> <slide>slides/perf/reduce.xml</slide> <slide>slides/perf/optimize.xml</slide> <slide>slides/perf/htmloptimize.xml</slide> <slide>slides/perf/compress.xml</slide> <slide>slides/perf/modgzip.xml</slide> <slide>slides/perf/phpzlib.xml</slide> <slide>slides/perf/resources-oscom4.xml</slide> </presentation> http://cvs.php.net/co.php/presentations/wereldveroverend-phpworks04.xml?r=1.1&p=1 Index: presentations/wereldveroverend-phpworks04.xml +++ presentations/wereldveroverend-phpworks04.xml <?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>Multi-lingual development</title> <event>php|works</event> <location>Toronto, Canada</location> <date>September 22th, 2004</date> <speaker>Derick Rethans</speaker> <email>derick@php.net</email> <url>http://pres.derickrethans.nl/wereldveroverend-phpworks04</url> <slide>slides/i18nl10n/title-phpworks04.xml</slide> <!-- CHARSETS --> <!--<slide>slides/i18nl10n/what-languages.xml</slide>--> <!-- what is the problem actually? --> <slide>slides/i18nl10n/not-ascii.xml</slide> <!-- not everything is ascii --> <slide>slides/i18nl10n/latin.xml</slide> <!-- latin charsets --> <slide>slides/i18nl10n/convert.xml</slide> <!-- converting charsets (single byte) --> <slide>slides/i18nl10n/asian.xml</slide> <!-- asian charsets --> <slide>slides/i18nl10n/unicode.xml</slide> <!-- unicode and ucs2, ucs4 --> <slide>slides/i18nl10n/utf8.xml</slide> <!-- what does utf8 solve? --> <slide>slides/i18nl10n/utf8-encoding.xml</slide> <!-- how does the encoding work? --> <!-- PROBLEMS and SOLUTIONS --> <slide>slides/i18nl10n/mb-problems.xml</slide> <!-- functions with utf8 chars --> <slide>slides/i18nl10n/iconv-solved.xml</slide> <!-- fixed with iconv --> <slide>slides/i18nl10n/iconv-strpos.xml</slide> <!-- iconv* and other functions --> <slide>slides/i18nl10n/pcre-utf8.xml</slide> <!-- regular expressions, /u, mb_regexp */ --> <!-- CONVERSION and OUTPUT --> <slide>slides/i18nl10n/iconv.xml</slide> <!-- iconv --> <slide>slides/i18nl10n/iconv-function.xml</slide> <!-- converting charsets with iconv --> <slide>slides/i18nl10n/iconv-ob-buffer.xml</slide> <!-- iconv ob_buffer --> <slide>slides/i18nl10n/iconv-ob-buffer-multiple.xml</slide> <!-- multiple charsets and iconv conversion --> <slide>slides/i18nl10n/wrong-http-header.xml</slide> <!-- show problem with wrong http header --> <slide>slides/i18nl10n/correct-http-header.xml</slide> <!-- setting http header --> <slide>slides/i18nl10n/iconv-html.xml</slide> <!-- transliteration to html --> <!--<slide>slides/i18nl10n/</slide>--> <!-- eZ transliteration ? --> <!-- LOCALE ISSUES --> <slide>slides/i18nl10n/locales.xml</slide> <slide>slides/i18nl10n/locale-collation.xml</slide> <!-- string collation (ordering) --> <slide>slides/i18nl10n/locale-casing.xml</slide> <!-- strupper/strlower --> <slide>slides/i18nl10n/locale-date.xml</slide> <!-- formatting a date --> <slide>slides/i18nl10n/locale-numeric.xml</slide> <!-- formatting numbers (also arabic numbers?) --> <slide>slides/i18nl10n/locale-money.xml</slide> <!-- formatting money --> <slide>slides/i18nl10n/locale-php.xml</slide> <!-- PHP and locales --> <!-- TRANSLATIONS IN WEBSITES --> <slide>slides/i18nl10n/trans-intro.xml</slide> <!-- intro --> <slide>slides/i18nl10n/trans-define1.xml</slide> <!-- with define --> <slide>slides/i18nl10n/trans-define2.xml</slide> <!-- with define --> <slide>slides/i18nl10n/trans-array1.xml</slide> <!-- with array --> <slide>slides/i18nl10n/trans-array2.xml</slide> <!-- with array --> <slide>slides/i18nl10n/trans-gettext1.xml</slide> <!-- with gettext --> <slide>slides/i18nl10n/trans-gettext2.xml</slide> <!-- with gettext --> <slide>slides/i18nl10n/trans-qt1.xml</slide> <!-- xml based definition --> <slide>slides/i18nl10n/trans-linguist.xml</slide> <!-- Qt Linguist --> <slide>slides/i18nl10n/trans-qt2.xml</slide> <!-- xml based definition --> <!-- EXIT --> <slide>slides/i18nl10n/resources.xml</slide> <!-- resources --> </presentation> http://cvs.php.net/co.php/presentations/slides/i18nl10n/i10n-example.php?r=1.1&p=1 Index: presentations/slides/i18nl10n/i10n-example.php +++ presentations/slides/i18nl10n/i10n-example.php <?php echo tr("foo"); ?> http://cvs.php.net/co.php/presentations/slides/i18nl10n/iconv-html.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/iconv-html.xml +++ presentations/slides/i18nl10n/iconv-html.xml <?xml version="1.0" encoding="iso-8859-1"?> <slide fontsize="6em"> <title>Conversion to HTML</title> <subtitle>(slide encoding is iso-8859-1)</subtitle> <blurb>iso-8859-1 to HTML:</blurb> <example class="bit_larger" encoding="iso-8859-1" result="0"><![CDATA[<?php $str = "Nittenhundreogåttiåtte<br/>\n"; echo htmlentities($str, ENT_NOQUOTES, 'iso-8859-1'); ?>]]></example> <break lines="2"/> <blurb class="bit_larger_output_text">output:</blurb> <example class="bit_larger_output"><![CDATA[Nittenhundreogåttiåtte<br/>]]></example> <break lines="4"/> <blurb>UTF-8 to HTML:</blurb> <example class="bit_larger" result="0"><![CDATA[<?php $str = "NittenhundreogÃ¥ttiÃ¥tte<br/>\n"; echo htmlentities($str, ENT_NOQUOTES, 'utf-8'); ?>]]></example> <break lines="2"/> <blurb class="bit_larger_output_text">output:</blurb> <example class="bit_larger_output"><![CDATA[Nittenhundreogåttiåtte<br/>]]></example> </slide> <!-- vim: encoding=latin1 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/locale-casing.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/locale-casing.xml +++ presentations/slides/i18nl10n/locale-casing.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>LC_CTYPE</title> <subtitle>language oriented case changes</subtitle> <example class="bit_larger" encoding="iso-8859-1" result="1"><![CDATA[<?php $a = "øyeblikk"; setlocale(LC_CTYPE, 'C'); echo strtoupper($a), "<br/>\n"; setlocale(LC_CTYPE, 'no_NO'); echo strtoupper($a), "<br/>\n"; setlocale(LC_CTYPE, 'tr_TR'); echo strtoupper($a), "<br/>\n"; ?>]]></example> <break/> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/locale-collation.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/locale-collation.xml +++ presentations/slides/i18nl10n/locale-collation.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>LC_COLLATE</title> <subtitle>language oriented sorting</subtitle> <example class="bit_larger" result="1"><![CDATA[<?php $b = $a = array("øks", "ærlig", "Ã¥tte", "øyeblikk"); setlocale(LC_COLLATE, 'C'); sort($a); var_dump($a); setlocale(LC_COLLATE, 'no_NO.UTF8'); sort($b, SORT_LOCALE_STRING); var_dump($b); ?>]]></example> <break/> <blurb>Mathematical order: Ã¥ (229), æ (230), ø (248)</blurb> <blurb>Natural order: æ, ø, Ã¥</blurb> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/locale-date.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/locale-date.xml +++ presentations/slides/i18nl10n/locale-date.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>LC_TIME</title> <subtitle>language oriented date and time formatting</subtitle> <example class="bit_larger" result="1"><![CDATA[<pre><?php $locales = array( 'Arabic (Egypt)' => 'ar_EG.UTF-8', 'American' => 'en_US', 'Dutch ' => 'nl_NL', 'Hebrew ' => 'iw_IL', 'Hebrew (UTF-8)' => 'iw_IL.UTF-8', 'Japanese' => 'ja_JP.UTF-8', 'Norwegian' => 'no_NO.UTF-8', 'Turkish ' => 'tr_TR.UTF-8' ); foreach ($locales as $country => $locale) { setlocale(LC_TIME, $locale); echo '<b>', $country, "</b>\t", strftime('%c'), "\n"; } ?></pre>]]></example> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/locale-money.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/locale-money.xml +++ presentations/slides/i18nl10n/locale-money.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>LC_MONETARY</title> <subtitle>formatting amounts of money</subtitle> <example class="bit_larger" result="1"><![CDATA[<pre><?php $locales = array( 'Egypt ' => 'ar_EG.UTF-8', 'Finland ' => 'fi_FI.UTF-8', 'Germany ' => 'de_DE.UTF-8', 'Israel ' => 'iw_IL.UTF-8', 'Japan ' => 'ja_JP.UTF-8', 'Netherlands' => 'nl_NL.UTF-8', 'Norway ' => 'no_NO.UTF-8', ); foreach ($locales as $country => $locale) { setlocale(LC_MONETARY, $locale); $nr = 31415.92654; echo "<b>$country</b>\t", money_format("[%i]", $nr), " \t", money_format("[%n]", $nr), "\n"; } ?></pre>]]></example> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/locale-numeric.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/locale-numeric.xml +++ presentations/slides/i18nl10n/locale-numeric.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>LC_NUMERIC</title> <subtitle>formatting numbers</subtitle> <example class="bit_larger" result="1"><![CDATA[<pre><?php $locales = array( 'Arabic (Egypt)' => 'ar_EG.UTF-8', 'American' => 'en_US', 'Dutch ' => 'nl_NL', 'Hebrew ' => 'iw_IL', 'Hebrew (UTF-8)' => 'iw_IL.UTF-8', 'Japanese' => 'ja_JP.UTF-8', 'Norwegian' => 'no_NO.UTF-8', 'Turkish ' => 'tr_TR.UTF-8' ); foreach ($locales as $country => $locale) { setlocale(LC_NUMERIC, $locale); $ldata = localeconv(); echo "<b>$country</b>\t", number_format("31415.92654", 2, $ldata['decimal_point'], $ldata['thousands_sep']), "\n"; } ?></pre>]]></example> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/locale-php.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/locale-php.xml +++ presentations/slides/i18nl10n/locale-php.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Locales and PHP</title> <blurb>string *setlocale*(const ~category~, string ~locale~, ~...~)</blurb> <blurb>string *setlocale*(const ~category~, array ~locales~)</blurb> <break/> <blurb>Localenames:</blurb> <list> <bullet>Are OS dependent (deu_deu vs. de_DE)</bullet> <bullet>Are not always available</bullet> </list> <break/> <blurb>Example:</blurb> <example class="bit_larger" result="1"><![CDATA[<?php $locale = setlocale(LC_ALL, "nl_NL.UTF-8@euro", "nl_NL.UTF-8", "dutch", "nld_nld"); echo "New locale: ", $locale, "<br />\n"; $locale = setlocale(LC_ALL, array("nld_nld", "nederlands")); echo "New locale: ", $locale, "<br />\n"; ?>]]></example> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/locales.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/locales.xml +++ presentations/slides/i18nl10n/locales.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Locales</title> <subtitle>language and cultural rules</subtitle> <blurb> A locale is a set of language and cultural rules. These cover aspects such as language for messages, different character sets, lexigraphic conventions, etc. </blurb> <break/> <blurb>Locale types:</blurb> <list> <bullet>LC_COLLATE: string collation</bullet> <bullet>LC_CTYPE: character properties, case sensivity</bullet> <bullet>LC_MONETARY: monetary formatting</bullet> <bullet>LC_NUMBER: number formatting</bullet> <bullet>LC_TIME: date and time formatting</bullet> </list> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/resources-oscom4.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/resources-oscom4.xml +++ presentations/slides/i18nl10n/resources-oscom4.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide fontsize="3.5em"> <title>Resources</title> <image align="center" filename="dominating-the-world.png" /> <break lines="4"/> <link fontsize="2.4em" marginleft="0em" leader="This presentation: " href="http://pres.derickrethans.nl/wereldveroverend-oscom4" target="_new"/> <link fontsize="3em" marginleft="0em" leader="Questions?: " href="derick@php.net" target="_new"/> </slide> http://cvs.php.net/co.php/presentations/slides/i18nl10n/title-oscom4.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/title-oscom4.xml +++ presentations/slides/i18nl10n/title-oscom4.xml <slide fontsize="3.5em"> <title>Welcome!</title> <image align="center" filename="dominating-the-world.png" /> <break lines="3"/> <blurb class="event">Oà´COM 4</blurb> <break/> <blurb class="event-date">September 30th, 2004. Züich, Switserland</blurb> <break/> <blurb class="event-presenter">Derick Rethans &lt;<a href="mailto:derick@php.net">derick@php.net</a>&gt;</blurb> <break/> <blurb class="pres-url-small"><a href="http://pres.derickrethans.nl/wereldveroverend-oscom4">http://pres.derickrethans.nl/wereldveroverend-oscom4</a></blurb> </slide> http://cvs.php.net/co.php/presentations/slides/i18nl10n/title-phpworks04.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/title-phpworks04.xml +++ presentations/slides/i18nl10n/title-phpworks04.xml <slide fontsize="3.5em"> <title>Welcome!</title> <image align="center" filename="multi-langual-development-trans.png" /> <break lines="3"/> <blurb class="event">php|Ïorks</blurb> <break/> <blurb class="event-date">September 22th, 2004. Toronto, Canada</blurb> <break/> <blurb class="event-presenter">Derick Rethans &lt;<a href="mailto:derick@php.net">derick@php.net</a>&gt;</blurb> <break/> <blurb class="pres-url-small"><a href="http://pres.derickrethans.nl/wereldveroverend-phpworks04">http://pres.derickrethans.nl/wereldveroverend-phpworks04</a></blurb> </slide> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-array1.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-array1.xml +++ presentations/slides/i18nl10n/trans-array1.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Method 2: Phrase dictionary</title> <subtitle>Using an array to define translation strings</subtitle> <blurb>How it works:</blurb> <list> <bullet>Each string an entry in the translation array</bullet> <bullet>Fall back realized with array merging</bullet> </list> <break/> <blurb>Definition files:</blurb> <example class='bit_larger'><![CDATA[trans/en.php: <?php $l = array(); $l["CLICK_HERE"] = 'Click <a href="%1">here</a> to'; $l["LOGIN"] = 'log in'; $l["LOGOUT"] = 'log out'; ?> trans/nl.php: <?php include 'trans/en.php'; $l["LOGIN"] = 'in te loggen'; $l["LOGOUT"] = 'uit te loggen'; ?>]]></example> <break/> <blurb>Usage:</blurb> <example class='bit_larger'><![CDATA[<?php include 'trans/nl.php'; printf("{$l['CLICK_HERE']} {$l['LOGIN']}", 'login.php'); ?>]]></example> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-array2.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-array2.xml +++ presentations/slides/i18nl10n/trans-array2.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Method 2: Phrase dictionary</title> <subtitle>Using an array to define translation strings</subtitle> <blurb>Pro:</blurb> <list> <bullet>It is very simple</bullet> <bullet>Fall back mechanism in place</bullet> </list> <break/> <blurb>Con:</blurb> <list> <bullet>Translators need to fiddle with PHP code</bullet> <bullet>Translation files need to be manually created</bullet> <bullet>Arrays can use quite some memory</bullet> <bullet>Two definition files are loaded</bullet> </list> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-define1.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-define1.xml +++ presentations/slides/i18nl10n/trans-define1.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Method 1: Constants</title> <subtitle>Using define() to define translation strings</subtitle> <blurb>How it works:</blurb> <list> <bullet>Each string is a constant</bullet> <bullet>Different include files for each language</bullet> </list> <break/> <blurb>Definition file:</blurb> <example class='bit_larger'><![CDATA[trans/nl.php: <?php define("CLICK_HERE", 'Klik <a href="%1">hier</a> om'); define("LOGIN", 'in te loggen'); define("LOGOUT", 'uit te loggen'); ?>]]></example> <break/> <blurb>Usage:</blurb> <example class='bit_larger'><![CDATA[<?php include 'trans/nl.php'; printf(CLICK_HERE . ' ' . LOGIN, 'login.php'); ?>]]></example> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-define2.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-define2.xml +++ presentations/slides/i18nl10n/trans-define2.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Method 1: Constants</title> <subtitle>Using define() to define translation strings</subtitle> <blurb>Pro:</blurb> <list> <bullet>It is very simple</bullet> </list> <break/> <blurb>Con:</blurb> <list> <bullet>Translators need to fiddle with PHP code</bullet> <bullet>Translation files need to be manually created</bullet> <bullet>Fall back is hardly possible</bullet> <bullet>define() is not fast</bullet> </list> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-gettext1.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-gettext1.xml +++ presentations/slides/i18nl10n/trans-gettext1.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Method 3: Gettext</title> <subtitle>Using gettext to manage translations</subtitle> <blurb>How it works:</blurb> <list> <bullet>Extract phrases: %xgettext gettext.php%</bullet> <bullet>Create directories: %mkdir -p nl/LC_MESSAGES%</bullet> <bullet>Copy file: %cp messages.po nl/LC_MESSAGES%</bullet> <bullet>Translate: %vi nl/LC_MESSAGES/messages.po%</bullet> <bullet>Compile: %msgfmt nl/LC_MESSAGES/messages.po \ % % -o nl/LC_MESSAGES/messages.mo%</bullet> </list> <break/> <blurb>Usage:</blurb> <example class='bit_larger'><![CDATA[<?php bindtextdomain('messages', './'); setlocale(LC_MESSAGES, 'nl'); printf(_("Click <a href='%s'>here</a>") . " " . _("to login"), 'login.php'); ?>]]></example> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-gettext2.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-gettext2.xml +++ presentations/slides/i18nl10n/trans-gettext2.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Method 3: Gettext</title> <subtitle>Using gettext to manage translations</subtitle> <blurb>Translation file:</blurb> <example class='bit_larger'><![CDATA[#: gettext.php:4 msgid "Click <a href='%s'>here</a>" msgstr "Klik <a href='%s'>hier</a>" #: gettext.php:4 msgid "to login" msgstr "om in te loggen"]]></example> <break/> <blurb>Pro:</blurb> <list> <bullet>Fall back mechanism in place</bullet> <bullet>Translation files can automatically be generated</bullet> <bullet>It's very efficient</bullet> </list> <break/> <blurb>Con:</blurb> <list> <bullet>Setting it up is not an easy task</bullet> <bullet>Translators still not have a very easy job</bullet> </list> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-intro.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-intro.xml +++ presentations/slides/i18nl10n/trans-intro.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Translating Applications</title> <blurb>A few things are important:</blurb> <list> <bullet>Non-technical translators should have an easy job</bullet> <bullet>Easy discovery of translatable text</bullet> <bullet>There needs to be a fall back to the default language</bullet> <bullet>It needs to be fast</bullet> </list> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-linguist.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-linguist.xml +++ presentations/slides/i18nl10n/trans-linguist.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide fontsize="6em"> <title>Qt Linguist</title> <image class="spaced" align="right" filename="linguist.png"/> </slide> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-qt1.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-qt1.xml +++ presentations/slides/i18nl10n/trans-qt1.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Method 4: The Qt way</title> <subtitle>Using XML based translation files</subtitle> <blurb>How it works:</blurb> <list> <bullet>Extract phrases: %lupdate linguist.php -ts en.ts nl.ts%</bullet> <bullet>Translate: %linguist nl.ts%</bullet> </list> <break/> <blurb>Usage:</blurb> <example class='bit_larger'><![CDATA[<?php // Parse XML file "nl.ts" into $dictionary function tr($phrase) { return $GLOBALS['dictionary'][$phrase]; } printf(tr("Click <a href='%s'>here</a>") . " " . tr("to login"), 'login.php'); ?>]]></example> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-qt2.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-qt2.xml +++ presentations/slides/i18nl10n/trans-qt2.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Method 4: The Qt way</title> <subtitle>Using XML based translation files</subtitle> <blurb>Pro:</blurb> <list> <bullet>Fall back mechanism in place</bullet> <bullet>Translation files can automatically be generated and updated</bullet> <bullet>Translators have a very easy job</bullet> </list> <break/> <blurb>Con:</blurb> <list> <bullet>The XML needs to be parsed</bullet> </list> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/perf/accelerators.xml?r=1.1&p=1 Index: presentations/slides/perf/accelerators.xml +++ presentations/slides/perf/accelerators.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide fontsize="6em"> <title>PHP Accelerators</title> <list> <li>APC</li> <li>Zend Performance Suite</li> <li>Turck MM Cache</li> <li>PHP Accelerator</li> </list> <image marginleft='4em' filename='caches.png'/> </slide> http://cvs.php.net/co.php/presentations/slides/perf/caching_eval.xml?r=1.1&p=1 Index: presentations/slides/perf/caching_eval.xml +++ presentations/slides/perf/caching_eval.xml <slide> <title>Pros and Cons of Caching</title> <break lines="4"/> <blurb>Pros:</blurb> <list> <bullet>Potentially Immense Speed-Up</bullet> <bullet>Decreased Resource Consumption</bullet> </list> <blurb>Cons:</blurb> <list> <bullet>Increase in Architectural Complexity</bullet> <bullet>Potential for Stale or Inconsistent Data</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/compress.xml?r=1.1&p=1 Index: presentations/slides/perf/compress.xml +++ presentations/slides/perf/compress.xml <slide> <title>Content Compression</title> <list class="large"> <bullet>Some browsers can accept certain content compressed.</bullet> <bullet>We can trade some CPU cycles for reduced bandwidth usage.</bullet> <bullet>Compression is usually a minor overhead.</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/cpuusage.xml?r=1.1&p=1 Index: presentations/slides/perf/cpuusage.xml +++ presentations/slides/perf/cpuusage.xml <slide> <title>CPU Usage</title> <list> <bullet>Avoid Using frequent array accesses, remember, each array access is a hash lookup.</bullet> </list> <example><![CDATA[<?php $ar = array(); $ar['name'] = 'Optimization'; for ($i = 0; $i < count($entries); $i++) { print $ar['name']; } ?>]]></example> <list> <bullet>Shorten "required" executions, such as loops.</bullet> <bullet>Avoid rebuilding large data structures.</bullet> <bullet>Look for alternatives to regular expressions</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/extern_squid.xml?r=1.1&p=1 Index: presentations/slides/perf/extern_squid.xml +++ presentations/slides/perf/extern_squid.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Squid</title> <blurb>Some effort to use with PHP:</blurb> <example><![CDATA[<?php $timestamp = /* timestamp for last updated part */; $tsstring = gmdate("D, d M Y H:i:s ", $timestamp)."GMT"; if ($_SERVER["HTTP_IF_MODIFIED_SINCE"] == $tsstring) { /* The UA has the exact same page we have. */ header("HTTP/1.1 304 Not Modified"); exit(); } else { header("Last-Modified: ".$tsstring); } ?>]]></example> <break lines="2"/> <blurb>Set Cache-Control headers so external caches know how to respect your content:</blurb> <example><![CDATA[<?php header("Last-Modified: Mon, 13 Se4 2002 09:44:13 GMT"); header("Expires: Mon, 13 Sep 2004 10:44:13 GMT"); header("Cache-Control: must-revalidate, max-age=15, s-maxage=0, private"); ?>]]></example> </slide> http://cvs.php.net/co.php/presentations/slides/perf/groups.xml?r=1.1&p=1 Index: presentations/slides/perf/groups.xml +++ presentations/slides/perf/groups.xml <slide> <title>Optimization Strategies</title> <list class="large"> <bullet>Tuning the Webserver</bullet> <bullet>Caching</bullet> <bullet>Optimizing SQL Queries</bullet> <bullet>Optimizing PHP Code</bullet> <bullet>Reducing Bandwidth</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/how_caching_works.xml?r=1.1&p=1 Index: presentations/slides/perf/how_caching_works.xml +++ presentations/slides/perf/how_caching_works.xml <slide> <title>How Caching Works</title> <break lines="4"/> <image filename="how_caching_works.png" align="center"/> </slide> http://cvs.php.net/co.php/presentations/slides/perf/how_ccache.xml?r=1.1&p=1 Index: presentations/slides/perf/how_ccache.xml +++ presentations/slides/perf/how_ccache.xml <slide> <title>Compiler Caches</title> <subtitle>How it works</subtitle> <image filename="how_ccache.png" class="spaced"/> <break lines="5"/> <list> <bullet>In general, each source file is compiled once</bullet> <bullet>Compilation overhead becomes inconsequential</bullet> <bullet>Cache introduces its own overhead due to dynamic nature of includes</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/htmloptimize.xml?r=1.1&p=1 Index: presentations/slides/perf/htmloptimize.xml +++ presentations/slides/perf/htmloptimize.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Bandwidth Optimizations</title> <subtitle>Optimizing HTML</subtitle> <list> <bullet>Remove All Comments!</bullet> <bullet>Use CSS</bullet> <bullet>Fully qualify links (ie, personal/images/ not personal/images)</bullet> <bullet>%ext/tidy%</bullet> </list> <example><![CDATA[<?php $opts = array("clean" => true, "drop-proprietary-attributes" => true, "drop-font-tags" => true, "drop-empty-paras" => true, "hide-comments" => true, "join-classes" => true, "join-styles" => true); $tidy = tidy_parse_file("php.html", $opts); tidy_clean_repair($tidy); echo $tidy; ?>]]></example> </slide> http://cvs.php.net/co.php/presentations/slides/perf/lifecycle.xml?r=1.1&p=1 Index: presentations/slides/perf/lifecycle.xml +++ presentations/slides/perf/lifecycle.xml <slide> <title>Compiler Caches</title> <subtitle>What can be optimized</subtitle> <image filename="lifecycle.png" class="spaced"/> <break lines="5"/> <list> <bullet>This cycle happens for every include file, not just for the "main" script</bullet> <bullet>Compilation can easily consume more time than execution</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/livedocs.xml?r=1.1&p=1 Index: presentations/slides/perf/livedocs.xml +++ presentations/slides/perf/livedocs.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Livedocs</title> <subtitle>An Example of On-Demand Page Generation</subtitle> <blurb>Set up a 404 error handler in .htaccess:</blurb> <example><![CDATA[RewriteEngine on RewriteRule /.*\.[^h][^t][^m][^l]$ /$1.html ErrorDocument 404 /index.php DirectoryIndex index.php ]]></example> <break/> <blurb>index.php:</blurb> <example><![CDATA[<?php if (!empty($_SERVER['REDIRECT_URL'])) { // This is the requested page that caused the error $current_page = substr($_SERVER['REDIRECT_URL'], strlen(WEBBASE)); } .... if (!FORCE_DYNAMIC) { $contents = ob_get_contents(); ob_clean(); $f = fopen($lang . "/" . $current_page . ".html", 'w'); fwrite($f, $contents); fclose($f); echo $contents; } ?>]]></example> </slide> http://cvs.php.net/co.php/presentations/slides/perf/modgzip.xml?r=1.1&p=1 Index: presentations/slides/perf/modgzip.xml +++ presentations/slides/perf/modgzip.xml <slide> <title>mod_gzip</title> <list class="large"> <bullet>A very nice apache module for compressing content</bullet> <bullet>Can compress any content</bullet> <bullet>Can switch on MIME Types and Browser Types</bullet> <bullet>Uses Temporary Files</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/optimize.xml?r=1.1&p=1 Index: presentations/slides/perf/optimize.xml +++ presentations/slides/perf/optimize.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Bandwidth Optimizations</title> <subtitle>How?</subtitle> <list> <bullet>Use preprocessors to eliminate whitespace</bullet> <bullet>If you save 20 bytes per file, and have 1,000,000 hits a day, you've just saved 20,000,000 extra bytes</bullet> <bullet>Send content "when ready", and use progressive images</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/pear_cache.xml?r=1.1&p=1 Index: presentations/slides/perf/pear_cache.xml +++ presentations/slides/perf/pear_cache.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Caching Example</title> <subtitle>PEAR::Cache_Lite</subtitle> <example><![CDATA[<?php /* Include the class */ require_once('Cache/Lite.php'); /* Set a key for this cache item */ $id = 'newsitem1'; /* Set a few options */ $options = array( 'cacheDir' => '/var/cache/news/', 'lifeTime' => 3600 ); /* Create a Cache_Lite object */ $Cache_Lite = new Cache_Lite($options); /* Test if there is a valid cache-entry for this key */ if ($data = $Cache_Lite->get($id)) { /* Cache hit! */ } else { /* Cache miss! */ ob_start(); /* Generate content */ $data = ob_get_contents(); $Cache_Lite->save($data); } ?> ]]></example> </slide> http://cvs.php.net/co.php/presentations/slides/perf/phpzlib.xml?r=1.1&p=1 Index: presentations/slides/perf/phpzlib.xml +++ presentations/slides/perf/phpzlib.xml <slide> <title>zlib.output_compression</title> <list class="large"> <bullet>A built-in output buffer handler</bullet> <bullet>Set in %php.ini%</bullet> <bullet>Cannot be used with a custom %output_handler%</bullet> <bullet>Does generally not work with trans-sid</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/prf_fileio.xml?r=1.1&p=1 Index: presentations/slides/perf/prf_fileio.xml +++ presentations/slides/perf/prf_fileio.xml <?xml version="1.0" encoding="utf-8"?> <slide> <title>File I/O</title> <blurb>File I/O Problems</blurb> <list> <bullet>Disk access is slower than memory access</bullet> <bullet>Simultaneous write/write operations cause data corruption. Therefore locking must occurâwhich is slow</bullet> </list> <blurb>Tips:</blurb> <list> <bullet>Use the disk in concentrated bits, meaning do all your writing together.</bullet> <bullet>Try and put write operations where they will cause the least loss in user experience (remember, web pages are chunked!)</bullet> <bullet>Close the session handler ASAP with ~session_write_close()~</bullet> </list> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/perf/reduce.xml?r=1.1&p=1 Index: presentations/slides/perf/reduce.xml +++ presentations/slides/perf/reduce.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Bandwidth Optimizations</title> <subtitle>Reducing Output</subtitle> <blurb>Less output is good because...</blurb> <list> <bullet>Saves server bandwidth</bullet> <bullet>Decreases server CPU and memory usage</bullet> <bullet>Has the same effect on the client side</bullet> <bullet>On large sites, bandwidth is most often the most costly bottleneck</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/regex.xml?r=1.1&p=1 Index: presentations/slides/perf/regex.xml +++ presentations/slides/perf/regex.xml <slide> <title>Regular Expressions</title> <blurb> Its often beneficial to replace regular expressions with simpler functions that have the same effect. </blurb> <break lines="2"/> <blurb>With Regular Expression:</blurb> <example><![CDATA[<?php if (preg_match ('/(.*)\@(.*)/', $data, $matches)) { print $matches[2]; } ?>]]></example> <break lines="2"/> <blurb>Without Regular Expression:</blurb> <example><![CDATA[<?php $pos = strrpos ('@', $data); if ($pos !== false) { print substr ($data, $pos); } ?>]]></example> <break lines="2"/> <blurb> In other cases it may help to use regular expressions instead of custom parse routines in your PHP code. </blurb> </slide> http://cvs.php.net/co.php/presentations/slides/perf/resources-oscom4.xml?r=1.1&p=1 Index: presentations/slides/perf/resources-oscom4.xml +++ presentations/slides/perf/resources-oscom4.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide fontsize="6em"> <title>Thank You!</title> <blurb> </blurb> <link fontsize="2em" marginleft="2em" leader="These Slides: " href="http://pres.derickrethans.nl" target="_new"/> <blurb> </blurb> <link fontsize="2em" marginleft="2em" leader="HTTP Cache Explanation: " href="http://www.mnot.net/cache_docs/"/> <link fontsize="2em" marginleft="2em" leader="HTML Tidy: " href="http://www.w3.org/People/Raggett/tidy/"/> <link fontsize="2em" marginleft="2em" leader="mod_gzip: " href="http://www.schroepl.net/projekte/mod_gzip/index.htm"/> <link fontsize="2em" marginleft="2em" leader="PHP: " href="http://www.php.net" target="_new"/> <link fontsize="2em" marginleft="2em" leader="squid: " href="http://www.squid-cache.org" target="_new"/> <link fontsize="2em" marginleft="2em" leader="Webreference HTML Optimization: " href="http://www.webreference.com/authoring/languages/html/optimize/"/> </slide> http://cvs.php.net/co.php/presentations/slides/perf/total_page_caching.xml?r=1.1&p=1 Index: presentations/slides/perf/total_page_caching.xml +++ presentations/slides/perf/total_page_caching.xml <slide> <title>Total Page Caching</title> <break lines="6"/> <image filename="total_page_caching.png" align="center"/> </slide> http://cvs.php.net/co.php/presentations/slides/perf/what_caching.xml?r=1.1&p=1 Index: presentations/slides/perf/what_caching.xml +++ presentations/slides/perf/what_caching.xml <slide> <title>What Is Caching?</title> <break lines="5"/> <blurb align="center" class="large_blurb_center"> Caching is the recognition and exploitation of the fact that most "dynamic" data does not change every time you request it. </blurb> </slide>
http://cvs.php.net/diff.php/presentations/wereldveroverend-oscom4.xml?r1=1.1&r2=1.2&ty=u Index: presentations/wereldveroverend-oscom4.xml diff -u presentations/wereldveroverend-oscom4.xml:1.1 presentations/wereldveroverend-oscom4.xml:1.2 --- presentations/wereldveroverend-oscom4.xml:1.1 Tue Sep 7 02:58:40 2004 +++ presentations/wereldveroverend-oscom4.xml Mon Sep 13 09:41:18 2004 @@ -9,57 +9,58 @@ stylesheet="presentations/slides/perf/ezp.css" backgroundfixed="1" > <topic>Localization and Internationalization</topic> -<title>Multi-lingual development</title> -<event>php|works</event> -<location>Toronto, Canada</location> -<date>September 22th, 2004</date> +<title>World Domination</title> +<event>OSCOM4</event> +<location>Zürich, Switserland</location> +<date>September 30th, 2004</date> <speaker>Derick Rethans</speaker> <email>derick@php.net</email> -<url>http://pres.derickrethans.nl/wereldveroverend-phpworks04</url> -<slide>slides/i18nl10n/title.xml</slide> - +<url>http://pres.derickrethans.nl/wereldveroverend-oscom4</url> +<slide>slides/i18nl10n/title-oscom4.xml</slide> <!-- CHARSETS --> -<!--<slide>slides/i18nl10n/what-languages.xml</slide>--> <!-- what is the problem actually? --> -<slide>slides/i18nl10n/not-ascii.xml</slide> <!-- not everything is ascii --> <slide>slides/i18nl10n/latin.xml</slide> <!-- latin charsets --> <slide>slides/i18nl10n/convert.xml</slide> <!-- converting charsets (single byte) --> <slide>slides/i18nl10n/asian.xml</slide> <!-- asian charsets --> <slide>slides/i18nl10n/unicode.xml</slide> <!-- unicode and ucs2, ucs4 --> <slide>slides/i18nl10n/utf8.xml</slide> <!-- what does utf8 solve? --> -<slide>slides/i18nl10n/utf8-encoding.xml</slide> <!-- how does the encoding work? --> <!-- PROBLEMS and SOLUTIONS --> <slide>slides/i18nl10n/mb-problems.xml</slide> <!-- functions with utf8 chars --> <slide>slides/i18nl10n/iconv-solved.xml</slide> <!-- fixed with iconv --> -<slide>slides/i18nl10n/iconv-strpos.xml</slide> <!-- iconv* and other functions --> <slide>slides/i18nl10n/pcre-utf8.xml</slide> <!-- regular expressions, /u, mb_regexp */ --> <!-- CONVERSION and OUTPUT --> -<slide>slides/i18nl10n/iconv.xml</slide> <!-- iconv --> <slide>slides/i18nl10n/iconv-function.xml</slide> <!-- converting charsets with iconv --> <slide>slides/i18nl10n/iconv-ob-buffer.xml</slide> <!-- iconv ob_buffer --> -<slide>slides/i18nl10n/iconv-ob-buffer-multiple.xml</slide> <!-- multiple charsets and iconv conversion --> <slide>slides/i18nl10n/wrong-http-header.xml</slide> <!-- show problem with wrong http header --> <slide>slides/i18nl10n/correct-http-header.xml</slide> <!-- setting http header --> -<slide>slides/i18nl10n/</slide> <!-- transliteration to html --> -<slide>slides/i18nl10n/</slide> <!-- eZ transliteration ? --> +<!--<slide>slides/i18nl10n/</slide>--> <!-- eZ transliteration ? --> <!-- LOCALE ISSUES --> -<slide>slides/i18nl10n/</slide> <!-- string collation (ordering) --> -<slide>slides/i18nl10n/</slide> <!-- strupper/strlower --> -<slide>slides/i18nl10n/</slide> <!-- formatting a date --> -<slide>slides/i18nl10n/</slide> <!-- formatting numbers (also arabic numbers?) --> -<slide>slides/i18nl10n/</slide> <!-- formatting money --> +<slide>slides/i18nl10n/locales.xml</slide> +<slide>slides/i18nl10n/locale-collation.xml</slide> <!-- string collation (ordering) --> +<slide>slides/i18nl10n/locale-casing.xml</slide> <!-- strupper/strlower --> +<slide>slides/i18nl10n/locale-date.xml</slide> <!-- formatting a date --> +<slide>slides/i18nl10n/locale-numeric.xml</slide> <!-- formatting numbers (also arabic numbers?) --> +<slide>slides/i18nl10n/locale-money.xml</slide> <!-- formatting money --> +<slide>slides/i18nl10n/locale-php.xml</slide> <!-- PHP and locales --> <!-- TRANSLATIONS IN WEBSITES --> -<slide>slides/i18nl10n/</slide> <!-- with define --> -<slide>slides/i18nl10n/</slide> <!-- with gettext --> -<slide>slides/i18nl10n/</slide> <!-- xml based definition --> -<slide>slides/i18nl10n/</slide> <!-- lupdate --> -<slide>slides/i18nl10n/</slide> <!-- Qt Linguist --> -<slide>slides/i18nl10n/</slide> <!-- using the XML translations --> +<slide>slides/i18nl10n/trans-intro.xml</slide> <!-- intro --> +<slide>slides/i18nl10n/trans-define1.xml</slide> <!-- with define --> +<slide>slides/i18nl10n/trans-define2.xml</slide> <!-- with define --> +<slide>slides/i18nl10n/trans-array2.xml</slide> <!-- with array --> +<slide>slides/i18nl10n/trans-gettext1.xml</slide> <!-- with gettext --> +<slide>slides/i18nl10n/trans-gettext2.xml</slide> <!-- with gettext --> +<slide>slides/i18nl10n/trans-qt1.xml</slide> <!-- xml based definition --> +<slide>slides/i18nl10n/trans-linguist.xml</slide> <!-- Qt Linguist --> +<slide>slides/i18nl10n/trans-qt2.xml</slide> <!-- xml based definition --> <!-- EXIT --> -<slide>slides/i18nl10n/resources.xml</slide> <!-- resources --> +<slide>slides/i18nl10n/resources-oscom4.xml</slide> <!-- resources --> + +<!-- BONUS --> +<slide>slides/i18nl10n/utf8-encoding.xml</slide> <!-- how does the encoding work? --> +<slide>slides/i18nl10n/iconv-ob-buffer-multiple.xml</slide> <!-- multiple charsets and iconv conversion --> </presentation> http://cvs.php.net/diff.php/presentations/slides/i18nl10n/iconv-function.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/i18nl10n/iconv-function.xml diff -u presentations/slides/i18nl10n/iconv-function.xml:1.1 presentations/slides/i18nl10n/iconv-function.xml:1.2 --- presentations/slides/i18nl10n/iconv-function.xml:1.1 Tue Sep 7 02:58:40 2004 +++ presentations/slides/i18nl10n/iconv-function.xml Mon Sep 13 09:41:18 2004 @@ -15,11 +15,15 @@ $str = "© 2004, by Derick Rethans"; echo iconv('iso-8859-1', 'iso-8859-2', $str); ?>]]></example> + +<div effect="hide"> <blurb>output:</blurb> <example class="bit_larger_output">Notice: iconv() [function.iconv]: Detected an illegal character in input string in /home/httpd/pres2/display.php(461) : eval()'d code on line 3</example> <break lines="2"/> +</div> +<div effect="hide"> <blurb>iconv():</blurb> <example class="bit_larger"><![CDATA[<?php $str = "© 2004, by Derick Rethans"; @@ -28,6 +32,7 @@ <blurb>output:</blurb> <example class="bit_larger_output">Notice: iconv() [function.iconv]: Detected an illegal character in input string in /home/httpd/pres2/display.php(461) : eval()'d code on line 3 2004, by Derick Rethans</example> +</div> </slide> <!-- http://cvs.php.net/diff.php/presentations/slides/i18nl10n/iconv-solved.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/i18nl10n/iconv-solved.xml diff -u presentations/slides/i18nl10n/iconv-solved.xml:1.1 presentations/slides/i18nl10n/iconv-solved.xml:1.2 --- presentations/slides/i18nl10n/iconv-solved.xml:1.1 Tue Sep 7 02:58:40 2004 +++ presentations/slides/i18nl10n/iconv-solved.xml Mon Sep 13 09:41:18 2004 @@ -10,12 +10,14 @@ <break lines="4"/> +<div effect="hide"> <blurb>iconv_substr():</blurb> <example class="bit_larger" result="1"><![CDATA[<?php iconv_set_encoding('internal_encoding', 'utf8'); $str = "Vær sÃ¥ god!"; echo "The first 7 characters are: ", iconv_substr($str, 0, 7); ?>]]></example> +</div> </slide> <!-- http://cvs.php.net/diff.php/presentations/slides/i18nl10n/mb-problems.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/i18nl10n/mb-problems.xml diff -u presentations/slides/i18nl10n/mb-problems.xml:1.1 presentations/slides/i18nl10n/mb-problems.xml:1.2 --- presentations/slides/i18nl10n/mb-problems.xml:1.1 Tue Sep 7 02:58:40 2004 +++ presentations/slides/i18nl10n/mb-problems.xml Mon Sep 13 09:41:18 2004 @@ -10,6 +10,7 @@ <break lines="2"/> +<div effect="hide"> <blurb>substr() may mangle text:</blurb> <example class="bit_larger" result="1"><![CDATA[<?php $str = "Vær sÃ¥ god!"; @@ -17,12 +18,15 @@ ?>]]></example> <break lines="2"/> +</div> +<div effect="hide"> <blurb>wordwrap() wraps too early:</blurb> <example class="bit_larger" result="1"><![CDATA[<?php $str = "Vær sÃ¥ god!"; echo wordwrap($str, 6, '|'); ?>]]></example> +</div> </slide> <!-- http://cvs.php.net/diff.php/presentations/slides/i18nl10n/pcre-utf8.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/i18nl10n/pcre-utf8.xml diff -u presentations/slides/i18nl10n/pcre-utf8.xml:1.1 presentations/slides/i18nl10n/pcre-utf8.xml:1.2 --- presentations/slides/i18nl10n/pcre-utf8.xml:1.1 Tue Sep 7 02:58:40 2004 +++ presentations/slides/i18nl10n/pcre-utf8.xml Mon Sep 13 09:41:18 2004 @@ -14,6 +14,7 @@ <break lines="4"/> +<div effect="hide"> <blurb>preg_match() in UTF8 mode:</blurb> <example class="bit_larger" result="1"><![CDATA[<?php $str = "1978,Dérick,Rethans"; @@ -23,6 +24,7 @@ echo 'There was no match!', "<br/>\n"; } ?>]]></example> +</div> </slide> <!-- http://cvs.php.net/diff.php/presentations/slides/i18nl10n/utf8-encoding.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/i18nl10n/utf8-encoding.xml diff -u presentations/slides/i18nl10n/utf8-encoding.xml:1.1 presentations/slides/i18nl10n/utf8-encoding.xml:1.2 --- presentations/slides/i18nl10n/utf8-encoding.xml:1.1 Tue Sep 7 02:58:40 2004 +++ presentations/slides/i18nl10n/utf8-encoding.xml Mon Sep 13 09:41:18 2004 @@ -21,10 +21,10 @@ byte 2: 10xx xxxx byte 3: 10xx xxxx -å (0x529f) 110x xxxx 10xx xxxx 10xx xxxx +å (0x529f) 1110 xxxx 10xx xxxx 10xx xxxx 0101 0010 1001 1111 -> ---+ 0101 --00 1010 --01 1111 =============================== - 1100 0101 1000 1010 1001 1111 + 1110 0101 1000 1010 1001 1111 0xe5 0x8a 0x9f]]></example> </slide> <!-- http://cvs.php.net/diff.php/presentations/slides/i18nl10n/wrong-http-header.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/i18nl10n/wrong-http-header.xml diff -u presentations/slides/i18nl10n/wrong-http-header.xml:1.1 presentations/slides/i18nl10n/wrong-http-header.xml:1.2 --- presentations/slides/i18nl10n/wrong-http-header.xml:1.1 Tue Sep 7 02:58:40 2004 +++ presentations/slides/i18nl10n/wrong-http-header.xml Mon Sep 13 09:41:18 2004 @@ -4,7 +4,7 @@ <list> <bullet>Most sites don't set any Content-Type header</bullet> - <bullet>Browsers and/or digital environments will move more and more to UTF8 as default encoding</bullet> + <bullet>Browsers and/or digital environments will move more and more to UTF-8 as default encoding</bullet> </list> <blurb>Result:</blurb> <image class="spaced" filename="wrong-http-header.png"/> http://cvs.php.net/diff.php/presentations/slides/perf/caches.png?r1=1.1&r2=1.2&ty=u Index: presentations/slides/perf/caches.png http://cvs.php.net/diff.php/presentations/slides/perf/dso.png?r1=1.1&r2=1.2&ty=u Index: presentations/slides/perf/dso.png http://cvs.php.net/diff.php/presentations/slides/perf/ezp.css?r1=1.7&r2=1.8&ty=u Index: presentations/slides/perf/ezp.css diff -u presentations/slides/perf/ezp.css:1.7 presentations/slides/perf/ezp.css:1.8 --- presentations/slides/perf/ezp.css:1.7 Tue Sep 7 02:58:40 2004 +++ presentations/slides/perf/ezp.css Mon Sep 13 09:41:18 2004 @@ -48,12 +48,14 @@ div.mainarea { position: fixed; top: 150px; +width: 725px; } ul.pres { list-style: circle; font-size: 24pt; } + ul.level2 { list-style: circle; font-size: 20pt; @@ -65,13 +67,18 @@ font-size: 28pt; margin-right: 40px; } + +ul.large div li.pres_bullet +{ + font-size: 40pt; +} div.small_blurb { - font-size: 24px; + font-size: 24pt; } div.blurb, div.bit_larger_output_text { - font-size: 32px; + font-size: 28pt; width: 100%; } @@ -84,7 +91,12 @@ } div.large_blurb { - font-size: 32px; + font-size: 32pt; +} + +div.large_blurb_center { + font-size: 48px; + text-align: center; } div.xx_large_blurb_center { @@ -94,7 +106,6 @@ div.q_mark { text-align: center; - margin-left: 250px; font-size: 480px; } @@ -102,33 +113,24 @@ font-size: 18px; width: 640px; } -div.bit_larger, div.bit_larger code, div.bit_larger_output { +div.example code, div.bit_larger, div.bit_larger code, div.bit_larger_output { background: #ccc; font-size: 20px; width: 100%; } -div.bit_larger, div.bit_larger_output { +div.example, div.bit_larger, div.bit_larger_output { margin-left: 20px; margin-right: 20px; - width: 100%; } -div.code_small { +div.code_small, div.code_medium, div.code_large, div.example { background: #ccc; } div.code_small code { font-size: 12px; } - -div.code_medium { - background: #ccc; -} div.code_medium code, div.code_medium pre { font-size: 20px; -} - -div.code_large { - background: #ccc; } div.code_large code, div.code_large pre { font-size: 24px; http://cvs.php.net/diff.php/presentations/slides/perf/squeeze.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/perf/squeeze.xml diff -u presentations/slides/perf/squeeze.xml:1.1 presentations/slides/perf/squeeze.xml:1.2 --- presentations/slides/perf/squeeze.xml:1.1 Thu Jun 17 03:58:37 2004 +++ presentations/slides/perf/squeeze.xml Mon Sep 13 09:41:18 2004 @@ -2,10 +2,11 @@ <slide fontsize="6em"> <title>Say Squeeze</title> - <list> + <list class="large"> <li>Optimized %./configure%</li> <li>Memory Limit</li> <li>Shorter Path</li> + <li>Use ~include()~ in a smarter way</li> <li>Ramdisk</li> </list> http://cvs.php.net/diff.php/presentations/slides/perf/static-und-squid.xml?r1=1.2&r2=1.3&ty=u Index: presentations/slides/perf/static-und-squid.xml diff -u presentations/slides/perf/static-und-squid.xml:1.2 presentations/slides/perf/static-und-squid.xml:1.3 --- presentations/slides/perf/static-und-squid.xml:1.2 Thu Jun 17 08:12:03 2004 +++ presentations/slides/perf/static-und-squid.xml Mon Sep 13 09:41:18 2004 @@ -3,12 +3,12 @@ <title>Static Squids</title> <image filename="static.jpg" align="right" marginright="2em" /> - <list> - <li>Reverse Proxy</li> - <li>Tied into Apache</li> - <li>Static Generated</li> - <li>Huge Performance Boost</li> - <li>No 'Dynamic' Content</li> + <list class="large"> + <bullet>Reverse Proxy</bullet> + <bullet>Tied into Apache</bullet> + <bullet>Static Generated</bullet> + <bullet>Huge Performance Boost</bullet> + <bullet>No 'Dynamic' Content</bullet> </list> </slide> http://cvs.php.net/diff.php/presentations/slides/perf/xdebug-trace-xgui.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/perf/xdebug-trace-xgui.xml diff -u presentations/slides/perf/xdebug-trace-xgui.xml:1.1 presentations/slides/perf/xdebug-trace-xgui.xml:1.2 --- presentations/slides/perf/xdebug-trace-xgui.xml:1.1 Tue Jun 29 07:32:14 2004 +++ presentations/slides/perf/xdebug-trace-xgui.xml Mon Sep 13 09:41:19 2004 @@ -6,6 +6,6 @@ <li>Simple Tracefile Browser</li> </list> - <image align='center' marginright="3em" filename='xgui.png'/> + <image align='right' marginright="3em" filename='xgui.png'/> </slide> http://cvs.php.net/diff.php/presentations/slides/xdebug/ccoverage1.xml?r1=1.2&r2=1.3&ty=u Index: presentations/slides/xdebug/ccoverage1.xml diff -u presentations/slides/xdebug/ccoverage1.xml:1.2 presentations/slides/xdebug/ccoverage1.xml:1.3 --- presentations/slides/xdebug/ccoverage1.xml:1.2 Thu Sep 2 02:56:03 2004 +++ presentations/slides/xdebug/ccoverage1.xml Mon Sep 13 09:41:19 2004 @@ -4,7 +4,7 @@ <subtitle>Function To Test and Test Driver</subtitle> <blurb>Function to test (bigassfunction.php):</blurb> - <example><![CDATA[<?php + <example class="bit_larger"><![CDATA[<?php function test_parse_time($f) { if (preg_match("/[0-9]{12}/", $f)) { @@ -25,12 +25,11 @@ ?>]]></example> <break /> <blurb>Test driver (basic.t):</blurb> - <example><![CDATA[<?php + <example class="bit_larger"><![CDATA[<?php $text = realpath("tests/bigassfunction.php"); include $text; $formats = array('2004-08-17 21:20', '20040817 2120'); - foreach ($formats as $format) { test_parse_time($format); } http://cvs.php.net/diff.php/presentations/slides/xdebug/ccoverage2.xml?r1=1.2&r2=1.3&ty=u Index: presentations/slides/xdebug/ccoverage2.xml diff -u presentations/slides/xdebug/ccoverage2.xml:1.2 presentations/slides/xdebug/ccoverage2.xml:1.3 --- presentations/slides/xdebug/ccoverage2.xml:1.2 Thu Sep 2 02:56:03 2004 +++ presentations/slides/xdebug/ccoverage2.xml Mon Sep 13 09:41:19 2004 @@ -3,7 +3,7 @@ <title>Code Coverage</title> <subtitle>The Testing Application</subtitle> - <example><![CDATA[<?php + <example class="bit_larger"><![CDATA[<?php echo "Output:\n\n"; xdebug_start_code_coverage(); include 'tests/basic.t'; http://cvs.php.net/diff.php/presentations/slides/xdebug/ccoverage3.xml?r1=1.2&r2=1.3&ty=u Index: presentations/slides/xdebug/ccoverage3.xml diff -u presentations/slides/xdebug/ccoverage3.xml:1.2 presentations/slides/xdebug/ccoverage3.xml:1.3 --- presentations/slides/xdebug/ccoverage3.xml:1.2 Thu Sep 2 02:56:03 2004 +++ presentations/slides/xdebug/ccoverage3.xml Mon Sep 13 09:41:19 2004 @@ -5,9 +5,9 @@ <image align="right" filename="ccoverage-end.png"/> <blurb> - xdebug_start_code_coverage() -- starts collecting data - xdebug_stop_code_coverage() -- stops collecting data - xdebug_get_code_coverage() -- returns coverage data + xdebug_start_code_coverage() + xdebug_stop_code_coverage() + xdebug_get_code_coverage() </blurb> </slide> http://cvs.php.net/diff.php/presentations/slides/xdebug/dbgp-breakpoint-types.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/xdebug/dbgp-breakpoint-types.xml diff -u presentations/slides/xdebug/dbgp-breakpoint-types.xml:1.1 presentations/slides/xdebug/dbgp-breakpoint-types.xml:1.2 --- presentations/slides/xdebug/dbgp-breakpoint-types.xml:1.1 Thu Sep 2 02:56:03 2004 +++ presentations/slides/xdebug/dbgp-breakpoint-types.xml Mon Sep 13 09:41:19 2004 @@ -5,7 +5,7 @@ <blurb>Option explanation:</blurb> <break/> - <example><![CDATA[-a class name + <example class="bit_larger"><![CDATA[-a class name -f file name -m function name -n line number @@ -15,16 +15,16 @@ <break/> <blurb>Different breakpoint types:</blurb> - <blurb>- ~line~: on a file/line combination (req: *-f* and *-n*)</blurb> - <blurb>- ~call~: on function entrance (req: *-m*; opt: *-a*)</blurb> - <blurb>- ~return~: on function exit (req: *-m*; opt: *-a*)</blurb> - <blurb>- ~exception~: on exception of given name (req: *-x*)</blurb> - <blurb>- ~conditional~: when condition is met (req: *--* and *-f*; opt: *-n*)</blurb> + <blurb class="small_blurb">- ~line~: on a file/line combination (req: *-f* and *-n*)</blurb> + <blurb class="small_blurb">- ~call~: on function entrance (req: *-m*; opt: *-a*)</blurb> + <blurb class="small_blurb">- ~return~: on function exit (req: *-m*; opt: *-a*)</blurb> + <blurb class="small_blurb">- ~exception~: on exception of given name (req: *-x*)</blurb> + <blurb class="small_blurb">- ~conditional~: when condition is met (req: *--* and *-f*; opt: *-n*)</blurb> <break lines="2"/> <blurb>Extra options:</blurb> <break/> - <example><![CDATA[-o hit condition (>=, == or %) + <example class="bit_larger"><![CDATA[-o hit condition (>=, == or %) -g hit value]]></example> </slide> http://cvs.php.net/diff.php/presentations/slides/xdebug/dbgp-breakpoints.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/xdebug/dbgp-breakpoints.xml diff -u presentations/slides/xdebug/dbgp-breakpoints.xml:1.1 presentations/slides/xdebug/dbgp-breakpoints.xml:1.2 --- presentations/slides/xdebug/dbgp-breakpoints.xml:1.1 Thu Sep 2 02:56:03 2004 +++ presentations/slides/xdebug/dbgp-breakpoints.xml Mon Sep 13 09:41:19 2004 @@ -4,10 +4,10 @@ <subtitle>Section 7.6</subtitle> <blurb>Setting a breakpoint:</blurb> - <blurb>~%breakpoint_set *-t* [type] *-f* [filename] *-n* [lineno]%~</blurb> - <blurb>~% *-a* [classname] *-m* [functionname]%~</blurb> - <blurb>%breakpoint_set -i 4 -t line -f dbgp-example.php -n 3%</blurb> - <blurb>%breakpoint_set -i 5 -t call -m level1%</blurb> + <blurb class="small_blurb">~%breakpoint_set *-t* [type] *-f* [filename] *-n* [lineno]%~</blurb> + <blurb class="small_blurb">~% *-a* [classname] *-m* [functionname]%~</blurb> + <blurb class="small_blurb">%breakpoint_set -i 4 -t line -f dbgp-example.php -n 3%</blurb> + <blurb class="small_blurb">%breakpoint_set -i 5 -t call -m level1%</blurb> <break/> <blurb>response:</blurb> <example type="xml" class="code_large"><![CDATA[<response command="breakpoint_set" transaction_id="4" @@ -16,9 +16,9 @@ <break/> <blurb>Retrieving and deleting breakpoints:</blurb> - <blurb>%breakpoint_list -i 6%</blurb> - <blurb>%breakpoint_get -i 7 -d 3140002%</blurb> - <blurb>%breakpoint_remove -i 7 -d 3140001%</blurb> + <blurb class="small_blurb">%breakpoint_list -i 6%</blurb> + <blurb class="small_blurb">%breakpoint_get -i 7 -d 3140002%</blurb> + <blurb class="small_blurb">%breakpoint_remove -i 7 -d 3140001%</blurb> <break/> <blurb>response:</blurb> <example type="xml" class="code_large"><![CDATA[<response command="breakpoint_get" transaction_id="7"> http://cvs.php.net/diff.php/presentations/slides/xdebug/dbgp-common.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/xdebug/dbgp-common.xml diff -u presentations/slides/xdebug/dbgp-common.xml:1.1 presentations/slides/xdebug/dbgp-common.xml:1.2 --- presentations/slides/xdebug/dbgp-common.xml:1.1 Thu Sep 2 02:56:03 2004 +++ presentations/slides/xdebug/dbgp-common.xml Mon Sep 13 09:41:19 2004 @@ -13,12 +13,12 @@ <blurb>Command layout:</blurb> <blurb>%|229922|[cmd]| *-i* [tid] ..other options..% *--* data</blurb> - <break lines="2"/> + <break lines="1"/> <blurb>- Options always have the form: %*-[char]* value%</blurb> <blurb>- The %*-i*% transaction ID option is mandatory</blurb> <blurb>- Data, if available, must be base64 encoded</blurb> - <break lines="2"/> + <break lines="1"/> <blurb>Status reply:</blurb> <example type="xml" class="code_large"><![CDATA[<response command="status" transaction_id="1" status="starting" reason="ok"/>]]></example> http://cvs.php.net/diff.php/presentations/slides/xdebug/dbgp-features.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/xdebug/dbgp-features.xml diff -u presentations/slides/xdebug/dbgp-features.xml:1.1 presentations/slides/xdebug/dbgp-features.xml:1.2 --- presentations/slides/xdebug/dbgp-features.xml:1.1 Thu Sep 2 02:56:03 2004 +++ presentations/slides/xdebug/dbgp-features.xml Mon Sep 13 09:41:19 2004 @@ -9,8 +9,7 @@ <blurb>response:</blurb> <example type="xml" class="code_large"><![CDATA[<response command="feature_get" transaction_id="1" feature_name="encoding" supported="1"> - <![CDATA[UTF-8]]> -</response>]]></example> + <![CDATA[UTF-8]]></response>]]></example> <break/> @@ -25,6 +24,6 @@ <blurb>Features include:</blurb> <blurb>%language_name% [RO], %supports_async% [RO], - %max_children% [RW], %max_data% [RW], %max_depth% [RO], %show_hidden% [RW] and + %max_children%, %max_data%, %max_depth% [RO], %show_hidden% and %supports_postmortem% [RO].</blurb> </slide> http://cvs.php.net/diff.php/presentations/slides/xdebug/vim.xml?r1=1.1&r2=1.2&ty=u Index: presentations/slides/xdebug/vim.xml diff -u presentations/slides/xdebug/vim.xml:1.1 presentations/slides/xdebug/vim.xml:1.2 --- presentations/slides/xdebug/vim.xml:1.1 Fri Mar 12 18:19:02 2004 +++ presentations/slides/xdebug/vim.xml Mon Sep 13 09:41:19 2004 @@ -3,13 +3,13 @@ <title>Vim Syntax</title> <blurb>~/.vim/filetype.vim</blurb> - <example fontsize="1.7em">augroup filetypedetect + <example class="bit_larger" fontsize="1.7em">augroup filetypedetect au BufNewFile,BufRead *.xt setf xt augroup END</example> <break lines="2"/> <blurb>~/.vim/syntax/xt.vim (http://xdebug.org/files/xt.vim)</blurb> - <example fontsize="1em">if version < 600 + <example class="bit_larger" fontsize="1em">if version < 600 syntax clear elseif exists("b:current_syntax") finish http://cvs.php.net/co.php/presentations/perf-oscom4.xml?r=1.1&p=1 Index: presentations/perf-oscom4.xml +++ presentations/perf-oscom4.xml <?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="0" > <topic>Performance</topic> <title>Speeding up PHP applications</title> <event>OSCOM 4</event> <location>Zürich, Switserland</location> <date>October 1st, 2004</date> <speaker>Derick Rethans</speaker> <email>derick@php.net</email> <url></url> <slide>slides/perf/title.xml</slide> <slide>slides/xdebug/questions.xml</slide> <slide>slides/perf/groups.xml</slide> <!-- SERVER OPTIMIZATION --> <slide>slides/perf/lifecycle.xml</slide> <slide>slides/perf/how_ccache.xml</slide> <slide>slides/perf/accelerators.xml</slide> <!-- Accelerators --> <slide>slides/perf/dso-nodso.xml</slide> <slide>slides/perf/squeeze.xml</slide> <!-- CACHING OPTIMIZATION --> <slide>slides/perf/what_caching.xml</slide> <slide>slides/perf/how_caching_works.xml</slide> <slide>slides/perf/pear_cache.xml</slide> <slide>slides/perf/caching_eval.xml</slide> <slide>slides/perf/total_page_caching.xml</slide> <slide>slides/perf/livedocs.xml</slide> <slide>slides/perf/static-und-squid.xml</slide> <slide>slides/perf/extern_squid.xml</slide> <!-- SQL OPTIMIZATION --> <!-- <slide>slides/hpp/mysql_opt.xml</slide> <slide>slides/hpp/mysql_opt2.xml</slide> <slide>slides/phpperform/visitation1.xml</slide> <slide>slides/phpperform/visitation2.xml</slide> <slide>slides/phpperform/visitation3.xml</slide> --> <!-- OPTIMIZING APPLICATIONS --> <slide>slides/perf/cpuusage.xml</slide> <slide>slides/perf/xdebug.xml</slide> <slide>slides/perf/xdebug-trace.xml</slide> <slide>slides/perf/xdebug-trace-xgui.xml</slide> <slide>slides/perf/xdebug-profile.xml</slide> <slide>slides/perf/prf_fileio.xml</slide> <slide>slides/perf/regex.xml</slide> <!-- BANDWIDTH OPTIMIZATION --> <slide>slides/perf/reduce.xml</slide> <slide>slides/perf/optimize.xml</slide> <slide>slides/perf/htmloptimize.xml</slide> <slide>slides/perf/compress.xml</slide> <slide>slides/perf/modgzip.xml</slide> <slide>slides/perf/phpzlib.xml</slide> <slide>slides/perf/resources-oscom4.xml</slide> </presentation> http://cvs.php.net/co.php/presentations/wereldveroverend-phpworks04.xml?r=1.1&p=1 Index: presentations/wereldveroverend-phpworks04.xml +++ presentations/wereldveroverend-phpworks04.xml <?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>Multi-lingual development</title> <event>php|works</event> <location>Toronto, Canada</location> <date>September 22th, 2004</date> <speaker>Derick Rethans</speaker> <email>derick@php.net</email> <url>http://pres.derickrethans.nl/wereldveroverend-phpworks04</url> <slide>slides/i18nl10n/title-phpworks04.xml</slide> <!-- CHARSETS --> <!--<slide>slides/i18nl10n/what-languages.xml</slide>--> <!-- what is the problem actually? --> <slide>slides/i18nl10n/not-ascii.xml</slide> <!-- not everything is ascii --> <slide>slides/i18nl10n/latin.xml</slide> <!-- latin charsets --> <slide>slides/i18nl10n/convert.xml</slide> <!-- converting charsets (single byte) --> <slide>slides/i18nl10n/asian.xml</slide> <!-- asian charsets --> <slide>slides/i18nl10n/unicode.xml</slide> <!-- unicode and ucs2, ucs4 --> <slide>slides/i18nl10n/utf8.xml</slide> <!-- what does utf8 solve? --> <slide>slides/i18nl10n/utf8-encoding.xml</slide> <!-- how does the encoding work? --> <!-- PROBLEMS and SOLUTIONS --> <slide>slides/i18nl10n/mb-problems.xml</slide> <!-- functions with utf8 chars --> <slide>slides/i18nl10n/iconv-solved.xml</slide> <!-- fixed with iconv --> <slide>slides/i18nl10n/iconv-strpos.xml</slide> <!-- iconv* and other functions --> <slide>slides/i18nl10n/pcre-utf8.xml</slide> <!-- regular expressions, /u, mb_regexp */ --> <!-- CONVERSION and OUTPUT --> <slide>slides/i18nl10n/iconv.xml</slide> <!-- iconv --> <slide>slides/i18nl10n/iconv-function.xml</slide> <!-- converting charsets with iconv --> <slide>slides/i18nl10n/iconv-ob-buffer.xml</slide> <!-- iconv ob_buffer --> <slide>slides/i18nl10n/iconv-ob-buffer-multiple.xml</slide> <!-- multiple charsets and iconv conversion --> <slide>slides/i18nl10n/wrong-http-header.xml</slide> <!-- show problem with wrong http header --> <slide>slides/i18nl10n/correct-http-header.xml</slide> <!-- setting http header --> <slide>slides/i18nl10n/iconv-html.xml</slide> <!-- transliteration to html --> <!--<slide>slides/i18nl10n/</slide>--> <!-- eZ transliteration ? --> <!-- LOCALE ISSUES --> <slide>slides/i18nl10n/locales.xml</slide> <slide>slides/i18nl10n/locale-collation.xml</slide> <!-- string collation (ordering) --> <slide>slides/i18nl10n/locale-casing.xml</slide> <!-- strupper/strlower --> <slide>slides/i18nl10n/locale-date.xml</slide> <!-- formatting a date --> <slide>slides/i18nl10n/locale-numeric.xml</slide> <!-- formatting numbers (also arabic numbers?) --> <slide>slides/i18nl10n/locale-money.xml</slide> <!-- formatting money --> <slide>slides/i18nl10n/locale-php.xml</slide> <!-- PHP and locales --> <!-- TRANSLATIONS IN WEBSITES --> <slide>slides/i18nl10n/trans-intro.xml</slide> <!-- intro --> <slide>slides/i18nl10n/trans-define1.xml</slide> <!-- with define --> <slide>slides/i18nl10n/trans-define2.xml</slide> <!-- with define --> <slide>slides/i18nl10n/trans-array1.xml</slide> <!-- with array --> <slide>slides/i18nl10n/trans-array2.xml</slide> <!-- with array --> <slide>slides/i18nl10n/trans-gettext1.xml</slide> <!-- with gettext --> <slide>slides/i18nl10n/trans-gettext2.xml</slide> <!-- with gettext --> <slide>slides/i18nl10n/trans-qt1.xml</slide> <!-- xml based definition --> <slide>slides/i18nl10n/trans-linguist.xml</slide> <!-- Qt Linguist --> <slide>slides/i18nl10n/trans-qt2.xml</slide> <!-- xml based definition --> <!-- EXIT --> <slide>slides/i18nl10n/resources.xml</slide> <!-- resources --> </presentation> http://cvs.php.net/co.php/presentations/slides/i18nl10n/i10n-example.php?r=1.1&p=1 Index: presentations/slides/i18nl10n/i10n-example.php +++ presentations/slides/i18nl10n/i10n-example.php <?php echo tr("foo"); ?> http://cvs.php.net/co.php/presentations/slides/i18nl10n/iconv-html.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/iconv-html.xml +++ presentations/slides/i18nl10n/iconv-html.xml <?xml version="1.0" encoding="iso-8859-1"?> <slide fontsize="6em"> <title>Conversion to HTML</title> <subtitle>(slide encoding is iso-8859-1)</subtitle> <blurb>iso-8859-1 to HTML:</blurb> <example class="bit_larger" encoding="iso-8859-1" result="0"><![CDATA[<?php $str = "Nittenhundreogåttiåtte<br/>\n"; echo htmlentities($str, ENT_NOQUOTES, 'iso-8859-1'); ?>]]></example> <break lines="2"/> <blurb class="bit_larger_output_text">output:</blurb> <example class="bit_larger_output"><![CDATA[Nittenhundreogåttiåtte<br/>]]></example> <break lines="4"/> <blurb>UTF-8 to HTML:</blurb> <example class="bit_larger" result="0"><![CDATA[<?php $str = "NittenhundreogÃ¥ttiÃ¥tte<br/>\n"; echo htmlentities($str, ENT_NOQUOTES, 'utf-8'); ?>]]></example> <break lines="2"/> <blurb class="bit_larger_output_text">output:</blurb> <example class="bit_larger_output"><![CDATA[Nittenhundreogåttiåtte<br/>]]></example> </slide> <!-- vim: encoding=latin1 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/locale-casing.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/locale-casing.xml +++ presentations/slides/i18nl10n/locale-casing.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>LC_CTYPE</title> <subtitle>language oriented case changes</subtitle> <example class="bit_larger" encoding="iso-8859-1" result="1"><![CDATA[<?php $a = "øyeblikk"; setlocale(LC_CTYPE, 'C'); echo strtoupper($a), "<br/>\n"; setlocale(LC_CTYPE, 'no_NO'); echo strtoupper($a), "<br/>\n"; setlocale(LC_CTYPE, 'tr_TR'); echo strtoupper($a), "<br/>\n"; ?>]]></example> <break/> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/locale-collation.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/locale-collation.xml +++ presentations/slides/i18nl10n/locale-collation.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>LC_COLLATE</title> <subtitle>language oriented sorting</subtitle> <example class="bit_larger" result="1"><![CDATA[<?php $b = $a = array("øks", "ærlig", "Ã¥tte", "øyeblikk"); setlocale(LC_COLLATE, 'C'); sort($a); var_dump($a); setlocale(LC_COLLATE, 'no_NO.UTF8'); sort($b, SORT_LOCALE_STRING); var_dump($b); ?>]]></example> <break/> <blurb>Mathematical order: Ã¥ (229), æ (230), ø (248)</blurb> <blurb>Natural order: æ, ø, Ã¥</blurb> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/locale-date.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/locale-date.xml +++ presentations/slides/i18nl10n/locale-date.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>LC_TIME</title> <subtitle>language oriented date and time formatting</subtitle> <example class="bit_larger" result="1"><![CDATA[<pre><?php $locales = array( 'Arabic (Egypt)' => 'ar_EG.UTF-8', 'American' => 'en_US', 'Dutch ' => 'nl_NL', 'Hebrew ' => 'iw_IL', 'Hebrew (UTF-8)' => 'iw_IL.UTF-8', 'Japanese' => 'ja_JP.UTF-8', 'Norwegian' => 'no_NO.UTF-8', 'Turkish ' => 'tr_TR.UTF-8' ); foreach ($locales as $country => $locale) { setlocale(LC_TIME, $locale); echo '<b>', $country, "</b>\t", strftime('%c'), "\n"; } ?></pre>]]></example> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/locale-money.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/locale-money.xml +++ presentations/slides/i18nl10n/locale-money.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>LC_MONETARY</title> <subtitle>formatting amounts of money</subtitle> <example class="bit_larger" result="1"><![CDATA[<pre><?php $locales = array( 'Egypt ' => 'ar_EG.UTF-8', 'Finland ' => 'fi_FI.UTF-8', 'Germany ' => 'de_DE.UTF-8', 'Israel ' => 'iw_IL.UTF-8', 'Japan ' => 'ja_JP.UTF-8', 'Netherlands' => 'nl_NL.UTF-8', 'Norway ' => 'no_NO.UTF-8', ); foreach ($locales as $country => $locale) { setlocale(LC_MONETARY, $locale); $nr = 31415.92654; echo "<b>$country</b>\t", money_format("[%i]", $nr), " \t", money_format("[%n]", $nr), "\n"; } ?></pre>]]></example> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/locale-numeric.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/locale-numeric.xml +++ presentations/slides/i18nl10n/locale-numeric.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>LC_NUMERIC</title> <subtitle>formatting numbers</subtitle> <example class="bit_larger" result="1"><![CDATA[<pre><?php $locales = array( 'Arabic (Egypt)' => 'ar_EG.UTF-8', 'American' => 'en_US', 'Dutch ' => 'nl_NL', 'Hebrew ' => 'iw_IL', 'Hebrew (UTF-8)' => 'iw_IL.UTF-8', 'Japanese' => 'ja_JP.UTF-8', 'Norwegian' => 'no_NO.UTF-8', 'Turkish ' => 'tr_TR.UTF-8' ); foreach ($locales as $country => $locale) { setlocale(LC_NUMERIC, $locale); $ldata = localeconv(); echo "<b>$country</b>\t", number_format("31415.92654", 2, $ldata['decimal_point'], $ldata['thousands_sep']), "\n"; } ?></pre>]]></example> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/locale-php.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/locale-php.xml +++ presentations/slides/i18nl10n/locale-php.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Locales and PHP</title> <blurb>string *setlocale*(const ~category~, string ~locale~, ~...~)</blurb> <blurb>string *setlocale*(const ~category~, array ~locales~)</blurb> <break/> <blurb>Localenames:</blurb> <list> <bullet>Are OS dependent (deu_deu vs. de_DE)</bullet> <bullet>Are not always available</bullet> </list> <break/> <blurb>Example:</blurb> <example class="bit_larger" result="1"><![CDATA[<?php $locale = setlocale(LC_ALL, "nl_NL.UTF-8@euro", "nl_NL.UTF-8", "dutch", "nld_nld"); echo "New locale: ", $locale, "<br />\n"; $locale = setlocale(LC_ALL, array("nld_nld", "nederlands")); echo "New locale: ", $locale, "<br />\n"; ?>]]></example> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/locales.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/locales.xml +++ presentations/slides/i18nl10n/locales.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Locales</title> <subtitle>language and cultural rules</subtitle> <blurb> A locale is a set of language and cultural rules. These cover aspects such as language for messages, different character sets, lexigraphic conventions, etc. </blurb> <break/> <blurb>Locale types:</blurb> <list> <bullet>LC_COLLATE: string collation</bullet> <bullet>LC_CTYPE: character properties, case sensivity</bullet> <bullet>LC_MONETARY: monetary formatting</bullet> <bullet>LC_NUMBER: number formatting</bullet> <bullet>LC_TIME: date and time formatting</bullet> </list> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/resources-oscom4.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/resources-oscom4.xml +++ presentations/slides/i18nl10n/resources-oscom4.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide fontsize="3.5em"> <title>Resources</title> <image align="center" filename="dominating-the-world.png" /> <break lines="4"/> <link fontsize="2.4em" marginleft="0em" leader="This presentation: " href="http://pres.derickrethans.nl/wereldveroverend-oscom4" target="_new"/> <link fontsize="3em" marginleft="0em" leader="Questions?: " href="derick@php.net" target="_new"/> </slide> http://cvs.php.net/co.php/presentations/slides/i18nl10n/title-oscom4.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/title-oscom4.xml +++ presentations/slides/i18nl10n/title-oscom4.xml <slide fontsize="3.5em"> <title>Welcome!</title> <image align="center" filename="dominating-the-world.png" /> <break lines="3"/> <blurb class="event">Oà´COM 4</blurb> <break/> <blurb class="event-date">September 30th, 2004. Züich, Switserland</blurb> <break/> <blurb class="event-presenter">Derick Rethans &lt;<a href="mailto:derick@php.net">derick@php.net</a>&gt;</blurb> <break/> <blurb class="pres-url-small"><a href="http://pres.derickrethans.nl/wereldveroverend-oscom4">http://pres.derickrethans.nl/wereldveroverend-oscom4</a></blurb> </slide> http://cvs.php.net/co.php/presentations/slides/i18nl10n/title-phpworks04.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/title-phpworks04.xml +++ presentations/slides/i18nl10n/title-phpworks04.xml <slide fontsize="3.5em"> <title>Welcome!</title> <image align="center" filename="multi-langual-development-trans.png" /> <break lines="3"/> <blurb class="event">php|Ïorks</blurb> <break/> <blurb class="event-date">September 22th, 2004. Toronto, Canada</blurb> <break/> <blurb class="event-presenter">Derick Rethans &lt;<a href="mailto:derick@php.net">derick@php.net</a>&gt;</blurb> <break/> <blurb class="pres-url-small"><a href="http://pres.derickrethans.nl/wereldveroverend-phpworks04">http://pres.derickrethans.nl/wereldveroverend-phpworks04</a></blurb> </slide> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-array1.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-array1.xml +++ presentations/slides/i18nl10n/trans-array1.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Method 2: Phrase dictionary</title> <subtitle>Using an array to define translation strings</subtitle> <blurb>How it works:</blurb> <list> <bullet>Each string an entry in the translation array</bullet> <bullet>Fall back realized with array merging</bullet> </list> <break/> <blurb>Definition files:</blurb> <example class='bit_larger'><![CDATA[trans/en.php: <?php $l = array(); $l["CLICK_HERE"] = 'Click <a href="%1">here</a> to'; $l["LOGIN"] = 'log in'; $l["LOGOUT"] = 'log out'; ?> trans/nl.php: <?php include 'trans/en.php'; $l["LOGIN"] = 'in te loggen'; $l["LOGOUT"] = 'uit te loggen'; ?>]]></example> <break/> <blurb>Usage:</blurb> <example class='bit_larger'><![CDATA[<?php include 'trans/nl.php'; printf("{$l['CLICK_HERE']} {$l['LOGIN']}", 'login.php'); ?>]]></example> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-array2.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-array2.xml +++ presentations/slides/i18nl10n/trans-array2.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Method 2: Phrase dictionary</title> <subtitle>Using an array to define translation strings</subtitle> <blurb>Pro:</blurb> <list> <bullet>It is very simple</bullet> <bullet>Fall back mechanism in place</bullet> </list> <break/> <blurb>Con:</blurb> <list> <bullet>Translators need to fiddle with PHP code</bullet> <bullet>Translation files need to be manually created</bullet> <bullet>Arrays can use quite some memory</bullet> <bullet>Two definition files are loaded</bullet> </list> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-define1.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-define1.xml +++ presentations/slides/i18nl10n/trans-define1.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Method 1: Constants</title> <subtitle>Using define() to define translation strings</subtitle> <blurb>How it works:</blurb> <list> <bullet>Each string is a constant</bullet> <bullet>Different include files for each language</bullet> </list> <break/> <blurb>Definition file:</blurb> <example class='bit_larger'><![CDATA[trans/nl.php: <?php define("CLICK_HERE", 'Klik <a href="%1">hier</a> om'); define("LOGIN", 'in te loggen'); define("LOGOUT", 'uit te loggen'); ?>]]></example> <break/> <blurb>Usage:</blurb> <example class='bit_larger'><![CDATA[<?php include 'trans/nl.php'; printf(CLICK_HERE . ' ' . LOGIN, 'login.php'); ?>]]></example> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-define2.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-define2.xml +++ presentations/slides/i18nl10n/trans-define2.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Method 1: Constants</title> <subtitle>Using define() to define translation strings</subtitle> <blurb>Pro:</blurb> <list> <bullet>It is very simple</bullet> </list> <break/> <blurb>Con:</blurb> <list> <bullet>Translators need to fiddle with PHP code</bullet> <bullet>Translation files need to be manually created</bullet> <bullet>Fall back is hardly possible</bullet> <bullet>define() is not fast</bullet> </list> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-gettext1.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-gettext1.xml +++ presentations/slides/i18nl10n/trans-gettext1.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Method 3: Gettext</title> <subtitle>Using gettext to manage translations</subtitle> <blurb>How it works:</blurb> <list> <bullet>Extract phrases: %xgettext gettext.php%</bullet> <bullet>Create directories: %mkdir -p nl/LC_MESSAGES%</bullet> <bullet>Copy file: %cp messages.po nl/LC_MESSAGES%</bullet> <bullet>Translate: %vi nl/LC_MESSAGES/messages.po%</bullet> <bullet>Compile: %msgfmt nl/LC_MESSAGES/messages.po \ % % -o nl/LC_MESSAGES/messages.mo%</bullet> </list> <break/> <blurb>Usage:</blurb> <example class='bit_larger'><![CDATA[<?php bindtextdomain('messages', './'); setlocale(LC_MESSAGES, 'nl'); printf(_("Click <a href='%s'>here</a>") . " " . _("to login"), 'login.php'); ?>]]></example> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-gettext2.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-gettext2.xml +++ presentations/slides/i18nl10n/trans-gettext2.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Method 3: Gettext</title> <subtitle>Using gettext to manage translations</subtitle> <blurb>Translation file:</blurb> <example class='bit_larger'><![CDATA[#: gettext.php:4 msgid "Click <a href='%s'>here</a>" msgstr "Klik <a href='%s'>hier</a>" #: gettext.php:4 msgid "to login" msgstr "om in te loggen"]]></example> <break/> <blurb>Pro:</blurb> <list> <bullet>Fall back mechanism in place</bullet> <bullet>Translation files can automatically be generated</bullet> <bullet>It's very efficient</bullet> </list> <break/> <blurb>Con:</blurb> <list> <bullet>Setting it up is not an easy task</bullet> <bullet>Translators still not have a very easy job</bullet> </list> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-intro.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-intro.xml +++ presentations/slides/i18nl10n/trans-intro.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Translating Applications</title> <blurb>A few things are important:</blurb> <list> <bullet>Non-technical translators should have an easy job</bullet> <bullet>Easy discovery of translatable text</bullet> <bullet>There needs to be a fall back to the default language</bullet> <bullet>It needs to be fast</bullet> </list> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-linguist.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-linguist.xml +++ presentations/slides/i18nl10n/trans-linguist.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide fontsize="6em"> <title>Qt Linguist</title> <image class="spaced" align="right" filename="linguist.png"/> </slide> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-qt1.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-qt1.xml +++ presentations/slides/i18nl10n/trans-qt1.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Method 4: The Qt way</title> <subtitle>Using XML based translation files</subtitle> <blurb>How it works:</blurb> <list> <bullet>Extract phrases: %lupdate linguist.php -ts en.ts nl.ts%</bullet> <bullet>Translate: %linguist nl.ts%</bullet> </list> <break/> <blurb>Usage:</blurb> <example class='bit_larger'><![CDATA[<?php // Parse XML file "nl.ts" into $dictionary function tr($phrase) { return $GLOBALS['dictionary'][$phrase]; } printf(tr("Click <a href='%s'>here</a>") . " " . tr("to login"), 'login.php'); ?>]]></example> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/i18nl10n/trans-qt2.xml?r=1.1&p=1 Index: presentations/slides/i18nl10n/trans-qt2.xml +++ presentations/slides/i18nl10n/trans-qt2.xml <?xml version="1.0" encoding="utf8"?> <slide fontsize="6em"> <title>Method 4: The Qt way</title> <subtitle>Using XML based translation files</subtitle> <blurb>Pro:</blurb> <list> <bullet>Fall back mechanism in place</bullet> <bullet>Translation files can automatically be generated and updated</bullet> <bullet>Translators have a very easy job</bullet> </list> <break/> <blurb>Con:</blurb> <list> <bullet>The XML needs to be parsed</bullet> </list> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/perf/accelerators.xml?r=1.1&p=1 Index: presentations/slides/perf/accelerators.xml +++ presentations/slides/perf/accelerators.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide fontsize="6em"> <title>PHP Accelerators</title> <list> <li>APC</li> <li>Zend Performance Suite</li> <li>Turck MM Cache</li> <li>PHP Accelerator</li> </list> <image marginleft='4em' filename='caches.png'/> </slide> http://cvs.php.net/co.php/presentations/slides/perf/caching_eval.xml?r=1.1&p=1 Index: presentations/slides/perf/caching_eval.xml +++ presentations/slides/perf/caching_eval.xml <slide> <title>Pros and Cons of Caching</title> <break lines="4"/> <blurb>Pros:</blurb> <list> <bullet>Potentially Immense Speed-Up</bullet> <bullet>Decreased Resource Consumption</bullet> </list> <blurb>Cons:</blurb> <list> <bullet>Increase in Architectural Complexity</bullet> <bullet>Potential for Stale or Inconsistent Data</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/compress.xml?r=1.1&p=1 Index: presentations/slides/perf/compress.xml +++ presentations/slides/perf/compress.xml <slide> <title>Content Compression</title> <list class="large"> <bullet>Some browsers can accept certain content compressed.</bullet> <bullet>We can trade some CPU cycles for reduced bandwidth usage.</bullet> <bullet>Compression is usually a minor overhead.</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/cpuusage.xml?r=1.1&p=1 Index: presentations/slides/perf/cpuusage.xml +++ presentations/slides/perf/cpuusage.xml <slide> <title>CPU Usage</title> <list> <bullet>Avoid Using frequent array accesses, remember, each array access is a hash lookup.</bullet> </list> <example><![CDATA[<?php $ar = array(); $ar['name'] = 'Optimization'; for ($i = 0; $i < count($entries); $i++) { print $ar['name']; } ?>]]></example> <list> <bullet>Shorten "required" executions, such as loops.</bullet> <bullet>Avoid rebuilding large data structures.</bullet> <bullet>Look for alternatives to regular expressions</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/extern_squid.xml?r=1.1&p=1 Index: presentations/slides/perf/extern_squid.xml +++ presentations/slides/perf/extern_squid.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Squid</title> <blurb>Some effort to use with PHP:</blurb> <example><![CDATA[<?php $timestamp = /* timestamp for last updated part */; $tsstring = gmdate("D, d M Y H:i:s ", $timestamp)."GMT"; if ($_SERVER["HTTP_IF_MODIFIED_SINCE"] == $tsstring) { /* The UA has the exact same page we have. */ header("HTTP/1.1 304 Not Modified"); exit(); } else { header("Last-Modified: ".$tsstring); } ?>]]></example> <break lines="2"/> <blurb>Set Cache-Control headers so external caches know how to respect your content:</blurb> <example><![CDATA[<?php header("Last-Modified: Mon, 13 Se4 2002 09:44:13 GMT"); header("Expires: Mon, 13 Sep 2004 10:44:13 GMT"); header("Cache-Control: must-revalidate, max-age=15, s-maxage=0, private"); ?>]]></example> </slide> http://cvs.php.net/co.php/presentations/slides/perf/groups.xml?r=1.1&p=1 Index: presentations/slides/perf/groups.xml +++ presentations/slides/perf/groups.xml <slide> <title>Optimization Strategies</title> <list class="large"> <bullet>Tuning the Webserver</bullet> <bullet>Caching</bullet> <bullet>Optimizing SQL Queries</bullet> <bullet>Optimizing PHP Code</bullet> <bullet>Reducing Bandwidth</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/how_caching_works.xml?r=1.1&p=1 Index: presentations/slides/perf/how_caching_works.xml +++ presentations/slides/perf/how_caching_works.xml <slide> <title>How Caching Works</title> <break lines="4"/> <image filename="how_caching_works.png" align="center"/> </slide> http://cvs.php.net/co.php/presentations/slides/perf/how_ccache.xml?r=1.1&p=1 Index: presentations/slides/perf/how_ccache.xml +++ presentations/slides/perf/how_ccache.xml <slide> <title>Compiler Caches</title> <subtitle>How it works</subtitle> <image filename="how_ccache.png" class="spaced"/> <break lines="5"/> <list> <bullet>In general, each source file is compiled once</bullet> <bullet>Compilation overhead becomes inconsequential</bullet> <bullet>Cache introduces its own overhead due to dynamic nature of includes</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/htmloptimize.xml?r=1.1&p=1 Index: presentations/slides/perf/htmloptimize.xml +++ presentations/slides/perf/htmloptimize.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Bandwidth Optimizations</title> <subtitle>Optimizing HTML</subtitle> <list> <bullet>Remove All Comments!</bullet> <bullet>Use CSS</bullet> <bullet>Fully qualify links (ie, personal/images/ not personal/images)</bullet> <bullet>%ext/tidy%</bullet> </list> <example><![CDATA[<?php $opts = array("clean" => true, "drop-proprietary-attributes" => true, "drop-font-tags" => true, "drop-empty-paras" => true, "hide-comments" => true, "join-classes" => true, "join-styles" => true); $tidy = tidy_parse_file("php.html", $opts); tidy_clean_repair($tidy); echo $tidy; ?>]]></example> </slide> http://cvs.php.net/co.php/presentations/slides/perf/lifecycle.xml?r=1.1&p=1 Index: presentations/slides/perf/lifecycle.xml +++ presentations/slides/perf/lifecycle.xml <slide> <title>Compiler Caches</title> <subtitle>What can be optimized</subtitle> <image filename="lifecycle.png" class="spaced"/> <break lines="5"/> <list> <bullet>This cycle happens for every include file, not just for the "main" script</bullet> <bullet>Compilation can easily consume more time than execution</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/livedocs.xml?r=1.1&p=1 Index: presentations/slides/perf/livedocs.xml +++ presentations/slides/perf/livedocs.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Livedocs</title> <subtitle>An Example of On-Demand Page Generation</subtitle> <blurb>Set up a 404 error handler in .htaccess:</blurb> <example><![CDATA[RewriteEngine on RewriteRule /.*\.[^h][^t][^m][^l]$ /$1.html ErrorDocument 404 /index.php DirectoryIndex index.php ]]></example> <break/> <blurb>index.php:</blurb> <example><![CDATA[<?php if (!empty($_SERVER['REDIRECT_URL'])) { // This is the requested page that caused the error $current_page = substr($_SERVER['REDIRECT_URL'], strlen(WEBBASE)); } .... if (!FORCE_DYNAMIC) { $contents = ob_get_contents(); ob_clean(); $f = fopen($lang . "/" . $current_page . ".html", 'w'); fwrite($f, $contents); fclose($f); echo $contents; } ?>]]></example> </slide> http://cvs.php.net/co.php/presentations/slides/perf/modgzip.xml?r=1.1&p=1 Index: presentations/slides/perf/modgzip.xml +++ presentations/slides/perf/modgzip.xml <slide> <title>mod_gzip</title> <list class="large"> <bullet>A very nice apache module for compressing content</bullet> <bullet>Can compress any content</bullet> <bullet>Can switch on MIME Types and Browser Types</bullet> <bullet>Uses Temporary Files</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/optimize.xml?r=1.1&p=1 Index: presentations/slides/perf/optimize.xml +++ presentations/slides/perf/optimize.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Bandwidth Optimizations</title> <subtitle>How?</subtitle> <list> <bullet>Use preprocessors to eliminate whitespace</bullet> <bullet>If you save 20 bytes per file, and have 1,000,000 hits a day, you've just saved 20,000,000 extra bytes</bullet> <bullet>Send content "when ready", and use progressive images</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/pear_cache.xml?r=1.1&p=1 Index: presentations/slides/perf/pear_cache.xml +++ presentations/slides/perf/pear_cache.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Caching Example</title> <subtitle>PEAR::Cache_Lite</subtitle> <example><![CDATA[<?php /* Include the class */ require_once('Cache/Lite.php'); /* Set a key for this cache item */ $id = 'newsitem1'; /* Set a few options */ $options = array( 'cacheDir' => '/var/cache/news/', 'lifeTime' => 3600 ); /* Create a Cache_Lite object */ $Cache_Lite = new Cache_Lite($options); /* Test if there is a valid cache-entry for this key */ if ($data = $Cache_Lite->get($id)) { /* Cache hit! */ } else { /* Cache miss! */ ob_start(); /* Generate content */ $data = ob_get_contents(); $Cache_Lite->save($data); } ?> ]]></example> </slide> http://cvs.php.net/co.php/presentations/slides/perf/phpzlib.xml?r=1.1&p=1 Index: presentations/slides/perf/phpzlib.xml +++ presentations/slides/perf/phpzlib.xml <slide> <title>zlib.output_compression</title> <list class="large"> <bullet>A built-in output buffer handler</bullet> <bullet>Set in %php.ini%</bullet> <bullet>Cannot be used with a custom %output_handler%</bullet> <bullet>Does generally not work with trans-sid</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/prf_fileio.xml?r=1.1&p=1 Index: presentations/slides/perf/prf_fileio.xml +++ presentations/slides/perf/prf_fileio.xml <?xml version="1.0" encoding="utf-8"?> <slide> <title>File I/O</title> <blurb>File I/O Problems</blurb> <list> <bullet>Disk access is slower than memory access</bullet> <bullet>Simultaneous write/write operations cause data corruption. Therefore locking must occurâwhich is slow</bullet> </list> <blurb>Tips:</blurb> <list> <bullet>Use the disk in concentrated bits, meaning do all your writing together.</bullet> <bullet>Try and put write operations where they will cause the least loss in user experience (remember, web pages are chunked!)</bullet> <bullet>Close the session handler ASAP with ~session_write_close()~</bullet> </list> </slide> <!-- vim: encoding=utf8 --> http://cvs.php.net/co.php/presentations/slides/perf/reduce.xml?r=1.1&p=1 Index: presentations/slides/perf/reduce.xml +++ presentations/slides/perf/reduce.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Bandwidth Optimizations</title> <subtitle>Reducing Output</subtitle> <blurb>Less output is good because...</blurb> <list> <bullet>Saves server bandwidth</bullet> <bullet>Decreases server CPU and memory usage</bullet> <bullet>Has the same effect on the client side</bullet> <bullet>On large sites, bandwidth is most often the most costly bottleneck</bullet> </list> </slide> http://cvs.php.net/co.php/presentations/slides/perf/regex.xml?r=1.1&p=1 Index: presentations/slides/perf/regex.xml +++ presentations/slides/perf/regex.xml <slide> <title>Regular Expressions</title> <blurb> Its often beneficial to replace regular expressions with simpler functions that have the same effect. </blurb> <break lines="2"/> <blurb>With Regular Expression:</blurb> <example><![CDATA[<?php if (preg_match ('/(.*)\@(.*)/', $data, $matches)) { print $matches[2]; } ?>]]></example> <break lines="2"/> <blurb>Without Regular Expression:</blurb> <example><![CDATA[<?php $pos = strrpos ('@', $data); if ($pos !== false) { print substr ($data, $pos); } ?>]]></example> <break lines="2"/> <blurb> In other cases it may help to use regular expressions instead of custom parse routines in your PHP code. </blurb> </slide> http://cvs.php.net/co.php/presentations/slides/perf/resources-oscom4.xml?r=1.1&p=1 Index: presentations/slides/perf/resources-oscom4.xml +++ presentations/slides/perf/resources-oscom4.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide fontsize="6em"> <title>Thank You!</title> <blurb> </blurb> <link fontsize="2em" marginleft="2em" leader="These Slides: " href="http://pres.derickrethans.nl" target="_new"/> <blurb> </blurb> <link fontsize="2em" marginleft="2em" leader="HTTP Cache Explanation: " href="http://www.mnot.net/cache_docs/"/> <link fontsize="2em" marginleft="2em" leader="HTML Tidy: " href="http://www.w3.org/People/Raggett/tidy/"/> <link fontsize="2em" marginleft="2em" leader="mod_gzip: " href="http://www.schroepl.net/projekte/mod_gzip/index.htm"/> <link fontsize="2em" marginleft="2em" leader="PHP: " href="http://www.php.net" target="_new"/> <link fontsize="2em" marginleft="2em" leader="squid: " href="http://www.squid-cache.org" target="_new"/> <link fontsize="2em" marginleft="2em" leader="Webreference HTML Optimization: " href="http://www.webreference.com/authoring/languages/html/optimize/"/> </slide> http://cvs.php.net/co.php/presentations/slides/perf/total_page_caching.xml?r=1.1&p=1 Index: presentations/slides/perf/total_page_caching.xml +++ presentations/slides/perf/total_page_caching.xml <slide> <title>Total Page Caching</title> <break lines="6"/> <image filename="total_page_caching.png" align="center"/> </slide> http://cvs.php.net/co.php/presentations/slides/perf/what_caching.xml?r=1.1&p=1 Index: presentations/slides/perf/what_caching.xml +++ presentations/slides/perf/what_caching.xml <slide> <title>What Is Caching?</title> <break lines="5"/> <blurb align="center" class="large_blurb_center"> Caching is the recognition and exploitation of the fact that most "dynamic" data does not change every time you request it. </blurb> </slide>