<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Oleg Puzanov</title>
	<atom:link href="http://olegpuzanov.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://olegpuzanov.com</link>
	<description>professional web developer blog</description>
	<lastBuildDate>Thu, 01 Mar 2012 12:46:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>4 Must-Read Books for Front End Developers</title>
		<link>http://olegpuzanov.com/2012/01/23/4-must-read-books-for-front-end-developers/</link>
		<comments>http://olegpuzanov.com/2012/01/23/4-must-read-books-for-front-end-developers/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 23:14:08 +0000</pubDate>
		<dc:creator>Oleg Puzanov</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[frontend]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://olegpuzanov.com/?p=272</guid>
		<description><![CDATA[Our life is changing really fast. Smartphones, tablets, web browsers, new technologies and approaches &#8211; everything new appears so quickly that it&#8217;s become extremely hard to follow it. The life of any front end developer in such conditions seems to never be tedious &#8211; your projects should looks good on dozen of different devices with diverse capabilities, [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">O</span>ur life is changing really fast. Smartphones, tablets, web browsers, new technologies and approaches &#8211; everything new appears so quickly that it&#8217;s become extremely hard to follow it. The life of any front end developer in such conditions seems to never be tedious &#8211; your projects should looks good on dozen of different devices with diverse capabilities, screen sizes, etc. Of course, you need to have a solid knowledge foundation to handle it. So I would like to provide a list of 4 books that I&#8217;ve found useful to me.<span id="more-272"></span></p>
<p>1. <a title="Dive into HTML5" href="http://diveintohtml5.info/">Dive into HTML5</a> by Mark Pilgrim</p>
<p>Excellent free online book about HTML5 features with a lot of examples. Unfortunately,  Mark has stopped maintaining this project, but community still actively maintain it it.</p>
<p>2. <a title="Responsive Web Design" href="http://www.abookapart.com/products/responsive-web-design">Responsive Web Design</a> by Ethan Marcotte</p>
<p>In his book Ethan explore CSS techniques and design principles, including fluid grids, flexible images, and media queries, demonstrating how you can deliver a quality experience to your users.</p>
<p>3. <a title="Mobile First" href="http://www.abookapart.com/products/mobile-first">Mobile First</a> by Luke Wroblewski</p>
<p>Luke explains why we should switch from graceful degradation to progressive enhancement and how to adopt best mobile experience.</p>
<p>4. <a title="Pro JavaScript Techniques" href="http://www.amazon.com/Pro-JavaScript-Techniques-John-Resig/dp/1590597273">Pro JavaScript Techniques</a> by John Resig</p>
<p>Great book which explains tricky JavaScript techniques from creator of Jquery library John Resig. Despite it was published in 2006, it&#8217;s still topical.</p>
]]></content:encoded>
			<wfw:commentRss>http://olegpuzanov.com/2012/01/23/4-must-read-books-for-front-end-developers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Improve DNS lookup time under Ubuntu 11.04</title>
		<link>http://olegpuzanov.com/2011/08/17/improve-dns-lookup-time-under-ubuntu-11-04/</link>
		<comments>http://olegpuzanov.com/2011/08/17/improve-dns-lookup-time-under-ubuntu-11-04/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 07:52:57 +0000</pubDate>
		<dc:creator>Oleg Puzanov</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://puzanov.info/?p=250</guid>
		<description><![CDATA[A lot of people complain about weird problems with DNS resolving speed under Ubuntu while surfing the Internet - it could takes a long time to access a new site, but when it is finally loaded, further browsing on that site is good. It doesn&#8217;t depends on the browser &#8211; Firefox, Google Chrome, Opera &#8211; load [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">A</span> lot of people complain about weird problems with DNS resolving speed under Ubuntu while surfing the Internet - it could takes a long time to access a new site, but when it is finally loaded, further browsing on that site is good. It doesn&#8217;t depends on the browser &#8211; Firefox, Google Chrome, Opera &#8211; load pages quite slowly for the first time. Besides, your network seems to be ok &#8211; ping time is acceptable, download speed is good.</p>
<p>Familiar situation?</p>
<p><span id="more-250"></span>There are a lot of solutions proposed on different blogs and forums &#8211; most popular among them are disabling ipv6 both in Ubuntu and FF, using alternative DNS resolution service (like <a title="Google Public DNS" href="http://code.google.com/speed/public-dns/">Google Publis DNS</a>), playing with MTU parameter of your connection, etc. But unfortunately, nothing works for me.</p>
<p>Finally, I found a solution for this problem. It was in nsswitch.conf - system databases and name service switch configuration file.</p>
<p>Try the following:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cat /etc/nsswitch.conf | grep hosts</div></div>
<p>Output will be like this:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">hosts: files wins mdns4_minimal [NOTFOUND=return] dns mdns4</div></div>
<p>It means, that first Ubuntu will check files records (like /etc/hosts), then wins, then mdns4_minimal and finally dns. These records were added by Samba, so everything what we should do is change their order to:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">hosts: files dns mdns4_minimal [NOTFOUND=return] wins mdns4</div></div>
<p>Reboot to apply changes.</p>
]]></content:encoded>
			<wfw:commentRss>http://olegpuzanov.com/2011/08/17/improve-dns-lookup-time-under-ubuntu-11-04/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introducing Lua</title>
		<link>http://olegpuzanov.com/2010/11/09/introducing-lua/</link>
		<comments>http://olegpuzanov.com/2010/11/09/introducing-lua/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 14:42:01 +0000</pubDate>
		<dc:creator>Oleg Puzanov</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[lua]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://puzanov.info/?p=226</guid>
		<description><![CDATA[Lua, WTF? Lua is a powerful, fast, lightweight, embeddable scripting language. It&#8217;s name comes from the Portuguese word lua meaning &#8220;moon&#8221;.  Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management [...]]]></description>
			<content:encoded><![CDATA[<h3><span class="drop">L</span>ua, WTF?</h3>
<p>Lua is a powerful, fast, lightweight, embeddable scripting language. It&#8217;s name comes from the Portuguese word lua meaning &#8220;moon&#8221;.  Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.</p>
<p><span id="more-226"></span></p>
<h3>Where Lua can be used?</h3>
<p>Lua is intended for use as an extension or scripting language, and is compact enough to fit on a variety of host platforms. It is widely used as a scripting language by game programmers (in Blizzard&#8217;s World of Warcraft for instance), perhaps owing to how easy it is to embed, its fast execution speed, and its small learning curve. Besides, Lua used in Adobe Photoshop Lightroom for user interface, in MySQL Workbench for extension and add-ons, in VLC media player to provide scripting support and in many other products (<a href="http://lua-users.org/wiki/LuaUses">list of products</a> that uses Lua on it&#8217;s official site and Wikipedia <a href="http://en.wikipedia.org/wiki/Lua_(programming_language)#Applications">list</a>).</p>
<h3>How to get started with Lua?</h3>
<p>First you need to download and install Lua for your system. Lua distributed in <a title="Lua source code" href="http://www.lua.org/ftp/">source code</a>, already compiled <a title="Lua binaries" href="http://lua-users.org/wiki/LuaBinaries">binaries</a> and special <a title="Lua for Windows" href="http://code.google.com/p/luaforwindows/">&#8220;Lua for Windows&#8221;</a> version. I&#8217;ve tried Windows version which include command line Lua interpreter and Lua IDE (&#8220;SciTE&#8221;) with syntax coloring, debugging, etc.</p>
<p>If you don&#8217;t want to install anything and just wanna play with Lua you can try online <a title="Lua online demo" href="http://www.lua.org/cgi-bin/demo">Demo</a> interpreter.</p>
<h3>Lua Basics</h3>
<p>The most recent version is 5.1 &#8211; released in 2006 (5.2 still under development). Lua written in ANSI C so it&#8217;s very fast. Lua has a simple and well documented API that allows strong integration with code written in other languages. It is easy to extend Lua with libraries written in other languages. It is also easy to extend programs written in other languages with Lua. Lua has been used to extend programs written not only in C and C++, but also in Java, C#, Smalltalk, Fortran, Ada, Erlang, and even in other scripting languages, such as Perl and Ruby.</p>
<p>Lua&#8217;s syntax is very easy, so it shouldn&#8217;t be a problem for any developer to understand it. <em>Two dashes</em> introduce comments. An <em>end</em> statement delimits control structures (<em>if, for, while</em>). All variables are global unless explicitly declared local. Lua&#8217;s fundamental data types include numbers (typically represented as double-precision floating-point values), strings, and Booleans. Lua has <em>true</em> and <em>false</em> as keywords; any expression that does not evaluate to <em>nil</em> is <em>true</em>. Note that 0 and arithmetic expressions that evaluate to 0 do not evaluate to <em>nil</em>. Thus Lua considers them as <em>true</em> when you use them as part of a conditional statement.</p>
<p>Usual &#8220;Hello World&#8221; example looks like this:</p>
<div class="codecolorer-container lua twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="lua codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000aa;">print</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff6666;">&quot;Hello World!&quot;</span><span style="color: #66cc66;">&#41;</span></div></div>
<p>Let say &#8220;Hello&#8221; three times:</p>
<div class="codecolorer-container lua twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="lua codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #aa9900; font-weight: bold;">for</span> i<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">3</span> <span style="color: #aa9900; font-weight: bold;">do</span><br />
<span style="color: #0000aa;">print</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff6666;">&quot;Hello World&quot;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #aa9900; font-weight: bold;">end</span></div></div>
<p>Cool, isn&#8217;t it?</p>
<p>I would like to recommend you great Lua tutorial by <a title="Lee Gao" href="http://failboat.me/">Lee Gao</a> - <a title="Lua Tutorial" href="http://luatut.com/">The.Lua.Tutorial</a> to quickly get started with Lua syntax. If you&#8217;re interested to get more information about Lua please check last section with recommended links.</p>
<h3>Further reading</h3>
<p>Official site: <a title="Lua website" href="http://www.lua.org/">Lua &#8211; the programming language</a></p>
<p><a href="http://www.ibm.com/developerworks/linux/library/l-lua.html">Embeddable scripting with Lua</a> &#8211; at IBM developerWorks</p>
<p><a href="http://onlamp.com/pub/a/onlamp/2006/02/16/introducing-lua.html">Introducing Lua</a> &#8211; at O&#8217;Reilly OnLamp</p>
]]></content:encoded>
			<wfw:commentRss>http://olegpuzanov.com/2010/11/09/introducing-lua/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HTML5 is here</title>
		<link>http://olegpuzanov.com/2010/10/06/html5-is-here/</link>
		<comments>http://olegpuzanov.com/2010/10/06/html5-is-here/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 09:29:44 +0000</pubDate>
		<dc:creator>Oleg Puzanov</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://puzanov.info/?p=214</guid>
		<description><![CDATA[As you probably know HTML5 is the latest revision of HTML standard. It brings a lot of new great features that will drastically change the World Wide Web in the nearest future. Actually, this changes are already there &#8211; Google used HTML5 features for video at Youtube.com and Apple launched special promo page on their site [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">A</span>s you probably know <a href="http://dev.w3.org/html5/markup/">HTML5</a> is the latest revision of HTML standard.</p>
<p>It brings a lot of new great features that will drastically change the World Wide Web in the nearest future. Actually, this changes are already there &#8211; Google used HTML5 features for video at Youtube.com and Apple launched <a href="http://www.apple.com/html5/">special promo page</a> on their site to show the advantages of creating rich multimedia web-applications without Flash &#8211; yes, they hate Adobe <img src='http://olegpuzanov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . Even Microsoft announced about HTML5 support in IE9.<span id="more-214"></span></p>
<p>Here is the list of main differences from previous (X)HTML versions:</p>
<ul>
<li>New layout tags: &lt;article&gt;, &lt;section&gt;, &lt;header&gt;, &lt;footer&gt;, etc.</li>
<li>Native media playback directly in browser (i.e. without Flash).</li>
<li>Canvas for drawing.</li>
<li>New form controls: date and time pickers, fields for email, url, search, etc.</li>
<li>Ability for applications to working offline (bye-bye Google Gears).</li>
<li>Drag-and-drop.</li>
<li>Geolocation.</li>
<li>Websockets.</li>
<li>Etc, etc, etc &#8211; please refer to the <a href="http://dev.w3.org/html5/markup/">language reference on w3c site</a>.</li>
</ul>
<p>Because HTML5 standard is quite new, a lot of new features still not supported by browser vendors. <a href="http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(HTML5)">Here</a> you can find detailed information about HTML5 support by most popular layout engines and <a href="http://html5test.com/">here</a> you can test how well your browser support HTML5.</p>
<p>It&#8217;s very easy to get started with HTML5. All you need to do is change your doctype to &lt;!DOCTYPE html&gt;. It don&#8217;t break your existing layout, because all tags from previous HTML versions still works in HTML5. After doctype switching you will allow to use new tags like &lt;article&gt;, &lt;section&gt;, etc. and start playing with other new features. You can look at several HTML5 experimentation and demos at <a href="http://html5demos.com/">HTML5Demos</a></p>
<p>So this is very quick and short introduction to HTML5. In next series we will try to dive deeper into it and try to understand how to use it in real-world projects. Stay tuned <img src='http://olegpuzanov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>P.S. I would like to recommend your great book &#8220;Dive into HTML5&#8243; by Mark Pilgrim which freely available <a href="http://diveintohtml5.org/">online</a>.</p>
            <a href="http://twitter.com/share" class="twitter-share-button" data-count="" data-text="HTML5 is here" data-via="" data-url="http://olegpuzanov.com/2010/10/06/html5-is-here/" >Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>]]></content:encoded>
			<wfw:commentRss>http://olegpuzanov.com/2010/10/06/html5-is-here/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Oracle to discontinue JavaFX script &#8211; will use Java API</title>
		<link>http://olegpuzanov.com/2010/09/21/oracle-to-discontinue-javafx-script-will-use-java-api/</link>
		<comments>http://olegpuzanov.com/2010/09/21/oracle-to-discontinue-javafx-script-will-use-java-api/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 08:54:32 +0000</pubDate>
		<dc:creator>Oleg Puzanov</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[javafx]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://puzanov.info/?p=205</guid>
		<description><![CDATA[After a short three-year run, the scripting language behind JavaFX was declared dead today at JavaOne. Starting with JavaFX 2.0, which is due out in 2011 (in 7-10 months), the unique RIA framework will use the Java API in place of the doomed JavaFX Script. Of course, this also means that other JVM languages like [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">A</span>fter a short three-year run, the scripting language behind JavaFX was declared dead today at JavaOne. Starting with JavaFX 2.0, which is due out in 2011 (in 7-10 months), the unique RIA framework will use the Java API in place of the doomed JavaFX Script.  Of course, this also means that other JVM languages like Groovy and Scala could be used to write applications with JavaFX, but we&#8217;ll have to see how this new system works.</p>
<p>JavaFX 2.0 will also come with an embeddable browser and will itself be embeddable into… wait for it… Swing.  On the surface, it looks like they&#8217;re essentially turning JavaFX into another set of libraries for RIA.  One tweeter called it &#8220;swing++.&#8221;  This will also make JavaFX resemble Apache Pivot in a few more ways.</p>
<p>via <a href="http://java.dzone.com/articles/oracle-discontinue-javafx">java.dzone.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://olegpuzanov.com/2010/09/21/oracle-to-discontinue-javafx-script-will-use-java-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visualise your Twitter friends with jsPlumb Jquery</title>
		<link>http://olegpuzanov.com/2010/06/08/visualise-your-twitter-friends-with-jsplumb-jquery/</link>
		<comments>http://olegpuzanov.com/2010/06/08/visualise-your-twitter-friends-with-jsplumb-jquery/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 13:52:20 +0000</pubDate>
		<dc:creator>Oleg Puzanov</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jsplumb]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://puzanov.info/?p=163</guid>
		<description><![CDATA[Recently I&#8217;ve read an article (in Russian) about great JQuery plugin &#8211; jsPlumb by Simon Porritt. This plugin provides a way to &#8220;plumb&#8221; elements of a UI together, so it can be used in many situations when you need to visualise relations between items. jsPlumb allows you to connect elements on the screen with &#8220;plumbing&#8221;, using [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">R</span>ecently I&#8217;ve read an <a title="jsPlubm" href="http://vremenno.net/js/visualizing-objects-relations-with-jsplumb/">article</a> (in Russian) about great JQuery plugin &#8211; <a href="http://morrisonpitt.com/jsPlumb/html/demo.html">jsPlumb</a> by <a href="http://morrisonpitt.com/simonporritt/">Simon Porritt</a>. This plugin provides a way to &#8220;plumb&#8221; elements of a UI together, so it can be used in many situations when you need to visualise relations between items. jsPlumb allows you to connect elements on the screen with &#8220;plumbing&#8221;, using a Canvas element when supported, and Google&#8217;s ExplorerCanvas script to support older browsers. Author also creates <a href="http://tweetplumb.com/">small project</a> as plugin demo which allow search throw tweets and display results as graph model.</p>
<p>So let&#8217;s try this plugin and create a small demo to build a tree of my followers from Twitter.</p>
<p><a href="http://puzanov.info/examples/jsplumb/">Click here to see the final working demo</a></p>
<p><span id="more-163"></span></p>
<p>Twitter has own great API, but there are many ready to use <a href="http://dev.twitter.com/pages/libraries">libraries</a> for all popular programming languages. For this example I will use PHP <a href="http://classes.verkoyen.eu/twitter/">Twitter class</a> by Tijs Verkoyen.  This class usage is very simple: just include it to your page and instantiate new Twitter object.</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #666666; font-style: italic;">// require class</span><br />
<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">'twitter.php'</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">// create instance</span><br />
<span style="color: #000088;">$twitter</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Twitter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;your-login&gt;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;your-password&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></div>
<p>To use jsPlumb you need to load jQuery, jQueryUI, ExplorerCanvas and, of course, jsPlumb itself into your page:</p>
<div class="codecolorer-container html4strict twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://explorercanvas.googlecode.com/svn/trunk/excanvas.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span> <br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span> <br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span> <br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://jsplumb.googlecode.com/svn/trunk/js/jquery.jsPlumb-1.0.2-min.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span></div></div>
<p>I&#8217;ve created the following class-wrapper for generating diagram with my Twitter followers:</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #000000; font-weight: bold;">class</span> TwitterFollowersVisualizer <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$offsetX</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">300</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$offsetY</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">500</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$user</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$followers</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$html</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$js</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$blockId</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #000088;">$user</span><span style="color: #339933;">,</span> <span style="color: #000088;">$followers</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$user</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">followers</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$followers</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">function</span> addItem<span style="color: #009900;">&#40;</span><span style="color: #000088;">$follower</span><span style="color: #339933;">,</span> <span style="color: #000088;">$position</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$blockId</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getBlockId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;div id=&quot;block_'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$blockId</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; class=&quot;block&quot; style=&quot;top:'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$position</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'x'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'px; left:'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$position</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'y'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'px; background-image:url('</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$follower</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'profile_image_url'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">')&quot;&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;a href=&quot;/test/twitter/index.php?username='</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$follower</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'screen_name'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$follower</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'screen_name'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">html</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;/div&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$blockId</span> <span style="color: #339933;">!=</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">js</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'$(&quot;#block_1&quot;).plumb({'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">js</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'target: \'block_'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$blockId</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'\','</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">js</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'anchors: [jsPlumb.Anchors.BottomCenter, jsPlumb.Anchors.TopCenter],'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">js</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'paintStyle: { gradient:{ stops: [[0, \'#8ec1da\'], [1, \'#8ec1da\']]}, lineWidth:3 },'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">js</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'endpoints:[new jsPlumb.Endpoints.Dot(), new jsPlumb.Endpoints.Dot()],'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">js</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'endpointStyles:[{gradient: { stops: [[0, \'#8ec1da\']] }, width: 10, height: 20}, { gradient: { stops: [[0, \'#8ec1da\']]}, radius: 6 }], '</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">js</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'endpointsOnTop:false, '</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">js</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'});'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">function</span> getHtml<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">html</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">function</span> getJs<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">js</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">function</span> getBlockId<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">blockId</span><span style="color: #339933;">++;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> displayHtml<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$followersCount</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/sizeof"><span style="color: #990000;">sizeof</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">followers</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$corner</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">360</span> <span style="color: #339933;">/</span> <span style="color: #000088;">$followersCount</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addItem</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'x'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">offsetX</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'y'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">offsetY</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$followersCount</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$x</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/round"><span style="color: #990000;">round</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">offsetX</span> <span style="color: #339933;">*</span> <a href="http://www.php.net/sin"><span style="color: #990000;">sin</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/deg2rad"><span style="color: #990000;">deg2rad</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$corner</span> <span style="color: #339933;">*</span> <span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$y</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/round"><span style="color: #990000;">round</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">offsetY</span> <span style="color: #339933;">*</span> <a href="http://www.php.net/cos"><span style="color: #990000;">cos</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/deg2rad"><span style="color: #990000;">deg2rad</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$corner</span> <span style="color: #339933;">*</span> <span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addItem</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">followers</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'x'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$x</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">offsetX</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'y'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$y</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">offsetY</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getHtml</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> displayJs<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getJs</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></div>
<p>So finally, our page will have the following content:</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">&quot;twitter.php&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">&quot;TwitterFollowersVisualizer.php&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000088;">$twitter</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Twitter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&lt;your-login&gt;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;your-password&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000088;">$username</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'username'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$username</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #000088;">$username</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'olegpuzanov'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; try <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$user</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$twitter</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getUser</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$username</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> catch <span style="color: #009900;">&#40;</span>TwitterException <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$e</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/die"><span style="color: #990000;">die</span></a><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; try <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$followers</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$twitter</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getFollowers</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$username</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> catch <span style="color: #009900;">&#40;</span>TwitterException <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$e</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/die"><span style="color: #990000;">die</span></a><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000088;">$followers</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array_slice"><span style="color: #990000;">array_slice</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$followers</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">15</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$twitterVisualiser</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> TwitterFollowersVisualizer<span style="color: #009900;">&#40;</span><span style="color: #000088;">$user</span><span style="color: #339933;">,</span> <span style="color: #000088;">$followers</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&lt;!doctype html&gt; <br />
&lt;html&gt; <br />
&nbsp; &nbsp; &lt;head&gt; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;title&gt;Twitter followers visualiser demo using jsPlumb&lt;/title&gt; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=7&quot;&gt; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;style&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; body {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: #c0deed;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; div.block {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width:170px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; height:48px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color:#ddeef6;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; position:absolute;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -webkit-border-radius:15px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-repeat:no-repeat;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cursor:move;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; zIndex: 10000;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; div.block a {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; float:left;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display:block;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width:48px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; height:48px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding-left:55px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line-height:45px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; color:#2276bb;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/style&gt;<br />
&nbsp; &nbsp; &lt;/head&gt;<br />
&lt;body&gt;<br />
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$twitterVisualiser</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">displayHtml</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&lt;script type=&quot;text/javascript&quot; src=&quot;http://explorercanvas.googlecode.com/svn/trunk/excanvas.js&quot;&gt;&lt;/script&gt; <br />
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;&gt;&lt;/script&gt; <br />
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js&quot;&gt;&lt;/script&gt; <br />
&lt;script type=&quot;text/javascript&quot; src=&quot;http://jsplumb.googlecode.com/svn/trunk/js/jquery.jsPlumb-1.0.2-min.js&quot;&gt;&lt;/script&gt;<br />
&lt;script type=&quot;text/javascript&quot;&gt;<br />
$(document).ready(function() {<br />
&nbsp; &nbsp; jsPlumb.DEFAULT_DRAG_OPTIONS = { cursor: 'pointer' };<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$twitterVisualiser</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">displayJs</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
});<br />
&lt;/script&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</div></div>
<p>You can check <a href="http://puzanov.info/examples/jsplumb/">final demo here</a> or download zip archive with sample files <a href="http://puzanov.info/examples/jsplumb/sample.zip">here</a>. Don&#8217;t forget to change Twitter login and password to yours to run this sample.</p>
]]></content:encoded>
			<wfw:commentRss>http://olegpuzanov.com/2010/06/08/visualise-your-twitter-friends-with-jsplumb-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The future of UI</title>
		<link>http://olegpuzanov.com/2010/06/05/the-future-of-ui/</link>
		<comments>http://olegpuzanov.com/2010/06/05/the-future-of-ui/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 15:11:35 +0000</pubDate>
		<dc:creator>Oleg Puzanov</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://puzanov.info/?p=173</guid>
		<description><![CDATA[Minority Report science adviser and inventor John Underkoffler demos g-speak &#8212; the real-life version of the film&#8217;s eye-popping, tai chi-meets-cyberspace computer interface. It&#8217;s amazing, really. Just check it out.]]></description>
			<content:encoded><![CDATA[<p><em><span class="drop">M</span>inority Report</em> science adviser and inventor John Underkoffler demos g-speak &#8212; the real-life version of the film&#8217;s eye-popping, tai chi-meets-cyberspace computer interface.</p>
<p><object width="540" height="340"><param name="movie" value="http://www.youtube.com/v/b6YTQJVzwlI&#038;hl=en_GB&#038;fs=1&#038;rel=0&#038;color1=0x3a3a3a&#038;color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/b6YTQJVzwlI&#038;hl=en_GB&#038;fs=1&#038;rel=0&#038;color1=0x3a3a3a&#038;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>It&#8217;s amazing, really. Just check it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://olegpuzanov.com/2010/06/05/the-future-of-ui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating your first VoiceXML application &#8211; Part2</title>
		<link>http://olegpuzanov.com/2010/04/19/creating-your-first-voicexml-application-part2/</link>
		<comments>http://olegpuzanov.com/2010/04/19/creating-your-first-voicexml-application-part2/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 21:07:35 +0000</pubDate>
		<dc:creator>Oleg Puzanov</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[google weather api]]></category>
		<category><![CDATA[voicexml]]></category>
		<category><![CDATA[voxeo]]></category>

		<guid isPermaLink="false">http://puzanov.info/?p=124</guid>
		<description><![CDATA[Hello. In previous part of the post I talked about definitions of VoiceXML and CCXML. Also we created simple static VXML file with weather condition for predefined cities list, deployed and tested it. In this second part we will generate our VXML file dynamically using real weather condition. Google Weather API One of the easiest ways [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">H</span>ello. In <a title="Creating your first VoiceXML application - Part1" href="http://puzanov.info/2010/04/13/creating-your-first-voicexml-application-part1/">previous part</a> of the post I talked about definitions of VoiceXML and CCXML. Also we created simple static VXML file with weather condition for predefined cities list, deployed and tested it. In this second part we will generate our VXML file dynamically using real weather condition.</p>
<p><span id="more-124"></span></p>
<h3>Google Weather API</h3>
<p>One of the easiest ways to get weather condition and forecast is use Google Weather API. You just need to make the following request:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">http://www.google.com/ig/api?weather=NEEDED_CITY</div></div>
<p>and you will receive replay in XML format.</p>
<p>I&#8217;ve created small PHP class that loads weather condition for specified city. Save it as weather.php</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #666666; font-style: italic;">/*<br />
* Load weather condition for specified city using Google Weather API<br />
* &nbsp;Author Oleg Puzanov<br />
*/</span><br />
<span style="color: #000000; font-weight: bold;">class</span> Weather <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> static <span style="color: #000088;">$_apiUrl</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://www.google.com/ig/api?weather='</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> static <span style="color: #000000; font-weight: bold;">function</span> get<span style="color: #009900;">&#40;</span><span style="color: #000088;">$city</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$weather</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// load weather conditions using Goolge weather api</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$xml</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/simplexml_load_file"><span style="color: #990000;">simplexml_load_file</span></a><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$_apiUrl</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$city</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// if xml loads succsessfully</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$xml</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// parse xml using SimpleXML</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$weather</span> &nbsp;<span style="color: #339933;">=</span> <span style="color: #0000ff;">'Now in '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$city</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' is '</span> <span style="color: #339933;">.</span> <span style="color: #009900;">&#40;</span>string<span style="color: #009900;">&#41;</span><span style="color: #000088;">$xml</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weather</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">current_conditions</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">condition</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'data'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">', '</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$weather</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'temperature is '</span> <span style="color: #339933;">.</span> <span style="color: #009900;">&#40;</span>string<span style="color: #009900;">&#41;</span><span style="color: #000088;">$xml</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weather</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">current_conditions</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">temp_c</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'data'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' degrees Celsius, '</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$weather</span> <span style="color: #339933;">.=</span> <span style="color: #009900;">&#40;</span>string<span style="color: #009900;">&#41;</span><span style="color: #000088;">$xml</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weather</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">current_conditions</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">humidity</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'data'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// notify customer about current problem</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$weather</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Sorry, could not load weather condition for this city at the moment'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$weather</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<h3>Generate VXML file</h3>
<p>Here is our final script. Save it as index.php</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #666666; font-style: italic;">// set header to text/xml for browser</span><br />
<a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type: text/xml'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// include previously created class for getting weather</span><br />
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'weather.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// define our VXML template with variables %WEATHER_LONDON%, %WEATHER_PARIS% and %WEATHER_MILAN%</span><br />
<span style="color: #000088;">$vxml</span> <span style="color: #339933;">=</span> <span style="color: #0000cc; font-style: italic;">&lt;&lt;&lt;XML<br />
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />
&lt;vxml version=&quot;2.1&quot;&gt;<br />
&lt;form id=&quot;choiceMenu&quot;&gt;<br />
&lt;field name=&quot;city&quot;&gt;<br />
&lt;prompt&gt;Please, specify your city&lt;/prompt&gt;<br />
&lt;!-- Insert an inline grammar --&gt;<br />
&lt;grammar type=&quot;text/gsl&quot;&gt;<br />
[london paris milan]<br />
&lt;/grammar&gt;<br />
&lt;!-- Reprompt user if he doesn't provide an answer --&gt;<br />
&lt;noinput&gt;<br />
Sorry, what did you say?<br />
&lt;reprompt /&gt;<br />
&lt;/noinput&gt;<br />
&lt;!-- Handle the case when no match is found --&gt;<br />
&lt;nomatch&gt;<br />
Sorry, but such city is not in my list. Please, try again.<br />
&lt;reprompt /&gt;<br />
&lt;/nomatch&gt;<br />
&lt;/field&gt;<br />
&lt;!-- Set our options. --&gt;<br />
&lt;filled namelist=&quot;city&quot;&gt;<br />
&lt;if cond=&quot;city == 'london'&quot;&gt;<br />
&lt;prompt&gt;%WEATHER_LONDON%&lt;/prompt&gt;<br />
&lt;elseif cond=&quot;city == 'paris'&quot; /&gt;<br />
&lt;prompt&gt;%WEATHER_PARIS%&lt;/prompt&gt;<br />
&lt;elseif cond=&quot;city == 'milan'&quot; /&gt;<br />
&lt;prompt&gt;%WEATHER_MILAN%&lt;/prompt&gt;<br />
&lt;/if&gt;<br />
&lt;/filled&gt;<br />
&lt;/form&gt;<br />
&lt;/vxml&gt;<br />
XML</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// replace variables with actual weather condition values</span><br />
<span style="color: #000088;">$vxml</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%WEATHER_LONDON%'</span><span style="color: #339933;">,</span> Weather<span style="color: #339933;">::</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;London&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$vxml</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$vxml</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%WEATHER_PARIS%'</span><span style="color: #339933;">,</span> Weather<span style="color: #339933;">::</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Paris&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$vxml</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$vxml</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%WEATHER_MILAN%'</span><span style="color: #339933;">,</span> Weather<span style="color: #339933;">::</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Milan&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$vxml</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">// output final VXML</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$vxml</span><span style="color: #339933;">;</span></div></div>
<p>You can check the final result here &#8211; <a title="VoiceXML dynamic file example" href="http://puzanov.info/examples/voicexml/index.php">http://puzanov.info/examples/voicexml/index.php</a>.</p>
<h3>Setup your application</h3>
<p>Let&#8217;s setup our application using Voxeo services. To do this create new application using &#8220;Account&#8221; =&gt; &#8220;Application manager&#8221; menu item (please check <a title="Creating your first VoiceXML application - Part1" href="http://puzanov.info/2010/04/13/creating-your-first-voicexml-application-part1/">previous part</a> which have detailed description with screenshots how to do this) using script that we created as Voice URL.</p>
<p><img class="alignnone size-full wp-image-148" title="voicexml2" src="http://puzanov.info/wp-content/uploads/2010/04/voicexml2.jpg" alt="" width="610" height="410" /></p>
<h3>Test it</h3>
<p>You will find application contact methods in special tab</p>
<p><img class="alignnone size-full wp-image-150" title="voicexml3" src="http://puzanov.info/wp-content/uploads/2010/04/voicexml3.jpg" alt="" width="597" height="482" /></p>
<p>You should hear a female voice prompt “Please, specify your city”. Say “London” for instance and get an answer about current weather condition in London.</p>
<h3>Summary</h3>
<p>In this short 2 series article I introduced the process of developing telephony applications and familiarized you with two standards &#8211; VoiceXML and CCMXL.  The W3C&#8217;s Speech Interface Framework also defines these other standards closely associated with VoiceXML: Speech Recognition Grammar Specification (SRGS), Speech Synthesis Markup Language (SSML), Pronunciation Lexicon Specification (PLS) and many others.</p>
<p>There many companies that works in this area and provide tools for developers which you could try for free. One of them is <a href="http://www.teleku.com">Teleku</a> which support different phone markup script languages and provide HTTP RESTFUL XML/JSON.  You could try them as alternative to <a href="http://www.voxeo.com/">Voxeo.com</a>.</p>
<h3>Further Reading</h3>
<p>If you are interested in these theme I would recommend you to read great set of articles on <a title="VoiceXML articles on IBM" href="http://www.ibm.com/developerworks/search/searchResults.jsp?searchSite=dW&amp;searchScope=dW&amp;displaySearchScope=dW&amp;encodedQuery=voicexml&amp;encodedFilter=%2B(+)+-(meta3.tsdoctype:db550)++-(meta3.tsdoctype:d100)++%2B(meta2.language:en)++%2B(meta2.newcountryurl:us+meta2.country:zz)+&amp;summaryShow=on&amp;offset=-20&amp;type=all&amp;lastUserQuery1=voicexml&amp;lastUserQuery2=&amp;lastUserQuery3=&amp;lastUserQuery4=&amp;perPage=20&amp;pageDate=&amp;pageLang=&amp;langEncoding=UTF8&amp;rankprofile=8">IBM developerWorks</a> section.</p>
]]></content:encoded>
			<wfw:commentRss>http://olegpuzanov.com/2010/04/19/creating-your-first-voicexml-application-part2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating your first VoiceXML application &#8211; Part1</title>
		<link>http://olegpuzanov.com/2010/04/13/creating-your-first-voicexml-application-part1/</link>
		<comments>http://olegpuzanov.com/2010/04/13/creating-your-first-voicexml-application-part1/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 09:45:40 +0000</pubDate>
		<dc:creator>Oleg Puzanov</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[voicexml]]></category>
		<category><![CDATA[voxeo]]></category>

		<guid isPermaLink="false">http://puzanov.info/?p=61</guid>
		<description><![CDATA[Hello, in this post we will get acquainted with VoiceXML and CCXML &#8211; the most commonly used standards for building voice applications. Introduction VoiceXML (VXML) is the W3C&#8217;s standard XML format for specifying interactive voice dialogues between a human and a computer. It allows voice applications to be developed and deployed in an analogous way [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">H</span>ello, in this post we will get acquainted with VoiceXML and CCXML &#8211; the most commonly used standards for building voice applications.</p>
<h3>Introduction</h3>
<p>VoiceXML (VXML) is the W3C&#8217;s standard XML format for specifying interactive voice dialogues between a human and a computer. It allows voice applications to be developed and deployed in an analogous way to HTML for visual applications. Just as HTML documents are interpreted by a visual web browser, VoiceXML documents are interpreted by a voice browser. A common architecture is to deploy banks of voice browsers attached to the Public Switched Telephone Network (PSTN) to allow users to interact with voice applications over the telephone.</p>
<p>CCXML (Call Control XML) &#8211; is the W3C standard markup language for controlling how phone calls are placed, answered, transferred, conferenced, and more. CCXML works hand-in-hand with VoiceXML to provide a 100% standards and XML based solution for any telephony application.</p>
<p><span id="more-61"></span></p>
<p>In this post I will use Voxeo.com (IVR and VoIP provider) developer tools to run our examples. Please register your own free account <a title="Get Voxeo free developer account" href="https://evolution.voxeo.com/account/register.jsp">here</a> to get started.</p>
<p>VoiceXML has tags that instruct the voice browser to provide speech synthesis, automatic speech recognition, dialog management, and audio playback. The following is an example of a VoiceXML document:</p>
<div class="codecolorer-container xml twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;vxml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;2.0&quot;</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/vxml&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;form<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;block<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;prompt<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Hello world!<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/prompt<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/block<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/form<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/vxml<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>When interpreted by a VoiceXML interpreter this will output &#8220;Hello world&#8221; with synthesized speech. Some applications may use static VoiceXML pages, while others rely on dynamic VoiceXML page generation. In this example we will create very basic voice recognition application that takes in user city from predefined list and provide current weather condition for it.</p>
<h3>Create static VXML application</h3>
<p>So let&#8217;s start with static VXML file first. Create the following file and save it as &#8220;weather.vxml&#8221;:</p>
<div class="codecolorer-container xml twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;vxml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;2.1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;form</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;choiceMenu&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;field</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;city&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;prompt<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Please, specify your city<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/prompt<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">&lt;!-- Insert an inline grammar --&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;grammar</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;text/gsl&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [london paris milan]<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/grammar<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">&lt;!-- Reprompt user if he doesn't provide an answer --&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;noinput<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sorry, what did you say?<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;reprompt</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/noinput<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">&lt;!-- Handle the case when no match is found --&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;nomatch<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sorry, but such city is not in my list. Please, try again.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;reprompt</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/nomatch<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/field<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">&lt;!-- Set our options. --&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;filled</span> <span style="color: #000066;">namelist</span>=<span style="color: #ff0000;">&quot;city&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;if</span> <span style="color: #000066;">cond</span>=<span style="color: #ff0000;">&quot;city == 'london'&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;prompt<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Currently in London +5<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/prompt<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;elseif</span> <span style="color: #000066;">cond</span>=<span style="color: #ff0000;">&quot;city == 'paris'&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;prompt<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Currently in Paris +10<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/prompt<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;elseif</span> <span style="color: #000066;">cond</span>=<span style="color: #ff0000;">&quot;city == 'milan'&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;prompt<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Currently in Milan +15<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/prompt<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/if<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/filled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/form<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/vxml<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<h3>Test it!</h3>
<p>1. Upload your application</p>
<p>Login <a title="Login into Voxeo.com" href="https://evolution.voxeo.com/">here</a> into your Voxeo.com developer account</p>
<p><img class="alignnone size-full wp-image-104" title="Login into your Voxeo.com developer account" src="http://puzanov.info/wp-content/uploads/2010/04/step11.jpg" alt="" width="610" height="512" /></p>
<p>Click on &#8220;Files, Logs, &amp; Reports&#8221; link</p>
<p><img class="alignnone size-full wp-image-106" title="Click on &quot;Files, Logs, &amp; Reports&quot; link" src="http://puzanov.info/wp-content/uploads/2010/04/step21.jpg" alt="" width="610" height="512" /></p>
<p>Upload your application into &#8220;www&#8221; directory</p>
<p><img class="alignnone size-full wp-image-107" title="Upload your application into &quot;www&quot; directory" src="http://puzanov.info/wp-content/uploads/2010/04/step31.jpg" alt="" width="610" height="512" /></p>
<p>2. Assign a phone number</p>
<p>To test out a phone-based application, you obviously need a phone, and that implies a number to call. You will get a free Voxeo phone number by creating new application.</p>
<p>Under &#8220;Account&#8221; menu select &#8220;Application Manager&#8221;</p>
<p><img class="alignnone size-full wp-image-109" title="Under &quot;Account&quot; menu select &quot;Application Manager&quot;" src="http://puzanov.info/wp-content/uploads/2010/04/step41.jpg" alt="" width="610" height="512" /></p>
<p>Create new application with such parameters</p>
<p><img class="alignnone size-full wp-image-110" title="Create new application with such parameters" src="http://puzanov.info/wp-content/uploads/2010/04/step51.jpg" alt="" width="610" height="512" /></p>
<p>3. Run it</p>
<p>Now you can test your application by calling the preferred number from &#8220;Contact Methods&#8221; tab. Calls from Skype to Skype VoIP number are free <img src='http://olegpuzanov.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://puzanov.info/wp-content/uploads/2010/04/step61.jpg"><img class="alignnone size-full wp-image-111" title="Test your application" src="http://puzanov.info/wp-content/uploads/2010/04/step61.jpg" alt="" width="610" height="512" /></a></p>
<p>You should hear a voice prompt &#8220;Please, specify your city&#8221;. Say &#8220;London&#8221; for instance and get an answer &#8220;Currently in London +5&#8243;.</p>
<p>Got it? Great.</p>
<p>That&#8217;s all for today. In next part we will generate our VXML file dynamically to get actual information about the weather. Stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://olegpuzanov.com/2010/04/13/creating-your-first-voicexml-application-part1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Nested labels in Gmail</title>
		<link>http://olegpuzanov.com/2010/04/09/nested-labels-in-gmail/</link>
		<comments>http://olegpuzanov.com/2010/04/09/nested-labels-in-gmail/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 07:50:15 +0000</pubDate>
		<dc:creator>Oleg Puzanov</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://puzanov.info/?p=50</guid>
		<description><![CDATA[Yesterday Gmail Blog announced that now you can organize labels hierarchy. To enable this feature go to the Gmail Labs tab under Settings, find &#8220;Nested Labels&#8221;, enable it and click &#8220;Save&#8221;. You&#8217;ll then need to name your label with slashes (/) to make it the child of another. For instance, if you want to organize your &#8220;Work&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p><span class="drop">Y</span>esterday <a href="http://gmailblog.blogspot.com/2010/04/new-in-labs-nested-labels-and-message.html">Gmail Blog announced</a> that now you can organize labels hierarchy. To enable this feature go to the <a href="http://mail.google.com/mail/?ui=2&amp;fs=1&amp;view=pu&amp;st=labs">Gmail Labs tab under Settings</a>, find &#8220;Nested Labels&#8221;, enable it and click &#8220;Save&#8221;.</p>
<p>You&#8217;ll then need to name your label with slashes (/) to make it the child of another. For instance, if you want to organize your &#8220;Work&#8221; label messages to appropriate clients just create the following labels: &#8220;Work/Client1&#8243;, &#8220;Work/Client2&#8243;, etc.</p>
<p>Gmail team said that this lab doesn&#8217;t play nicely with the &#8220;Hide Read Labels&#8221; lab. You might not get exactly what you expect if you have both labs enabled; for example, the collapse/expand icons won&#8217;t always appear when they should.</p>
]]></content:encoded>
			<wfw:commentRss>http://olegpuzanov.com/2010/04/09/nested-labels-in-gmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.521 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2013-06-03 17:16:59 -->
