<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/css/rss20.xsl" type="text/xsl"?>
<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/" xmlns:pheedo="http://www.pheedo.com/namespace/pheedo">
	<channel>
		<title>SitePoint » Learn CSS &#124; HTML5 &#124; JavaScript &#124; Wordpress &#124; Tutorials-Web Development &#124; Reference &#124; Books and More &#187; Web Tech</title>
		<atom:link href="http://www.sitepoint.com/category/webtech/feed/" rel="self" type="application/rss+xml"/>
		<link>http://www.sitepoint.com</link>
		<description></description>
		<lastBuildDate>Wed, 16 May 2012 15:00:34 +0000</lastBuildDate>
		<language>en</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
		<generator>http://wordpress.org/?v=3.3.1</generator>
		<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex"/>
		<item>
			<title>Two New Proposals to Solve the CSS3 Vendor Prefix Crisis</title>
			<link>http://www.pheedcontent.com/click.phdo?i=cef218a86efd615ecc4a777e83b9898e</link>
			<pheedo:origLink>http://www.sitepoint.com/css3-vendor-prefix-crisis-solutions-2/?utm_source=rss&amp;#038;utm_medium=rss&amp;#038;utm_campaign=css3-vendor-prefix-crisis-solutions-2</pheedo:origLink>
			<comments>http://www.sitepoint.com/css3-vendor-prefix-crisis-solutions-2/#comments</comments>
			<pubDate>Tue, 15 May 2012 15:41:07 +0000</pubDate>
			<dc:creator>Craig Buckler</dc:creator>
			<category><![CDATA[CSS Tutorials]]></category>
			<category><![CDATA[CSS3]]></category>
			<category><![CDATA[Discussion]]></category>
			<category><![CDATA[HTML & CSS]]></category>
			<category><![CDATA[HTML5]]></category>
			<category><![CDATA[News & Trends]]></category>
			<category><![CDATA[Web Tech]]></category>
			<category><![CDATA[CSS]]></category>
			<category><![CDATA[HTML5 Dev Center]]></category>
			<category><![CDATA[HTML5 Tutorials & Articles]]></category>
			<category><![CDATA[vendor prefixes]]></category>
			<guid
