<?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>DLBATES.COM &#187; Cdn</title>
	<atom:link href="http://dlbates.com/Post/tag/cdn/feed/" rel="self" type="application/rss+xml" />
	<link>http://dlbates.com</link>
	<description>The life and times of David Bates, Programmer, Graphic Designer, Webmaster, Handyman, Logical Thinker, Husband, Father, and an INTP. Just sit back and take it in one post at a time.</description>
	<lastBuildDate>Sat, 17 Mar 2012 09:07:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Creating a lightbox using JQuery UI Dialog</title>
		<link>http://dlbates.com/Post/creating-a-lightbox-using-jquery-ui-dialog/</link>
		<comments>http://dlbates.com/Post/creating-a-lightbox-using-jquery-ui-dialog/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 02:58:09 +0000</pubDate>
		<dc:creator>David Bates</dc:creator>
				<category><![CDATA[All Post]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Cdn]]></category>
		<category><![CDATA[Combination Of The Two]]></category>
		<category><![CDATA[Content Area]]></category>
		<category><![CDATA[Darkness]]></category>
		<category><![CDATA[Div]]></category>
		<category><![CDATA[Element]]></category>
		<category><![CDATA[Fly]]></category>
		<category><![CDATA[Frustration]]></category>
		<category><![CDATA[Functionality]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Helper Function]]></category>
		<category><![CDATA[Js]]></category>
		<category><![CDATA[Libs]]></category>
		<category><![CDATA[Lightbox]]></category>
		<category><![CDATA[Link Href]]></category>
		<category><![CDATA[Love]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Platforms]]></category>
		<category><![CDATA[Script Type]]></category>
		<category><![CDATA[Showcase]]></category>
		<category><![CDATA[Text Javascript]]></category>
		<category><![CDATA[Thickbox]]></category>
		<category><![CDATA[Ui]]></category>

		<guid isPermaLink="false">http://dlbates.com/?p=1024</guid>
		<description><![CDATA[$(&#8220;&#8221;"#I&#8221;").Love(&#8220;&#8221;"JQuery&#8221;"); I love JQuery and I love JQuery UI even more but what I love most about the combination of the two is that they are cross browser compatible, delivered [...]]]></description>
			<content:encoded><![CDATA[<h2 align="center">$(&#8220;&#8221;"#I&#8221;").Love(&#8220;&#8221;"JQuery&#8221;");</h2>
<p>I love JQuery and I love JQuery UI even more but what I love most about the combination of the two is that they are cross browser compatible, delivered over a CDN network, and open source. This means that I can use anything I build on top of these two very powerful platforms in any website I wish, including the enterprise ones. </p>
<p>I was recently tasked with building a lightbox element that would allow me to showcase Vimeo videos (or any other content) in a cross browser CDN enabled way. At first I scoured the web looking for the best jquery lightbox plugin. I tried fancybox, shadowbox, thickbox, slimbox, facebox, other younameit-box plugins but they all either catered to one type of content, failed in the cross browser arena, or had unknown or grey licensing. </p>
<p>On day two of my growing frustration a friend of mine suggested I look at JQuery UI and specifically the Dialog method. So I did and was instantly hooked, and while it didn&#8217;t provide all of the functionality you need from a lightbox it came pretty darn close. So I began hacking away until I got down to a pretty comprehensive lightbox solution for video and then wrote a little helper function to populate the content area on the fly and set the title. What follows is how to do that: </p>
<h3>Step one: includes</h3>
<p>So first you need to include JQuery and JQuery UI within your page. The easiest way to do this is use Google&#8217;s CDN by placing the following two lines in your head.<br />
<code>&lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">&lt;/script><br />
&lt;script type="text/javascript" src=" https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.js">&lt;/script><br />
</code><br />
You will also need to include a JQuery UI theme you can use the starter theme hosted on Google&#8217;s CDN too!<br />
<code><br />
&lt;link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/ui-darkness/jquery-ui.cs"<br />
        type="text/css" rel="Stylesheet" /><br />
</code><br />
Again that needs to be placed in your head. </p>
<h3>Step two: create a div</h3>
<p>We need to create a div that will not only hold our dialog but also most of the embed code for the video&#8217;s we will want to play.<br />
I would suggest adding this code near the footer of the page since it will load an iframe.<br />
<code><br />
&lt;div id="videoPlayerDiv"><br />
    &lt;iframe id="theVideo" src="" width="640" height="360" frameborder="0" webkitallowfullscreen="" allowfullscreen="">&lt;/iframe><br />
&lt;/div><br />
</code></p>
<h3>Step three .dialog()</h3>
<p>Now you need some JQuery magic on page load as well as creating the helper function<br />
<code>&lt;script type="text/jscript"><br />
            $(document).ready(function () {<br />
                $('#videoPlayerDiv').dialog({ autoOpen: false, modal: true, title: "RFMD Video", width: 664, resizable: false });<br />
                $("#videoPlayerDiv").bind("dialogclose", function (event, ui) {<br />
                    $('#theVideo').attr('src', '');<br />
                });</p>
<p>            });<br />
            function SetVideo(source, title) {<br />
                $('#theVideo').attr('src', source);<br />
                $('#videoPlayerDiv').dialog("option", "title", title);<br />
                $('#videoPlayerDiv').dialog('open');<br />
                $('.ui-widget-overlay').click(function () { $('#videoPlayerDiv').dialog('close'); });<br />
            };<br />
    &lt;/script></code><br />
This can go in your header or wherever you might have already put the $(document).ready clause.</p>
<h3>Final step: Call your helper function</h3>
<p>So now all you need to do is call the helper function and pass it the src url for the video and the title<br />
<code><br />
&lt;a href="#" onclick="javascript:SetVideo('http://player.vimeo.com/video/18888136?title=0&amp;byline=0&amp;portrait=0&amp;color=af0522"&amp;autoplay=1', 'Courtesy Vimeo User 1024');return false;">Video&lt;/a><br />
</code><br />
You can prolly tell I use asp.net from the javascript surrounds and return false. If you don&#8217;t use .net you don&#8217;t need this. </p>
<h3>Demo</h3>
<p><a href="http://dlbates.com/jquidialogdemo.html" title="click to open" target="_Blank">Click to open demo</a></p>
<div class="add-comments-link"><center><b><a href="http://dlbates.com/Post/creating-a-lightbox-using-jquery-ui-dialog/#respond" title="Make a Comment">Make a Comment</a></b></center></div>]]></content:encoded>
			<wfw:commentRss>http://dlbates.com/Post/creating-a-lightbox-using-jquery-ui-dialog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bing Reported as Running on Linux</title>
		<link>http://dlbates.com/Post/bing-reported-as-running-on-linux/</link>
		<comments>http://dlbates.com/Post/bing-reported-as-running-on-linux/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 14:24:13 +0000</pubDate>
		<dc:creator>David Bates</dc:creator>
				<category><![CDATA[Akamai]]></category>
		<category><![CDATA[Cdn]]></category>
		<category><![CDATA[David Bates]]></category>
		<category><![CDATA[Frank Sandoval]]></category>
		<category><![CDATA[Html Headers]]></category>
		<category><![CDATA[Ip]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Os]]></category>
		<category><![CDATA[Linux Screenshot]]></category>
		<category><![CDATA[Linux Server]]></category>
		<category><![CDATA[Linux Servers]]></category>
		<category><![CDATA[Load Balancers]]></category>
		<category><![CDATA[Main News]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Netcraft]]></category>
		<category><![CDATA[Running]]></category>
		<category><![CDATA[Server Platform]]></category>
		<category><![CDATA[Server Type]]></category>
		<category><![CDATA[Webserver]]></category>

		<guid isPermaLink="false">http://dlbates.com/?p=316</guid>
		<description><![CDATA[When Frank Sandoval came to me with a screen shot proposing that Bing.com actually ran on Linux I was skeptical to say the least. No way Microsoft would do that&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bing.com"><img alt="" src="http://userlogos.org/files/logos/Rog/bing.com_02.png" title="bing" class="alignnone" width="400" height="300" /></a><!--digg--><br />
When<a href="http://twitter.com/franksterville"> Frank Sandoval</a> came to me with a screen shot proposing that Bing.com actually ran on Linux I was skeptical to say the least. No way Microsoft would do that&#8230; and why wouldn&#8217;t this be main news? I asked of him. </p>
<p>While I don&#8217;t know the why&#8217;s or what&#8217;s it is reported by <a href="http://www.netcraft.com/">netcraft.com</a> that the ip addresses used to resolve <a href="http://www.bing.com">http://www.bing.com</a> is running on Linux OS. <a href="http://screencast.com/t/u8noc21GZ2B">Screenshot</a>, <a href="http://uptime.netcraft.com/up/graph?site=www.bing.com">Live Page</a></p>
<p>Now, in Microsoft&#8217;s defense I cannot find another source to be sure as they use <a href="http://www.w3.org/P3P/">p3p</a> in their html headers.<br />
So the Linux OS could be <a href="http://www.netcraft.com">netcraft</a> reporting a load ballancer or who knows what&#8230; still you think if Microsoft was using one of it&#8217;s own technologies it would proudly be displayed on the home page. </p>
<p>Discuss below:<br />
David Bates</p>
<p><a href="http://twitter.com/rexm">@Rexm</a> pointed out that <a href="http://www.stackoverflow.com">StackOverflow</a> had this question posted as well. <a href="http://stackoverflow.com/questions/1015651/whats-the-famous-bing-running-on-asp-net-asp-net-mvc-iis-7-net-3-5/1015671#1015671">Link</a></p>
<p>Another Note: It has been said to me many times that this probably Bing&#8217;s <a href="http://en.wikipedia.org/wiki/Content_delivery_network">CDN</a> and not Bing&#8217;s actual webserver. I wrote this post because if you type Bing.com into <a href="http://www.netcraft.com">netcraft</a> it says  Linux is the server type. I do agree with many and even said that it is more than likely to be load balancers than bing itself&#8230; It turns out that it could be <a href="http://en.wikipedia.org/wiki/Akamai_Technologies">Akamai</a> that has the linux servers than Bing being hosted on Linux servers&#8230; It should also be noted that Akamai is the worlds largest CDN, but I still find it interesting that Microsoft would have anything Linux related in their server platform even if it is the CDN. </p>
<div class="add-comments-link"><center><b><a href="http://dlbates.com/Post/bing-reported-as-running-on-linux/#respond" title="Make a Comment">Make a Comment</a></b></center></div>]]></content:encoded>
			<wfw:commentRss>http://dlbates.com/Post/bing-reported-as-running-on-linux/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
	</channel>
</rss>

