cvs: presentations / varazdin.xml /slides/intro ws6.xml ws8.xml yajax.xml yajax_combined.php

From: Date: Wed, 19 Apr 2006 07:39:07 +0000
Subject: cvs: presentations / varazdin.xml /slides/intro ws6.xml ws8.xml yajax.xml yajax_combined.php
Groups: php.pres 
Request: Send a blank email to pres+get-1280@lists.php.net to get a copy of this message
rasmus Wed Apr 19 07:39:07 2006 UTC Modified files: /presentations varazdin.xml /presentations/slides/intro ws6.xml ws8.xml yajax.xml yajax_combined.php Log: Tweaks, and skip the MVC stuff for Varazdin http://cvs.php.net/viewcvs.cgi/presentations/varazdin.xml?r1=1.1&r2=1.2&diff_format=u Index: presentations/varazdin.xml diff -u presentations/varazdin.xml:1.1 presentations/varazdin.xml:1.2 --- presentations/varazdin.xml:1.1 Mon Apr 17 00:58:43 2006 +++ presentations/varazdin.xml Wed Apr 19 07:39:07 2006 @@ -29,6 +29,9 @@ <slide>slides/intro/titlepage.xml</slide> +<slide>slides/intro/serverside.xml</slide> +<slide>slides/intro/idea.xml</slide> +<slide>slides/lamp/failfast.xml</slide> <slide>slides/intro/rich.xml</slide> <slide>slides/intro/rich2.xml</slide> <slide>slides/intro/php5.xml</slide> @@ -44,6 +47,8 @@ <slide>slides/intro/ws9.xml</slide> <slide>slides/intro/yajax.xml</slide> <slide>slides/intro/yajax_apc.xml</slide> +<slide>slides/bm06/profit.xml</slide> +<!-- <slide>slides/mvc/mvc.xml</slide> <slide>slides/mvc/example.xml</slide> <slide>slides/mvc/mvc_view1.xml</slide> @@ -51,8 +56,7 @@ <slide>slides/mvc/mvc_view3.xml</slide> <slide>slides/mvc/mvc_controller.xml</slide> <slide>slides/mvc/mvc_model.xml</slide> - -<slide>slides/bm06/profit.xml</slide> +--> <slide>slides/bm06/initial.xml</slide> <slide>slides/bm06/pg.xml</slide> <slide>slides/bm06/pg_persist.xml</slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/intro/ws6.xml?r1=1.1&r2=1.2&diff_format=u Index: presentations/slides/intro/ws6.xml diff -u presentations/slides/intro/ws6.xml:1.1 presentations/slides/intro/ws6.xml:1.2 --- presentations/slides/intro/ws6.xml:1.1 Wed Nov 9 11:33:37 2005 +++ presentations/slides/intro/ws6.xml Wed Apr 19 07:39:07 2006 @@ -3,23 +3,18 @@ Finally, a free geocoding API </blurb> -<example title="REST Query to look up an address" result="0" fontsize="1.8em" marginright="0em"><![CDATA[http://api.local.yahoo.com/MapsService/V1/geocode?appid=YahooDemo&location=94539]]></example> +<example title="REST Query to look up an address" result="0" fontsize="1.8em" marginright="0em"><![CDATA[http://api.local.yahoo.com/MapsService/V1/geocode?appid=YahooDemo&location=:-:location:-:]]></example> -<example title="Returned XML" result="0" fontsize="1.4em" marginright="0em"><![CDATA[<ResultSet xsi:schemaLocation="urn:yahoo:maps http://api.local.yahoo.com/MapsService/V1/GeocodeResponse.xsd"> - <Result precision="zip"> - <Latitude>37.5173</Latitude> - <Longitude>-121.9263</Longitude> - <Address/> - <City>FREMONT</City> - <State>CA</State> - <Zip>94539</Zip> - <Country>US</Country> - </Result> -</ResultSet>]]></example> +<example hide="1" result="1" title="Returned XML"><![CDATA[<?php +$data = file_get_contents("http://api.local.yahoo.com/MapsService/V1/geocode?appid=YahooDemo&location=:-:location:-:"); +$data = preg_replace("|<(/.*?)>|","<\\1>\n",$data); +$data = preg_replace("|\">|","\">\n",$data); +echo nl2br(htmlspecialchars($data)); +?>]]></example> <example fontsize="1.2em" title="We can parse it like this" result="1" marginright="0em" required_extension="simplexml"><![CDATA[<?php $url = 'http://api.local.yahoo.com/MapsService/V1/geocode'; - $url .= '?appid=YahooDemo&location=94539'; + $url .= '?appid=YahooDemo&location=:-:location:-:'; $xml = simplexml_load_file($url); $ret['precision'] = (string)$xml->Result['precision']; $ret['warning'] = (string)$xml->Result['warning']; http://cvs.php.net/viewcvs.cgi/presentations/slides/intro/ws8.xml?r1=1.3&r2=1.4&diff_format=u Index: presentations/slides/intro/ws8.xml diff -u presentations/slides/intro/ws8.xml:1.3 presentations/slides/intro/ws8.xml:1.4 --- presentations/slides/intro/ws8.xml:1.3 Mon Apr 17 00:58:43 2006 +++ presentations/slides/intro/ws8.xml Wed Apr 19 07:39:07 2006 @@ -10,7 +10,7 @@ </script> <div id="mapContainer" style="height: 400px; width: 930px;"></div> <script type="text/javascript"> -var mymap = new Map("mapContainer","YahooDemo",":-:location:-:",16,MapViews.HYBRID); +var mymap = new Map("mapContainer","YahooDemo",":-:location:-:",10,MapViews.HYBRID); mymap.addTool(new PanTool(), true); mymap.addWidget(new SatelliteControlWidget()); mymap.addWidget(new NavigatorWidget()); @@ -30,7 +30,8 @@ var jsmap = new YMap(document.getElementById('jsmapContainer')); jsmap.addTypeControl(); jsmap.addZoomLong(); -jsmap.drawZoomAndCenter(":-:location:-:", 10); +jsmap.setMapType('YAHOO_SAT'); +jsmap.drawZoomAndCenter(":-:location:-:", 16); </script>]]></example> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/intro/yajax.xml?r1=1.2&r2=1.3&diff_format=u Index: presentations/slides/intro/yajax.xml diff -u presentations/slides/intro/yajax.xml:1.2 presentations/slides/intro/yajax.xml:1.3 --- presentations/slides/intro/yajax.xml:1.2 Mon Apr 17 08:14:08 2006 +++ presentations/slides/intro/yajax.xml Wed Apr 19 07:39:07 2006 @@ -5,5 +5,5 @@ <example title="yajax_geocode.php" filename="yajax_geocode.php" hide="0" result="0" fontsize="1.5em" marginright="0em"/> <example title="" filename="yajax_geocode.php" hide="1" result="1" marginright="0em" type="iframe" iheight="100"/> <example title="yajax_combined.php" filename="yajax_combined.php" hide="0" result="0" fontsize="1.5em" marginright="0em"/> -<example title="" filename="yajax_combined.php" hide="1" result="1" marginright="0em" type="iframe" iheight="400" iwidth="2000"/> +<example title="" filename="yajax_combined.php" hide="1" result="1" marginright="0em" type="iframe" iheight="500" iwidth="2000"/> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/intro/yajax_combined.php?r1=1.1&r2=1.2&diff_format=u Index: presentations/slides/intro/yajax_combined.php diff -u presentations/slides/intro/yajax_combined.php:1.1 presentations/slides/intro/yajax_combined.php:1.2 --- presentations/slides/intro/yajax_combined.php:1.1 Mon Apr 17 08:14:08 2006 +++ presentations/slides/intro/yajax_combined.php Wed Apr 19 07:39:07 2006 @@ -6,7 +6,7 @@ $lat = $ll['ResultSet']['Result']['Latitude']; $lon = $ll['ResultSet']['Result']['Longitude']; $map = "http://api.local.yahoo.com/MapsService/V1/mapImage?appid=YahooDemo". - "&output=php&image_width=500&image_height=500&radius=1500"; + "&output=php&image_width=450&image_height=450&radius=1500"; $N = unserialize(file_get_contents("$map&latitude=$lat&longitude=$lon")); $lat = -$lat; $lon = $lon<0 ? 180+$lon : $lon-180; $S = unserialize(file_get_contents("$map&latitude=$lat&longitude=$lon")); @@ -26,12 +26,12 @@ var resp = eval('(' + o.responseText + ')'); if(!img1) { img1 = document.createElement('img'); - img1.src = resp.north; img1.width=500; img2.height=500; img2.border=1; + img1.src = resp.north; img1.width=450; img2.height=450; img2.border=1; document.body.appendChild(img1); } else img1.src = resp.north; if(!img2) { img2 = document.createElement('img'); - img2.src = resp.south; img2.width=500; img2.height=500; img2.border=1; + img2.src = resp.south; img2.width=450; img2.height=450; img2.border=1; document.body.appendChild(img2); } else img2.src = resp.south; }

« previous php.pres (#1280) next »