Tuesday, July 31, 2012

The Go Programming Language Phrasebook




The Go Programming Language Phrasebook
Essential Go code and idioms for all facets of the development process 

This guide gives you the code “phrases” you need to quickly and effectively complete a wide variety of projects with Go, today’s most exciting new programming language.

Tested, easy-to-adapt code examples illuminate every step of Go development, helping you write highly scalable, concurrent software. You’ll master Go-specific idioms for working with strings, collections, arrays, error handling, goroutines, slices, maps, channels, numbers, dates, times, files, networking, web apps, the runtime, and more.

Concise and Accessible
Easy to carry and easy to use: Ditch all those bulky books for one portable pocket guide

Flexible and Functional
Packed with more than 100 customizable code snippets: Quickly create solid Go code to solve just about any problem

Register your book at informit.com/register for convenient access to downloads, updates, and corrections as they become available.

Video tutorial - HTML5 & CSS3 Fundamentals: Development for Absolute Beginners

01 - Series Introduction

In this first lesson, Bob sets expectations and provides a brief overview of the upcoming series.

02 - Creating Your First HTML5 Web Page

Warm up your keyboard and get ready to work. In this lesson—an important foundation for the series as a whole—you'll be fully immersed in what it takes to build an HTML5 web page, including the utilization of HTML5 structural elements in a real scenario.

03 - Styling Your First HTML5 Web Page with CSS3

Now that you've built a semantically well-structured and marked-up HTML5 web page, you'll apply a CSS3 style sheet to give the new page a simple but attractive appearance.

Download the source code for Styling Your First HTML5 Web Page with CSS3

04 - Understanding the HTML5 You Wrote

In Lesson 2, you worked with Bob to create a semantically correct HTML5 page. But Bob didn't spend much time explaining each individual element—its purpose, your options, etc. That process begins in this lesson as he talks about what makes HTML5 special, the purpose for things like DOCTYPE, meta tags, charset, UTF-8, html, why "semantics" is important, the head and body tags, and more.

Download the source code for Understanding the HTML5 You Wrote

05 - Working with Paragraphs and Text

In this lesson, Bob discusses the various semantic meanings of popular HTML5 inline tags useful for marking up text inside of paragraphs, including b, i, small, em, mark, span, and much more.

Download the source code for Working with Paragraphs and Text

06 - Defining the Structure of Your Document

Moving beyond the text, this lesson discusses how to give semantic meaning to the various elements of a web page using header, footer, aside, nave, h1 through h2, article, section, and more.

Download the source code for Defining the Structure of Your Document

07 - Working with Figures and Images

This lesson demonstrates how to include images as well as whole figures with captions in your HTML5 web pages.

08 - Working with Lists

We've already used a few list style tags in our HTML5 pages, but now we'll learn how to create a semantically rich set of lists for creating ordered and unordered lists, definitions of terms, and using lists to create navigation—a popular technique in web development.

Download the source code for Working with Lists

09 - Creating Tables

The oft-maligned table still has a semantic purpose in HTML5: to display tabular information. This lesson demonstrates the many different ways to structure tabular data in HTML5, including headers, rows, columns, footers, column groups, and more.

Download the source code for Creating Tables

10 - Creating Forms

This lesson demonstrates how to add a rudimentary level of interactivity to your web pages by allowing users to input information via forms. We'll look at over a dozen examples of common form elements allowing us to guide the user to input high-quality data.

Download the source code for Creating Forms

11 - Form Validation and Other Future HTML5 Form Enhancements

This video looks toward new HTML5 form features used in Internet Explorer 10 and later. First up is a look at using new input elements and attributes for creating richer forms. Bob then demonstrates how built-in validation works and how it can reduce the amount of JavaScript required by web pages hosting forms.

Download the source code for Form Validation and Other Future HTML5 Form Enhancements

12 - Understanding Cascading Style Sheets

In Lesson 3, you worked with Bob to create an external Cascading Style Sheet that provides a simple but attractive aesthetic improvement to the HTML5 web page. This lesson picks up where that lesson left off by discussing the basics of CSS as well as how you can define styles and target certain elements of your HTML5 web pages using selectors.

Download the source code for Understanding Cascading Style Sheets

13 - CSS3 Font and Text Properties

In this lesson we focus on the CSS properties specific to modifying font and text properties on HTML5 web pages. Tune in for a discussion about font-family stacks, common units used for defining relative and absolute sizes, the various font-related modifiers, and much more.

Download the source code for CSS3 Font and Text Properties

14 - CSS3 Color and Background Properties

You can easily modify the colors and backgrounds of various HTML5 elements using CSS3 and this lesson demonstrates how, starting with the various ways you can define a color in CSS and expanding to how to set background images with alignment, tiling, and more.

Download the source code for CSS3 Color and Background Properties

15 - CSS3 List and Table Properties

In Lessons 7 and 8 you learned about Lists and Tables. In this lesson, you learn various properties exposed by CSS3 that allow you to provide a professional style to your Lists and Tables.

Download the source code for CSS3 List and Table Properties

16 - CSS3 Box Properties

This lesson makes the important distinction between inline-display and block-display in HTML5 elements. For block-style elements, it is vital to understand the box model and this lesson provides that background as well as an overview of the CSS3 properties for properly styling block-style elements.

Download the source code for CSS3 Box Properties

17 - Working with CSS3 Font-Face

Designers rely on typography to communicate and emote along with the message of the text itself. The font-face is just one more tool that designers can use to widen the prospective array of typefaces that are accessible in HTML5 web pages.