isPermaLink="false">http://www.sitepoint.com/?p=54609</guid>
			<description><![CDATA[<img
width="50" height="50" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/02/641-css-vendor-prefix-crisis-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="641-css-vendor-prefix-crisis" title="641-css-vendor-prefix-crisis" />Craig discusses two new proposals which could prevent the CSS3 vendor prefix catastrophe before it begins.<br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=cef218a86efd615ecc4a777e83b9898e&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=cef218a86efd615ecc4a777e83b9898e&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></description>
			<content:encoded><![CDATA[<img
width="50" height="50" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/02/641-css-vendor-prefix-crisis-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="641-css-vendor-prefix-crisis" title="641-css-vendor-prefix-crisis" /><p></p><p>Web developers have been concerned about the <a
href="http://www.sitepoint.com/w3c-css-webkit-prefix-crisis/">vendor prefix crisis</a> since February 2012. To summarize the issue, this is what should happen in an ideal world:</p><ol><li>Vendors implement experimental CSS3 properties using their own prefix, e.g. -webkit-transform, -moz-transform, -ms-transform, -o-transform.</li><li>Developers can use the technologies today without breaking cross-browser compatibility. Properties can be listed with their prefixed and unprefixed names to ensure they work everywhere.</li><li>Once a property becomes a W3C recommendation, all browser vendors can provide a stable unprefixed property, e.g. transform.</li><li>Optionally, developers can remove the prefixed properties from their stylesheets. However, it&#8217;s not strictly necessary if the unprefixed property is defined last and CSS cascade rules apply.</li></ol><p>This is what occurs in the real world:</p><ol><li>Vendors implement experimental CSS3 properties using their own prefix. In some cases, vendors promote them as an HTML5 <em>&#8220;standard&#8221;</em> even if they&#8217;re device-specific or never submitted to the W3C.</li><li>Some developers use the proprietary property from a single vendor, e.g. only -webkit-transform. This might be owing to ignorance, laziness or because they&#8217;re testing a limited number of devices.</li><li>Once a property becomes a W3C recommendation, all browser vendors can provide a stable unprefixed property, e.g. transform&hellip;</li><li>but developers neglect to change their stylesheets. The site looks good in some browsers but worse in others even when they support the standard W3C specification.</li><li>The vendors become concerned and add support for other prefixes into their browser, i.e. <a
href="http://www.sitepoint.com/opera-css3-webkit-prefix/">Opera implements the -webkit prefix for some properties</a>. The prefix process is broken and, while it&#8217;s too early to predict the outcome, the majority of developers consider it to be a bad move.</li></ol><p>We have discussed the issues at length on SitePoint; <a
href="http://www.sitepoint.com/css3-vendor-prefix-crisis-solutions/" class="broken_link">there are no easy solutions</a>. However, two interesting proposals have been raised by W3C members during the past week.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><h2>Option 1: Unprefixed Properties are Supported From Day One</h2><p>The first proposal comes from Florian Rivoal, Opera&#8217;s W3C representative:</p><blockquote><p> When a browser vendor implements a new CSS feature, it should support it, from day 1, both prefixed and unprefixed, the two being aliased. If a style sheet contains both prefixed and unprefixed, the last one wins, according to the cascade.</p><p>Authors should write their style sheets using the unprefixed property, and only add a prefixed version of the property (below the unprefixed one) if they discover a bug or inconsistency that they need to work around in a particular browser.</p><p>If a large amount of content accumulates using the a particular vendor prefix to work around an issue with the early implementation in that browser, the vendor could decide to freeze the behavior of the prefixed property while continuing to improve the unprefixed one.</p></blockquote><p>For example, you could use the following transform code in your CSS:</p><pre><code>
transform: rotate(30deg);
</code></pre><p>The property would be ignored by all browsers which had not implemented transforms. If there were a difference between two or more implementations, e.g. webkit browsers rotated anti-clockwise by default, you could override the property accordingly, e.g.</p><pre><code>
transform: rotate(30deg);
-webkit-transform: rotate(-30deg);
</code></pre><p>It&#8217;s a simple solution and easy to implement. Most existing stylesheets would continue to work and prefixed properties would rarely be necessary. In most cases, you would never need to update your CSS again.</p><p>However, what would happen if webkit changed rotation to the W3C-approved clockwise direction? Developers would need to fix their stylesheets by removing or rearranging the <code>-webkit-transform: rotate(-30deg);</code> property. Unfortunately, not everyone uses the same version of the webkit engine at the same time. You could encounter a situation where your site works in Chrome but not in Safari for several months.</p><h2>Option 2: A New Vendor-Draft Modifier</h2><p>The second proposal comes from Fran&ccedil;ois Remy:</p><blockquote><p> Let&#8217;s introduce the &#8220;!vendor-draft&#8221; value modifier. I propose we use unprefixed properties from start, but with a token explaining which version of the property we built our CSS for:<br
/> <code>border-radius: 3px !webkit-draft;</code></p><p>Any browser which is not webkit but implemented border-radius in a way that is compatible with the &#8220;webkit draft&#8221; can support the declaration. This is different from vendor prefixes: other browsers don&#8217;t impersonate webkit, they just acknowledge they support one specific property the way the webkit draft defines it. Browsers which are not compatible with that draft will just ignore the declaration. Browsers that change their implementation of a property are encouraged to iterate their &#8220;!vendor-draft&#8221; flag (using a version number, if appropriate).</p></blockquote><p>This solves the issue by changing the property value rather than its name (in a similar way to the <code>!important</code> modifier). Again, the following transform code could be used:</p><pre><code>
transform: rotate(30deg);
</code></pre><p>But a default anti-clockwise rotation could be fixed in any browser adhering to a webkit specification:</p><pre><code>
transform: rotate(30deg);
transform: rotate(-30deg) !webkit-draft;
</code></pre><p>If a browser subsequently supported the W3C specification, the second property would be ignored.</p><p>It would also be possible to implement draft versioning, e.g.</p><pre><code>
transform: rotate(30deg);
transform: rotate(-30degrees) !webkit-draft;
transform: rotate(-30deg) !webkit-draft-2;
</code></pre><p>It&#8217;s a flexible solution which finally addresses the issue of properties evolving over time.</p><p>Unfortunately, it&#8217;s more difficult to implement and could take months to appear in browsers even if all vendors agreed today. It may be technically better, but it&#8217;s a fundamentally different approach which could break existing stylesheets. In the short term, vendors would probably support both prefixes and value modifiers &#8212; and that would lead to confusion.</p><p>I like both solutions. From a coding perspective, vendor-draft modifiers seems the most logical option but I doubt it can be considered until vendors <em>&#8220;complete&#8221;</em> CSS3 and begin work on CSS4.</p><p>Supporting unprefixed properties is more practical but will certainly cause versioning issues which couldn&#8217;t be fixed in CSS alone. But perhaps that&#8217;s the price you pay for using experimental technology?</p><p>Do you have a preference for either of these options? Or is it too late to prevent a vendor prefix catastrophe?</p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div><br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=cef218a86efd615ecc4a777e83b9898e&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=cef218a86efd615ecc4a777e83b9898e&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/css3-vendor-prefix-crisis-solutions-2/feed/</wfw:commentRss>
			<slash:comments>10</slash:comments>
		</item>
		<item>
			<title>Ubuntu 12.04 LTS Precise Pangolin: Networking tips and tricks</title>
			<link>http://www.pheedcontent.com/click.phdo?i=49604f96ec07066dac688025f7068c4b</link>
			<pheedo:origLink>http://www.sitepoint.com/ubuntu-12-04-lts-precise-pangolin-networking-tips-and-tricks/?utm_source=rss&amp;#038;utm_medium=rss&amp;#038;utm_campaign=ubuntu-12-04-lts-precise-pangolin-networking-tips-and-tricks</pheedo:origLink>
			<comments>http://www.sitepoint.com/ubuntu-12-04-lts-precise-pangolin-networking-tips-and-tricks/#comments</comments>
			<pubDate>Mon, 14 May 2012 15:00:50 +0000</pubDate>
			<dc:creator>Jonathan Hobson</dc:creator>
			<category><![CDATA[Web Tech]]></category>
			<category><![CDATA[WebOS]]></category>
			<category><![CDATA[Ubuntu]]></category>
			<guid
isPermaLink="false">http://www.sitepoint.com/?p=54343</guid>
			<description><![CDATA[<img
width="50" height="39" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/ubuntu-50x39.png" class="attachment-thumbnail wp-post-image" alt="ubuntu" title="ubuntu" />Networking is often regarded to be complicated and very difficult to manage but as it forms an essential role in the day-to-day use of your computer the purpose of this article is to expose a few &#8216;tips and tricks&#8217; that will serve to improve your computers connectivity and overall performance by showing you how easy [...]<br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=49604f96ec07066dac688025f7068c4b&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=49604f96ec07066dac688025f7068c4b&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></description>
			<content:encoded><![CDATA[<img
width="50" height="39" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/ubuntu-50x39.png" class="attachment-thumbnail wp-post-image" alt="ubuntu" title="ubuntu" /><p></p><p>Networking is often regarded to be complicated and very difficult to manage but as it forms an essential role in the day-to-day use of your computer the purpose of this article is to expose a few &#8216;tips and tricks&#8217; that will serve to improve your computers connectivity and overall performance by showing you how easy it is to take control of Ubuntu 12.04, LTS Precise Pangolin.</p><p>So let&#8217;s get started &#8230;</p><h2>What is my local IP address</h2><p>It may be a easy question to begin with, but in a world of complexity it is often the simple questions that get overlooked.</p><h3>Using the graphical tools:</h3><p>Right click on the &#8216;networking icon&#8217; in the top panel of the Ubuntu desktop and choose &#8216;Connection Information&#8217; as shown below:</p><p><a
href="http://www.sitepoint.com/?attachment_id=54344" rel="attachment wp-att-54344" class="broken_link"><img
class="alignnone size-full wp-image-54344" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/05/u1.jpg" alt="" width="500" height="486" /></a></p><p>The resulting dialogue box will then provide feedback on your current settings.</p><h3>Using the command line interface:</h3><p>On the other hand, for those individuals who are beginning to enjoy the power of Terminal or for those of you who use a server (via the Console or Putty or similar).<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>If you have a wireless based connection, run:</p><pre>iwconfig</pre><p>If you have a &#8216;wired&#8217; connection, run</p><pre>ifconfig</pre><p>The results for &#8216;ifconfig&#8217; will look something like this:</p><pre>eth0      Link encap:Ethernet  HWaddr 00:1d:92:65:09:e1
          inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21d:92ff:fe65:9e1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:510 errors:0 dropped:0 overruns:0 frame:0
          TX packets:315 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:80353 (80.3 KB)  TX bytes:38731 (38.7 KB)
          Interrupt:42 Base address:0xa000
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:108 errors:0 dropped:0 overruns:0 frame:0
          TX packets:108 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8176 (8.1 KB)  TX bytes:8176 (8.1 KB)</pre><p>And because the command line provides us with additional opportunities, if you would like to quickly identify all the available ethernet devices on your computer, you can run</p><pre>ifconfig -a | grep eth</pre><p>The result will look something like this:</p><pre>eth0      Link encap:Ethernet  HWaddr 00:1d:92:65:09:e1</pre><p>Well done, but just before we finish-up I would like to take this opportunity to show you another useful command that can help identify all the network interfaces available to your system. Known as the &#8216;lshw&#8217; command, this tool will not only detail your ethernet devices but it will also provide a plethora of information on your hardware&#8217;s &#8216;other&#8217; capabilities.</p><p>To use this tool, simply run the following command and wait a few seconds whilst Ubuntu quieries your devices:</p><pre>sudo lshw -class network</pre><p>And the result will look something like this:</p><pre>  *-network
       description: Ethernet interface
       product: RTL8111/8168B PCI Express Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: eth0
       version: 01
       serial: 00:1d:92:65:09:e1
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm vpd msi pciexpress bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=N/A ip=192.168.1.160 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
       resources: irq:43 ioport:d800(size=256) memory:feaff000-feafffff memory:feac0000-feadffff</pre><p>Sometimes you&#8217;ve just &#8216;gotta&#8217; love the details, but now we know something about our computer we can begin to take control :-)</p><h2>How do I create a static IP address with the Network Manager</h2><p>The following instruction shows you how to create a fixed (or static) IP address with the Network Manager.</p><p>This approach is best suited to all desktop users who may require the need to keep the functionality of the Network Manager or for those that use netbooks, laptops and and other wireless connections that may require a DHCP based option in the future. Don&#8217;t worry, it is all very simple:</p><p>Click the network menu on the top panel (the &#8216;up/down&#8217; arrows icon) and select &#8216;Edit Connections&#8217;.</p><p>Alternatively you can choose System Settings &gt; Network &gt; Choose your &#8216;Network Connection&#8217; from the left hand panel and select &#8216;Options&#8217;.</p><p><a
href="http://www.sitepoint.com/?attachment_id=54345" rel="attachment wp-att-54345" class="broken_link"><img
class="alignnone size-full wp-image-54345" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/05/u2.jpg" alt="" width="500" height="400" /></a></p><p>Now choose the relevant connection and click edit.</p><p>For example, if you are using a &#8216;wired connection&#8217;, choose the &#8216;wired&#8217; tab to find your connection.</p><p><a
href="http://www.sitepoint.com/?attachment_id=54346" rel="attachment wp-att-54346" class="broken_link"><img
class="alignnone size-full wp-image-54346" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/05/u3.jpg" alt="" width="500" height="583" /></a></p><p>In the resulting dialogue box you should:</p><ul><li>Select the &#8216;IPv4 Settings&#8217; tab and change the &#8216;Method&#8217; to &#8216;Manual&#8217;.</li><li>Click Add and complete each field with your IP address, network mask and default gateway.Always press the &#8216;Enter/Return&#8217; when you&#8217;ve finished typing each address otherwise the dialogue will fail to accept your new settings and the &#8216;save&#8217; button will remain inactive/greyed-out.</li><li>Include the IP addresses of the DNS servers. Multiple addresses should be separated by commas.</li><li>Click Save and close the remaining dialogue boxes.</li></ul><p>And there you go &#8230;</p><p>If all is well you should be able to view web sites and/or view your local network but in some situations and depending on your network topology a reboot may be necessary.</p><p>To confirm your new settings, simply check your connection settings as shown previously (see above)</p><p><strong>But what if I need DHCP again?</strong><br
/> If you ever need to return to a dynamically assigned IP address simply re-run the previous steps. Find your current connection, select the &#8216;IPv4 Settings&#8217; tab and change the &#8216;Method&#8217; to &#8216;Automatic (DHCP)&#8217;. To finalise this reversal click save and reboot (depending on the network conditions and how the DHCP server is configured).</p><h2>Disable the Network Manager and &#8216;hard-code&#8217; a static IP address</h2><p>This solution explains how to create a fixed (or static) IP address without using the Network Manager.</p><p>The Network Manager is a very nice feature, but only suitable for individuals who require dynamically assigned connections or those who require wireless connectivity. Yes, it is true to say that these are both very popular in homes and offices throught the world but for those of us who use and prefer the benefit of a &#8216;wired connection&#8217; using the Network Manager does come at the cost of performance. So this solution uses the traditional approach to &#8216;hard-coding&#8217; your network connection and it is most suitable to those individuals who demand maximum performance or absolute stability.</p><blockquote><p>By using this approach you should note that we will not be removing the Network Manager, merely disabling it with the intention to capitalise on the performance gains by by-passing or side-stepping this device. These performance gains will not only be noticed in terms of network speed but also in terms of the computer in general.</p></blockquote><p>Again, don&#8217;t worry, the process to disable the Network Manager is very simple but it will require us to run various &#8216;commands&#8217; in Terminal in order to complete some steps.</p><p>So let&#8217;s begin by making a backup of our original file.</p><p>In Terminal type:</p><pre>sudo cp /etc/NetworkManager/NetworkManager.conf /etc/NetworkManager/NetworkManager.conf.bak</pre><blockquote><p>This will serve to back-up our original file to &#8216;/etc/NetworkManager/NetworkManager.conf.bak&#8217;. Hopefully you will not need it, but if you ever need to restore the original file simply open Terminal and reverse the command like so: &#8216;sudo cp /etc/NetworkManager/NetworkManager.conf.bak /etc/NetworkManager/NetworkManager.conf&#8217; and reboot.</p></blockquote><p>And with the confidence that we are fully backed-up we shall now proceed to disable the Network Manager.</p><p>In Terminal, type:</p><pre>sudo gedit /etc/NetworkManager/NetworkManager.conf</pre><p>This will open the &#8216;NetworkManager.conf&#8217; file in our text editor.</p><p>Now change:</p><p>managed=false</p><p>to</p><p>managed=true</p><p>So it looks like this:</p><p><a
href="http://www.sitepoint.com/?attachment_id=54347" rel="attachment wp-att-54347" class="broken_link"><img
class="alignnone size-full wp-image-54347" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/05/u4.jpg" alt="" width="500" height="409" /></a></p><p>When done, save the file and close it.</p><blockquote><p>You can re-enable the network manager at any time by simply reversing the steps shown above or by restoring your back-up file. Remember to reboot in order to apply these changes.</p></blockquote><p>Now we have successfully disabled the Network Manager we can proceed to create our Static IP address by making some direct changes to the &#8216;interface&#8217; file; but with safety in mind let&#8217;s begin by making a backup of our original file.</p><p>In Terminal and type:</p><pre>sudo cp /etc/network/interfaces /etc/network/interfaces.bak</pre><blockquote><p>This will back-up our original file to /etc/network/interfaces.bak. Again, it is not expected that we will need it but if you ever need to restore it open Terminal and reverse the command like so: sudo cp /etc/network/interfaces.bak /etc/network/interfaces</p></blockquote><p>Now lets add our static IP address.</p><p>In Terminal type:</p><pre>sudo gedit /etc/network/interfaces</pre><p>Authenticate yourself in the usual way and then replace the file contents as shown below, where xxx represents values relevant to your needs:</p><pre>auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
	address 	xxx.xxx.xxx.xxx
	netmask 	xxx.xxx.xxx.xxx
	network 	xxx.xxx.xxx.xxx
	broadcast 	xxx.xxx.xxx.xxx
	gateway 	xxx.xxx.xxx.xxx</pre><p>And to help you out, here is an example with an explanation of the values concerned:</p><pre>auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
	address 	192.168.1.100 	(this is my computers IP address)
	netmask 	255.255.255.0 	(this is my subnet mask)
	network 	192.168.1.0	(this is my network base address)
	broadcast 	192.168.1.255	(this is my broadcast address)
	gateway 	192.168.1.254	(this is my gateway/router's ip address)</pre><p>When complete, simply save and close the file and reboot your computer to complete these steps.</p><p>We are re-booting our computer at this point in order to &#8216;dis-engage&#8217; the Network Manager, and once complete you can always re-configure your IP address at any time by making the necessary changes to the &#8216;interfaces&#8217; file (shown above) and using the following command to restart your networking service: &#8216;sudo /etc/init.d/networking restart&#8217;.</p><p>After you restart your computer you will discover (visually) that nothing has changed but as a consequence you should be experiencing a &#8216;more&#8217; responsive computer and network connection.</p><blockquote><p>Should you ever want to re-enable the Network Manager. Simply reverse the steps we have taken above and/or restore you back-up files and reboot and as we created them with the &#8216;cp&#8217; or copy command &#8211; unless you delete them, your original backup files will always remain for future reference.</p></blockquote><h2>Create Virtual Network Adapters (add more than 1 IP address to a single ethernet card)</h2><p>In some situations this can be very useful and as an extension to our previous solution of &#8216;disabling the network manager and hard-coding a static IP address&#8217; I will now show you how to assign more than one IP address to the same ethernet card:</p><p>In Terminal type:</p><pre>sudo gedit /etc/network/interfaces</pre><p>Authenticate yourself and then replace the file contents like so, where xxx represents values relevant to your needs:</p><pre>auto lo
iface lo inet loopback
auto eth0
iface eth0 static
	address 	xxx.xxx.xxx.xxx
	netmask 	xxx.xxx.xxx.xxx
	network 	xxx.xxx.xxx.xxx
	broadcast 	xxx.xxx.xxx.xxx
	gateway 	xxx.xxx.xxx.xxx
auto eth0:0
iface eth0:0 static
	address 	xxx.xxx.xxx.xxx
	netmask 	xxx.xxx.xxx.xxx
	gateway 	xxx.xxx.xxx.xxx</pre><p>And to make this as simple as possible, here is an example:</p><pre>auto lo
iface lo inet loopback
auto eth0
iface eth0 static
	address 	192.168.1.100
	netmask 	255.255.255.0
	network 	192.168.1.0
	broadcast 	192.168.1.255
	gateway 	192.168.1.254
auto eth0:0
iface eth0:0 static
	address 	192.168.1.101
	netmask 	255.255.255.0
	gateway 	192.168.1.254</pre><p>By doing this I will be adding two IP addresses to my a single ethernet card. It will not only have the IP address of 192.168.1.100 but it will also have the alternative address of 192.168.1.101 (as a virtual instance).</p><p>The trick is to follow the virtual naming scheme (i.e. eth0:0, eth0:1, eth0:2 etc &#8230;) and to ensure that every instance maintains a unique IP address. In this way you can create as many &#8216;instances&#8217; of an IP address as required.</p><p>To illustrate this point, let&#8217;s add a third IP address to our example:</p><pre>auto lo
iface lo inet loopback
auto eth0
iface eth0 static
	address 	192.168.1.100
	netmask 	255.255.255.0
	network 	192.168.1.0
	broadcast 	192.168.1.255
	gateway 	192.168.1.254
auto eth0:0
iface eth0:0 static
	address 	192.168.1.101
	netmask 	255.255.255.0
	gateway 	192.168.1.254
iface eth0:1 static
	address 	192.168.1.102
	netmask 	255.255.255.0
	gateway 	192.168.1.254</pre><p>When complete, remember to reboot your computer to apply the changes or open Terminal and type:</p><pre>sudo /etc/init.d/networking restart</pre><p>You can then run &#8216;ifconfig&#8217; to view your new settings.</p><p>Have fun ..!</p><h2>Change your computer&#8217;s hostname</h2><p>You may like your current computer name, or you may want to change it.</p><p>In this short recipe I will show you how to view and change your computer name with relative ease &#8230;</p><p>In Terminal type:</p><pre>sudo gedit /etc/hostname</pre><p>The file will probably look something like this:</p><pre>ubuntu-computername</pre><p>To change the name of your computer, simply delete the existing content and replace as required.</p><p>Remember, the actual name can be anything your want as long as you remember some basic principles:</p><ul><li>Desktops generally use a singular name (as shown above) whereas all servers or &#8216;desktops acting as servers&#8217; should be in the format of computername.computerdomain.suffix.</li><li>On a local network computers should refrain from using the standard or typical internet based suffix or TLD unless your local DNS can account for such similarities.</li><li>Use &#8216;internet friendly&#8217; names and do not use a computer name that already exists on your network.</li><li>Do not use spaces or non-internet friendly characters.</li></ul><p>Once complete, simply choose &#8216;save&#8217;, &#8216;close&#8217; the file and reboot your computer to see the changes.</p><p>Your new computer name will be in the top-left hand side of the login screen but if you missed this or need to confirm your current or new hostname at any time.</p><p>Open Terminal and type:</p><pre>sudo hostname</pre><p>And the result should reflect the changes you made &#8230;</p><h2>Managing the Hosts file</h2><p>The hosts file file consists of a list of IP addresses and corresponding hostnames. Most users may never need to touch this area of their computer but there maybe an occasion when you need to edit the hosts file on your machine. This can because of any number of reasons (i.e. reversing the effect of malicious activity) or it can be because your are trying to make your life that little &#8216;quicker&#8217; buy &#8216;hard-coding&#8217; the address of an internal or external web site. Similarly, if your network contains computers whose IP addresses that are not listed in an existing DNS record, then it is recommended that you add them to the hosts file. So with this in mind I will now show you how to manage you hosts file.</p><p>Before you begin, you can make a back-up of this file by simply typing the following command in to Terminal:</p><pre>sudo cp /etc/hosts /etc/hosts.bak</pre><p>Now, to proceed and customise your hosts file simply return to the command line and type:</p><pre>sudo gedit /etc/hosts</pre><p>A typical desktop file will look like this (simply substitue the example values with those relevant to your computer):</p><pre>127.0.0.1			localhost
127.0.1.1			ubuntu-computername
# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters</pre><p>However, having said that and just for the record, for the &#8216;server&#8217; or &#8216;desktop server&#8217; version of the same file should look more like this:</p><pre>127.0.0.1       localhost.localdomain   localhost
192.168.1.100 	ubuntu-computername.ubuntu-domainname.lan  ubuntu-computername
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters</pre><p>You will notice that my examples include the IPv6 instruction and this is entirely at your discretion as it depends on whether your network supports it.</p><p>For example, you may ignore these values (not include them or comment them out by placing a &#8216;hash&#8217; character at the beginning of the line) like so if your computer does not use IPv6.</p><pre># The following lines are desirable for IPv6 capable hosts
#::1     ip6-localhost ip6-loopback
#fe00::0 ip6-localnet
#ff00::0 ip6-mcastprefix
#ff02::1 ip6-allnodes
#ff02::2 ip6-allrouters</pre><p>Of course, disabling IPv6 is optional and can sometimes improve performance but if you are in doubt, simply ignore them (but as they sometimes say in &#8216;old blighty&#8217; &#8211; &#8216;don&#8217;t fix what ain&#8217;t broke&#8217;).</p><p>So getting back on track &#8230;</p><p>In your hosts file you may want to include a list or pre-identified servers and workstations in order to speed-up name resolution like so:</p><pre>192.168.1.200		servername1 www servername1.localdomain.lan
192.168.1.200		servername2 mail servername2.localdomain.lan</pre><blockquote><p>In my example I have included an alias in addition to the actual names &#8211; i.e. servername1 is also known as www and servername2 is also known as mail. You do not need to do this as my other examples will show.</p></blockquote><p>Windows (and Mac) users should notice that this process very similar to customisng the &#8216;hosts&#8217; file on any Windows/Mac based operating system and the resulting file could look like this:</p><pre>127.0.0.1			localhost
127.0.1.1			ubuntu-computername
# PUT YOU COMMENT AFTER A HASH (#) FOR REFERENCE - NOT REQUIRED BUT USEFUL
192.168.1.200		www.website1.com
192.168.1.201		www.website2.com
# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters</pre><p>Consequently, my computer will now use the IP address for www.website1.com instead of searching a DNS record thereby ensuring that my ability to view the website in question would be quicker than before.</p><p>Taking this one step further &#8230; and by giving it a little twist.</p><p>For those of you who wish to excercise some &#8216;parental power&#8217; you could easily use this as a way to block direct access to some &#8216;unwanted web sites&#8217; by sending someone who expects to go to www.website1.com to www.website2.com, like so:</p><pre>#192.168.1.200	www.website1.com
192.168.1.201		www.website1.com
192.168.1.201		www.website2.com
192.168.1.202		www.website3.com
192.168.1.123		www.website4.com
192.168.1.167		www.website5.com</pre><p>Notice I have commented out the real address of website1 with a hash (#) and that both website1 and website 2 now have the same IP address &#8230; (the IP address being the actual address of website2)</p><p>It isn&#8217;t a perfect of solution by any means but it is food for thought and can serve as a starting point for future development ;-)</p><h2>How to re-configure DNS resolution</h2><p>The purpose of this section is to show you how to configure the appropriate nameserver to use when resolving IP address to hostnames and vice versa. It is not intended to explain how to configure the system as a name server as this is something I will be covering in a future article. You should only affect this file if you are not using the Network Manager and want to use a static IP address.</p><blockquote><p>The resolv.conf file is the resolver configuration file and it is used to configure workstation or server access to the Internet Domain Name System (DNS). This file defines which nameservers to use and in what order they are tried. You should therefore put the most reliable server first. It is convention that up to three name servers are supported. However, if no nameserver option is given, the resolver will attempt to connect to the name server on the local host.</p></blockquote><p>Resolv.conf still does this, but with the release of the Precise Pangolin a few things have changed, and regardless as to whether you are running a desktop or a server your system is probably running the resolveconf program:</p><p>&#8216;Resolveconf&#8217; is a small program that resides in &#8216;/etc/resolvconf&#8217; that dynamically modifies the nameserver information on boot. It is a useful tool, but for our purposes it can be disruptive, so we are going to work around it by simply adding a new entry to our &#8216;/etc/network/interfaces&#8217; file:</p><p>In Terminal type:</p><pre>sudo gedit /etc/network/interfaces</pre><p>Now add the following nameserver line to your file, changing XXX to something more applicable to your needs:</p><pre>dns-nameservers xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx</pre><p>Similar to the example shown above here is the new file using Google&#8217;s public nameservers:</p><pre>auto lo
iface lo inet loopback
auto eth0
iface eth0 static
	address 	192.168.1.100
	netmask 	255.255.255.0
	network 	192.168.1.0
	broadcast 	192.168.1.255
	gateway 	192.168.1.254
        dns-nameservers 8.8.8.8 8.8.4.4</pre><p>When complete, click &#8216;save&#8217;, then &#8216;close&#8217; the file and reboot to apply the changes.</p><p>On reboot, you can see that the new nameserver information has now been applied to our &#8216;resolve.conf&#8217; file by opening Terminal and typing:</p><pre>cat /etc/resolv.conf</pre><p>Which may look something like this:</p><pre># Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 127.0.0.1</pre><p>So having made your changes, to query the DNS capabilities of your system, simply return to the command line and type:</p><pre>nslookup www.sitepoint.com</pre><p>or alternatively try</p><pre>dig www.sitepoint.com</pre><p>And that&#8217;s it for now &#8230; but most of all, have fun :-)</p><p>So until next time &#8230;</p><p>I hope that you continue to enjoy using Ubuntu 12.04 LTS Precise Pangolin.</p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div><br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=49604f96ec07066dac688025f7068c4b&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=49604f96ec07066dac688025f7068c4b&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/ubuntu-12-04-lts-precise-pangolin-networking-tips-and-tricks/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		</item>
		<item>
			<title>Scalable Vector Graphics: an Overview</title>
			<link>http://www.pheedcontent.com/click.phdo?i=b8a5010453c01c9fa0355d650c005468</link>
			<pheedo:origLink>http://www.sitepoint.com/svg-scalable-vector-graphics-overview/?utm_source=rss&amp;#038;utm_medium=rss&amp;#038;utm_campaign=svg-scalable-vector-graphics-overview</pheedo:origLink>
			<comments>http://www.sitepoint.com/svg-scalable-vector-graphics-overview/#comments</comments>
			<pubDate>Fri, 11 May 2012 18:30:38 +0000</pubDate>
			<dc:creator>Craig Buckler</dc:creator>
			<category><![CDATA[Client Side Coding]]></category>
			<category><![CDATA[Design]]></category>
			<category><![CDATA[HTML & CSS]]></category>
			<category><![CDATA[HTML5]]></category>
			<category><![CDATA[Web Tech]]></category>
			<category><![CDATA[canvas]]></category>
			<category><![CDATA[HTML5 Dev Center]]></category>
			<category><![CDATA[SVG]]></category>
			<guid
isPermaLink="false">http://www.sitepoint.com/?p=54386</guid>
			<description><![CDATA[<img
width="50" height="50" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/05/672-svg-basics-50x50.png" class="attachment-thumbnail wp-post-image" alt="672-svg-basics" title="672-svg-basics" />Craig provides a concise overview of Scalable Vector Graphics and its associated technologies.<br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=b8a5010453c01c9fa0355d650c005468&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=b8a5010453c01c9fa0355d650c005468&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></description>
			<content:encoded><![CDATA[<img
width="50" height="50" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/05/672-svg-basics-50x50.png" class="attachment-thumbnail wp-post-image" alt="672-svg-basics" title="672-svg-basics" /><p></p><p>In my recent article, we discussed <a
href="http://www.sitepoint.com/7-reasons-to-consider-svgs-instead-of-canvas/">7 Reasons to Consider SVGs Instead of Canvas</a>. SVGs are ideal if you require a scalable diagram such as a chart or logo which can be altered or animated using JavaScript DOM methods.</p><p>So &hellip; <em>what are SVGs and how do we use them?</em> This is the first part in a series articles about the vector image format.</p><h2>What Are SVGs?</h2><p>SVGs are vector graphics. Rather than defining the color of each pixel like you would in a bitmap (JPEG, PNG, GIF, BMP etc.), vector graphics define lines and shapes, e.g. draw a black line from co-ordinate 0,0 to 100,100. This has a number of advantages: vectors are easy to modify, generally require smaller files and are scalable to any dimension without losing quality &#8212; which makes them ideal for responsive web design. Bitmaps remain the best choice for photographs or very complex images (note that SVGs can include embedded bitmaps).</p><p><img
src="http://blogs.sitepointstatic.com/images/tech/672-svg-basics-vector.png" width="339" height="267" alt="vector vs bitmap comparison" class="center" style="margin:20px auto" /></p><p>SVG is a royalty-free web standard maintained by the <a
href="http://www.w3.org/Graphics/SVG/">W3C SVG Working Group</a>. Version 1.0 of the technology was originally proposed in 1999. <a
href="http://www.w3.org/TR/SVG11/">Version 1.1</a> is the most recent standard with <a
href="http://www.w3.org/Graphics/SVG/WG/wiki/Roadmap">version 2.0</a> expected in 2013.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>There are a couple of other flavors: <a
href="http://www.w3.org/TR/SVGTiny12/">SVG Tiny</a> and <a
href="http://www.w3.org/TR/SVGMobile/">SVG Mobile</a>. These are simplified profiles or subsets of the full SVG specification which target devices with reduced computational and display capabilities. These standards largely relate to how rendering engines parse the image; an SVG 1.1 file can be rendered on a device which supports SVG Tiny but some effects such as gradients and opacities would not be applied.</p><h2>How are SVGs Defined?</h2><p>SVGs are declared using eXtensible Markup Language (XML). It uses tags like HTML &#8212; the following code draws a white circle with a black border:</p><pre><code>
&lt;circle cx=&quot;100&quot; cy=&quot;100&quot; r=&quot;50&quot; stroke-width=&quot;4&quot; stroke=&quot;#000&quot; fill=&quot;#fff&quot; /&gt;
</code></pre><p>Be aware that XML is stricter than HTML. You cannot, for example, omit a closing tag since this will make the file invalid and the SVG will not be rendered.</p><p>The W3C SVG1.1 specification defines 14 main features:</p><ol><li><strong>Basic shapes</strong>: straight lines, polygons, circles, ellipses, and rectangles with or without rounded corners.</li><li><strong>Paths</strong>: outlined or filled paths containing curved or straight lines.</li><li><strong>Text</strong>: on straight or curved paths in any direction.</li><li><strong>Painting</strong>: fills and outlines using solid colors, gradients, patterns, transparency, and markers (line terminators such as arrow heads).</li><li><strong>Color</strong>: fill and stroke properties defined using standard 3 or 6-digit hex or rgb values.</li><li><strong>Gradients and patterns</strong>: CSS3-like gradient declarations or bitmap backgrounds.</li><li><strong>Clipping, masking and compositing</strong>: using elements to outline regions which can be painted.</li><li><strong>Filters</strong>: effects applied to all elements within a container, e.g. blurring, lighting, color adjustments, etc.</li><li><strong>Linking</strong>: hyperlinks to other documents.</li><li><strong>Interactivity</strong>: attaching event handlers using JavaScript.</li><li><strong>DOM Scripting</strong>: accessing and manipulating SVG elements using the Document Object Model.</li><li><strong>Animation</strong>: built-in animations using Synchronized Multimedia Integration Language (SMIL).</li><li><strong>Fonts</strong>: text glyphs defined in an SVG file which can be used as a standard font.</li><li><strong>Metadata</strong>: titles, descriptions, subjects, creators and other properties about the SVG image.</li></ol><h2>Cascading Stylesheets in SVGs</h2><p>SVGs also support embedded or external CSS rules. Like HTML, the selectors can target tag types or IDs and classes assigned to specific elements. CSS properties and values generally follow element attributes. For example, this CSS renders every circle in the SVG with the same white fill and black border color:</p><pre><code>
circle
{
	stroke: #000;
	fill: #fff;
}
</code></pre><h2>SVG Creation Tools</h2><p>Creating SVGs in a text editor is possible but it&#8217;s a slow process, error-prone and not much fun. Fortunately, there are several open source and commercial tools which allow designers and non-programmers to easily create SVG images:</p><ul><li><a
href="http://www.inkscape.org/">Inkscape</a></li><li><a
href="http://www.openoffice.org/">OpenOffice</a> or <a
href="">LibreOffice</a> Draw</li><li><a
href="http://svg-edit.googlecode.com/svn/branches/2.5.1/editor/svg-editor.html">svg-edit</a></li></ul><p>Therefore, a design team could create a great-looking chart which a programmer can modify by applying real data to specific elements.</p><p>However, note that some graphics packages may not create the most optimal code or apply their own XML extensions.</p><h2>SVG Browser Support</h2><p>Although the technology has been available for more than a decade, SVG use within browsers was held back by Internet Explorer which first provided support in IE9. Today, most desktop and mobile browsers can handle SVGs and it is a recognized HTML5 standard.</p><p>Browser implementations vary, but SVGs can either be:</p><ul><li>viewed as a separate file directly in a web browser.</li><li>embedded as an XML section within an HTML page.</li><li>defined as an external page resource within <code>img</code>, <code>object</code> or the old <code>embed</code> tags (or as an <code>iframe</code>, although that&#8217;s effectively viewing the SVG file)</li><li>set as background image in CSS.</li></ul><p>There are a number of plug-in and shim options if you require SVG support in Internet Explorer 8.0 and below. Several fallback to Vector Markup Language (VML); a technology used in Microsoft products which influenced the SVG standard:</p><ul><li><a
href="http://raphaeljs.com/">Rapha&euml;l</a> &#8212; JavaScript/VML</li><li><a
href="http://www.amplesdk.com/">AmpleSDK</a> &#8212; JavaScript/VML</li><li><a
href="http://code.google.com/p/svgweb/">svgweb</a> &#8212; JavaScript/Flash</li><li><a
href="http://xmlgraphics.apache.org/batik/">Batik</a> &#8212; Java toolkit</li></ul><h2>SVG Performance in Browsers</h2><p>SVG XML must be parsed to render images on-screen and represented in memory as a Document Object Model. As with HTML pages, performance will be affected if you attempt to move or manipulate SVGs containing a large number of elements. In extreme cases, the redraw will be noticeable.</p><p>For this reason, it&#8217;s often preferable to use the HTML5 <code>canvas</code> tag for fast action games with hundreds of animated items. However, you may be able to adopt SVGs for some aspects, e.g. a player&#8217;s spaceship could be a simple SVG which can be moved, rotated, scaled and warped over a <code>canvas</code>-generated background.</p><h2>SVGs and Accessibility</h2><p>Owing to their XML data structure, <a
href="http://www.w3.org/TR/SVG-access/">SVGs provide better accessibility</a> than bitmap images. At a basic level, meta data, short text and long text alternatives can be applied to any SVG image.</p><p>That said, screen reader support is poor. SVGs were not considered a viable browser technology until the release of IE9 so vendors did not consider them a priority. The situation will undoubtedly improve.</p><p>In the short term, you could consider transforming SVG XML into a text-based alternative using XSLT.</p><h2>SVGs and Search Engine Optimization</h2><p>Unlike bitmaps, XML is inherently machine-readable so static SVG files can be read, parsed and indexed by search engine bots. Google has been indexing SVG content since August 2010 and results can be found in the standard and image search systems.</p><p>Replacing a few PNGs with SVGs is unlikely to improve your rankings. However, if you&#8217;re displaying data as images without textual fall-backs, switching to SVGs could offer an SEO boost.</p><p>In my next SVG article we&#8217;ll create our first images without the use of a graphics package!</p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div><br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=b8a5010453c01c9fa0355d650c005468&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=b8a5010453c01c9fa0355d650c005468&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/svg-scalable-vector-graphics-overview/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		</item>
		<item>
			<title>My Website&#8217;s Broken: 5 Steps to Determine What&#8217;s Wrong</title>
			<link>http://www.pheedcontent.com/click.phdo?i=f50ee2a79f734e647bd77e563666601e</link>
			<pheedo:origLink>http://www.sitepoint.com/5-steps-fix-broken-websites/?utm_source=rss&amp;#038;utm_medium=rss&amp;#038;utm_campaign=5-steps-fix-broken-websites</pheedo:origLink>
			<comments>http://www.sitepoint.com/5-steps-fix-broken-websites/#comments</comments>
			<pubDate>Wed, 09 May 2012 15:30:03 +0000</pubDate>
			<dc:creator>Craig Buckler</dc:creator>
			<category><![CDATA[Best Practices]]></category>
			<category><![CDATA[Cloud]]></category>
			<category><![CDATA[Disaster]]></category>
			<category><![CDATA[Disaster Recovery]]></category>
			<category><![CDATA[failover]]></category>
			<category><![CDATA[Resources]]></category>
			<category><![CDATA[Web Hosting]]></category>
			<category><![CDATA[Web Tech]]></category>
			<category><![CDATA[disaster recovery]]></category>
			<category><![CDATA[website]]></category>
			<guid
isPermaLink="false">http://www.sitepoint.com/?p=54311</guid>
			<description><![CDATA[<img
width="50" height="50" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/05/013-surviving-failure-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="013-surviving-failure" title="013-surviving-failure" />Your website's down but you're convinced nothing has changed? Craig's 5-step guide could help diagnose those pesky performance problems.<br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=f50ee2a79f734e647bd77e563666601e&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=f50ee2a79f734e647bd77e563666601e&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></description>
			<content:encoded><![CDATA[<img
width="50" height="50" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/05/013-surviving-failure-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="013-surviving-failure" title="013-surviving-failure" /><p></p><p>We&#8217;ve all been there. Your wonderful website has been running successfully for months then &#8212; BAM &#8212; it disappears. Or, more often, certain features stop functioning. Despite your protests that nothing has changed, your client isn&#8217;t happy. Prepare yourself for a few frustrating hours of problem probing.</p><h2>Step 1: Identify the Issue</h2><p>This might sound obvious, but I&#8217;ve known many developers open their IDE and start hacking at random code. It&#8217;s more important to determine the issue than the cause at this stage. Is the site unavailable? Is a particular page or function failing? Is it limited to specific browsers?</p><h2>Step 2: Test Resource Availability</h2><p>Nine times out of ten, the problem will be caused by a connectivity issue at your end or the client&#8217;s. If you can&#8217;t access any other pages, it&#8217;s not surprising that your website has disappeared. That said, it&#8217;s not always obvious; certain IP ranges, countries or sections of the internet can become temporarily blocked.</p><p>Test your site from a variety of locations &#8212; a <a
href="http://www.publicproxyservers.com/">public proxy server</a> will help identify whether it&#8217;s a local or global problem. If possible, examine the status of other sites running from the same server or web host.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>One less obvious problem is disk space. If you&#8217;re running a busy site, server logs can rapidly use the available space even when your application&#8217;s storage requirements are low.</p><p>Remember that you might be using resources on other servers. This includes CDN-hosted files, database servers, or remotely-hosted APIs such as those for Google Maps, YouTube, Twitter, advertising services etc.</p><p>You should also check your server loads. A major traffic spike or Denial of Service attack will cause access problems.</p><p>Finally, is your domain registration valid and is the DNS server responding as it should?</p><h2>Step 3: Identify What Changed</h2><p>Once you&#8217;ve rejected connectivity, traffic, DNS and disk space, it&#8217;s time to determine what changed. 999 times out of 1,000 the problem will have been caused by an update.</p><p>You may not have touched the files but are you sure others haven&#8217;t? Check with everyone who has access but don&#8217;t necessarily believe them. Here&#8217;s a typical conversation you&#8217;ll encounter&hellip;</p><p><strong>Client:</strong> My sites not working. What are you going to do about it?<br
/> <strong>You:</strong> I&#8217;ll fix it. Have you made any changes recently?<br
/> <strong>Client:</strong> No. It was like that when I got here.<br
/> <em>&hellip;five hour&#8217;s frantic investigation&hellip;</em><br
/> <strong>You:</strong> You changed X, didn&#8217;t you?<br
/> <strong>Client:</strong> X? Oh yes, I changed X. I did that when I was fiddling with Y and Z.</p><p>Your application may not be directly to blame. Has your web host updated the OS, language runtime, database software or file permissions? While vendors attempt to ensure PHP, Ruby, Python, MySQL, PostgreSQL, etc. remain backward compatible, features will almost certainly change or break between editions.</p><h2>Step 4: Reject the Edge Cases</h2><p>Although rare, you should look for signs of cracking. Software such as <a
href="http://www.sitepoint.com/10-wordpress-security-tips/">WordPress</a>, Joomla and OScommerce are obvious targets, however, changes are often subtle because the cracker wants to retain access. For example, you might discover that a file explorer add-on has been installed or phishing pages have appeared deep within the file structure.</p><p>Finally, you should never rule out hardware problems. Corrupt memory chips or disk sectors could be responsible for any number of bizarre issues. If possible, evaluate your application on a similar set-up or install a separate test version on the same server.</p><h2>Step 5: Fix Your App</h2><p>Once you have eliminated the impossible, whatever remains, however improbable, must be the truth. Perhaps your code isn&#8217;t as perfect as you thought&hellip;</p><p>Do you have any tips for diagnosing website or application problems? What was the most difficult issue you encountered?</p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div><br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=f50ee2a79f734e647bd77e563666601e&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=f50ee2a79f734e647bd77e563666601e&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/5-steps-fix-broken-websites/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		</item>
		<div>
			<div
class="post_box two_ads" style="float:left;padding-left:2px;">
				<div
id='div-gpt-ad-1328645237920-0' style='width:728px; height:90px;'>
					<script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328645237920-0'); });</script>
				</div>
			</div>
		</div>
		<div
class="clear">&nbsp;</div>
		<item>
			<title>Are You as Smart as Kevin Yank? Take the PHP &amp; MySQL Quiz and Find Out.</title>
			<link>http://www.pheedcontent.com/click.phdo?i=0cb2293a056b359cb76c52ce5f4ed452</link>
			<pheedo:origLink>http://www.sitepoint.com/are-you-as-smart-as-kevin-yank-take-the-php-mysql-quiz-and-find-out/?utm_source=rss&amp;#038;utm_medium=rss&amp;#038;utm_campaign=are-you-as-smart-as-kevin-yank-take-the-php-mysql-quiz-and-find-out</pheedo:origLink>
			<comments>http://www.sitepoint.com/are-you-as-smart-as-kevin-yank-take-the-php-mysql-quiz-and-find-out/#comments</comments>
			<pubDate>Wed, 09 May 2012 06:24:16 +0000</pubDate>
			<dc:creator>Mick Gibson</dc:creator>
			<category><![CDATA[PHP & MySQL News & Interviews]]></category>
			<category><![CDATA[PHP & MySQL Tutorials]]></category>
			<category><![CDATA[Tech]]></category>
			<category><![CDATA[Tutorials]]></category>
			<category><![CDATA[Web Developer Quiz]]></category>
			<category><![CDATA[Web Tech]]></category>
			<guid
isPermaLink="false">http://www.sitepoint.com/?p=54479</guid>
			<description><![CDATA[<img
width="50" height="43" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/php-mysql-50x43.png" class="attachment-thumbnail wp-post-image" alt="php-mysql" title="php-mysql" />We all know Kevin Yank is a pretty smart guy. Now&#8217;s your chance to see if you&#8217;re as smart as Kev, by taking the PHP &#38; MySQL Quiz (which accompanies his new book &#8220;PHP &#38; MySQl: Novice to Ninja&#8220;) Jump in now, and take on the elephant in the room :)<br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=0cb2293a056b359cb76c52ce5f4ed452&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=0cb2293a056b359cb76c52ce5f4ed452&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></description>
			<content:encoded><![CDATA[<img
width="50" height="43" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/php-mysql-50x43.png" class="attachment-thumbnail wp-post-image" alt="php-mysql" title="php-mysql" /><p></p><p><a
href="http://www.sitepoint.com/launch/d724a6" rel="attachment wp-att-53906"><img
class="alignright size-medium wp-image-53906" title="PHP &amp; MySQL: Novice to Ninja" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/phpmysql5-cover-86x115.jpg" alt="PHP &amp; MySQL: Novice to Ninja" width="86" height="115" /></a>We all know <a
href="http://www.sitepoint.com/launch/d724a6">Kevin Yank</a> is a pretty smart guy.</p><p>Now&#8217;s your chance to see if you&#8217;re as smart as Kev, by taking the <strong><a
href="http://www.sitepoint.com/quiz-phpmysql" target="_blank">PHP &amp; MySQL Quiz</a></strong> (which accompanies his new book &#8220;<a
href="http://www.sitepoint.com/launch/d724a6 ">PHP &amp; MySQl: Novice to Ninja</a>&#8220;)</p><p><strong><a
href="http://www.sitepoint.com/quiz-phpmysql" target="_blank">Jump in now</a>,</strong> and take on the elephant in the room :)</p><p
style="text-align: center;"><a
href="http://www.sitepoint.com/quiz-phpmysql"><img
class="aligncenter size-full wp-image-54486" title="Take the PHP &amp; MySQL Quiz" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/05/php-mysql5-quiz.jpg" alt="Take the PHP &amp; MySQL Quiz" width="500" height="454" /></a></p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div><br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=0cb2293a056b359cb76c52ce5f4ed452&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=0cb2293a056b359cb76c52ce5f4ed452&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/are-you-as-smart-as-kevin-yank-take-the-php-mysql-quiz-and-find-out/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		</item>
		<item>
			<title>Judgment Day Arrives: Opera Implements the CSS3 Webkit Prefix</title>
			<link>http://www.pheedcontent.com/click.phdo?i=9040e3fce784623a3f5c4c267a6cedbf</link>
			<pheedo:origLink>http://www.sitepoint.com/opera-css3-webkit-prefix/?utm_source=rss&amp;#038;utm_medium=rss&amp;#038;utm_campaign=opera-css3-webkit-prefix</pheedo:origLink>
			<comments>http://www.sitepoint.com/opera-css3-webkit-prefix/#comments</comments>
			<pubDate>Sat, 05 May 2012 12:05:30 +0000</pubDate>
			<dc:creator>Craig Buckler</dc:creator>
			<category><![CDATA[Android]]></category>
			<category><![CDATA[CSS3]]></category>
			<category><![CDATA[Discussion]]></category>
			<category><![CDATA[HTML & CSS]]></category>
			<category><![CDATA[HTML5]]></category>
			<category><![CDATA[iOS]]></category>
			<category><![CDATA[JavaScript]]></category>
			<category><![CDATA[JavaScript & CSS]]></category>
			<category><![CDATA[Mobile Web Dev]]></category>
			<category><![CDATA[Mobile Web Development]]></category>
			<category><![CDATA[Opinion]]></category>
			<category><![CDATA[Web Tech]]></category>
			<category><![CDATA[apple]]></category>
			<category><![CDATA[HTML5 Dev Center]]></category>
			<category><![CDATA[HTML5 Tutorials & Articles]]></category>
			<category><![CDATA[microsoft]]></category>
			<category><![CDATA[Mozilla]]></category>
			<category><![CDATA[opera]]></category>
			<category><![CDATA[webkit]]></category>
			<guid
isPermaLink="false">http://www.sitepoint.com/?p=54305</guid>
			<description><![CDATA[<img
width="50" height="50" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/02/641-css-vendor-prefix-crisis-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="641-css-vendor-prefix-crisis" title="641-css-vendor-prefix-crisis" />Opera is implementing 14 regularly-used webkit-prefixed properties in their browser. Is this the beginning of the end for CSS3 vendor prefixes?<br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=9040e3fce784623a3f5c4c267a6cedbf&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=9040e3fce784623a3f5c4c267a6cedbf&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></description>
			<content:encoded><![CDATA[<img
width="50" height="50" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/02/641-css-vendor-prefix-crisis-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="641-css-vendor-prefix-crisis" title="641-css-vendor-prefix-crisis" /><p></p><p>In February 2012, we reported the minutes of W3C meeting where <a
href="http://www.sitepoint.com/w3c-css-webkit-prefix-crisis/">Mozilla, Opera and Microsoft discussed implementing -webkit prefixes</a> in non-webkit browsers. The reason: some developers use only webkit prefixes &#8212; their sites look good in some browsers, but broken in others even when they offer the same level of CSS3 support. The issue is especially prevalent on mobile browsers and many developers fail to look beyond their high-end Apple or Android devices.</p><p><a
href="http://dev.opera.com/articles/view/opera-mobile-emulator-experimental-webkit-prefix-support/">Opera has now announced support for 14 CSS3 webkit properties</a> in their Mobile Emulator. The implementation will eventually reach all editions of their desktop and mobile browsers. If you&#8217;re thinking <em>&#8220;Opera has a tiny market share&#8221;</em>, think again: <a
href="http://www.sitepoint.com/browser-trends-may-2012/">it&#8217;s the world&#8217;s most-used mobile browser</a>.</p><p>Perhaps I&#8217;m being overly dramatic, but Charlton Heston&#8217;s famous line comes to mind: <em>&#8220;They finally, really did it. You manics. You blew it up!&#8221;</em></p><h2>Opera -webkit Aliasing</h2><p>Opera analyzed stylesheets from 10,000 popular websites to determine which CSS values/properties would receive -webkit aliases:<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><table
summary="Opera CSS webkit aliases" width="70%" style="text-align:left !important;margin:20px auto"><tr><th>-o- prefix</th><th>-webkit- alias</th></tr><tr><td>-o-linear-gradient</td><td>-webkit-linear-gradient</td></tr><tr><td>box-shadow</td><td>-webkit-box-shadow</td></tr><tr><td>-o-transform</td><td>-webkit-transform</td></tr><tr><td>-o-transform-origin</td><td>-webkit-transform-origin</td></tr><tr><td>border-radius</td><td>-webkit-border-radius</td></tr><tr><td>border-top-left-radius</td><td>-webkit-border-top-left-radius</td></tr><tr><td>border-top-right-radius</td><td>-webkit-border-top-right-radius</td></tr><tr><td>border-bottom-left-radius</td><td>-webkit-border-bottom-left-radius</td></tr><tr><td>border-bottom-right-radius</td><td>-webkit-border-bottom-right-radius</td></tr><tr><td>-o-transition</td><td>-webkit-transition</td></tr><tr><td>-o-transition-delay</td><td>-webkit-transition-delay</td></tr><tr><td>-o-transition-duration</td><td>-webkit-transition-duration</td></tr><tr><td>-o-transition-property</td><td>-webkit-transition-property</td></tr><tr><td>-o-transition-timing-function</td><td>-webkit-transition-timing-function</td></tr></table><p>If the browser encounters a property such as <code>-webkit-border-radius</code>, it will apply that effect. If you&#8217;ve defined <code>-webkit-border-radius</code>, <code>-o-border-radius</code> and <code>border-radius</code>, normal CSS cascading rules apply and the last defined rule or most appropriate selector will be applied, e.g.</p><pre><code>
#myelement
{
	-o-border-radius: 3px;
	border-radius: 6px;
	-webkit-border-radius: 9px;
}
</code></pre><p>All properties are considered to have equal priority so Opera applies a border radius of 9px.</p><p>With regard to differences in behavior, Opera state:</p><blockquote><p> As far as we can tell, the behavior the properties that we have aliased is identical in WebKit and Opera, or at least close enough that the differences will not matter in practice. If it turns out that there are differences big enough to cause breakage, we will consider our options, one of which is to align the behavior of our -webkit- prefixed variant to what WebKit actually does.</p></blockquote><p>Opera make a reasonable case to justify their decision. While they understand the complaints, their primary goal is to create a browser which works well for users &#8212; who outnumber developers by many thousands to one.</p><h2>The Backlash</h2><p>Most developers understand the problem but disagree with the solution. It&#8217;s crude and has the potential to break the web. Taking the decision to it&#8217;s logical extreme, all vendors would support every prefix but any implementation differences would render the CSS property useless.</p><p>The solution rewards bad development practices. While Opera advises you use all vendor prefixes, they will exacerbate the problem:</p><ul><li>Less conscientious developers will see this as justification for only targeting webkit browsers.</li><li>If your site uses differing -webkit and -o values, it will now be affected by CSS cascade rules. Is it easier to analyze and retest your code or simply remove the Opera properties?</li><li>It will become easier to accidentally omit the -o prefix since sites will work as expected.</li></ul><p>Several problems have already been reported. For example, Modernizr evaluates prefixes in turn until it finds one the browser supports. Therefore:</p><pre><code>
Modernizr.prefixed("transition");
</code></pre><p>now returns <code>WebkitTransition</code> in Opera. Transitions are new to Opera and the browser doesn&#8217;t support every webkit CSS and JavaScript property. If you want to adjust or disable effects in Opera, you can&#8217;t rely on Modernizr-like detection code. You may even need to implement <a
href="http://www.sitepoint.com/why-browser-sniffing-stinks/">nasty browser sniffing</a>.</p><p>However, my biggest issue is this: <em>where are all these problem sites?</em> Has user experience suffered from the lack of rounded corner, gradient, shadow, transition and transform effects? Are those sites genuinely broken or has Opera taken a (marketing) opportunity to make their browser look better?</p><p>Since Opera has analyzed 10,000 websites they can contact the owners directly. At the very least, they could publish a &#8220;hall of shame&#8221; which provides examples and highlights the technical issues. Many developers would happily contact companies on Opera&#8217;s behalf. Some would be prepared to fix sites for free since it could lead to future contracts.</p><p>There are <a
href="http://www.sitepoint.com/css3-vendor-prefix-crisis-solutions/" class="broken_link">no easy solutions to the vendor prefix crisis</a>. I understand Opera&#8217;s reasons but, regardless of how this is implemented, it&#8217;s inevitable that something will end up broken.</p><p><strong>Some good news:</strong> Microsoft has announced they will not support webkit prefixes in Internet Explorer (although there&#8217;s nothing to prevent them reversing that decision). Mozilla is yet to reveal their intentions &#8212; they will be watching Opera&#8217;s situation closely.</p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div><br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=9040e3fce784623a3f5c4c267a6cedbf&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=9040e3fce784623a3f5c4c267a6cedbf&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/opera-css3-webkit-prefix/feed/</wfw:commentRss>
			<slash:comments>28</slash:comments>
		</item>
		<item>
			<title>Add a Web Console to Your Toolbox, Part 1</title>
			<link>http://www.pheedcontent.com/click.phdo?i=43433b9278e81e21e28d598f8a21b18f</link>
			<pheedo:origLink>http://www.sitepoint.com/add-a-web-console-to-your-toolbox-part-1/?utm_source=rss&amp;#038;utm_medium=rss&amp;#038;utm_campaign=add-a-web-console-to-your-toolbox-part-1</pheedo:origLink>
			<comments>http://www.sitepoint.com/add-a-web-console-to-your-toolbox-part-1/#comments</comments>
			<pubDate>Thu, 03 May 2012 15:00:43 +0000</pubDate>
			<dc:creator>Jeff Friesen</dc:creator>
			<category><![CDATA[HTML5]]></category>
			<category><![CDATA[JavaScript]]></category>
			<category><![CDATA[Web Tech]]></category>
			<guid
isPermaLink="false">http://www.sitepoint.com/?p=54167</guid>
			<description><![CDATA[<img
width="50" height="28" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/05/Screen-Shot-2012-05-02-at-4.06.54-PM-50x28.png" class="attachment-thumbnail wp-post-image" alt="Screen Shot 2012-05-02 at 4.06.54 PM" title="Screen Shot 2012-05-02 at 4.06.54 PM" />In this tutorial, Jeff teaches us how to make a completely interactive terminal, compatible with the top five browsers, make sure you do not miss this one.<br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=43433b9278e81e21e28d598f8a21b18f&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=43433b9278e81e21e28d598f8a21b18f&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></description>
			<content:encoded><![CDATA[<img
width="50" height="28" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/05/Screen-Shot-2012-05-02-at-4.06.54-PM-50x28.png" class="attachment-thumbnail wp-post-image" alt="Screen Shot 2012-05-02 at 4.06.54 PM" title="Screen Shot 2012-05-02 at 4.06.54 PM" /><p></p><p>A <em>console</em> is a software artifact for reading line-oriented textual input from the keyboard and writing line-oriented textual output to the screen. Consoles are often used to implement operating system<a
href="http://en.wikipedia.org/wiki/Command-line_interface" target="_blank">command-line interfaces</a>, but are also handy in <a
href="http://en.wikipedia.org/wiki/Adventure_game#Text_adventure" target="_blank">text-based adventure games</a> and other contexts.</p><p>Although text-oriented consoles are not as popular as they once were because of the proliferation of graphical user interfaces, they can be useful to <a
href="http://en.wikipedia.org/wiki/Power_user" target="_blank">power users</a> who are not intimidated by this style of interface. Also, consoles can open up a new class of web application such as the embedded browser <a
href="http://en.wikipedia.org/wiki/Shell_(computing)" target="_blank">shell</a>.</p><p>This article begins a two-part series that presents a JavaScript-based console library for use with web applications that may benefit from this style of user interface. Part 1 introduces you to the library&#8217;s simple API along with a browser shell application that serves as a useful demonstration of this API. Part 2 shows you how the library is implemented so that you can modify it to meet additional requirements.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><h2>Explore the Console Library</h2><p>The console library consists of a global object named <code>Console</code> with several properties. This arrangement minimizes pollution of the global namespace. Furthermore, it reflects my desire to avoid supporting multiple consoles, as I find it easier to implement a singleton console.<br
/> <code>Console</code> provides the following features:</p><ul></ul><ul><li>easy initialization based on number of desired rows and columns (the <code>&lt;canvas&gt;</code> tag requires only an <code>id</code> attribute)</li></ul><ul></ul><ul><li>canvas placed in tab order and gains keyboard focus immediately for browsers such as Firefox</li></ul><ul></ul><ul><li>clear console capability</li></ul><ul></ul><ul><li>green on black text with monospace font</li></ul><ul></ul><ul><li>visible cursor that marks the current input position</li></ul><ul></ul><ul><li>text echoing capability</li></ul><ul></ul><ul><li>vertically scrollable when text flows past the lower-right character position</li></ul><ul></ul><ul><li>simplified editing in terms of the backspace key</li></ul><ul></ul><ul><li>automatically call a function when no input is available</li></ul><ul></ul><ul><li>supports FireFox, Internet Explorer, Chrome, Opera, and Safari</li></ul><p>Although <code>Console</code> encapsulates multiple accessible properties, I consider only four of them to be members of the &#8220;public&#8221; API. The other properties should not be accessed; they exist to support the following four properties and could change in a subsequent version of the library:</p><ul></ul><ul><li><code>init(canvasName, numCols, numRows)</code> initializes the console. The string passed to <code>canvasName</code> must match the value of an existing <code>&lt;canvas&gt;</code> element&#8217;s <code>id</code> attribute. The integer passed to<code>numCols</code> identifies the desired number of columns (e.g., 80), and the integer passed to <code>numRows</code> identifies the desired number of rows (e.g., 25). The console is cleared and the cursor position is set (0, 0). The resulting console displays green text on a black background. This function does not return a value.</li></ul><ul></ul><ul><li><code>clear()</code> clears the console and sets the cursor position to (0, 0). This function does not return a value.</li></ul><ul></ul><ul><li><code>getLine(callback)</code> returns a line of input and echoes this input to the console. It first checks if a line has been entered by noting whether a newline character (indicated by the user having pressed the key labeled Enter or Return) is present in the input. If so, the line is returned without the newline character. If a newline is not present, or if there is no input, this function returns null. When a function is passed to <code>callback</code>, that function is called when nothing has been entered.</li></ul><ul></ul><ul><li><code>echo(msg)</code> echoes the string passed to <code>msg</code> to the console starting at the cursor position, which is updated. The console scrolls vertically when the message flows past the lower-right corner. This function recognizes <code>\b</code> (backspace) and <code>\n</code> (newline) special characters. Also, it does not return a value.</li></ul><p>The <code>getLine(callback)</code> function does not block the current thread while waiting for the user to press Enter/Return. Instead, it returns immediately. It does so because JavaScript code runs on a single thread. (HTML5&#8242;s web workers are an exception, and are beyond the scope of this article.) Blocking this thread for longer than what the browser considers acceptable causes the browser to display a dialog box that reports an unresponsive script.</p><p>The console library is easy to use. After defining a <code>&lt;canvas&gt;</code> element, and after initializing and echoing any preliminary text to the console, repeatedly execute a function via JavaScript&#8217;s<code>setInterval()</code> function. Each execution should invoke <code>getLine(callback)</code> (with an optional callback function) and then take appropriate action based on <code>getLine()</code>&#8216;s return value. Listing 1 presents the HTML for a simple demonstration of this library.</p><pre>&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;
         Console Demo
      &lt;/title&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=Edge"/&gt;
      &lt;script src="../Console/Console.js"&gt;
      &lt;/script&gt;
   &lt;/head&gt;
   &lt;body style="text-align: center"&gt;
      &lt;p&gt;
      &lt;h2&gt;
        Console Demo
      &lt;/h2&gt;
      &lt;canvas id="mycanvas"&gt;
      HTML5 canvas element not supported by this browser.
      &lt;/canvas&gt;
      &lt;p&gt;
      You might have to press the Tab key or click the canvas to give it keyboard focus.
      &lt;/p&gt;
      &lt;script&gt;
         Console.init("mycanvas", 64, 16);
         Console.echo("&gt;");
         function tick()
         {
            var line = Console.getLine();
            if (line != null)
            {
               if (line != "")
                  Console.echo(line+"\n");
               Console.echo("&gt;");
            }
         }
         setInterval("tick()", 50); // Invoke tick() every 50 milliseconds.
      &lt;/script&gt;
   &lt;/body&gt;
&lt;/html&gt;</pre><p><strong>Listing 1:</strong> Echoing entered text on the console</p><p>Listing 1 describes <code>ConsoleDemo.html</code>. This listing is fairly straightfoward, except perhaps for the <code>&lt;meta&gt;</code> element. This element enforces a <a
href="http://blogs.msdn.com/b/askie/archive/2009/03/23/understanding-compatibility-modes-in-internet-explorer-8.aspx" target="_blank">compatibility mode</a> &#8211; use latest standards rendering mode &#8212; so that the console will work under Internet Explorer 9 (and probably higher versions of this browser). Otherwise, Explorer outputs an error message about the Canvas API&#8217;s <code>getContext()</code> function not being defined.</p><p>Listing 1 continues with a <code>&lt;script&gt;</code> element that includes the contents of a JavaScript source file named <code>Console.js</code>. This file defines the console library and is located in a <code>Console</code> directory that&#8217;s accessed relative to <code>ConsoleDemo.html</code>. The code file that&#8217;s attached to this article contains <code>ConsoleDemo.html</code> and <code>Console.js</code> in appropriate directories relative to each other, so you should be able to run <code>ConsoleDemo</code> without problems.</p><p>The body of this HTML file specifies a <code>&lt;canvas&gt;</code> element whose <code>id</code> attribute is assigned <code>mycanvas</code>. No other attribute is required because the console library takes care of them. The body also contains a <code>&lt;script&gt;</code> element that presents the console demonstration code.</p><p>The code first initializes the canvas to a 64-column-by-16-row drawing area &#8212; I chose these values because they were the dimensions of the text screen on my old TRS-80 Model III microcomputer. The code then echoes a <code>&gt;</code> character to the console as the initial input line&#8217;s prompt.</p><p>At this point, a function named <code>tick()</code> is defined for repeated execution. This function will be executed every 50 milliseconds courtesy of the <code>setInterval("tick()", 50)</code> function call. Each invocation attempts to retrieve and echo back to the console a line of input.</p><p><code>tick()</code> first invokes <code>getLine()</code> without passing a callback function because none is needed in this example. If this function returns null because nothing has been entered or the user is typing some input (and has not yet pressed Enter/Return), nothing further happens. Otherwise, if the returned line is not equal to the empty string (only Enter/Return was pressed), the entered text followed by a newline is echoed to the console. At this point, a <code>&gt;</code> prompt is echoed to inform the user that another line of input is expected.</p><p>Figure 1 shows you the resulting console in the context of Firefox.</p><p><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/05/figure1.jpg"/></p><p><strong>Figure 1:</strong> You don&#8217;t have to press Tab to start using the console on Firefox.</p><h2>Encounter a Browser Shell</h2><p>A <a
href="http://en.wikipedia.org/wiki/Shell_(computing)" target="_blank"><em>shell</em></a> provides an operating system&#8217;s user interface, and its primary purpose is to run programs. Modern operating systems feature graphical shells, but many also feature traditional command-line-oriented shells (e.g, Unix&#8217;s Korn and Bourne shells). A similar shell can be embedded within a web page via the console library, and this <em>browser shell</em> can be used to execute browser-oriented commands.I&#8217;ve created a browser shell application as a useful demonstration of the console library. Figure 2 reveals this application&#8217;s console in the context of the Internet Explorer 9 browser.</p><p><a
href="http://www.sitepoint.com/wp-content/uploads/1/files/2012/05/figure2.jpg"><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/05/figure2.jpg" alt="" title="figure2" width="848" height="680" class="alignleft size-full wp-image-54250" /></a></p><p><strong>Figure 2:</strong> The browser shell currently supports four commands.</p><p>Figure 2 reveals an interesting anomaly: geolocation information is not immediately displayed. Instead, latitude and longitude data is often presented multiple lines later in the browser. You will learn the reason while exploring Listing 2.</p><pre>&lt;html&gt;
   &lt;head&gt;
      &lt;title&gt;
         Browser Shell
      &lt;/title&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=Edge"/&gt;
      &lt;script src="../Console/Console.js"&gt;
      &lt;/script&gt;
   &lt;/head&gt;
   &lt;body style="text-align: center"&gt;
      &lt;p&gt;
      &lt;h2&gt;
        Browser Shell
      &lt;/h2&gt;
      &lt;canvas id="mycanvas"&gt;
      HTML5 canvas element not supported by this browser.
      &lt;/canvas&gt;
      &lt;p&gt;
      You might have to press the Tab key or click the canvas to give it keyboard focus.
      &lt;/p&gt;
      &lt;script&gt;
         Console.init("mycanvas", 64, 22);
         Console.echo("Browser Shell 1.0\n\n");
         Console.echo("Type 'help' (without the quotes) to obtain help\n\n");
         Console.echo("&gt;");
         var geo = "";
         function callback()
         {
            if (geo == "")
               return;
            Console.echo(geo+"\n");
            Console.echo("&gt;");
            geo = "";
         }
         function tick()
         {
            var line = Console.getLine(callback);
            if (line != null)
            {
               line = line.trim();
               if (line == "browser")
                  Console.echo(navigator.<wbr>userAgent+"\n\n"); else if (line == "cls") Console.clear(); else if (line == "geo") { Console.echo("querying location info...may take a few moments\n\n"); function report_error(error) { geo = error.message; if (geo == "") // geo is "" on Safari geo = "unknown error"; } function report_geolocation_query(</wbr><wbr>position) { geo = "Lat: "+position.coords.latitude+", Lon: "+position.coords.latitude; } navigator.geolocation.</wbr><wbr>getCurrentPosition(report_</wbr><wbr>geolocation_query, report_error); } else if (line == "help") { Console.echo("Available commands...\n"); Console.echo("browser -- display current browser info\n"); Console.echo("cls -- clear screen\n"); Console.echo("geo -- obtain geolocation information\n"); Console.echo("help -- display this help text\n\n"); } else if (line != "") Console.echo("bad command\n"); Console.echo("&gt;"); } } setInterval("tick()", 50); // Invoke tick() every 50 milliseconds. &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;</wbr></pre><p><strong>Listing 2:</strong> Interpreting and executing commands</p><p>Listing 2 presents <code>BrowserShell.html</code>. This listing has a similar layout to Listing 1 and should be fairly easy to follow. After initializing and echoing preliminary text to the console, the <code>tick()</code>function is repeatedly executed to get the next line of input, trim whitespace from both ends, check for one of four possible commands, and execute the command. If an invalid command is entered, <code>bad command</code> is echoed to the console. Regardless, the user is then prompted to enter the next command.</p><p>The <code>geo</code> command is the most complex to implement. It obtains geolocation information about the user via the <a
href="http://www.w3.org/TR/geolocation-API/" target="_blank">Geolocation API</a>, which is asynchronous to avoid blocking the JavaScript thread.<code>navigator.geolocation.<wbr>getCurrentPosition(report_</wbr><wbr>geolocation_query, report_error)</wbr></code> queries the user to grant permission to obtain geolocation information, proceeds to get that information when the user accepts, and then invokes one of two callback functions:</p><ul></ul><ul><li><code>report_geolocation_query(<wbr>position)</wbr></code> is invoked (upon success) with a <code>Position</code> argument that stores the geolocation data via its <code>coords</code> member, of Document Object Model type<code>Coordinates</code>. This DOM interface includes <code>latitude</code> and <code>longitude</code> fields of DOM type <code>double</code>.</li></ul><ul></ul><ul><li><code>report_error(error)</code> is invoked (upon failure) with a <code>PositionError</code> argument that stores the reason for failure via its <code>message</code> member, of DOM type <code>DOMString</code>, and its <code>code</code> member, of DOM type <code>unsigned short</code>.</li></ul><p>Each of these callbacks extracts information from its passed argument and builds a string that it assigns to the <code>geo</code> variable. During testing on Safari, I discovered that this browser wouldn&#8217;t let me obtain geolocation information. Furthermore, it assigned the empty string to <code>message</code>. To address this situation, I coded <code>report_error(error)</code> to assign <code>"unknown error"</code> to <code>message</code>. (I could have output a message based on <code>error.code</code> whose value was 2 &#8212; the position is unavailable. I leave making this change with you as an exercise.)</p><p>Listing 2 declares a <code>callback()</code> function that it passes as an argument to <code>getLine(callback)</code>. This function is invoked each time <code>getLine(callback)</code> detects that there is no input. After verifying that something has been assigned to <code>geo</code>, <code>callback()</code> echoes this variable&#8217;s value followed by a <code>&gt;</code> prompt to the console, and then assigns the empty string to this variable (to avoid having <code>geo</code>&#8216;s value repeatedly output).</p><p>Why don&#8217;t I echo <code>geo</code>&#8216;s value within <code>report_geolocation_query(<wbr>position)</wbr></code> and <code>report_error(error)</code> (and then I wouldn&#8217;t need <code>geo</code> but could use a local variable) instead of going to the trouble of passing a callback function to <code>getLine(callback)</code>? If I did so, that navigation data could be output in the midst of entering a command, resulting in a mess. For example, while entering <code>help</code> I might end up with the following intermixed output:</p><pre>&gt;helLat: 49.88, Lon: 49.88
&gt;p</pre><h2>Conclusion</h2><p>Console is a useful tool for embedding a simple console into web pages. The previous browser shell application gives you an idea of what&#8217;s possible. You might want to extend this application with additional commands, such as a <code>dir</code> command for obtaining a directory listing of <a
href="http://www.w3.org/TR/webstorage/" target="_blank">web storage</a>. However, you first need to understand how this library works, and that is the subject of Part 2.</p><table
width="60%" border="1" align="center"><tbody><tr><th
bgcolor="#0000c0"><span
style="color: #ffffff;">Note</span></th></tr><tr><td>All files pertaining to this article are located in <a
href="http://www.sitepoint.com/wp-content/uploads/1/files/2012/05/code.zip" target="_blank">code.zip</a>.</td></tr></tbody></table> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div><br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=43433b9278e81e21e28d598f8a21b18f&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=43433b9278e81e21e28d598f8a21b18f&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/add-a-web-console-to-your-toolbox-part-1/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		</item>
		<item>
			<title>Browser Trends May 2012: IE9 Strikes Back</title>
			<link>http://www.pheedcontent.com/click.phdo?i=fddb4542c1df93c997f1616187d25ccf</link>
			<pheedo:origLink>http://www.sitepoint.com/browser-trends-may-2012/?utm_source=rss&amp;#038;utm_medium=rss&amp;#038;utm_campaign=browser-trends-may-2012</pheedo:origLink>
			<comments>http://www.sitepoint.com/browser-trends-may-2012/#comments</comments>
			<pubDate>Tue, 01 May 2012 09:54:33 +0000</pubDate>
			<dc:creator>Craig Buckler</dc:creator>
			<category><![CDATA[Mobile]]></category>
			<category><![CDATA[News & Trends]]></category>
			<category><![CDATA[Opinion]]></category>
			<category><![CDATA[Web Tech]]></category>
			<category><![CDATA[apple]]></category>
			<category><![CDATA[Browser Trends]]></category>
			<category><![CDATA[browsers]]></category>
			<category><![CDATA[chrome]]></category>
			<category><![CDATA[firefox]]></category>
			<category><![CDATA[Google Tutorials & Articles]]></category>
			<category><![CDATA[HTML5 Dev Center]]></category>
			<category><![CDATA[ie]]></category>
			<category><![CDATA[microsoft]]></category>
			<category><![CDATA[Mozilla]]></category>
			<category><![CDATA[opera]]></category>
			<category><![CDATA[safari]]></category>
			<guid
isPermaLink="false">http://www.sitepoint.com/?p=54145</guid>
			<description><![CDATA[<img
width="50" height="50" src="http://www.sitepoint.com/wp-content/uploads/1/files/2011/05/522-browser-trends-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="522-browser-trends" title="522-browser-trends" />Has Chrome's growth finally started to plateau? Craig takes us through the latest browser market share facts, figures and fallacies.<br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=fddb4542c1df93c997f1616187d25ccf&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=fddb4542c1df93c997f1616187d25ccf&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></description>
			<content:encoded><![CDATA[<img
width="50" height="50" src="http://www.sitepoint.com/wp-content/uploads/1/files/2011/05/522-browser-trends-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="522-browser-trends" title="522-browser-trends" /><p></p><p>It&#8217;s been one month since we <a
href="http://www.sitepoint.com/browser-trends-april-2012/">last looked at the browser market</a>. Since then, <a
href="http://www.sitepoint.com/firefox-12-chrome-18-whats-new/">Firefox 12 and Chrome 18</a> were released and Microsoft has embarked on an aggressive television, movie and online marketing campaign for IE9. Has any of this affected usage patterns in the <a
href="http://gs.statcounter.com/#browser_version-ww-monthly-201204-201204-bar">worldwide StatCounter statistics</a>?&hellip;</p><table
id="stats" summary="worldwide browser market share statistics, April 2011" width="80%" style="text-align:right !important;margin:20px auto"><tr><th
width="20%">Browser</th><th
width="20%">March</th><th
width="20%">April</th><th
width="20%">change</th><th
width="20%">relative</th></tr><tr><th>IE 9.0+</th><td>14.56%</td><td>15.67%</td><td
class="up">+1.11%</td><td
class="up">+7.60%</td></tr><tr><th>IE 8.0</th><td>16.00%</td><td>14.69%</td><td
class="dn">-1.31%</td><td
class="dn">-8.20%</td></tr><tr><th>IE 7.0</th><td>2.91%</td><td>2.54%</td><td
class="dn">-0.37%</td><td
class="dn">-12.70%</td></tr><tr><th>IE 6.0</th><td>1.34%</td><td>1.17%</td><td
class="dn">-0.17%</td><td
class="dn">-12.70%</td></tr><tr><th>Firefox 4.0+</th><td>21.11%</td><td>21.38%</td><td
class="up">+0.27%</td><td
class="up">+1.30%</td></tr><tr><th>Firefox 3.7-</th><td>3.88%</td><td>3.48%</td><td
class="dn">-0.40%</td><td
class="dn">-10.30%</td></tr><tr><th>Chrome</th><td>30.92%</td><td>31.29%</td><td
class="up">+0.37%</td><td
class="up">+1.20%</td></tr><tr><th>Safari</th><td>6.71%</td><td>7.14%</td><td
class="up">+0.43%</td><td
class="up">+6.40%</td></tr><tr><th>Opera</th><td>1.76%</td><td>1.70%</td><td
class="dn">-0.06%</td><td
class="dn">-3.40%</td></tr><tr><th>Others</th><td>0.81%</td><td>0.94%</td><td
class="up">+0.13%</td><td
class="up">+16.00%</td></tr><tr><th>IE (all)</th><td>34.81%</td><td>34.07%</td><td
class="dn">-0.74%</td><td
class="dn">-2.10%</td></tr><tr><th>Firefox (all)</th><td>24.99%</td><td>24.86%</td><td
class="dn">-0.13%</td><td
class="dn">-0.50%</td></tr></table><p>The table shows market share estimates for desktop browsers. The &#8216;change&#8217; column shows the absolute increase or decrease in market share. The &#8216;relative&#8217; column indicates the proportional change, i.e. another 12.7% of IE6 users abandoned the browser last month. There are several caveats so I recommend you read <a
href="http://blogs.sitepoint.com/how-browser-market-share-is-calculated">How Browser Market Share is Calculated</a>.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>Chrome&#8217;s monthly growth has fallen below 1% for the first time since <a
href="http://www.sitepoint.com/browser-trends-october-2011/">October 2011</a>. Other vendors dream about a market share increase of 0.37% but it&#8217;s unusually low for Chrome. I&#8217;m not convinced adoption rates have begun to plateau and it could be a statistical blip. That said, the advantages Chrome holds over the competition are more marginal than they&#8217;ve ever been.</p><p>This month&#8217;s biggest winner is IE9 and it&#8217;s risen 3.6% since the start of March. Three factors have contributed to it&#8217;s success:</p><ol><li>Automated browser updates.</li><li>Microsoft&#8217;s glossy marketing campaign.</li><li>Businesses migrating to Windows Vista/7.</li></ol><p>However, Microsoft cannot be complacent. IE8 is falling faster than IE9&#8242;s gains and total IE usage dropped by 0.74%. Chrome is still poised to overtake during the summer of 2012.</p><p>Safari had another good month and the browser is slowly creeping toward double-digit usage figures. The iPad accounts for 2.12% of the 7.14% total which means it now has more users than IE6.</p><p>Firefox and Opera&#8217;s market share barely changed. Perhaps this isn&#8217;t surprising; there are few major differences between the top five browsers and we could be entering a period of stability with little significant movement in browser market.</p><h2>Mobile Browser Usage</h2><p>April&#8217;s mobile usage increased to <a
href="http://gs.statcounter.com/#mobile_vs_desktop-ww-monthly-201204-201204-bar">9.58% of all web activity</a>. This is partly owing to better weather in the northern hemisphere &#8212; although the UK had its wettest April for 100 years.</p><p>The primary mobile browsing applications are:</p><ol><li>Opera Mini/Mobile &#8212; 21.52% (down 1.34%)</li><li>Android &#8212; 21.31% (up 0.15%)</li><li>iPhone &#8212; 20.04% (down 0.06%)</li><li>Nokia browser &#8212; 11.42% (down 0.44%)</li><li>UC Browser &#8212; 7.77% (up 1.42%)</li></ol><p>There&#8217;s little change within the top five although <a
href="http://www.ucweb.com/">UC Browser</a> has helped itself to another slice of Blackberry.</p><p>While it&#8217;s great to see healthy competition in the mobile market, it remains frustratingly difficult to test web sites and applications on a range of popular devices. Do you bother?</p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div><br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=fddb4542c1df93c997f1616187d25ccf&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=fddb4542c1df93c997f1616187d25ccf&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/browser-trends-may-2012/feed/</wfw:commentRss>
			<slash:comments>18</slash:comments>
		</item>
		<div>
			<div
class="post_box two_ads" style="float:left;padding-left:2px;">
				<div
id='div-gpt-ad-1328645237920-1' style='width:728px; height:90px;'>
					<script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328645237920-1'); });</script>
				</div>
			</div>
		</div>
		<div
class="clear">&nbsp;</div>
		<item>
			<title>Ubuntu 12.04 LTS Precise Pangolin: Desktop Essentials</title>
			<link>http://www.pheedcontent.com/click.phdo?i=4815167a6be778b82a57a3a011bbf22d</link>
			<pheedo:origLink>http://www.sitepoint.com/ubuntu-12-04-lts-precise-pangolin-desktop-essentials/?utm_source=rss&amp;#038;utm_medium=rss&amp;#038;utm_campaign=ubuntu-12-04-lts-precise-pangolin-desktop-essentials</pheedo:origLink>
			<comments>http://www.sitepoint.com/ubuntu-12-04-lts-precise-pangolin-desktop-essentials/#comments</comments>
			<pubDate>Mon, 30 Apr 2012 16:38:24 +0000</pubDate>
			<dc:creator>Jonathan Hobson</dc:creator>
			<category><![CDATA[Web Tech]]></category>
			<category><![CDATA[WebOS]]></category>
			<category><![CDATA[Ubuntu]]></category>
			<guid
isPermaLink="false">http://www.sitepoint.com/?p=54053</guid>
			<description><![CDATA[<img
width="50" height="39" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/ubuntu-50x39.png" class="attachment-thumbnail wp-post-image" alt="ubuntu" title="ubuntu" />In a previous article I showed you how easy it was to install Ubuntu 12.04 LTS and by now you should be making yourself familiar with the idea of how your desktop works, where your files are stored and some of the basic concepts that make Ubuntu 12.04 LTS Precise Pangolin a truly great operating [...]<br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=4815167a6be778b82a57a3a011bbf22d&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=4815167a6be778b82a57a3a011bbf22d&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></description>
			<content:encoded><![CDATA[<img
width="50" height="39" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/ubuntu-50x39.png" class="attachment-thumbnail wp-post-image" alt="ubuntu" title="ubuntu" /><p></p><p>In a previous article I showed you how easy it was to install Ubuntu 12.04 LTS and by now you should be making yourself familiar with the idea of how your desktop works, where your files are stored and some of the basic concepts that make Ubuntu 12.04 LTS Precise Pangolin a truly great operating system.</p><p>On the whole it would be true to say that Ubuntu also comes pre-installed with an excellent range of software and for the purpose of installing software Ubuntu maintains its very own Software Centre. Giving you instant access to thousands of free and open-source applications, games, and magazines does make things nice &#8216;n&#8217; easy but with so much to choose from and for those of us who want to &#8216;hit the floor running&#8217; it can be a little overwhelming (if not time consuming). So the question remains, where do I start?</p><p>To get the most out of your computer it is simply a question of what software you can run, what music you can listen to, what videos you can watch and what games you can play. You want to own your desktop and make it do fantastic things, you want familiarity but you also want something different. Choice can be a dilemna but it is purpose of this article is take up the running with a check-list of post install &#8216;tips and tricks&#8217; that will deliver a fully functional desktop in no time at all. I  am not only going to show you short-cut the Software Centre process but I will also show you how to install a whole host of screensavers, remove the guest account, and install the classic Gnome interface &#8211; leaving you with plenty of time on your hands to discover the hidden gems of the Ubuntu Software Centre at your leisure.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>So let&#8217;s get started &#8230;</p><h2>Additional software sources.</h2><p>Before we begin we must make sure that our software sources list is up-to-date.</p><p>You can achive this by simply opening the Ubuntu Software Center icon (found in the Launcher or by searching for the &#8216;Ubuntu Software Center&#8217; in the search bar of the &#8216;dash&#8217;) and then:</p><ul><li>Place your mouse over the top bar (near your username), choose Edit &gt; Software Sources</li><li>From the resulting window choose &#8216;Other Software&#8217;.</li><li>Tick the checkboxes next to &#8216;Canonical Partners&#8217; and &#8216;Canonical Partners (Source Code)&#8217;. This repository includes access to software such as Skype and Adobe Reader.</li><li>Choose the &#8216;update tab&#8217; to configure your update schedule. A weekly or daily schedule is advised.</li><li>Click &#8216;close&#8217; when done thereby allowing the operating system to update itself with the new settings.</li></ul><blockquote><p><strong>Please note,</strong><br
/> For the purpose of this article I will not be addressing the use of any Personal Package Archive (PPA). Otherwise known as PPAs, these archives are used to help test pre-release or specialty software.</p></blockquote><h2>Using Terminal.</h2><p>A brief introduction to software installation can be found <a
href="https://help.ubuntu.com/community/InstallingSoftware" target="_blank">here</a>, but for the purpose of this article we will be using the Terminal.</p><blockquote><p>By single definition the Terminal is similar to the command line in Microsoft Windows but it differs in the fact that it can perform any operation on the system. It is a very powerful application, but after a little practice you will discover that it is a very easy tool to use.</p></blockquote><p>You can find Terminal by using one of the following methods:</p><ul><li>Dash &gt; Search for Terminal</li><li>Dash &gt; More Apps &gt; Accessories &gt; Terminal</li><li>But my favourite is to simply use Ctrl + Alt + T as a keyboard shortcut.</li></ul><p>A helpful guide on this subject can be found <a
href="https://help.ubuntu.com/community/UsingTheTerminal" target="_blank">here</a> and <a
href="https://help.ubuntu.com/community/AptGet/Howto?action=show&amp;redirect=AptGetHowto" target="_blank">here</a> but once Terminal is open you will see somthing similar to the following:</p><pre>username@ubuntu:~$</pre><p>Let&#8217;s digress and just for a quick experiment try the a command. Type in the following (exactly as you see it) or use copy/paste and press the &#8216;return/enter&#8217; key when done:</p><pre>date</pre><p>By doing this you have just requested the system to tell you the time and date. Obviously the exact time and date will be different on your system but you should now see something like this:</p><pre>Sat Apr 28 15:35:35 BST 2012</pre><p>And throughout this article that&#8217;s as complicated as we will get :-)</p><p>Naturally, I would encourage you to read the background information at your leisure but it isn&#8217;t necessary as all we are going to do is run the following types of command in order to perform an installation request:</p><pre>sudo apt-get install &lt;package_name&gt;</pre><p>or to install multiple packages we will use:</p><pre>sudo apt-get install &lt;package_name_1&gt; &lt;package_name_2&gt; &lt;package_name_3&gt;</pre><p>In reverse or if you ever make a mistake and you need to remove a package, simply use the following command format (replacing &lt;package_name&gt; with the name of the software you wish to remove):</p><pre>sudo apt-get remove &lt;package_name&gt;</pre><p>The most important thing to remember is. It may be a little awkward and strange at first (and I have merely introduced you to the subject), but by doing it this way, you will not only get a true feel for the Linux operating system but you will discover that Terminal is the fastest and most efficient way of getting the job done.</p><h2>Updating your system</h2><p>So without further hesitation, let&#8217;s jump straight in and use the Terminal to update our system. The commands are a little bit different to what we just discussed but I am sure they will be self-explanatory :-)</p><p>Open Terminal and type:</p><pre>sudo apt-get update &amp;&amp; apt-get upgrade</pre><p>You will be asked to authenticate yourself &#8211; so simply enter your password and hit the &#8216;return/enter&#8217; key.<br
/> Terminal will now perform a check on your system to see if any updates are available to you.</p><p>If none are available then no further action is required but if updates are available, Terminal will respond by asking you to confirm the update by using either a simply Y (Yes) or N (No) to complete the task.</p><p>A large update may take a while to complete but that&#8217;s it, to update your system it really is that simple and you can repeat these steps whenever you need to.</p><h2>Building your desktop</h2><p>Now we will turn our attention to building the desktop.</p><p>So let&#8217;s begin by installing a collection of useful utilities by returning to Terminal and typing:</p><pre>sudo apt-get install flashplugin-installer gsfonts-x11 unace rar unrar p7zip-rar p7zip zip unzip sharutils uudeview mpack lha arj cabextract file-roller acroread geany geany-plugins filezilla calibre gparted</pre><p>Some of the package names will be familiar to you whilst some others may not, but we have just asked the system to install a collection of tools that includes the Adobe Flash Plugin and the associated fonts, (acroread) Adobe Acrobat Reader, a series of zip/compression utitlities, (gparted) a disk partitioning tool, (calibre) an e-book catalogue and viewer, (filezilla) for FTP, and (geany) a compact text editor that shares some features of a larger IDE.</p><p>In the same way we can now consider installing a collection of tools to finish off Libre Office with a global menu bar, provide PDF functionality and incorporate the Mozilla plugins whilst including a Viso-like diagram creator called DIA.</p><pre>sudo apt-get install dia libreoffice-pdfimport mozilla-libreoffice</pre><p>While we are here, let&#8217;s install the basic tool kit that will enable you to compile from source (you may not want to do anything like this now, but by installing these utilities you will be giving yourself options for the future):</p><pre>sudo apt-get install build-essential checkinstall cdbs devscripts dh-make fakeroot libxml-parser-perl check avahi-daemon</pre><p>And to finish up, for those who like options and want to install Google Chromium, in Terminal type:</p><pre>sudo apt-get install chromium-browser chromium-browser-l10n</pre><p>Now wasn&#8217;t that quicker and easier than searching for and installing each item individually :-)</p><h2>Building for sound, vision and design</h2><p>For those who want the very best in audio-visual play back and recording in Terminal type:</p><pre>sudo apt-get install smplayer libxine1-ffmpeg gxine mencoder mpeg2dec vorbis-tools id3v2 mpg321 mpg123 libflac++6 ffmpeg totem-mozilla icedax tagtool easytag id3tool lame nautilus-script-audio-convert libmad0 libjpeg-progs flac faac faad sox ffmpeg2theora libmpeg2-4 uudeview flac libmpeg3-1 mpeg3-utils mpegdemux liba52-0.7.4-dev libquicktime2 gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-gnonlin gstreamer0.10-sdl gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly totem-plugins-extra gstreamer-dbus-media-service gstreamer-tools ubuntu-restricted-extras ttf-mscorefonts-installer regionset</pre><p>This collection of important utilities should provide you with enough media codecs and players to keep you happy for quite a while :-)</p><p>For those who want to use their desktop for photography and/or graphic design, in Terminal type:</p><pre>sudo apt-get install scribus gimp gimp-data gimp-plugin-registry gimp-data-extras inkscape pinta libraw-bin ufraw ufraw-batch and gimp-ufraw rawtherapee</pre><p>This will install Scribus, Gimp, Pinta and Inkscape with a collection RAW file viewers/editors/plugins for SLR Digital Photography.</p><h2>How do I remove the guest account</h2><p>The Ubuntu &#8216;Guest&#8217; account is installed by default and for those of us who want to keep the login screen nice and tidy, to remove it all we need to do is this:</p><p>In Terminal type:</p><pre>sudo gedit /etc/lightdm/lightdm.conf</pre><p>This will open the &#8216;lightdm&#8217; configuration file in your text editor.<br
/> At the bottom of this file, underneath the existing copy add the following line:</p><pre>allow-guest=false</pre><p>Now save the file, close it and reboot.<br
/> The Guest account should no-longer be visible!</p><h2>Restoring the screensaver</h2><p>Ubuntu 12.04 LTS Precise Pangolin does not feature any screensavers in the standard installation and if you are like me (and miss them) this can fixed like so.</p><p>Run the following command to remove the existing gnome-screensaver package:</p><p>In Terminal type:</p><pre>sudo apt-get purge gnome-screensaver</pre><p>Next, run the following command to install the &#8216;xscreensaver&#8217; packages:</p><p>In Terminal type:</p><pre>sudo apt-get install xscreensaver xscreensaver-gl-extra xscreensaver-data-extra</pre><p>Next, run the following command to create the &#8216;xscreensaver autostart file&#8217;.</p><p>In Terminal type:</p><pre>sudo gedit /etc/xdg/autostart/screensaver.desktop</pre><p>This will open a newly created file in your text editor. Simply copy and paste the following lines into that file and click &#8216;save&#8217;:</p><pre>[Desktop Entry]
Name=Screensaver
Type=Applicaton
Exec=xscreensaver -nosplash</pre><p>Close the file, reboot, search for screensavers in the &#8216;dash&#8217; and configure as required and you will have as many screensavers as you will ever need &#8230;</p><h2>Fall-back to the Gnome desktop environment</h2><p>Some people like Unity, some people do not; (who am I to judge) but if you ever find yourself wishing to see the face of Gnome back on Ubuntu simply open Terminal and enter the following commands, one line at a time (press the &#8216;enter/return&#8217; key at the end of each line):</p><pre>sudo apt-get install gnome-session-fallback
sudo apt-get install indicator-applet-appmenu
sudo apt-get install gnome-tweak-tool</pre><p>Each command may take a few minutes to complete but when done, simply &#8216;reboot&#8217; your computer and at the login prompt, use the small &#8216;cog&#8217; icon to change the user interface style.</p><p>You will have the choice of Unity, Gnome Classic or Gnome 3.</p><p>On the other hand, if you do not want to do this right now and just in case you are curious, Gnome Classic looks like this:</p><p><img
src="http://modefour.co.uk/bin/u12shots/install/12.png" alt="" width="500" height="365" border="0" /></p><p><img
src="http://modefour.co.uk/bin/u12shots/install/13.png" alt="" width="500" height="365" border="0" /></p><p>Whereas Gnome 3 looks like this:</p><p><img
src="http://modefour.co.uk/bin/u12shots/install/14.png" alt="" width="500" height="365" border="0" /></p><h2>And what about security they ask &#8230;</h2><p>Last but not least we want to make our desktop environment safe and secure and to do this we need an anti-virus solution.</p><p>In Terminal type:</p><pre>sudo apt-get install clamav clamtk</pre><p>This will install ClamAV, an open source (GPL) antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats.</p><p>When the installation is complete simply search for ClamTK in the &#8216;dash&#8217;, it is very easy to use, the software also runs on Windows and all updates are made free of charge. See <a
href="http://www.clamav.net/" target="_blank">http://www.clamav.net/ </a>for further details.</p><p>And finally, to finalise our &#8216;desktop starting point&#8217; we now want to install a firewall.</p><p>Thank fully, Ubuntu have made this an easy choice that simply requires you to install the &#8216;Uncomplicated Firewall&#8217;. Otherwise known as UFW, it is designed to be very simple and is packaged with an intuitive user interface. According to the developers,</p><blockquote><p>&#8220;The reason ufw was developed is that we wanted to create a server-level firewall utility that was a little bit more for &#8216;human beings&#8217;&#8221;</p></blockquote><p>They may call it simple (and it is), but don&#8217;t underestimate its power.</p><p>In Terminal type:</p><pre>sudo apt-get install gufw</pre><p>When the installation is complete you will be able to find it in the &#8216;dash&#8217; under UFW but for now this is where I will leave you as I shall come back to the UFW and the art of firewall configuration at a later date.</p><p>If you followed this article you should (by now) have a desktop swimming with &#8216;apps&#8217; and more than enough to get you started. And I think it&#8217;s time to let you play &#8230;</p><p>I hope you enjoy using Ubuntu 12.04 LTS Precise Pangolin.</p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div><br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=4815167a6be778b82a57a3a011bbf22d&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=4815167a6be778b82a57a3a011bbf22d&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/ubuntu-12-04-lts-precise-pangolin-desktop-essentials/feed/</wfw:commentRss>
			<slash:comments>11</slash:comments>
		</item>
		<item>
			<title>Generating Interest in Above-the-Fold Content Using Tabbed Featured Posts</title>
			<link>http://www.pheedcontent.com/click.phdo?i=262b793dbe29bf6b39a1c9e625dd336c</link>
			<pheedo:origLink>http://www.sitepoint.com/generating-interest-in-above-the-fold-content-using-tabbed-featured-posts/?utm_source=rss&amp;#038;utm_medium=rss&amp;#038;utm_campaign=generating-interest-in-above-the-fold-content-using-tabbed-featured-posts</pheedo:origLink>
			<comments>http://www.sitepoint.com/generating-interest-in-above-the-fold-content-using-tabbed-featured-posts/#comments</comments>
			<pubDate>Mon, 30 Apr 2012 15:00:30 +0000</pubDate>
			<dc:creator>Vladislav Davidzon</dc:creator>
			<category><![CDATA[Web Tech]]></category>
			<guid
isPermaLink="false">http://www.sitepoint.com/?p=53160</guid>
			<description><![CDATA[<img
width="50" height="50" src="http://www.sitepoint.com/wp-content/uploads/1/files/2011/07/547-wordpress-thumbnails-50x50.png" class="attachment-thumbnail wp-post-image" alt="547-wordpress-thumbnails" title="547-wordpress-thumbnails" />In this tutorial you'll learn how to create a tabbed post box, including optional JavaScript for additional effect.<br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=262b793dbe29bf6b39a1c9e625dd336c&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=262b793dbe29bf6b39a1c9e625dd336c&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></description>
			<content:encoded><![CDATA[<img
width="50" height="50" src="http://www.sitepoint.com/wp-content/uploads/1/files/2011/07/547-wordpress-thumbnails-50x50.png" class="attachment-thumbnail wp-post-image" alt="547-wordpress-thumbnails" title="547-wordpress-thumbnails" /><p></p><p>The web development community is one of the most trend-focused groups of professionals that you&#8217;ll find anywhere. As part of their quest to define a new way of displaying content and introducing users to a site&#8217;s best posts, this community of designers and programmers has invented the so-called &#8220;featured post slider&#8221; or &#8220;tabled posts box.&#8221; This box is responsible for displaying between two and (typically) five posts which are the site&#8217;s best and most recent works. This is a great idea when catering to new site visitors as they&#8217;ll be interested to see just why a website thinks that its content warrants saving, printing, bookmarking, or sharing. When combined with vivid and descriptive post images, this post slider box becomes a great way to draw users&#8217; attention inward toward the website in much the same way that newspapers and magazines use large images and titles to captivate their readers&#8217; attention.</p><p>Indeed, a tabbed post box is designed to be the primary element displayed on a site&#8217;s index page and it&#8217;s intended to be placed &#8220;above the fold,&#8221; meaning that it will be displayed before the end of a browser&#8217;s length on a typical laptop or desktop computer. It can optionally use JavaScript to rotate through posts, with slick animations that further increase readers&#8217; attention and curiosity. No matter which technique is used to develop this box full of featured posts, it&#8217;s sure to grab attention and introduce new and existing readers to your site&#8217;s best authors, its premier articles and entries, and its stunning use of imagery. Here&#8217;s how it&#8217;s done using WordPress, XHTML, CSS, and optionally jQuery code.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><h2>Step 1: Define a Block Element to House the Post Slider Feature</h2><p>Essentially, every image and story contained within the post slider will be styled using just one <code>div</code> tag. Therefore, it&#8217;s important to define this tag at the outset so that it can be used and called within all the styles and functions that are about to be defined both in WordPress and in the theme&#8217;s files themselves. So, this is the time to decide exactly where the post slider feature will be placed on your website&#8217;s index page. When you&#8217;ve decided that, simply place the following code into your theme&#8217;s existing &#8220;index.php&#8221; template and move on to the second step:</p><pre>
&lt;div id=&quot;slider-post-box&quot;&gt;
  /* THIS IS A PLACEHOLDER FOR FEATURE SLIDER CODE */
&lt;/div&gt;
</pre><p>That&#8217;s simple enough, and it&#8217;s all we&#8217;ll need to do to the &#8220;index.php&#8221; template for now. If you like reducing your desktop clutter, you can close this template as we proceed with developing the function itself.</p><h2>Step 2: Taking Advantage of Built-in (Hidden) WordPress Features</h2><p>This post slider box is going to use images to draw users&#8217; attention to the featured stories that are highlighted on the index page, and it&#8217;s going to do that using a secret WordPress feature that most users simply don&#8217;t know exists. This is known as the &#8220;featured post image&#8221; feature, and it was once known as the WordPress &#8220;post thumbnail&#8221; feature. At one time in WordPress&#8217; history, this feature was included and turned on by default; now, however it must be enabled on a theme-by-theme basis by the designer who wishes to take advantage of it. This is done by modifying the theme&#8217;s &#8220;functions.php&#8221; file.</p><p>Navigate to your theme&#8217;s home folder at <code>/public_html/wp-content/themes/your-current-theme/</code> and select the &#8220;functions.php&#8221; file to edit it. If there are already a number of custom functions defined, simply scroll to the end of those functions and then paste in the code below. This code will cause WordPress to initialize the featured image both in the Dashboard itself and throughout the templates that comprise the current theme. That code is as follows:</p><pre>
add_theme_support('post-thumbnails', array('post' ));
add_image_size('click-image', 60, 30, true);
add_image_size('post-slider-box-image', 600, 300, true);
</pre><p>The first line of code in this setup simply adds support to the existing theme (and to the Dashboard itself) for the featured post image. The second line of code creates a thumbnail that is just ten percent of the size of the full-size featured post image. This can be used in the &#8220;tabs&#8221; that navigate between featured posts, or it can be left out, but it&#8217;s always a good idea to generate a thumbnail. Finally, the third line of code creates a full-sized featured post image that will be used for the main display within the post slider box. All of the image sizes are customizable, so feel free to make this work for whatever type of layout your website currently has in place.</p><h2>Step 3: Initializing a Second WordPress Loop</h2><p>Unfortunately, the WordPress Loop can only be initialized once per template. That&#8217;s not to say that the same content cannot be pulled in multiple times, however, in order to place entries on a page multiple times using a standard Loop-like setup, a database query will be initialized to pull variables and information from the standard WordPress entries table within the database. This is done on the &#8220;index.php&#8221; file, so be sure to open that file and place this code within the <code>div</code> tags created in the earlier part of this tutorial. The opened, secondary Loop looks like this:</p><pre>
&lt;?php $featuredPosts = new WP_Query();
$featuredPosts-&gt;query("showposts=3");
while ($featuredPosts-&gt;have_posts()) : $featuredPosts-&gt;the_post(); ? &gt;
</pre><p>This secondary WordPress Loop is pretty straightforward, and it&#8217;s used to display only the three latest entries produced by site authors. If a certain category is desired for this post slider box, it can be specified using the <code>cat=5</code> construction, where &ldquo;5&rdquo; is the numerical ID of the preferred category. If no changes are required, it&#8217;s time to add more to this Loop. Next, we will produce the actual &#8220;slides&#8221; or &#8220;tabs&#8221; that will display to users:</p><pre>
  &lt;div id=&quot;slider-&quot;&gt;
    &lt;a href=&quot;&lt;?php the_permalink() ?&gt;"&gt;&lt;?php the_post_thumbnail('post-slider-box-image'); ?&gt;&lt;/a&gt;
  &lt;/div&gt;
</pre><p>This displays only the featured post &#8220;thumbnail&#8221; image, as it is called by the WordPress variable, if one is featured in the &#8220;Add New Entry&#8221; area of the WordPress Dashboard. If an image is not defined within the Dashboard, a post will not be considered &#8220;featured&#8221; and it will not be presented in the slider. With this being defined, it&#8217;s time to close the loop. That&#8217;s done with this piece of PHP:</p><pre>
&lt;?php endwhile; ?&gt;
</pre><h2>Step 4: Adding Tabs for Maximum Usability</h2><p>At this point, all that will happen with the above code is that one image will be displayed and nothing else will be. The image will link to the post which it&#8217;s associated with, but users have no way of seeing the other feature posts or navigating between them. This is a significant usability problem, but it&#8217;s easily solved by adding so-called tabs, or side-by-side links, to the other featured posts (up to three, unless the number was increased by the designer in the above WordPress Loop).</p><p>Because we&#8217;ve established how to use multiple WordPress Loops throughout the site, it will come as no surprise to most designers that we are going to take this opportunity to use a tertiary Loop that will call the other posts into a list. This list will then be styled using CSS so that the post links appear side-by-side, rather than in a traditional vertical listing. It all comes together like so:</p><pre>
&lt;ol id="slider-links"&gt;
  &lt;?php $nav_id=1;
  while ($featuredPosts-&gt;have_posts()) : $featuredPosts-&gt;the_post(); ?&gt;
    &lt;li&gt;&lt;a href=&quot;#slide-&lt; ?php echo $nav_id; ? &gt;&quot;&gt;&lt; ? the_title(); $nav_id++;? &gt;&lt;/a&gt;&lt;/li&gt;
  &lt;?php endwhile; ?&gt;
&lt;/ol&gt;
</pre><p>As any experienced WordPress Developer can see, an ordered list is first established and then each of the featured slider posts are placed into <code>li</code> tags. Only the title of the post is displayed, and this helps to save on space versus including a thumbnail-sized post image as well as the title. For websites that prefer a thumbnail, a simple variable (modeled after the full-size image in the earlier part of this process) can be included within the tertiary WordPress Loop.</p><h2>Step 5: You&#8217;re Done! Unless &hellip;</h2><p>This brings us to the end of the tutorial for creating a simple WordPress post slider box. Each full-sized image is paired with a small tab that links to the other featured posts. It&#8217;s a great way to draw users&#8217; attention to one post, and encourage that they click on the other tabs to enjoy more top-notch content as well. But what happens if a site wants to expose all three of the featured posts equally? This is not as impossible as it might sound, especially because WordPress contains the necessary language to do so built into its core.</p><p>If you&#8217;re ready to tackle JavaScript, by way of the jQuery library of animations and functions, then it&#8217;s time to turn this slider box into one that actually, literally &#8220;slides&#8221; images back and forth and features all posts to users in an equal fashion.</p><p>You can start this process by including all three of the default jQuery libraries built into WordPress in the &#8220;header.php&#8221; file. All three libraries are included using a PHP variable:</p><pre>
&lt;?php wp_enqueue_script('jquery-ui-core'); ?&gt;
&lt;?php wp_enqueue_script('jquery'); ?&gt;
&lt;?php wp_enqueue_script('jquery-ui-tabs'); ?&gt;
</pre><p>Don&#8217;t forget any of these libraries, as functions from all three are an important way to make sure that the tabbed layout is fully functional and fully animated. When each of these three lines has been pasted into the theme&#8217;s &#8220;header.php&#8221; file, it&#8217;s time to move on to the next step.</p><h2>Step 6: Remember that &#8220;Div&#8221; Tag from Step 1?</h2><p>Before closing the &#8220;header.php&#8221; file, another simple line must be inserted using a JavaScript <code>script</code> tag. This determines the functionality of the box and to which CSS &#8220;ID&#8221; element it will be applied. The code that will be used looks like this, and it can go anywhere between the <code>&lt;head&gt;</code> and tags in your header file:</p><pre>
&lt;script type="javascript"&gt;
  jQuery(document).ready(function($){
    $("#slider-post-box").tabs({
      fx: { opacity: "toggle" }
    }).tabs("slide", 1000);
  });
&lt;/script&gt;
</pre><p>Images will now &#8220;slide&#8221; into each other every one second. That&#8217;s a bit fast, but it&#8217;ll hammer the point home pretty well during a test run. The &#8220;1000&#8243; number can be increased and this will slow down the actual sliding / rotating action between featured post images in the post slider box. The animation style can also be changed to any of the methods that the jQuery Core UI library supports, and users will enjoy playing around with animations until they find the perfect way to draw attention to their featured entries.</p><p>Be sure to customize the &#8220;ID&#8221; element indicated in this script by the hashtag. If this is incorrect, the animation and automatic cycling through featured post images will not occur at all. That simple mistake often leaves many users frustrated and feeling as if they can&#8217;t conquer jQuery, but simple attention to detail can avoid this occurrence altogether.</p><h2>Step 7: Bug Test and Make it Public</h2><p>It&#8217;s well-known for being temperamental, so any design element using jQuery should be rigorously tested by website designers and administrators before it&#8217;s permitted to go public. Be sure to double-check that the new post slider box looks uniform in all major browsers, and do a little mobile testing to ensure that it doesn&#8217;t cause mobile phones to glitch (this can often happen to Android users when dealing with JavaScript on non-mobile sites).</p><p>If everything works perfectly, then the process is finished and the post slider box is ready too wow and woo new users.</p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div><br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=262b793dbe29bf6b39a1c9e625dd336c&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=262b793dbe29bf6b39a1c9e625dd336c&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/generating-interest-in-above-the-fold-content-using-tabbed-featured-posts/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		</item>
		<item>
			<title>Ubuntu 12.04 LTS Precise Pangolin: Kick-start your installation</title>
			<link>http://www.pheedcontent.com/click.phdo?i=9a30f6b1e9d2b9154fea1b6b94b33b2c</link>
			<pheedo:origLink>http://www.sitepoint.com/ubuntu-12-04-lts-precise-pangolin-kick-start-your-installation/?utm_source=rss&amp;#038;utm_medium=rss&amp;#038;utm_campaign=ubuntu-12-04-lts-precise-pangolin-kick-start-your-installation</pheedo:origLink>
			<comments>http://www.sitepoint.com/ubuntu-12-04-lts-precise-pangolin-kick-start-your-installation/#comments</comments>
			<pubDate>Mon, 30 Apr 2012 14:48:13 +0000</pubDate>
			<dc:creator>Jonathan Hobson</dc:creator>
			<category><![CDATA[Web Tech]]></category>
			<category><![CDATA[WebOS]]></category>
			<category><![CDATA[Ubuntu]]></category>
			<guid
isPermaLink="false">http://www.sitepoint.com/?p=54018</guid>
			<description><![CDATA[<img
width="50" height="39" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/ubuntu-50x39.png" class="attachment-thumbnail wp-post-image" alt="ubuntu" title="ubuntu" />The waiting is finally over and Ubuntu 12.04 LTS Precise Pangolin has arrived and this is the guide to get you up and running in no time at all.<br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=9a30f6b1e9d2b9154fea1b6b94b33b2c&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=9a30f6b1e9d2b9154fea1b6b94b33b2c&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></description>
			<content:encoded><![CDATA[<img
width="50" height="39" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/ubuntu-50x39.png" class="attachment-thumbnail wp-post-image" alt="ubuntu" title="ubuntu" /><p></p><p>Ubuntu 12.04 has arrived and this is the guide to get you up and running in no time at all.</p><p>Representing the latest release in an excellent pedigree there is no doubt that Ubuntu 12.04 LTS looks great and does the job exceedingly well. Naturally, things may feel different, particularly in view of the new features found, but on the whole we are going to discover that Ubuntu remains steadfast, reliable, easy to use, highly customisable and secure.</p><p>So let&#8217;s begin &#8230;</p><h2>Requirements:</h2><p>Assuming that your host computer meets the specific requirements you will need to download an iso image of Ubuntu 12.04.</p><p>You can obtain this from the <a
href="http://www.ubuntu.com/" target="_blank">Ubuntu Website</a> where you can elect to choose either, the 32-bit or 64-bit version; but given the range of multimedia plug-ins associated with today&#8217;s desktop environment the 32-bit version is advised.</p><p>When the download is complete:</p><ul><li>Burn the image to a blank CD with your favourite CD/DVD burning software.</li><li>Insert the media and boot from that drive.</li></ul><p>You should be aware that during the installation an active internet connection is required and for those wishing to install this operating system on a mobile device (i.e. Laptop or Netbook), it is advised that a mains power supply is used or made available throughout this process.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><h2>Installation</h2><p>In this first part of this article we will take a quick trip through the typical installation process.<br
/> From the boot screen, select your language and choose &#8220;Install Ubuntu&#8221;</p><p><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/01.png" alt="" width="500" height="375" border="0" /></p><p>On the next screen you will be shown the requirements of the installer.<br
/> Ensure that the following checkboxes are &#8216;selected&#8217;.</p><ul><li>Download updates while installing.</li><li>Install this third-party software.</li></ul><p>In many respects, I would say that checking these boxes should be considered as a requirement as this action will ultimately make the entire process a little easier.</p><p><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/02.png" alt="" width="500" height="375" border="0" /></p><p>In the next screen we will simply confirm that we want to erase the contents of our hard drive and install Ubuntu.</p><blockquote><p><strong>Note:</strong><br
/> These guidelines are for a typical installation.<br
/> If you are attempting to &#8216;dual-boot&#8217; then your screen may look different at this stage.</p></blockquote><p>To proceed, choose &#8220;Erase disk and install Ubuntu&#8221; and click &#8220;continue&#8221;.</p><p><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/03.png" alt="" width="500" height="375" border="0" /></p><p>As the installation method chosen will remove all the data from our hard drive the resulting screen will act as a confirmation of our previous instruction.</p><blockquote><p><strong>Note:</strong><br
/> If you have made a mistake and wish to salvage any existing data (or attempt a completely different type of installation)<br
/> then this is the time to quit and to start again.</p></blockquote><p>Confirm the correct hard disk has been chosen and if you are happy to proceed, click &#8216;install now&#8217;.</p><p><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/04.png" alt="" width="500" height="375" border="0" /></p><p>Ubuntu will now begin the installation process and the installer will ask a few simple questions.<br
/> Don&#8217;t worry, there is no time limit.</p><p>The first screen will ask us to confirm our time zone/location.</p><p>By using your mouse simply choose your closest geographical location.<br
/> When done, click &#8216;continue&#8217; to proceed.</p><p><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/05.png" alt="" width="500" height="375" border="0" /></p><p>The next screen will ask us to confirm our keyboard layout.</p><p>Again, this is relatively straight forward and a test field is provided in order that we can validate our selection.<br
/> As before, when done, click &#8216;continue&#8217; to proceed.</p><p><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/06.png" alt="" width="500" height="375" border="0" /></p><p>The final screen will ask us to create a user identity.</p><p>Start with your name or preferred alias and complete the subsequent fields.</p><blockquote><p>In general all usernames/passwords/computer names should be no longer than 16 characters long and they should not contain spaces or non-standardised characters.<br
/> Remember to keep your password safe at all times.</p></blockquote><p>When done, click &#8216;continue&#8217; to proceed.</p><p><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/07.png" alt="" width="500" height="375" border="0" /></p><p>The basic steps are now complete and from this point onwards (and until prompted) you can click through the feature dialogue on the main installation screen by using the left and right arrows on the main display area.</p><p><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/08.png" alt="" width="500" height="375" border="0" /></p><p>Please be patient.<br
/> Depending on the speed of your internet connection the installation process may take some time and when complete you will be required to reboot.</p><p>As indicated below click &#8216;restart now&#8217; to in order to complete the process.</p><p>Your computer will now reboot and ask you to remove the installation media from your optical drive.<br
/> (You will be asked to confirm this by pressing the &#8216;return/enter key&#8217;).</p><p><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/09.png" alt="" width="500" height="375" border="0" /></p><p>After a successful reboot you will be welcomed by the Ubuntu 12.04 login screen:<br
/> Login with the password created during the installation process to uncover your crisp and shiny new desktop.</p><p><a
href="http://www.sitepoint.com/?attachment_id=54085" rel="attachment wp-att-54085"><img
class="alignnone size-full wp-image-54085" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/103.png" alt="" width="500" height="375" /></a></p><p>Well done, you have now successfully installed Ubuntu 12.04 LTS Precise Pangolin.<br
/> And this is where the fun begins &#8230;</p><p><a
href="http://www.sitepoint.com/?attachment_id=54086" rel="attachment wp-att-54086"><img
class="alignnone size-full wp-image-54086" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/112.png" alt="" width="500" height="375" /></a></p><h2>What happens after first boot</h2><p>Just like a typical Windows desktop, Ubuntu will automatically check for updates and depending on the options available to you, you may be asked to:</p><ul><li>Confirm the use of any optional drivers for your video card (You can also find this in System Settings &gt; Hardware &gt; Additional Drivers.)</li><li>Install operating system updates.</li></ul><p>With regard to system updates, when prompted simply click the &#8216;yes&#8217; button to update.</p><blockquote><p><strong>Note:</strong><br
/> If you are not prompted to update the system you can always start the &#8216;Update Manager&#8217; by opening the &#8216;Dash&#8217; and typing &#8216;Update Manager&#8217; into the search bar. When found, click the icon to open the tool. Choose &#8216;check&#8217; and then &#8216;install updates&#8217; if any are available.</p></blockquote><p>And that&#8217;s it &#8230;</p><p>In the next installment we will take up the running with a check-list of post install &#8216;tips and tricks&#8217; that will deliver a fully functional desktop computer suitable for most home and office environments, but before we &#8216;jump in&#8217; I am sure you may want to spend some time discovering your new system. There are lots to discover and may I suggest starting with Ubuntu One, Terminal, Rhythmbox, Shotwell Photo Manager, Gwibber, Libre Office, and Transmission to name but a few.</p><p>Until next time, have fun &#8230;</p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div><br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=9a30f6b1e9d2b9154fea1b6b94b33b2c&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=9a30f6b1e9d2b9154fea1b6b94b33b2c&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/ubuntu-12-04-lts-precise-pangolin-kick-start-your-installation/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		</item>
		<item>
			<title>How to Use WebSockets Today With Pusher</title>
			<link>http://www.pheedcontent.com/click.phdo?i=8d7ecbe4cd48d801db00c2faeb2b3b8c</link>
			<pheedo:origLink>http://www.sitepoint.com/use-websockets-today-with-pusher/?utm_source=rss&amp;#038;utm_medium=rss&amp;#038;utm_campaign=use-websockets-today-with-pusher</pheedo:origLink>
			<comments>http://www.sitepoint.com/use-websockets-today-with-pusher/#comments</comments>
			<pubDate>Thu, 26 Apr 2012 16:27:45 +0000</pubDate>
			<dc:creator>Craig Buckler</dc:creator>
			<category><![CDATA[HTML5]]></category>
			<category><![CDATA[News & Trends]]></category>
			<category><![CDATA[Resources]]></category>
			<category><![CDATA[Reviews]]></category>
			<category><![CDATA[Tutorials]]></category>
			<category><![CDATA[Web Tech]]></category>
			<category><![CDATA[HTML5 Dev Center]]></category>
			<category><![CDATA[HTML5 Tutorials & Articles]]></category>
			<category><![CDATA[Pusher]]></category>
			<category><![CDATA[WebSockets]]></category>
			<guid
isPermaLink="false">http://www.sitepoint.com/?p=53837</guid>
			<description><![CDATA[<img
width="50" height="50" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/665-websockets-pusher-50x50.png" class="attachment-thumbnail wp-post-image" alt="665-websockets-pusher" title="665-websockets-pusher" />HTML5 WebSockets are great - if your browser and server platform support them. Craig looks at Pusher, a new service which polyfills the gaps and allows you to use WebSocket technology today.<br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=8d7ecbe4cd48d801db00c2faeb2b3b8c&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=8d7ecbe4cd48d801db00c2faeb2b3b8c&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></description>
			<content:encoded><![CDATA[<img
width="50" height="50" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/665-websockets-pusher-50x50.png" class="attachment-thumbnail wp-post-image" alt="665-websockets-pusher" title="665-websockets-pusher" /><p></p><p>Brian Raymor&#8217;s recent SitePoint article, <a
href="http://www.sitepoint.com/websockets-stable-and-ready-for-developers/">WebSockets: Stable and Ready for Developers</a> provides a fabulous overview of the technology. In essence, WebSockets permit asynchronous bi-directional communication between the client and server. A connection is held open so lightweight messages can be sent from either device at any time. It&#8217;s an ideal solution for real-time chat and games and is likely to be more efficient than Ajax polling.</p><p>That said, there are a couple of drawbacks:</p><ul><li>WebSocket technology is relatively new and, at the time of writing, it&#8217;s only fully supported by Firefox and Chrome.</li><li>Even if your browser supports WebSockets, there&#8217;s no guarantee it&#8217;ll be natively supported by your server platform.</li></ul><p>Stable and ready? Perhaps not yet.</p><p>Fortunately, there&#8217;s another option if you&#8217;re desperate to exploit WebSocket technology today. <a
href="http://pusher.com/">Pusher</a> is a new service which ployfills over the gaps in WebSocket implementation:</p><ul><li>Pusher is a proxy service that sits between your clients and server.</li><li>On the client, Pusher provides a range of WebSocket libraries for JavaScript, iOS, Android, Flash, .NET, Silverlight, Ruby and Arduino.</li><li>If you&#8217;re using a browser which doesn&#8217;t offer native support, the JavaScript library automatically imports a Flash-based shim which implements WebSocket technology on IE6 to 9, Chrome 1 to 4, Firefox 1 to 3, Safari 1 to 4, Opera and Android.</li><li>On the server, Pusher provides a range of WebSocket libraries for PHP (generic and framework options), Ruby, ASP.NET (C# and VB.NET), Python, Node.js, Java, Groovy/Grails, Clojure, Coldfusion and Perl.</li><li>If you&#8217;d prefer not use the WebSocket API for triggering server events, you can adopt <a
href="http://pusher.com/docs/rest_api">Pusher&#8217;s REST API</a>.</li></ul><p>The whole process is reassuringly simple. Once you&#8217;ve <a
href="https://app.pusherapp.com/accounts/sign_up">registered for a Pusher account</a>, you&#8217;ll receive an API key. Your HTML5 page includes the JavaScript library, establishes a connection and subscribes to a named channel:<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><pre><code>
&lt;script src=&quot;http://js.pusher.com/1.11/pusher.min.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
var pusher = new Pusher(&quot;YOUR-PUSHER-API-KEY&quot;);
var channel = pusher.subscribe(&quot;my-channel&quot;);
</code></pre><p>You can then define callbacks that bind to events coming in via the Pusher socket:</p><pre><code>
channel.bind(&quot;my-event&quot;, function(data) {
	alert("An event was triggered with message: " + data.message);
});
</code></pre><p>To send a message from PHP:</p><pre><code>
require('Pusher.php');
$pusher = new Pusher($key, $secret, $app_id);
$pusher-&gt;trigger( 'my-channel', 'my-event', array('message' =&gt; 'hello world') );
</code></pre><p>The <a
href="http://pusher.com/">Pusher website</a> provides <a
href="http://pusher.com/docs">full documentation</a>, a selection of <a
href="http://pusher.com/tutorials">tutorials for PHP and Ruby</a> and a <a
href="http://pusher.com/showcase">showcase</a> with case studies which might inspire your next world-beating real-time app.</p><p>I like the concept behind Pusher. It&#8217;s a great solution if you want to try WebSockets today while supporting the majority of browsers and native OS platforms. There are free plans for experimental prototypes as well as paid accounts for heavier usage.</p><p>For more information, refer to <a
href="http://pusher.com/">Pusher.com</a>.</p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div><br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=8d7ecbe4cd48d801db00c2faeb2b3b8c&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=8d7ecbe4cd48d801db00c2faeb2b3b8c&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/use-websockets-today-with-pusher/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		</item>
		<item>
			<title>Have you tried Opa?</title>
			<link>http://www.pheedcontent.com/click.phdo?i=ee63e394dc0eb8f4b42cf9eee8129585</link>
			<pheedo:origLink>http://www.sitepoint.com/have-you-tried-opa/?utm_source=rss&amp;#038;utm_medium=rss&amp;#038;utm_campaign=have-you-tried-opa</pheedo:origLink>
			<comments>http://www.sitepoint.com/have-you-tried-opa/#comments</comments>
			<pubDate>Thu, 26 Apr 2012 15:00:50 +0000</pubDate>
			<dc:creator>Adam Koprowski</dc:creator>
			<category><![CDATA[Web Tech]]></category>
			<guid
isPermaLink="false">http://www.sitepoint.com/?p=53629</guid>
			<description><![CDATA[Opa is a new programming language developed with the intention of minimizing the technology stack you work with, while not removing any of the features. Read on to find out more. <br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=ee63e394dc0eb8f4b42cf9eee8129585&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=ee63e394dc0eb8f4b42cf9eee8129585&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></description>
			<content:encoded><![CDATA[<p></p><p>The Web is growing not only in size, but also in importance. The modern web as we know it has little to do with its early days of static pages; today, it&#8217;s anything but static. Some pages even earn the title of web applications–think Google Docs, for instance–apps that are accessed via a browser, and that start presenting serious competition to more traditional distribution models.</p><p>Development these apps is not simple. They&#8217;re inherently distributed between the client &#8211; a browser &#8211; and the server. Both are typically developed with different technologies and effort needs to be put into communication between them.</p><p>We often end up with a complex technology stack. A programming language for the server side, often with a framework on top of it, a programming language for the client side (usually JavaScript) with some libraries (jQuery, Dojo, Prototype, …), and a Database and its query language. All different technologies, with different concepts and models. Add configuration and tending to communication between them and you&#8217;ll get a picture of a fairly complex puzzle. Making all elements fit together is not an easy feat.</p><p>The goal of the new web programming platform, Opa, is to simplify this picture and to replace this complex technology stack with a single programming language. Let&#8217;s take a look at some simple Opa programs to see how it tries to make web developer&#8217;s life easier.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><h2>Hello, Opa!</h2><p>Perhaps the simplest Opa program is the following:</p><pre>Server.start(Server.http,
  { title: "Hello web",
    page: function() { &lt;h1&gt;Hello web&lt;/h1&gt; }
  }
)</pre><p>Let&#8217;s try to understand what happens here. First, <code>Server.start</code> is a function that starts a web server. It takes two arguments, the first one is a server configuration, including port, encryption parameters etc. – here we are just using default http settings. The second argument is the description of how the server should handle incoming requests. There are many variants possible for this second argument, here we are using a simple single-page-service variant which accepts a record with two fields: title and page.</p><p><code>Title</code> is just a string with the title of this single page. <code>Page</code> is a function with no arguments that returns the HTML content of the page. Notice how we used an anonymous function for this field and that the last expression in a function is its return value. Also note how Opa &#8220;understands&#8221; HTML and accepts it via usual syntax.</p><p>Opa is built on modern standards so it supports HTML5, as witnessed by existing community projects using: WebGL, Canvas and SVG vector graphics. It also offers connectivity with existing services, including extensive libraries for: Facebook, Twitter, Dropbox and GitHub.</p><h2>Compilation</h2><p>How do we run the app? In Opa, it&#8217;s a two-step process. First, we must compile this program: (assuming we saved it in file named hello.opa)<br
/> <code>opa hello.opa</code>, and then we can run it with: <code>./hello.exe</code></p><p>With the growing popularity of interpreted languages one may wonder why Opa requires compilation. Apart from the usual argument that compilation allows for optimizations and better overall performance, there are at least two advantages of this approach.</p><p>The Opa compiler gathers and packs all application resources (including images and such) into one final executable (hello.exe in our case). That means that deploying it on a server requires just copying this single file and running it there. No external dependencies. No forgotten files.</p><h2>Type checking</h2><p>Next, Opa is a strongly, statically typed language and the compilation phase has many checks, including type-checking. That means that the compiler is able to detect a large class of programming mistakes and point them out to you, even before you run your program. This is very important and is in fact one of the crucial differences between Opa and some other web technologies, such as <a
href="http://www.sitepoint.com/serving-static-files-with-node-js/">Node.js</a>.</p><p>To better understand that let&#8217;s take a look at our simple program. What if we made a typo in one of the function or field names? What if we forgot one argument? What if page returned a string, not an HTML fragment? In all those situations the compiler would point out the mistake with a clear indication of the problem.</p><p>But the checks go much further than that. There are many variants possible for the second argument of the Server.start function. Opa&#8217;s type checker is strong enough to infer which variants are permissible and accept only those. I said infer, because in most situations you are not required to annotate your programs with types (as in, say, Java) and instead the compiler will perform type inference for you. Especially in bigger projects: this is a life saver.</p><h2>Simple Demo</h2><p>It&#8217;s hard to judge a language by how one writes &#8220;Hello world&#8221;, so let&#8217;s look at a slightly more complex, though still basic, Opa program.</p><pre>database mydb { int /counter = 0; }
function action(_) {
    /mydb/counter &lt; - /mydb/counter + 1;
    #msg = &lt;&gt;Hello, user number {/mydb/counter}!;
}
function page() {
    &lt;h1 onclick={action}&gt;Hello, world&lt;/h1&gt;
    &lt;div id="msg"&gt;Click the header&lt;/div&gt;;
}
Server.start(Server.http, { ~page, title: "Hello, world" });</pre><p>What does this program do? It presents a page with a &#8220;Hello, world&#8221; header, and a message saying &#8220;Click the header&#8221;. Upon clicking the header the message is replaced with &#8220;Hello, user number x&#8221;, where the x is replaced with the number of times the header was clicked since the inception of the service, i.e: it won&#8217;t be reset upon, for instance, restarting the web server.</p><h2>Database</h2><p>Let&#8217;s take a closer look at this program. To count the clicks it uses a database and so it starts with a declaration of a database called mydb, containing a single value of type int at path /counter. Database paths in Opa are locations for DB values and, conceptually, are somewhat similar to filesystem paths. That&#8217;s a very modest database but there are essentially no limitations on the number and complexity of paths.</p><p>As you can see in the action function, Opa tightly integrates database programming in the core language, providing convenient syntax for database reads and updates; and also querying, although that&#8217;s beyond the scope of this article. With a simple annotation one can choose the database engine that will power the application, with MongoDB being the prime choice in Opa right now.</p><h2>Interactivity</h2><p>Onto the page function. Interestingly, the static HTML contains an event handler, which points to a function in our program.</p><pre>&lt;h1 onclick={action}&gt;Hello, world&lt;/h1&gt;</pre><p>where the said function does some database manipulation and DOM manipulation using special syntax:</p><pre>#msg = &lt;&gt;Hello, user number {/mydb/counter}!;</pre><p>There are two things at play here. Firstly, #id = content means: replace the content of the DOM element with id with content. Secondly the HTML fragment contains an insert, which is an easy and safe (more about that later) way to inject values into strings/HTML fragments. For instance Java&#8217;s:</p><pre>System.out.println(x + " + " + y + " = " + (x+y));</pre><p>would in Opa become:</p><pre>println("{x} + {y} = {x+y}");</pre><h2>Unified client/server coding</h2><p>In the snippet from the action function, the insert happens to be a read operation in the database. The interesting thing about this function is that obviously all database manipulations will have to be executed on the server, while all DOM manipulations will need to happen on the client. Not only does the Opa compiler figure out what should happen where, but it also automatically generates Javascript for the client and transparently takes care of all client-server communication.</p><p>Of course the developer can have better control over what&#8217;s happening and decide himself what should go where by means of simple function annotations. But the nice part is that moving function from client-to-server (or vice-versa) boils down to replacing the client keyword with server and the rest is handled by the compiler.</p><p>Another thing worth noting is how easy it is how easy it is to program event handlers and achieve interactivity in Opa. In fact, the language offers powerful constructions for real-time web, however that goes beyond the scope of this short article.</p><h2>Security</h2><p>One of the main challenges of web applications, and one to which Opa pays particular attention, is security. With constant client-server communication and the interactive nature of web apps its very challenging to make sure that sensitive information does not leak, and that users cannot do harmful things. Opa takes a twofold approach to this problem.</p><p>Apart from the client/server function annotations it provides two additional ones for the server functions: exposed and protected, which differentiate between server entry points that can be optimized for performance and those that should not be accessible, event to a compromised client.</p><p>The second security measure comes from the aforementioned type-safety of Opa. On one hand it means that (just like for some other high-level languages) buffer overflows or null pointer exceptions just cannot happen in Opa. On the other hand it offers protection against most popular security threats such as XSS attacks and code injections. This protection is possible because thanks to typing Opa knows what is an URL, what is HTML and what is a database-query (as opposed to dynamically/weakly typed languages where all of the above would just be strings) and therefore can properly sanitize all inserts.</p><p>In this short article I only had a chance to scratch the surface of what Opa has to offer, but I hope that was enough to get you interested in the language. I hope to continue with more news and tutorials about Opa in the near future. For now, if you want to know more, I suggest you visit Opa’s <span
style="color: #000080;"><span
style="text-decoration: underline;"><a
href="http://opalang.org/">website</a></span></span>, where you can<span
style="color: #000080;"><span
style="text-decoration: underline;"><a
href="http://opalang.org/get.xmlt">download</a><a
href="http://opalang.org/get.xmlt">it</a></span></span>, read the<span
style="color: #000080;"><span
style="text-decoration: underline;"><a
href="http://doc.opalang.org/">manual</a></span></span>,<span
style="color: #000080;"><span
style="text-decoration: underline;"><a
href="http://blog.opalang.org/">the</a><a
href="http://blog.opalang.org/">blog</a></span></span> (with numerous tutorials) and a bunch of other<span
style="color: #000080;"><span
style="text-decoration: underline;"><a
href="http://opalang.org/media_coverage.xmlt">articles</a><a
href="http://opalang.org/media_coverage.xmlt">about</a><a
href="http://opalang.org/media_coverage.xmlt">Opa</a></span></span>. And if you want to know more you can meet the helpful Opa community on the<span
style="color: #000080;"><span
style="text-decoration: underline;"><a
href="http://forum.opalang.org/">forum</a></span></span>.</p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div><br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=ee63e394dc0eb8f4b42cf9eee8129585&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=ee63e394dc0eb8f4b42cf9eee8129585&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/have-you-tried-opa/feed/</wfw:commentRss>
			<slash:comments>16</slash:comments>
		</item>
		<item>
			<title>Sneak Peek at Kevin Yank&#8217;s New Book &#8216;PHP &amp; MYSQL: Novice to Ninja&#8217;</title>
			<link>http://www.pheedcontent.com/click.phdo?i=d3961be24a3a1c820a286ef173b2651b</link>
			<pheedo:origLink>http://www.sitepoint.com/sneak-peek-of-kevin-yanks-new-php-mysql-book/?utm_source=rss&amp;#038;utm_medium=rss&amp;#038;utm_campaign=sneak-peek-of-kevin-yanks-new-php-mysql-book</pheedo:origLink>
			<comments>http://www.sitepoint.com/sneak-peek-of-kevin-yanks-new-php-mysql-book/#comments</comments>
			<pubDate>Thu, 26 Apr 2012 06:01:19 +0000</pubDate>
			<dc:creator>Mick Gibson</dc:creator>
			<category><![CDATA[PHP]]></category>
			<category><![CDATA[PHP & MySQL News & Interviews]]></category>
			<category><![CDATA[PHP & MySQL Reviews and Apps]]></category>
			<category><![CDATA[PHP & MySQL Tutorials]]></category>
			<category><![CDATA[Server Side Coding]]></category>
			<category><![CDATA[Server Side Essentials]]></category>
			<category><![CDATA[Tutorial]]></category>
			<category><![CDATA[Tutorials]]></category>
			<category><![CDATA[Web Tech]]></category>
			<guid
isPermaLink="false">http://www.sitepoint.com/?p=53890</guid>
			<description><![CDATA[<img
width="50" height="43" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/php-mysql-50x43.png" class="attachment-thumbnail wp-post-image" alt="php-mysql" title="php-mysql" />Kevin Yank&#8217;s done it again! He&#8217;s just completed a new 2012 edition of his best-selling book (Build Your Own Database Driven Web Site, 4th Edition) which is now titled - PHP &#38; MySQL: Novice to Ninja. And, today you can: Take a sneak peek inside the book (with an excerpt from the Chapter 3 -Introducing PHP) Order the [...]<br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=d3961be24a3a1c820a286ef173b2651b&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=d3961be24a3a1c820a286ef173b2651b&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></description>
			<content:encoded><![CDATA[<img
width="50" height="43" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/php-mysql-50x43.png" class="attachment-thumbnail wp-post-image" alt="php-mysql" title="php-mysql" /><p></p><p><a
href="http://www.sitepoint.com/?attachment_id=53906" rel="attachment wp-att-53906"><img
class="alignright size-full wp-image-53906" title="phpmysql5-cover" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/phpmysql5-cover.jpg" alt="phpmysql5-cover" width="200" height="267" /></a>Kevin Yank&#8217;s done it again! He&#8217;s just completed a new 2012 edition of his best-selling book (<em>Build Your Own Database Driven Web Site, 4th Edition</em>) which is now titled - <em>PHP &amp; MySQL: Novice to Ninja. </em>And, today you can:</p><ul><li><strong>Take a sneak peek inside the book</strong> (with an excerpt from the Chapter 3 -<em>Introducing PHP</em>)</li><li><strong><a
href="#pre-order">Order the book</a></strong>, and SAVE up to 50%</li></ul><div>Now let&#8217;s jump into the excerpt from the book. Over to you Kev &#8230;</div><div></div><h2>Introducing PHP</h2><p>PHP is a <strong>server-side language</strong>. This concept may be a little difficult to grasp, especially if you’ve only ever designed websites using client-side languages like HTML, CSS, and JavaScript.</p><p>A server-side language is similar to JavaScript in that it allows you to embed little</p><p>programs (scripts) into the HTML code of a web page. When executed, these programs give you greater control over what appears in the browser window than HTML alone can provide. The key difference between JavaScript and PHP is the stage of loading the web page at which these embedded programs are executed.</p><p>Client-side languages like JavaScript are read and executed by the web browser after downloading the web page (embedded programs and all) from the web server. In contrast, server-side languages like PHP are run by the web <em>server</em>, before sending the web page to the browser. Whereas client-side languages give you control over how a page behaves once it’s displayed by the browser, server-side languages let you generate customized pages on the fly before they’re even sent to the browser.</p><p>Once the web server has executed the PHP code embedded in a web page, the result takes the place of the PHP code in the page. All the browser sees is standard HTML code when it receives the page, hence the name “server-side language.” Let’s look back at the today.php example presented in Chapter 1:</p><pre>&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;meta charset="utf-8"&gt;
&lt;title&gt;Today&amp;rsquo;s Date&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;Today&amp;rsquo;s date (according to this web server) is
<strong>&lt;?php </strong>
<strong>echo date('l, F jS Y.'); </strong>
<strong>?&gt; </strong>
&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre><p>Most of this is plain HTML except the line between &lt;?php and ?&gt; is PHP code. &lt;?php marks the start of an embedded PHP script and ?&gt; marks its end. The web server is asked to interpret everything between these two delimiters and convert it to regular HTML code before it sends the web page to the requesting browser. The browser is presented with the following:</p><p>Notice that all signs of the PHP code have disappeared. In its place the output of the script has appeared, and it looks just like standard HTML. This example demonstrates several advantages of server-side scripting:</p><pre>&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;meta charset="utf-8"&gt;
&lt;title&gt;Today&amp;rsquo;s Date&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;Today&amp;rsquo;s date (according to this web server) is
<strong>Sunday, April 1st 2012. </strong>&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre><p>Notice that all signs of the PHP code have disappeared. In its place the output of the script has appeared, and it looks just like standard HTML. This example demonstrates several advantages of server-side scripting:</p><h3>No browser compatibility issues</h3><p>PHP scripts are interpreted by the web server alone, so there’s no need to worry about whether the language features you’re using are supported by the visitor’s browser.</p><h3>Access to server-side resources</h3><p>In the above example, we placed the date according to the web server into the web page. If we had inserted the date using JavaScript, we’d only be able to display the date according to the computer on which the web browser was running. Granted, there are more impressive examples of the exploitation of server-side resources, such as inserting content pulled out of a MySQL database (<em>hint, hint …</em>).</p><h3>Reduced load on the client</h3><p>JavaScript can delay the display of a web page significantly (especially on mobile devices!), as the browser must run the script before it can display the web page. With server-side code this burden is passed to the web server, which you can make as beefy as your application requires (and your wallet can afford).</p><h2>Basic Syntax and Statements</h2><p>PHP syntax will be very familiar to anyone with an understanding of JavaScript, C, C++, C#, Objective-C, Java, Perl, or any other C-derived language. But if these languages are unfamiliar to you, or if you’re new to programming in general, there’s no need to worry about it.</p><p>A PHP script consists of a series of commands, or <strong>statements</strong>. Each statement is an instruction that must be followed by the web server before it can proceed to the next instruction. PHP statements, like those in the aforementioned languages, are always terminated by a semicolon (;).</p><p>This is a typical PHP statement:</p><pre>echo 'This is a &lt;strong&gt;test&lt;/strong&gt;!';</pre><p>This is an echo statement, which is used to generate content (usually HTML code) to send to the browser. An echo statement simply takes the text it’s given and inserts it into the page’s HTML code at the position of the PHP script where it was contained.</p><p>In this case, we’ve supplied a string of text to be output: &#8216;This is a &lt;strong&gt;test&lt;/strong&gt;!&#8217;. Notice that the string of text contains HTML tags (&lt;strong&gt; and &lt;/strong&gt;), which is perfectly acceptable. So, if we take this statement and put it into a complete web page, here’s the resulting code:</p><pre>&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;meta charset="utf-8"&gt;
&lt;title&gt;Today&amp;rsquo;s Date&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;<strong>&lt;?php echo 'This is a &lt;strong&gt;test&lt;/strong&gt;!'; ?&gt;</strong>&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre><p>If you place this file on your web server and then request it using a web browser, your browser will receive this HTML code:</p><pre>&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;meta charset="utf-8"&gt;
&lt;title&gt;Today&amp;rsquo;s Date&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;<strong>This is a &lt;strong&gt;test&lt;/strong&gt;!</strong>&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre><p>The today.php example we looked at earlier contained a slightly more complex echo statement:</p><pre>echo date('l, F jS Y.');</pre><p>Instead of giving echo a simple string of text to output, this statement invokes a <strong>built-in function </strong>called date and passes <em>it </em>a string of text: &#8216;l, F jS Y.&#8217;. You can think of built-in functions as tasks that PHP knows how to do without you needing to spell out the details. PHP has many built-in functions that let you do everything, from sending email to working with information stored in various types of databases.</p><p>When you invoke a function in PHP—that is, ask it to do its job—you’re said to be <strong>calling </strong>that function. Most functions <strong>return </strong>a value when they’re called; PHP then behaves as if you’d actually just typed that returned value instead in your code. In this case, our echo statement contains a call to the date function, which returns the current date as a string of text (the format of which is specified by the text string in the function call). The echo statement therefore outputs the value returned by the function call.</p><p>You may wonder why we need to surround the string of text with both parentheses ((…)) and single quotes (&#8216;…&#8217;). As in SQL, quotes are used in PHP to mark the beginning and end of strings of text, so it makes sense for them to be there. The parentheses serve two purposes. First, they indicate that date is a function that you want to call. Second, they mark the beginning and end of a list of <strong>arguments </strong>that you wish to provide, in order to tell the function what you want it to do.</p><p>In the case of the date function, you need to provide a string of text that describes the format in which you want the date to appear. Later on, we’ll look at functions that take more than one argument, and we’ll separate those arguments with commas. We’ll also consider functions that take no arguments at all. These functions will still need the parentheses, even though there will be nothing to type between them.</p><p>&#8212;</p><p>Fantastic, thanks Kevin for sharing that!<a
href="http://www.sitepoint.com/?attachment_id=53914" rel="attachment wp-att-53914"><img
class="alignright size-full wp-image-53914" title="phpmysql5-whats-inside" src="http://www.sitepoint.com/wp-content/uploads/1/files/2012/04/phpmysql5-whats-inside.jpg" alt="phpmysql5-whats-inside" width="165" height="450" /></a></p><p>The good news is there&#8217;s loads more practical and hands-on examples just like this in the 500+ pages of the book. Which covers:</p><ul><li><strong>Tutorials</strong>: Easy-to-follow tutorials with downloadable code examples</li><li><strong>Installation:</strong> Instructions for PHP &amp; MySQL on Windows, Mac OS X, and Linux</li><li><strong>PHP coding</strong>: Learning the correct PHP syntax</li><li><strong>Database design</strong>: Mastering SQL database design</li><li><strong>Object Oriented Programming</strong> (OOP): Crash course in OOP principles.</li><li><strong>Building a CMS</strong>: Step-by-step guide to creating a CMS.</li><li><strong>Shopping Carts</strong>: Developing an e-commerce cart from scratch.<a
name="pre-order"></a></li><li><strong>Latest technologies</strong>: Updated for Windows 7, Mac OS X Lion, and the latest versions of PHP, MySQL, phpMyAdmin, XAMPP, MAMP, and HTML5.</li></ul><p>Order your copy now:</p><ul><li><strong><a
href="http://www.sitepoint.com/launch/d724a6 " target="_blank">PRINT Book + Digital EPACK Bundle &#8211; for $34</a></strong>  <strong>(SAVE 50%)</strong></li><li><a
style="font-weight: bold;" href="http://www.sitepoint.com/launch/d724a6 " target="_blank">Digital EPACK (pdf, epub, mobi) &#8211; for $17</a>  <strong>(SAVE 42%)</strong></li></ul><p>That&#8217;s it. Enjoy, and as always, we&#8217;d love to hear all your thoughts and comments.</p> <span
id="pty_trigger"></span><div
style='padding:20px 0px 50px 0px;'><div
style='float:left;padding-left:40px;'><div
id='div-gpt-ad-1335489406190-0' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-0'); });</script> </div></div><div
style='float:right;padding-right:40px;'><div
id='div-gpt-ad-1335489406190-1' style='width:300px; height:100px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1335489406190-1'); });</script> </div></div><div
style='clear:both'></div></div><div
style='clear:both'></div><br clear="both" style="clear: both;"/>
<br clear="both" style="clear: both;"/>
<a href="http://ads.pheedo.com/click.phdo?s=d3961be24a3a1c820a286ef173b2651b&p=1"><img alt="" style="border: 0;" border="0" src="http://ads.pheedo.com/img.phdo?s=d3961be24a3a1c820a286ef173b2651b&p=1"/></a>
<img alt="" height="0" width="0" border="0" style="display:none" src="http://tags.bluekai.com/site/5148"/><img alt="" height="0" width="0" border="0" style="display:none" src="http://insight.adsrvr.org/track/evnt/?ct=0:8pyu3gz&adv=wouzn4v&fmt=3"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/sneak-peek-of-kevin-yanks-new-php-mysql-book/feed/</wfw:commentRss>
			<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 52/87 queries in 0.222 seconds using memcached
Object Caching 3209/3262 objects using memcached

Served from: www.sitepoint.com @ 2012-05-16 08:07:35 -->
