<?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"
	>

<channel>
	<title>.Net Frenzy</title>
	<atom:link href="http://www.dotnetfrenzy.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dotnetfrenzy.com</link>
	<description>An ASP.Net Developers Blog</description>
	<pubDate>Fri, 12 Mar 2010 11:30:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>Ambilight Sample; video and canvas</title>
		<link>http://feedproxy.google.com/~r/ajaxian/~3/qnz4uC8i6LA/ambilight</link>
		<comments>http://feedproxy.google.com/~r/ajaxian/~3/qnz4uC8i6LA/ambilight#comments</comments>
		<pubDate>Fri, 12 Mar 2010 11:30:20 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
		
		<category><![CDATA[Canvas]]></category>

		<category><![CDATA[Examples]]></category>

		<category><![CDATA[Front Page]]></category>

		<category><![CDATA[Miscellaneous]]></category>

		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8713</guid>
		<description><![CDATA[
Sergey Chikuyonok gets his Philips Ambilight foo on as he created a HTML5 video + canvas sample that mimics the TV effect.
As the video runs, a snapshot is sent over to JavaScript land where colors are worked out:
PLAIN TEXT
JAVASCRIPT:




&#160;


function getMidColors&#40;side&#41; &#123;


&#160; &#160; &#160; &#160; var w = buffer.width,


&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://ajaxian.com/wp-content/images/ambilight.png" alt="ambilight" width="480" height="234"></p>
<p>Sergey Chikuyonok gets his Philips Ambilight foo on as he created a <a href="http://chikuyonok.ru/ambilight/">HTML5 video + canvas</a> sample that mimics the TV effect.</p>
<p>As the video runs, a snapshot is sent over to JavaScript land where colors are worked out:</p>
<div class="igBar"><a href="showCodeTxt('javascript-2');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span>JAVASCRIPT:</span>
<div>
<div class="javascript">
<ol>
<li>
<div>&nbsp;</div>
</li>
<li>
<div><span>function</span> getMidColors<span>&#40;</span>side<span>&#41;</span> <span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; <span>var</span> w = buffer.<span>width</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; h = buffer.<span>height</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lamps = getOption<span>&#40;</span><span>'lamps'</span><span>&#41;</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; block_width = getOption<span>&#40;</span><span>'block_size'</span><span>&#41;</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; block_height = Math.<span>ceil</span><span>&#40;</span>h / lamps<span>&#41;</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pxl = block_width * block_height * <span>4</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result = <span>&#91;</span><span>&#93;</span>,</div>
</li>
<li>
<div>&nbsp;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; img_data = buffer_ctx.<span>getImageData</span><span>&#40;</span>side == <span>'right'</span> ? w - block_width : <span>0</span>, <span>0</span>, block_width, h<span>&#41;</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; total_pixels = img_data.<span>data</span>.<span>length</span>;</div>
</li>
<li>
<div>&nbsp;</div>
</li>
<li>
<div>&nbsp;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; <span>for</span> <span>&#40;</span><span>var</span> i = <span>0</span>; i &lt;lamps; i++<span>&#41;</span> <span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span>var</span> from = i * w * block_width;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; result.<span>push</span><span>&#40;</span> calcMidColor<span>&#40;</span>img_data.<span>data</span>, i * pxl, Math.<span>min</span><span>&#40;</span><span>&#40;</span>i + <span>1</span><span>&#41;</span> * pxl, total_pixels - <span>1</span><span>&#41;</span><span>&#41;</span> <span>&#41;</span>;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; <span>&#125;</span></div>
</li>
<li>
<div>&nbsp;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; <span>return</span> result;</div>
</li>
<li>
<div><span>&#125;</span></div>
</li>
<li>
<div>&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Then, two canvas objects are placed, one on each side, of the video itself.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ajaxian?a=qnz4uC8i6LA:TBBPRLvVggI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=qnz4uC8i6LA:TBBPRLvVggI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=qnz4uC8i6LA:TBBPRLvVggI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ajaxian?i=qnz4uC8i6LA:TBBPRLvVggI:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://feedproxy.google.com/~r/ajaxian/~3/qnz4uC8i6LA/ambilight/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ASP.NET MVC 2 Released</title>
		<link>http://weblogs.asp.net/scottgu/archive/2010/03/11/asp-net-mvc-2-released.aspx</link>
		<comments>http://weblogs.asp.net/scottgu/archive/2010/03/11/asp-net-mvc-2-released.aspx#comments</comments>
		<pubDate>Fri, 12 Mar 2010 05:24:16 +0000</pubDate>
		<dc:creator>ScottGu</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[Community News]]></category>

		<category><![CDATA[Miscellaneous]]></category>

		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7379567</guid>
		<description><![CDATA[<font size="2" face="arial">   <p>I’m happy to announce that the final release of ASP.NET MVC 2 is now available for VS 2008/Visual Web Developer 2008 Express with ASP.NET 3.5.&#160; You can download and install it from the following locations: </p>    <ul>     <li><a href="http://go.microsoft.com/fwlink/?LinkID=185037" target="_blank">Download ASP.NET MVC 2 using the Microsoft Web Platform Installer</a> </li>      <li><a href="http://go.microsoft.com/fwlink/?LinkID=157074" target="_blank">Download ASP.NET MVC 2 from the Download Center</a> </li>   </ul>    <p>The final release of VS 2010 and Visual Web Developer 2010 will have ASP.NET MVC 2 built-in – so you won’t need an additional install in order to use ASP.NET MVC 2 with them.&#160; </p>    <h3><u>ASP.NET MVC 2</u></h3>    <p>We shipped ASP.NET MVC 1 a little less than a year ago.&#160; Since then, almost 1 million developers have downloaded and used the final release, and its popularity has steadily grown month over month.</p>    <p>ASP.NET MVC 2 is the next significant update of ASP.NET MVC. It is a compatible update to ASP.NET MVC 1 – so all the knowledge, skills, code, and extensions you already have with ASP.NET MVC continue to work and apply going forward. Like the first release, we are also <a href="http://aspnet.codeplex.com/releases/view/41742" target="_blank">shipping the source code for ASP.NET MVC 2</a> under an OSI-compliant open-source license.</p>    <p>ASP.NET MVC 2 can be installed side-by-side with ASP.NET MVC 1 (meaning you can have some apps built with V1 and others built with V2 on the same machine).&#160; We have <a href="http://www.asp.net/learn/whitepapers/aspnet-mvc2-upgrade-notes/" target="_blank">instructions on how to update</a> your existing ASP.NET MVC 1 apps to use ASP.NET MVC 2 using VS 2008 <a href="http://www.asp.net/learn/whitepapers/aspnet-mvc2-upgrade-notes/" target="_blank">here</a>.&#160; Note that VS 2010 has an automated upgrade wizard that can automatically migrate your existing ASP.NET MVC 1 applications to ASP.NET MVC 2 for you.</p>    <h3><u>ASP.NET MVC 2 Features</u></h3>    <p>ASP.NET MVC 2 adds a bunch of new capabilities and features.&#160; I’ve started a <a href="http://weblogs.asp.net/scottgu/archive/2010/01/10/asp-net-mvc-2.aspx" target="_blank">blog series</a> about some of the new features, and will be covering them in more depth in the weeks ahead.&#160; Some of the new features and capabilities include: </p>    <ul>     <li><a href="http://weblogs.asp.net/scottgu/archive/2010/01/10/asp-net-mvc-2-strongly-typed-html-helpers.aspx" target="_blank">New Strongly Typed HTML Helpers</a> </li>      <li><a href="http://weblogs.asp.net/scottgu/archive/2010/01/15/asp-net-mvc-2-model-validation.aspx" target="_blank">Enhanced Model Validation support across both server and client</a> </li>      <li>Auto-Scaffold UI Helpers with Template Customization </li>      <li>Support for splitting up large applications into “Areas” </li>      <li>Asynchronous Controllers support that enables long running tasks in parallel </li>      <li>Support for rendering sub-sections of a page/site using Html.RenderAction </li>      <li>Lots of new helper functions, utilities, and API enhancements </li>      <li>Improved Visual Studio tooling support </li>   </ul>    <p></p>    <p><a href="http://go.microsoft.com/fwlink/?LinkID=157074"></a></p>    <p></p>    <p>You can learn more about these features in the “<a href="http://www.asp.net/learn/whitepapers/what-is-new-in-aspnet-mvc/" target="_blank">What’s New in ASP.NET MVC 2</a>” document on the <a href="http://www.asp.net/mvc/" target="_blank">www.asp.net/mvc</a> web-site.&#160; </p>    <p>We are going to be posting a lot of new tutorials and videos shortly on <a href="http://www.asp.net/mvc/" target="_blank">www.asp.net/mvc</a> that cover all the features in ASP.NET MVC 2 release.&#160; We will also post an updated end-to-end tutorial built entirely with ASP.NET MVC 2 (much like the <a href="http://nerddinnerbook.s3.amazonaws.com/Intro.htm" target="_blank">NerdDinner tutorial</a> that I wrote that covers ASP.NET MVC 1).&#160; </p>    <h3><u>Summary</u></h3>    <p>The ASP.NET MVC team delivered regular V2 preview releases over the last year to get feedback on the feature set.&#160; I’d like to say a big thank you to everyone who tried out the previews and sent us suggestions/feedback/bug reports.&#160; </p>    <p>We hope you like the final release!</p>    <p>Scott</p> </font><img src="http://weblogs.asp.net/aggbug.aspx?PostID=7379567" width="1" height="1">]]></description>
			<content:encoded><![CDATA[<font size="2" face="arial">   <p>I’m happy to announce that the final release of ASP.NET MVC 2 is now available for VS 2008/Visual Web Developer 2008 Express with ASP.NET 3.5.&#160; You can download and install it from the following locations: </p>    <ul>     <li><a href="http://go.microsoft.com/fwlink/?LinkID=185037">Download ASP.NET MVC 2 using the Microsoft Web Platform Installer</a> </li>      <li><a href="http://go.microsoft.com/fwlink/?LinkID=157074">Download ASP.NET MVC 2 from the Download Center</a> </li>   </ul>    <p>The final release of VS 2010 and Visual Web Developer 2010 will have ASP.NET MVC 2 built-in – so you won’t need an additional install in order to use ASP.NET MVC 2 with them.&#160; </p>    <h3><u>ASP.NET MVC 2</u></h3>    <p>We shipped ASP.NET MVC 1 a little less than a year ago.&#160; Since then, almost 1 million developers have downloaded and used the final release, and its popularity has steadily grown month over month.</p>    <p>ASP.NET MVC 2 is the next significant update of ASP.NET MVC. It is a compatible update to ASP.NET MVC 1 – so all the knowledge, skills, code, and extensions you already have with ASP.NET MVC continue to work and apply going forward. Like the first release, we are also <a href="http://aspnet.codeplex.com/releases/view/41742">shipping the source code for ASP.NET MVC 2</a> under an OSI-compliant open-source license.</p>    <p>ASP.NET MVC 2 can be installed side-by-side with ASP.NET MVC 1 (meaning you can have some apps built with V1 and others built with V2 on the same machine).&#160; We have <a href="http://www.asp.net/learn/whitepapers/aspnet-mvc2-upgrade-notes/">instructions on how to update</a> your existing ASP.NET MVC 1 apps to use ASP.NET MVC 2 using VS 2008 <a href="http://www.asp.net/learn/whitepapers/aspnet-mvc2-upgrade-notes/">here</a>.&#160; Note that VS 2010 has an automated upgrade wizard that can automatically migrate your existing ASP.NET MVC 1 applications to ASP.NET MVC 2 for you.</p>    <h3><u>ASP.NET MVC 2 Features</u></h3>    <p>ASP.NET MVC 2 adds a bunch of new capabilities and features.&#160; I’ve started a <a href="http://weblogs.asp.net/scottgu/archive/2010/01/10/asp-net-mvc-2.aspx">blog series</a> about some of the new features, and will be covering them in more depth in the weeks ahead.&#160; Some of the new features and capabilities include: </p>    <ul>     <li><a href="http://weblogs.asp.net/scottgu/archive/2010/01/10/asp-net-mvc-2-strongly-typed-html-helpers.aspx">New Strongly Typed HTML Helpers</a> </li>      <li><a href="http://weblogs.asp.net/scottgu/archive/2010/01/15/asp-net-mvc-2-model-validation.aspx">Enhanced Model Validation support across both server and client</a> </li>      <li>Auto-Scaffold UI Helpers with Template Customization </li>      <li>Support for splitting up large applications into “Areas” </li>      <li>Asynchronous Controllers support that enables long running tasks in parallel </li>      <li>Support for rendering sub-sections of a page/site using Html.RenderAction </li>      <li>Lots of new helper functions, utilities, and API enhancements </li>      <li>Improved Visual Studio tooling support </li>   </ul>    <p></p>    <p><a href="http://go.microsoft.com/fwlink/?LinkID=157074"></a></p>    <p></p>    <p>You can learn more about these features in the “<a href="http://www.asp.net/learn/whitepapers/what-is-new-in-aspnet-mvc/">What’s New in ASP.NET MVC 2</a>” document on the <a href="http://www.asp.net/mvc/">www.asp.net/mvc</a> web-site.&#160; </p>    <p>We are going to be posting a lot of new tutorials and videos shortly on <a href="http://www.asp.net/mvc/">www.asp.net/mvc</a> that cover all the features in ASP.NET MVC 2 release.&#160; We will also post an updated end-to-end tutorial built entirely with ASP.NET MVC 2 (much like the <a href="http://nerddinnerbook.s3.amazonaws.com/Intro.htm">NerdDinner tutorial</a> that I wrote that covers ASP.NET MVC 1).&#160; </p>    <h3><u>Summary</u></h3>    <p>The ASP.NET MVC team delivered regular V2 preview releases over the last year to get feedback on the feature set.&#160; I’d like to say a big thank you to everyone who tried out the previews and sent us suggestions/feedback/bug reports.&#160; </p>    <p>We hope you like the final release!</p>    <p>Scott</p> </font><img src="http://weblogs.asp.net/aggbug.aspx?PostID=7379567" width="1" height="1">]]></content:encoded>
			<wfw:commentRss>http://weblogs.asp.net/scottgu/archive/2010/03/11/asp-net-mvc-2-released.aspx/feed/</wfw:commentRss>
		</item>
		<item>
		<title>YQL Geo library – all your geo needs in pure JavaScript</title>
		<link>http://feedproxy.google.com/~r/ajaxian/~3/4d9UHS2adjk/yql-geo-library-all-your-geo-needs-in-pure-javascript</link>
		<comments>http://feedproxy.google.com/~r/ajaxian/~3/4d9UHS2adjk/yql-geo-library-all-your-geo-needs-in-pure-javascript#comments</comments>
		<pubDate>Thu, 11 Mar 2010 15:04:15 +0000</pubDate>
		<dc:creator>Chris Heilmann</dc:creator>
		
		<category><![CDATA[Front Page]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Library]]></category>

		<category><![CDATA[Miscellaneous]]></category>

		<category><![CDATA[Yahoo!]]></category>

		<category><![CDATA[geo]]></category>

		<category><![CDATA[location]]></category>

		<category><![CDATA[w3c geo]]></category>

		<category><![CDATA[yql]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8718</guid>
		<description><![CDATA[I just finished doing some talks on geo hacking (slides are available here) and how to use some of the Geo technologies Yahoo and Google provide as part of a University gig in Atlanta. 
As a lot of the students liked the idea of APIs like GeoPlanet and Placemaker but had a hard time getting [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished doing some talks on geo hacking (<a href="http://www.slideshare.net/cheilmann/introduction-to-geo-hacking-with-amongst-others-yahoo-technology-3388374">slides are available here</a>) and how to use some of the Geo technologies Yahoo and Google provide as part of a University gig in Atlanta. </p>
<p>As a lot of the students liked the idea of APIs like <a href="http://developer.yahoo.com/geo">GeoPlanet and Placemaker</a> but had a hard time getting their head around them I thought it a good idea to build a small JavaScript library that does the job for them. </p>
<p>I give you <a href="http://isithackday.com/hacks/geo/yql-geo-library/">the YQL Geo library</a> (<a href="http://github.com/codepo8/YQL-Geo-Library">and its source on GitHub</a>). Using this library you can do the following:</p>
<ul>
<li>Detecting the visitor's location with the W3C geo API and with IP as a fallback</li>
<li>Find geo location from text</li>
<li>Find location from lat/lon pair</li>
<li>Find locations in a certain web document (by URL)</li>
<li>Get the location for a certain IP number</li>
</ul>
<p>And all of that in pure JavaScript. For example:</p>
<div class="igBar"><a href="showCodeTxt('javascript-5');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span>JAVASCRIPT:</span>
<div>
<div class="javascript">
<ol>
<li>
<div>yqlgeo.<span>get</span><span>&#40;</span></div>
</li>
<li>
<div>&nbsp; <span>'paris,fr'</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp;<span>function</span><span>&#40;</span>o<span>&#41;</span><span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp;console.<span>log</span><span>&#40;</span>o<span>&#41;</span>;</div>
</li>
<li>
<div>&nbsp; <span>&#125;</span></div>
</li>
<li>
<div><span>&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>Will get you: </p>
<div class="igBar"><a href="showCodeTxt('javascript-6');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span>JAVASCRIPT:</span>
<div>
<div class="javascript">
<ol>
<li>
<div><span>"place"</span>:<span>&#123;</span></div>
</li>
<li>
<div>&nbsp; <span>"lang"</span>:<span>"en-US"</span>,</div>
</li>
<li>
<div>&nbsp; <span>"uri"</span>:<span>"http://where.yahooapis.com/v1/place/615702"</span>,</div>
</li>
<li>
<div>&nbsp; <span>"woeid"</span>:<span>"615702"</span>,</div>
</li>
<li>
<div>&nbsp; <span>"placeTypeName"</span>:<span>&#123;</span> </div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"code"</span>:<span>"7"</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"content"</span>:<span>"Town"</span></div>
</li>
<li>
<div>&nbsp; <span>&#125;</span>,</div>
</li>
<li>
<div>&nbsp; <span>"name"</span>:<span>"Paris"</span>,</div>
</li>
<li>
<div>&nbsp; <span>"country"</span>:<span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"code"</span>:<span>"FR"</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"type"</span>:<span>"Country"</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"content"</span>:<span>"France"</span></div>
</li>
<li>
<div>&nbsp; <span>&#125;</span>,</div>
</li>
<li>
<div>&nbsp; <span>"admin1"</span>:<span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"code"</span>:<span>""</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"type"</span>:<span>"Region"</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"content"</span>:<span>"Ile-de-France"</span></div>
</li>
<li>
<div>&nbsp; <span>&#125;</span>,</div>
</li>
<li>
<div>&nbsp; <span>"admin2"</span>:<span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"code"</span>:<span>"FR-75"</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"type"</span>:<span>"Department"</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"content"</span>:<span>"Paris"</span></div>
</li>
<li>
<div>&nbsp; <span>&#125;</span>,</div>
</li>
<li>
<div>&nbsp; <span>"admin3"</span>:<span>null</span>,</div>
</li>
<li>
<div>&nbsp; <span>"locality1"</span>:<span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"type"</span>:<span>"Town"</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"content"</span>:<span>"Paris"</span></div>
</li>
<li>
<div>&nbsp; <span>&#125;</span>,</div>
</li>
<li>
<div>&nbsp; <span>"locality2"</span>:<span>null</span>,</div>
</li>
<li>
<div>&nbsp; <span>"postal"</span>:<span>null</span>,</div>
</li>
<li>
<div>&nbsp; <span>"centroid"</span>:<span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"latitude"</span>:<span>"48.856918"</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"longitude"</span>:<span>"2.341210"</span></div>
</li>
<li>
<div>&nbsp; <span>&#125;</span>,</div>
</li>
<li>
<div>&nbsp; <span>"boundingBox"</span>:<span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"southWest"</span>:<span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; <span>"latitude"</span>:<span>"48.658291"</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; <span>"longitude"</span>:<span>"2.086790"</span></div>
</li>
<li>
<div>&nbsp; &nbsp; <span>&#125;</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; <span>"northEast"</span>:<span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; <span>"latitude"</span>:<span>"49.046940"</span>,</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; <span>"longitude"</span>:<span>"2.637910"</span>&nbsp; </div>
</li>
<li>
<div>&nbsp; &nbsp; <span>&#125;</span></div>
</li>
<li>
<div>&nbsp; <span>&#125;</span></div>
</li>
<li>
<div><span>&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>Other uses:</p>
<p>This gets the name and the country of a lat/lon pair:</p>
<div class="igBar"><a href="showCodeTxt('javascript-7');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span>JAVASCRIPT:</span>
<div>
<div class="javascript">
<ol>
<li>
<div>yqlgeo.<span>get</span><span>&#40;</span><span>33</span>.<span>748</span>,-<span>84</span>.<span>393</span>,<span>function</span><span>&#40;</span>o<span>&#41;</span><span>&#123;</span></div>
</li>
<li>
<div>&nbsp; <span>alert</span><span>&#40;</span>o.<span>place</span>.<span>name</span> + <span>','</span> + o.<span>place</span>.<span>country</span>.<span>content</span><span>&#41;</span>;</div>
</li>
<li>
<div><span>&#125;</span><span>&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>This finds the visitor's location (on W3C geo API enabled browsers it asks them to share it - otherwise it detects the IP and locates this one on the planet)</p>
<div class="igBar"><a href="showCodeTxt('javascript-8');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span>JAVASCRIPT:</span>
<div>
<div class="javascript">
<ol>
<li>
<div>yqlgeo.<span>get</span><span>&#40;</span><span>'visitor'</span>,<span>function</span><span>&#40;</span>o<span>&#41;</span><span>&#123;</span></div>
</li>
<li>
<div>&nbsp; <span>alert</span><span>&#40;</span>o.<span>place</span>.<span>name</span> + <span>','</span> + o.<span>place</span>.<span>country</span>.<span>content</span> +&nbsp; </div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; <span>' ('</span> + o.<span>place</span>.<span>centroid</span>.<span>latitude</span> + <span>','</span> +</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;o.<span>place</span>.<span>centroid</span>.<span>longitude</span> + <span>')'</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; <span>&#41;</span>;</div>
</li>
<li>
<div><span>&#125;</span><span>&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>Read all about it <a href="http://www.wait-till-i.com/2010/03/11/yql-geo-library-and-introduction-to-geo-hacking-talk/">on my blog</a> and enjoy!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ajaxian?a=4d9UHS2adjk:ZS5hH4xlAck:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=4d9UHS2adjk:ZS5hH4xlAck:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=4d9UHS2adjk:ZS5hH4xlAck:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ajaxian?i=4d9UHS2adjk:ZS5hH4xlAck:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://feedproxy.google.com/~r/ajaxian/~3/4d9UHS2adjk/yql-geo-library-all-your-geo-needs-in-pure-javascript/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SVG Wow!</title>
		<link>http://feedproxy.google.com/~r/ajaxian/~3/CgfloplT8cM/svg-wow</link>
		<comments>http://feedproxy.google.com/~r/ajaxian/~3/CgfloplT8cM/svg-wow#comments</comments>
		<pubDate>Thu, 11 Mar 2010 10:35:01 +0000</pubDate>
		<dc:creator>Brad Neuberg</dc:creator>
		
		<category><![CDATA[Front Page]]></category>

		<category><![CDATA[Miscellaneous]]></category>

		<category><![CDATA[SVG]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8614</guid>
		<description><![CDATA[Erik Dahlström and Vincent Hardy have put together a cool website, called SVG Wow!, that showcases SVG doing things you didn&#8217;t expect SVG can do:


There are alot of unique demos on there.
One of my favorites uses SVG, HTML5 Audio, Web Fonts, and YUI to play music accompanied by flying animated lyrics (Chrome and Safari only):

There [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://my.opera.com/MacDev_ed/blog/">Erik </a><span><a href="http://my.opera.com/MacDev_ed/blog/">Dahlström</a> and <a href="http://www.w3.org/People/VHardy/">Vincent Hardy</a> have put together a cool website, called <a href="http://svg-wow.org/">SVG Wow!</a>, that showcases SVG doing things you didn&#8217;t expect SVG can do:</span></p>
<p><span><a href="http://svg-wow.org/"><img class="aligncenter size-full wp-image-8694" src="http://ajaxian.com/wp-content/images/svgwow11.png" alt="svgwow1" width="386" height="307" /></a><br />
</span></p>
<p>There are alot of unique demos on there.</p>
<p><a href="http://svg-wow.org/audio/animated-lyrics.html">One of my favorites</a> uses SVG, HTML5 Audio, Web Fonts, and YUI to play music accompanied by flying animated lyrics (Chrome and Safari only):</p>
<p><a href="http://svg-wow.org/audio/animated-lyrics.html"><img class="aligncenter size-full wp-image-8695" src="http://ajaxian.com/wp-content/images/svgwow2.png" alt="svgwow2" width="531" height="364" /></a></p>
<p><a href="http://svg-wow.org/">There are lots of other great samples</a> for you to play with and study!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ajaxian?a=CgfloplT8cM:qJDqqQpOu60:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=CgfloplT8cM:qJDqqQpOu60:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=CgfloplT8cM:qJDqqQpOu60:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ajaxian?i=CgfloplT8cM:qJDqqQpOu60:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://feedproxy.google.com/~r/ajaxian/~3/CgfloplT8cM/svg-wow/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ext JS 3.2 beta: stores, components, transitions, and themes</title>
		<link>http://feedproxy.google.com/~r/ajaxian/~3/8BQGkiJoWb0/ext-js-3-2-beta-stores-components-transitions-and-themes</link>
		<comments>http://feedproxy.google.com/~r/ajaxian/~3/8BQGkiJoWb0/ext-js-3-2-beta-stores-components-transitions-and-themes#comments</comments>
		<pubDate>Thu, 11 Mar 2010 06:12:05 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
		
		<category><![CDATA[Ext]]></category>

		<category><![CDATA[Front Page]]></category>

		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8716</guid>
		<description><![CDATA[The Ext JS team have announced the 3.2 beta which includes new components and goodness.
Take the animated DataView transitions for example:

On top of that, the release includes:

Multiple sorting and filtering on Ext.data.Store

Composite Fields

Slider improvements

Toolbar plugins:  ToolbarReorderer and ToolbarDroppable

New Accessibility Theme: compliant with Section 508 of the Disabilities Act.

Quality Assurance: Unit Testing: over 180 bug [...]]]></description>
			<content:encoded><![CDATA[<p>The Ext JS team have <a href="http://www.extjs.com/blog/2010/03/09/announcing-ext-js-3-2-beta-multisort-transitions-and-composite-fields/">announced the 3.2 beta</a> which includes new components and goodness.</p>
<p>Take the animated DataView transitions for example:</p>
<p></p>
<p>On top of that, the release includes:</p>
<ul>
<li><a href="http://www.extjs.com/deploy/ext-3.2-beta/examples/grid/multiple-sorting.html">Multiple sorting and filtering on Ext.data.Store</a>
</li>
<li><a href="http://www.extjs.com/deploy/ext-3.2-beta/examples/form/composite-field.html">Composite Fields</a>
</li>
<li><a href="http://www.extjs.com/deploy/ext-3.2-beta/examples/slider/slider.html">Slider improvements</a>
</li>
<li>Toolbar plugins: <a href="http://www.extjs.com/deploy/ext-3.2-beta/examples/toolbar/reorderable.html"> ToolbarReorderer</a> and <a href="http://www.extjs.com/deploy/ext-3.2-beta/examples/toolbar/droppable.html">ToolbarDroppable</a>
</li>
<li>New Accessibility Theme: compliant with Section 508 of the Disabilities Act.
</li>
<li>Quality Assurance: Unit Testing: over 180 bug fixes and enhancements over 3.1
</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ajaxian?a=8BQGkiJoWb0:Dao1xnolWeo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=8BQGkiJoWb0:Dao1xnolWeo:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=8BQGkiJoWb0:Dao1xnolWeo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ajaxian?i=8BQGkiJoWb0:Dao1xnolWeo:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://feedproxy.google.com/~r/ajaxian/~3/8BQGkiJoWb0/ext-js-3-2-beta-stores-components-transitions-and-themes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSS3 Please! Instant results… Thank You</title>
		<link>http://feedproxy.google.com/~r/ajaxian/~3/mDpzAA5hJ38/css3-please-instant-results-thank-you</link>
		<comments>http://feedproxy.google.com/~r/ajaxian/~3/mDpzAA5hJ38/css3-please-instant-results-thank-you#comments</comments>
		<pubDate>Wed, 10 Mar 2010 13:39:24 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Examples]]></category>

		<category><![CDATA[Front Page]]></category>

		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8699</guid>
		<description><![CDATA[
Paul Irish and Jonathan Neal have created a fun example of various CSS tweaks that you can make, and see the results instantly.
CSS3, Please! lets you play with fancy new rules such as:

border-radius
box shadow
gradients
rgba support in backgrounds
transforms
font-face

Really nice way to make tweaks inline in the page&#8230;.. nicely done. Hope to see some other examples out [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://ajaxian.com/wp-content/images/css3please.png" alt="css3please" width="480" height="286"></p>
<p><a href="http://paulirish.com/">Paul Irish</a> and <a href="http://twitter.com/jon_neal">Jonathan Neal</a> have created a fun example of various CSS tweaks that you can make, and see the results instantly.</p>
<p><a href="http://css3please.com/">CSS3, Please!</a> lets you play with fancy new rules such as:</p>
<ul>
<li>border-radius</li>
<li>box shadow</li>
<li>gradients</li>
<li>rgba support in backgrounds</li>
<li>transforms</li>
<li>font-face</li>
</ul>
<p>Really nice way to make tweaks inline in the page&#8230;.. nicely done. Hope to see some other examples out there :)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ajaxian?a=mDpzAA5hJ38:gioU5uWmRDw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=mDpzAA5hJ38:gioU5uWmRDw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=mDpzAA5hJ38:gioU5uWmRDw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ajaxian?i=mDpzAA5hJ38:gioU5uWmRDw:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://feedproxy.google.com/~r/ajaxian/~3/mDpzAA5hJ38/css3-please-instant-results-thank-you/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HTML Minification</title>
		<link>http://feedproxy.google.com/~r/ajaxian/~3/GqOvRXjR1wY/html-minification</link>
		<comments>http://feedproxy.google.com/~r/ajaxian/~3/GqOvRXjR1wY/html-minification#comments</comments>
		<pubDate>Wed, 10 Mar 2010 11:14:51 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
		
		<category><![CDATA[Front Page]]></category>

		<category><![CDATA[HTML]]></category>

		<category><![CDATA[Miscellaneous]]></category>

		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8697</guid>
		<description><![CDATA[Good old Kangax has been playing with HTML minification and has shared his new tool in an early stage.

What does it do?
Kangax has forked John Resig&#8217;s HTML parser which parses the HTML and sends that into the Minifier. This has rules that do things like whitespace optimization, comment removal, and collapsing boolean attributes (e.g. disabled=&#8221;true&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Good old Kangax has been <a href="http://perfectionkills.com/experimenting-with-html-minifier/">playing with HTML minification</a> and has shared <a href="http://kangax.github.com/html-minifier/">his new tool</a> in an early stage.</p>
<p><img src="http://perfectionkills.com/images/minifier-screenshot.png"></p>
<p><b>What does it do?</b></p>
<p>Kangax has <a href="http://github.com/kangax/html-minifier/blob/gh-pages/src/htmlparser.js">forked John Resig&#8217;s HTML parser</a> which parses the HTML and sends that into the Minifier. This has rules that do things like whitespace optimization, comment removal, and collapsing boolean attributes (e.g. disabled=&#8221;true&#8221; -&gt; disabled).</p>
<p>He also has a linter going:</p>
<blockquote><p>
While working on minifier, I realized that oftentimes the most wasteful part of the markup is not white space, comments or boolean attributes, but inline styles, scripts, presentational or deprecated elements and attributes. None of these can be simply stripped, as that could affect state of the document and is just too obtrusive. What can be done, however, is reporting of these occurences to the user. HTMLLint is even a smaller script, whose job is exactly that—to log any deprecated or presentational elements/attributes encountered during parsing. Additionally, it detects event attributes (e.g. onclick, onmouseover, etc.). The rationale for this is that moving contents of event attributes to external script allows to <a href="http://perfectionkills.com/optimizing-html/#3_onclick_onmouseover_etc">take advantage of resource caching</a>.
</p></blockquote>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ajaxian?a=GqOvRXjR1wY:5xIeieC82ME:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=GqOvRXjR1wY:5xIeieC82ME:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=GqOvRXjR1wY:5xIeieC82ME:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ajaxian?i=GqOvRXjR1wY:5xIeieC82ME:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://feedproxy.google.com/~r/ajaxian/~3/GqOvRXjR1wY/html-minification/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Harmony: Canvas Drawing Tool</title>
		<link>http://feedproxy.google.com/~r/ajaxian/~3/9ASJDZ59k9Y/harmony-canvas-drawing-tool</link>
		<comments>http://feedproxy.google.com/~r/ajaxian/~3/9ASJDZ59k9Y/harmony-canvas-drawing-tool#comments</comments>
		<pubDate>Wed, 10 Mar 2010 09:50:44 +0000</pubDate>
		<dc:creator>Michael Mahemoff</dc:creator>
		
		<category><![CDATA[Canvas]]></category>

		<category><![CDATA[Front Page]]></category>

		<category><![CDATA[Miscellaneous]]></category>

		<category><![CDATA[Showcase]]></category>

		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8702</guid>
		<description><![CDATA[
Harmony is a new drawing tool, a HTML5/Canvas experiment with great potential. It provides some unique brush styles, and can produce some great-looking charcoal pencil style sketches, among other things. Better to try it out than explain it in words.
Creator Mr. Doob  (Richard Cabello) explains how he used Canvas to make it darker the [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p><a href="http://mrdoob.com/lab/javascript/harmony/">Harmony</a> is a new drawing tool, a HTML5/Canvas experiment with great potential. It provides some unique brush styles, and can produce some great-looking charcoal pencil style sketches, among other things. Better to <a href="http://mrdoob.com/lab/javascript/harmony/">try it out</a> than explain it in words.</p>
<p>Creator Mr. Doob  (Richard Cabello) <a href="http://mrdoob.com/blog/post/689">explains</a> how he used Canvas to make it darker the more you draw over it:</p>
<blockquote><p>
The whole thing is quite modular so I can keep adding more brush styles whenever I get inspired. During the process I found out that, for some reason (apparently lack of hardware acceleration), Firefox and Opera do not support context.globalCompositeOperation = &#8216;darker&#8217;. This was on the HTML5 spec before but got removed. Just so you know what I&#8217;m talking about, this is like the &#8220;multiply&#8221; blending in Photoshop. Webkit does support it tho. I hope they put it back on the specs and all browsers support it.
</p></blockquote>
<p>You can also save images using data URI encoding.</p>
<p>As it works on webkit, he made sure it worked on the mobile Android and iPhone browsers. No multi-touch as yet, but the touch UI still makes a nice input mechanism.</p>
<p><a href="http://mrdoob.com/lab/javascript/harmony/"><img src="http://ajaxian.com/wp-content/images/harmony.jpg" alt="harmony" width="320" height="480" class="alignnone size-full wp-image-8703" /></a></p>
<p>(Thanks <a href="http://twitter.com/FND">FND</a>)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ajaxian?a=9ASJDZ59k9Y:QoYCwb10r9k:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=9ASJDZ59k9Y:QoYCwb10r9k:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=9ASJDZ59k9Y:QoYCwb10r9k:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ajaxian?i=9ASJDZ59k9Y:QoYCwb10r9k:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://feedproxy.google.com/~r/ajaxian/~3/9ASJDZ59k9Y/harmony-canvas-drawing-tool/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Spectrum Visualization with the HTML5 Audio Data API</title>
		<link>http://feedproxy.google.com/~r/ajaxian/~3/tVWFXrUtupI/spectrum-visualization-with-the-html5-audio-data-api</link>
		<comments>http://feedproxy.google.com/~r/ajaxian/~3/tVWFXrUtupI/spectrum-visualization-with-the-html5-audio-data-api#comments</comments>
		<pubDate>Tue, 09 Mar 2010 11:20:07 +0000</pubDate>
		<dc:creator>Dion Almaer</dc:creator>
		
		<category><![CDATA[Front Page]]></category>

		<category><![CDATA[Miscellaneous]]></category>

		<category><![CDATA[Sound]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=8690</guid>
		<description><![CDATA[
The HTML5 specification introduces the  and  media elements, and with them the opportunity to dramatically change the way we integrate media on the web. The current HTML5 media API provides ways to play and get limited information about audio and video, but gives no way to programatically access or create such media. We [...]]]></description>
			<content:encoded><![CDATA[<blockquote cite="https://wiki.mozilla.org/Audio_Data_API"><p>
The HTML5 specification introduces the  and  media elements, and with them the opportunity to dramatically change the way we integrate media on the web. The current HTML5 media API provides ways to play and get limited information about audio and video, but gives no way to programatically access or create such media. We present a new extension to this API, which allows web developers to read and write raw audio data.<br />
</p></blockquote>
<p>The above quote is from the <a href="https://wiki.mozilla.org/Audio_Data_API">Audio Data API</a> extension that joins a bunch of juicy developer work in Firefox 3.7.</p>
<p>Thomas Sturm has taken that API and &lt;a href="http://www.storiesinflight.com/jsfft/visualizer/index.html<br />
"&gt;created a spectrum visualization</a> a kin to some of the great work by Scott Schiller (using Flash).</p>
<p></p>
<p>There is a new <code>onaudiowritten</code> attribute:</p>
<div class="igBar"><a href="showCodeTxt('html-4');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span>HTML:</span>
<div>
<div class="html">
<ol>
<li>
<div>&nbsp;</div>
</li>
<li>
<div><span>&lt;audio <span>src</span>=<span>"song.ogg"</span> controls=<span>"true"</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;onaudiowritten=<span>"audioWritten(event);"</span><span>&gt;</span></a></span></div>
</li>
<li>
<div><span><span>&lt;</span></a>/audio&gt;</span></div>
</li>
<li>
<div>&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>that lets you get access to info such as the spectrum:</p>
<div class="igBar"><a href="showCodeTxt('javascript-5');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span>JAVASCRIPT:</span>
<div>
<div class="javascript">
<ol>
<li>
<div>&nbsp;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; <span>function</span> audioWritten<span>&#40;</span>event<span>&#41;</span> <span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; spectrum = event.<span>mozSpectrum</span>;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; <span>var</span> specSize = spectrum.<span>length</span>, magnitude;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; <span>// Clear the canvas before drawing spectrum</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; ctx.<span>clearRect</span><span>&#40;</span><span>0</span>,<span>0</span>, canvas.<span>width</span>, canvas.<span>height</span><span>&#41;</span>;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; <span>for</span> <span>&#40;</span> <span>var</span> i = <span>0</span>; i &lt;specSize; i++ <span>&#41;</span> <span>&#123;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; magnitude = spectrum.<span>item</span><span>&#40;</span>i<span>&#41;</span> * <span>4000</span>; <span>// multiply spectrum by a zoom value</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span>// Draw rectangle bars for each frequency bin</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ctx.<span>fillRect</span><span>&#40;</span>i * <span>4</span>, canvas.<span>height</span>, <span>3</span>, -magnitude<span>&#41;</span>;</div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; &nbsp; <span>&#125;</span></div>
</li>
<li>
<div>&nbsp; &nbsp; &nbsp; <span>&#125;</span></div>
</li>
<li>
<div>&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Add to that the ability to write audio.... </p>
<div class="igBar"><a href="showCodeTxt('javascript-6');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span>JAVASCRIPT:</span>
<div>
<div class="javascript">
<ol>
<li>
<div>&nbsp;</div>
</li>
<li>
<div><span>var</span> audioOutput = <span>new</span> Audio<span>&#40;</span><span>&#41;</span>;</div>
</li>
<li>
<div>audioOutput.<span>mozSetup</span><span>&#40;</span><span>2</span>, <span>44100</span>, <span>1</span><span>&#41;</span>;</div>
</li>
<li>
<div>&nbsp;</div>
</li>
<li>
<div><span>var</span> samples = <span>&#91;</span><span>0</span>.<span>242</span>, <span>0</span>.<span>127</span>, <span>0</span>.<span>0</span>, -<span>0</span>.<span>058</span>, -<span>0</span>.<span>242</span>, ...<span>&#93;</span>;</div>
</li>
<li>
<div>audioOutput.<span>mozAudioWrite</span><span>&#40;</span>samples.<span>length</span>, samples<span>&#41;</span>;</div>
</li>
<li>
<div>&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>Nice work all around.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ajaxian?a=tVWFXrUtupI:ednfTQcVq1Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=tVWFXrUtupI:ednfTQcVq1Y:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=tVWFXrUtupI:ednfTQcVq1Y:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ajaxian?i=tVWFXrUtupI:ednfTQcVq1Y:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://feedproxy.google.com/~r/ajaxian/~3/tVWFXrUtupI/spectrum-visualization-with-the-html5-audio-data-api/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ASMX ScriptService mistakes: Installation and configuration</title>
		<link>http://feeds.encosia.com/~r/Encosia/~3/KWSmeXAYY6A/</link>
		<comments>http://feeds.encosia.com/~r/Encosia/~3/KWSmeXAYY6A/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 03:29:07 +0000</pubDate>
		<dc:creator>Dave Ward</dc:creator>
		
		<category><![CDATA[AJAX]]></category>

		<category><![CDATA[ASMX Mistakes and Misconceptions]]></category>

		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://encosia.com/?p=972</guid>
		<description><![CDATA[Continuing my series of posts about ASMX services and JSON, in this post I’m going to cover two common mistakes that plague the process of getting a project’s first ASMX ScriptService working: Installing System.Web.Extensions into the GAC and configuring your web.config.
System.Web.Extensions (aka ASP.NET AJAX)
The ability for ASMX services to return raw JSON is made possible [...]<p><p>###</p>

<p>Originally posted at <a href="http://encosia.com">Encosia</a>.  If you're reading this elsewhere, come on over and see the original.</p><br /><br /><a href="http://encosia.com/2010/03/08/asmx-scriptservice-mistakes-installation-and-configuration/">ASMX ScriptService mistakes: Installation and configuration</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Continuing <a href="http://encosia.com/2010/03/03/asmx-and-json-common-mistakes-and-misconceptions/">my series of posts about ASMX services and JSON</a>, in this post I’m going to cover two common mistakes that plague the process of getting a project’s first ASMX ScriptService working: <strong>Installing System.Web.Extensions</strong> into the GAC and <strong>configuring your web.config</strong>.</p>
<h3>System.Web.Extensions (aka ASP.NET AJAX)</h3>
<p>The ability for ASMX services to return raw JSON is made possible by two key features originally added by the ASP.NET AJAX Extensions v1.0:</p>
<ul>
<li><strong>JavaScriptSerializer</strong> – <a href="http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer(VS.100).aspx">The JavaScriptSerializer class</a> is the actual workhorse that translates back and forth between JSON strings and .NET CLR objects. Though less powerful than WCF’s DataContractJsonSerializer and third-party libraries like <a href="http://www.codeplex.com/Json" rel="nofollow">Json.NET</a>, JavaScriptSerializer is likely all you’ll ever need for simple AJAX callbacks. </li>
<li><strong>ScriptHandlerFactory</strong> – There are several more classes behind the scenes*, but the ScriptHandlerFactory is the tip of the iceberg that you&#8217;ll need to remember during configuration. Redirecting ASMX requests through this HttpHandler is what coordinates the pairing of ScriptService with JavaScriptSerializer to provide automatic JSON handling. </li>
</ul>
<p>Though both of these classes appear in the System.Web.Script namespace, they actually reside in ASP.NET AJAX&#8217;s System.Web.Extensions assembly. That has different implications depending on which version of ASP.NET your site targets:</p>
<ul>
<li><strong>1.x</strong> – No support for ScriptServices. A custom HttpHandler coupled with a third party library like <a href="http://james.newtonking.com/pages/json-net.aspx">Json.NET</a> is your best bet (if anyone has a good tutorial on doing this under 1.x, let me know so that I can link to it).</li>
<li><strong>2.0</strong> – ScriptServices are available in ASP.NET 2.0 with the installation of the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&amp;displaylang=en" rel="nofollow">ASP.NET AJAX Extensions v1.0</a>.
<ul>
<li>That means that <strong>the ASP.NET AJAX installer needs to be run on the server that hosts your site</strong>, not just on your local development machine.</li>
<li>For some of a ScriptService’s features to work in medium trust (i.e. shared hosting), the System.Web.Extensions assembly needs to be in your server’s global assembly cache (GAC). <a href="http://msmvps.com/blogs/luisabreu/archive/2007/11/22/stop-the-nonsense-don-t-put-the-system-web-extensions-dll-inside-your-bin-folder.aspx">Don’t waste your time trying to make it work in your site’s /bin directory</a>; insist that the extensions be properly installed on the server.</li>
</ul>
</li>
<li><strong>3.5+</strong> – As of .NET 3.5, System.Web.Extensions ships with the framework. No additional assemblies need be installed.</li>
</ul>
<p><em>* If you’re interested in the internals, I highly recommend downloading </em><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ef2c1acc-051a-4fe6-ad72-f3bed8623b43&amp;DisplayLang=en" rel="nofollow">the ASP.NET AJAX Extensions v1.0 source</a><em></em><em> and taking a look at ScriptHandlerFactory, RestHandlerFactory, and RestHandler. Though the classes have changed slightly since v1.0, they are still very similar.</em></p>
<h3>Rerouting the ASMX handler via web.config</h3>
<p>With the System.Web.Extensions assembly installed in the GAC, the remaining configuration step is an element in your site’s web.config. To take advantage of the ScriptService functionality, <strong>ASP.NET must be instructed to reroute ASMX requests through the ScriptHandlerFactory instead of ASP.NET’s standard ASMX handler</strong>.</p>
<p>This step is often unnecessary. The project templates in ASP.NET 3.5+ include all the necessary configuration elements, and ASP.NET 2.0 sites created with the “AJAX Enabled” templates are also pre-configured correctly.</p>
<p>However, if you find yourself unable to coax JSON out of an ASMX ScriptService, <strong>verifying your web.config is one of the best first steps in troubleshooting the issue</strong>. Whether due to a web.config generated by an older project template, accidental modification, or other issues, missing the httpHandlers web.config setting is a very common pitfall.</p>
<p>What should appear varies slightly depending on which version of ASP.NET your project targets. Regardless of your framework version, the config elements should be added to the &lt;httpHandlers&gt; section and are the only elements necessary. The <a href="http://www.asp.net/AJAX/documentation/live/ConfiguringASPNETAJAX.aspx" rel="nofollow">variety of other config items required for the UpdatePanel and ScriptManager</a> aren’t crucial to the ScriptService functionality.</p>
<h4>ASP.NET 2.0 (with the ASP.NET AJAX Extensions installed)</h4>

<div class="wp_syntax"><div class="code"><pre><span><span>&lt;configuration<span>&gt;</span></span></span>
  <span><span>&lt;system.web<span>&gt;</span></span></span>
    <span><span>&lt;httphandlers<span>&gt;</span></span></span>
      <span><span>&lt;remove</span> <span>path</span>=<span>&quot;*.asmx&quot;</span> <span>verb</span>=<span>&quot;*&quot;</span> <span>/&gt;</span></span>
      <span><span>&lt;add</span> <span>path</span>=<span>&quot;*.asmx&quot;</span> <span>verb</span>=<span>&quot;*&quot;</span> <span>Culture</span>=neutral, <span>validate</span>=<span>&quot;false&quot;</span></span>
<span>           <span>type</span>=<span>&quot;System.Web.Script.Services.ScriptHandlerFactory, </span>
<span>                 System.Web.Extensions, Version=1.0.61025.0,</span>
<span>                 PublicKeyToken=31bf3856ad364e35&quot;</span> <span>/&gt;</span></span>
    <span><span>&lt;/httphandlers<span>&gt;</span></span></span>
  <span><span>&lt;/system.web<span>&gt;</span></span></span>
<span><span>&lt;/configuration<span>&gt;</span></span></span></pre></div></div>

<h4>ASP.NET 3.5</h4>

<div class="wp_syntax"><div class="code"><pre><span><span>&lt;configuration<span>&gt;</span></span></span>
  <span><span>&lt;system.web<span>&gt;</span></span></span>
    <span><span>&lt;httphandlers<span>&gt;</span></span></span>
      <span><span>&lt;remove</span> <span>path</span>=<span>&quot;*.asmx&quot;</span> <span>verb</span>=<span>&quot;*&quot;</span> <span>/&gt;</span></span>
      <span><span>&lt;add</span> <span>path</span>=<span>&quot;*.asmx&quot;</span> <span>verb</span>=<span>&quot;*&quot;</span> <span>Culture</span>=neutral, <span>validate</span>=<span>&quot;false&quot;</span></span>
<span>           <span>type</span>=<span>&quot;System.Web.Script.Services.ScriptHandlerFactory, </span>
<span>                 System.Web.Extensions, Version=3.5.0.0,</span>
<span>                 PublicKeyToken=31bf3856ad364e35&quot;</span> <span>/&gt;</span></span>
    <span><span>&lt;/httphandlers<span>&gt;</span></span></span>
  <span><span>&lt;/system.web<span>&gt;</span></span></span>
<span><span>&lt;/configuration<span>&gt;</span></span></span></pre></div></div>

<h4>ASP.NET 4</h4>
<p>Thankfully, <a href="http://www.asp.net/LEARN/whitepapers/aspnet4/default.aspx#_TOC1_1" rel="nofollow">ASP.NET 4 has taken steps to reverse the trend of ever-enlarging baseline web.config files</a>. By moving common configuration items such as the ScriptService’s HttpHandler to the default machine.config, each individual site need not include those configuration elements in their specific web.config files.</p>
<p>Unless you go out of your way to manually remove their HttpHandler, ASMX ScriptServices will work automatically in any ASP.NET 4 site.</p>
<p><p>###</p>

<p>Originally posted at <a href="http://encosia.com">Encosia</a>.  If you're reading this elsewhere, come on over and see the original.</p><br><br><a href="http://encosia.com/2010/03/08/asmx-scriptservice-mistakes-installation-and-configuration/">ASMX ScriptService mistakes: Installation and configuration</a></p>
<div class="feedflare">
<a href="http://feeds.encosia.com/~ff/Encosia?a=KWSmeXAYY6A:ubmrC_jzw0I:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/Encosia?i=KWSmeXAYY6A:ubmrC_jzw0I:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.encosia.com/~ff/Encosia?a=KWSmeXAYY6A:ubmrC_jzw0I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Encosia?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.encosia.com/~ff/Encosia?a=KWSmeXAYY6A:ubmrC_jzw0I:aWKiLpGymzw"><img src="http://feeds.feedburner.com/~ff/Encosia?d=aWKiLpGymzw" border="0"></img></a> <a href="http://feeds.encosia.com/~ff/Encosia?a=KWSmeXAYY6A:ubmrC_jzw0I:30RXbuXOgYA"><img src="http://feeds.feedburner.com/~ff/Encosia?d=30RXbuXOgYA" border="0"></img></a> <a href="http://feeds.encosia.com/~ff/Encosia?a=KWSmeXAYY6A:ubmrC_jzw0I:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Encosia?i=KWSmeXAYY6A:ubmrC_jzw0I:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.encosia.com/~ff/Encosia?a=KWSmeXAYY6A:ubmrC_jzw0I:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Encosia?i=KWSmeXAYY6A:ubmrC_jzw0I:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Encosia/~4/KWSmeXAYY6A" height="1">]]></content:encoded>
			<wfw:commentRss>http://feeds.encosia.com/~r/Encosia/~3/KWSmeXAYY6A/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