Download the source code for Working with CSS3 font-face

18 - Embedding Video in HTML5

In this video we dive back into HTML5 and examine the basics of the video tag to add progressively downloaded / pseudo-streamed video to your web pages. We discuss the various options available, as well as the necessary codecs required to make it all work.

Download the source code for Embedding Video in HTML5

19 - Working with the HTML5 Canvas

The HTML5 Canvas allows JavaScript savvy developers to draw bitmapped images directly into HTML5 web pages. This video provides a simple example in order to show how this works at a high level, reviewing the process of drawing on the canvas via JavaScript.

Download the source code for Working with the HTML5 Canvas

20 - Working with SVG in HTML5

Scalable Vector Graphics, or SVG, has been a web standard for many years but has gained renewed interest after being included in the HTML5 specification. SVG allows you to define vector shapes using XML, and these shapes can even be styled with CSS and scripted with JavaScript. In this video, we demonstrate how to use an exported SVG document from Adobe Illustrator in a web page using the img tag as well as embedding the code directly in an HTML5 page. Finally, we show how to add interactivity to an SVG image using JavaScript.

Download the source code for Working with SVG in HTML5

21 - Where to Go From Here

In this final video, Bob provides a roadmap for topics that will help you take your newfound knowledge much further. Topics include a short history of laying out web pages in HTML and CSS, current directions in web page layout with grid based and liquid—or rather, responsive—web design, mobile first design, and more. He lists a number of open source CSS frameworks and utilities, and finally a few books for more information.

Source: HTML5 & CSS3 Fundamentals: Development for Absolute Beginners | Channel 9

Download the entire series source code here.


Thursday, July 19, 2012

YouTube Upload Widget for your website



The YouTube Upload Widget lets your website's visitors perform both webcam and file uploads to YouTube. The support for webcam uploads sets the upload widget apart from the other uploading options that the YouTube API supports. The widget uses HTML5's postMessage support to send messages back to your website regarding videos uploaded via the widget.

The YouTube Upload Widget is an experimental feature, which means that it is still in development and subject to change or even be removed without notice.

Link: YouTube Upload Widget

Wednesday, July 18, 2012

WebGL Beginner's Guide


This book is a step-by-step tutorial that includes complete source code for all of the examples covered. Every chapter builds on top of the previous one thereby giving the reader an immediate feeling of progression. Each block of code is explained, and 3D web development concepts are diagrammed and covered in detail. This book is written for JavaScript developers who are interested in 3D web development. A basic understanding of the DOM object model and the jQuery library is ideal but not required. No prior WebGL knowledge is expected.

Thursday, July 12, 2012

jQuery Mobile 1.1.1 released



This is our first maintenance release for version 1.1 and it’s chock full of bug fixes and improvements based on community feedback and testing.

The most notable changes in this release are speedier page transitions and tap responsiveness on longer pages, smoother transitions in Cordova, and more polished form elements.

Alongside this release, the ThemeRoller Mobile tool has been updated to make it easy to upgrade existing themes to 1.1.1. A new downloader builder tool is now released as a public alpha and allows you to build custom versions of jQuery Mobile 1.1.1 that only include the modules you need.

Source: http://jquerymobile.com/blog/2012/07/12/jqm-1-1-1/


Sunday, July 8, 2012

Create photo grid using css

First create a HTML with a series of picture without css.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Mobile-Web-App: test css</title>

</head>
<body>
<h1>Mobile-Web-App: CSS Exercise</h1>
<div id="photogrid"  style="width:600px;">
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
</div>

</body>
</html>



Modify the HTML with CSS, it's easy to create grid for the pictures.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Mobile-Web-App: test css</title>
<style>

#photogrid{
 line-height: 0;
 -webkit-column-count: 6;
 -webkit-olumn-gap: 5px;
 -moz-column-count: 6;
 -moz-column-gap: 5px;
 column-count: 6;
 column-gap: 5px;
}
#photogrid img{
 width: 100%;
 height: auto;
 margin-bottom: 5px;
}

</style>
</head>
<body>
<h1>Mobile-Web-App: CSS Exercise</h1>
<div id="photogrid"  style="width:600px;">
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
 <img src="http://goo.gl/BlQEX"/>
</div>

</body>
</html>



Wednesday, July 4, 2012

Get screen density with JavaScript using window.devicePixelRatio DOM property

In mobile web app (specially in Android, various screen densities are provided), we can get screen density with JavaScript using window.devicePixelRatio DOM property.

<!doctype html>
<head>
 <title>Mobile-Web-App: Test Javascript</title>
 <meta charset="utf-8">

<script>
function myOnLoad(){
 
 var devicePixelRatio = window.devicePixelRatio;
 eleRatio = document.getElementById("ratio");
 eleRatio.innerHTML = devicePixelRatio;
 
}

window.onload = myOnLoad;
</script> 

</head>
<body>
<h1>Mobile-Web-App: detect device pixel ratio</h1>

devicePixelRatio: <b id="ratio"></b>

</body>
</html>


devicePixelRatio on Galaxy Nexus

devicePixelRatio on desktop

Monday, July 2, 2012

Mozilla's Boot to Gecko Mobile Operating System

Mozilla tells us that all Android users (with unlocked bootloaders) will be able to install the operating system onto their phones. The video show a quick demo of Boot to Gecko on a Galaxy S II, which included peeks at the dialer, messaging system, system preferences.