반응형
반응형

How to create QR code reader in HTML5 website

There aren't many JavaScript decoders.

There is one at http://www.webqr.com/index.html

The easiest way is to run ZXing or similar on your server. You can then POST the image and get the decoded result back in the response.


javascript QRCode scanner


https://github.com/LazarSoft

반응형
반응형

How to Turn jQuery Accordion into CSS3 Accordion

http://css.dzone.com/articles/how-turn-jquery-accordion-css3


Have you ever used ordinary accordion plugins in your projects? I would believe so! Most of them use javascript to work (or jQuery). Usually we use such plugins (accordions) to build a promo with images, a little photo gallery, or in case we have to build an advertisement with a list of product features. We did some research and came to the conclusion that sometimes we don’t need to use any script in order to build accordions. We can just use the power of CSS3. We can handle the OnClick event and use custom animation.

download sources

I prepared three versions with accordions. For the first demonstration we use jQuery to build an accordion. I selected liteAccordion jQuery plugin (http://nicolahibbert.com/demo/liteAccordion/) as an accordion plugin for out test purposes. See how it works:

Live Demo


That’s all, our own CSS3-based accordion is complete! You can check it in action:

CSS3 accordion demo

But that’s not all for today, as a bonus, I prepared a third demo for you with an animated accordion.


animated accordion demo

In order to do it I recommend disable onclick behavior, and apply new animation:

Conclusion

Now that is all for today. We have just created three different demos: the first one with jQuery, the second and the third – with pure CSS3. I hope that you like it. Good luck!


반응형
반응형

INTERFACE SKETCH http://interfacesketch.tumblr.com/

스케치, http://enva.to/uxlzdf에 스케치를 얻을 수 있도록 인쇄 서식 파일의 전체 더미 인터페이스

Free sketch templates for web, mobile and tablet.

If you're designing a website or app, these simple templates are designed to help you sketch your ideas on paper.

How to use

Download a template. Print it out. Start sketching! You can print in colour or black-and-white; on laser or inkjet printer. All templates are in PDF (portable document format). Some of the templates contain a grid of dots to help with alignment when you sketch. These dots do not represent the pixel dimensions of the device or browser.

Printing tip

Some templates contain pages in landscape and portrait sizes. To print these templates correctly, look for the checkbox option in your print dialog box that states auto-rotate (in some PDF readers, it may say auto-rotate and center). Make sure this option is selected; this will ensure that pages are printed in their correct orientation.

The templates (in PDF)

These templates are hosted on Google Docs. When you click a link below, a preview of the template will open in your browser. To save the template to your computer as a PDF file, press Ctrl+S or click the File menu and then choose Download.

Windows 8 phone


반응형
반응형

N.O.V.A. 3 - Near Orbit Vanguard Alliance By Gameloft

http://itunes.apple.com/us/app/n.o.v.a.-3-near-orbit-vanguard/id474764934?mt=8


N.O.V.A. 3 - Near Orbit Vanguard Alliance


Open iTunes to buy and download apps.

Description

New iOS game sale! N.O.V.A. 3 - Near Orbit Vanguard Alliance is now $0.99 for a limited time!


“If you're an iOS gamer who demands the very best, you should buy N.O.V.A. 3.” - Slidetoplay
“N.O.V.A. 3 looks, and sounds streets-ahead of anything else on the AppStore right now” - Touchgen 5/5
“NOVA 3 is bigger and better than its predecessors, not to mention a visual feast” - KnowYourMobile – 4.5/5


The most immersive and impressive sci-fi FPS franchise on smartphones is back! Fight for mankind's survival in the greatest space shooter on mobile devices!

Four months have passed since Kal ruined the Volterites' plans by sabotaging their war factories, and stopping the extraction of the Judger Artifacts. However, following the assassination of President Folsom, the government surrendered the colonies to the Volterite Protectorate in order to prevent civil war amongst the increasingly pro-Volterite citizens.
Kal Wardin has been laying low since Folsom’s death, but now he has received a desperate plea from Yelena to come to Earth. Once again, the hero must rise to save mankind!

• An epic storyline: Humanity finally returns to Earth after years of exile! Fight in 10 immersive levels across the galaxy, from a war-torn Earth to a frozen Volterite city.
• Multiple weapons and powers: Run, shoot, drive vehicles, and pilot a mech to defeat hordes of enemies.
• Join 12-player battles in 7 multiplayer modes (Capture the Point, Free-for-All, Capture the Flag, etc.) on 7 different maps.
• Use Voice Chat to communicate with your friends in real time! (Voice Chat available only on iPad 2, the new iPad, and iPhone 4S.)
• For the first time, multiple allies can jump inside the same vehicle and spread destruction on the battlefield.
• Discover the new FPS benchmark for graphics and gameplay on iOS (real-time shadow & lights, particle system, ragdoll physics, etc.)
•Optimized for iPad Retina Display



----

Visit our official site at http://www.gameloft.com
Follow us on Twitter at http://glft.co/GameloftonTwitter or like us on Facebook at http://facebook.com/Gameloft to get more info about all our upcoming titles.
Check out our videos and game trailers on http://www.youtube.com/Gameloft
Discover our blog at http://glft.co/Gameloft_Official_Blog for the inside scoop on everything Gameloft.

What's New in Version 1.0.2

Coordinate ambushes in real time and overcome any challenge by talking directly to your friends during the fight! Voice chat and more amazing features are now available in the new N.O.V.A. 3 - Near Orbit Vanguard Alliance update!

VOICE CHAT (Available only on iPad 2, the new iPad, and iPhone 4S)
Communicate in real time with your teammates and employ devastating tactics using the new Voice Chat feature!

NEW MULTIPLAYER MAP
The Warehouse map is now available in Multiplayer mode. This exciting new map offers a great mix of close- and long-range combat opportunities for maximum fun. Take advantage of the rooftops and control the battlefield with your jetpack! Return to San Francisco and fight your way through the courtyard.

NEW MULTIPLAYER MODE
Tread carefully in Team InstaGib mode, as you and your enemies all have the same weapon, and even a single hit means instant death!

Screenshots

iPhone Screenshot 1
iPhone Screenshot 2
iPhone Screenshot 3
iPhone Screenshot 4
iPhone Screenshot 5



반응형
반응형

Chrome Dev Tools: Markup and Style

브라우저, 개발자 도구, 스타일가이드

http://net.tutsplus.com/tutorials/tools-and-tips/chrome-dev-tools-markup-and-style/


Browser Developer Tools

Before digging into Chrome’s developer tools, I want to give you just a brief look at the development tools provided by the major browsers. Note that this isn’t a comprehensive look at these tools and their features, but I do provide basic information for each tool.

Chrome Developer Tools

You can use the developer tools within Chrome, Chrome Canary and even Chromium.

Safari WebKit Inspector

Safari uses code from the Web Inspector repository; however, you may find that it’s not updated as often as Chrome.

Firefox Developer Tools

Firefox now comes with its own set of developer tools which has a nice focus on the visual side of things. For those who are used to Firebug, that’s still available as an add-on.

Internet Explorer Developer Tools

Opera Dragonfly

Getting Started

Note: this tutorial uses the Canary build of Chrome. Therefore, some features covered in this article may or may not be available in the beta or stable releases.

Before taking a look at the contents of the Elements panel, let’s take some time to understand the little controls near the top and bottom. Please refer to the numbered list below the following image that explains the different UI elements in the tool window.

  1. Close Developer Tools.
  2. Buttons to select different tool panels (Elements is currently selected).
  3. A custom tool installed by a third-party extention (PageSpeed).
  4. Change the layout of the developer tools.
  5. Show the console (will be covered in a different tutorial).
  6. Select an element in the tool by clicking on it in the page.
  7. JavaScript errors in the page.
  8. Open the settings screen overlay.

It’s good to choose a layout you are comfortable with. Click once on the bottom-left corner and notice how the developer tools pane detaches itself from the main window–perfect for multi-monitor setups. Clicking and holding on the bottom left icon allows you dock to the right, like this:


Elements Panel

The Elements panel lists the page’s markup as it is rendered in the browser. Any change made to the DOM via JavaScript is reflected in the elements found in this panel.

Let’s get familiar with this panel. As before, refer to the list items below the following screenshot that identify the different parts of the Elements panel.

The power given to us by the dev tools is nothing short than amazing.

  1. The elements as rendered within the document.
  2. The arrow indicates that the element has children. The position of the arrow signifies whether the element is collapsed or expanded.
  3. Elemental breadcrumbs starting with the document element (<html/>) and ending with the currently selected element. Hovering over each crumb highlights the respective element in the browser window.
  4. A movable divider to separate the elements list from the style information.
  5. Togglable panes that contain styling (and more) information.
  6. Computed Styles show the styling information the browser calculated for the selected element.
  7. Shows you the styles inherited from the browser’s default styles that are applied to the selected element.
  8. Show you user added styles, such as: styles retrieved from the page’s corresponding styles.css file, styles added via JavaScript, and styles added via the developer tools.
  9. The “New style rule” button. It creates a new style rule for the selected element.
  10. Toggle Element State lets you trigger user initiated states such as :hover (the user hovering over something with their mouse, :active, and more. The image shows the button in its “on” state; it is off by default.
  11. The font section displays only the fonts that the browser has had to download.

  12. Allows you to set the preferred format for color values. You can keep the default (“as authored”), change everything to hex, use RGB, or even set it to HSL.
  13. Visualizes the element’s box by taking margin, border, and padding into account.

Extra Information

  • What: The Elements panel allows for viewing and editing elements and style information.
  • Where: It’s the first panel. You can also access it by right-clicking an element on the page and selecting Inspect element.
  • Why: There are a number of use cases. You may wish to modify the DOM by deleting a node or adding a new one. Markup aside, the elements panel is a great place to see the applied styles of a specific node. You can also add and remove styles, as well as create new rules to possibly add to your stylesheets.

DOM Modifications

Modifying the DOM within the Elements panel is a fairly straightforward process. To delete a node, simply right-click it and select Delete node. As you might expect, deleting a parent node also deletes its children. Handy tip: You can also press the delete key on your keyboard to delete the selected node.

Changing an element’s type is possible by double clicking on the element name itself. For example: the p portion on a paragraph tag. Naturally, changing an element from one type to another causes both the opening and closing tags to change.

renaming an element

Viewing the page’s resources is essential for debugging.

Adding attributes can be achieved by right-clicking on the element and selecting Add attribute. The cursor immediately positions itself where you would expect it to, and you can start typing the attributes you want to add to the element. For example: class="title". Pressing the tab key on your keyboard positions the cursor to the next attribute position.

Editing attributes is similar to adding them. Find the attribute you want to edit, and double click either the attribute name or its value. The former highlights the attribute name, and the latter highlights the value.

Raw HTML editing is enabled by right-clicking on an element and selecting Edit as HTML.

Locating Elements

The developer tools provide a few useful techniquies for locating elements in the document. Hovering over elements in the Elements pane causes the corresponding rendered elements to be highlighted in the page. This is a great way to find which element in developer tools matches corresponds with the element in the page.

Hovering over elements in the panel to locate them on the page

Naturally, we do not see elements outside of the browser’s viewport highlighted when hovering over the corresponding elements in the Elements pane. Fortunately, we do see a tooltip indicating the direction of the out-of-viewport element. The icing on the cake, however, is the Scroll into view feature found within an element’s context menu. It does exactly what its says: it scrolls the element into view.

Scrolling an element into view

The developer tools also has a search feature. While the dev tools pane has focus, press Control + f to open the search box. This is a simple text search box; so, typing “body” will find the first instance of the text “body” in the document.

Viewing Style Information

Before we get to the style panes (the right hand side) of the Elements tab, we can access some style information directly from an element if it has all three of margins, paddings and borders specified in the stylesheet. Hovering over one of these elements gives us a glimpse at its box model, like this:

result of hovering over an element

When you’re wondering why some floated elements are not behaving as expected, viewing the margin/padding information can help diagnose the problem. For example, you may find that an element is wider than what you expected due to extra padding.

While on the subject of margins/paddings/borders, let’s shift over to the styles area of the Elements panel and check out the “Metrics” pane.

the metrics pane

This allows you to drill-down and identify possible problems as to why an element renders the way it does. It’s also a great learning tool; if you haven’t gotten your head around the CSS Box Model, then the Metrics diagram is a great visual aid.

The Metrics pane lets you view element dimensions, padding, borders and margins. Notice how you can highlight over each individual portion to get a visual representation as to how it renders in the browser. The Metrics diagram also gives pixel based measurements for each portion of the element, e.g. a style rule of padding: 10px 5px (10px at the top and bottom, 5px right and left) will show the exact measurements for each side of the element.

Setting Style Information

Viewing style information is fun, but immediately tinkering with any page’s style ranks much higher on the ‘ol fun meter. Whether it’s to educate ourselves, experiment with a design, or even communicate ideas to our peers, the power given to us by the dev tools is nothing short than amazing.

Ensure the Styles panel is expanded and click just to the right of the opening curly bracket. You’ll notice a cursor automatically positions itself so that you can write a style property. Type a property name, press tab to move the cursor to the value portion, and type the value. I’m going to add the following CSS:

border: 1px solid green

The Elements panel lists the page’s markup as it is rendered in the browser.

When you start typing in the property name, Chrome provides suggestions, giving you the benefit of auto-completion. Awesome! Pressing tab selects the closest match to what you typed and moves the cursor to the value position. However, pressing the right arrow key causes the cursor to remain in the property portion but fills in the closest match to what you typed.

Auto-completion also works with property values. For example, typing in “pos” *tab* “fi” *tab* creates a style property of position: fixed. When entering pixel/percentage based values, such as 15% or 10px, we can increment and decrement those values using the up and down arrow keys. To increment by 10, use shift + up arrow key.

Modifying color values is a breeze thanks to the color picker. After entering a color value, single-click on the small, colored square to the left of the value to bring up the color picker tool. You can also toggle between color value formats by shift+clicking the small colored square.

You can create a new style rule by clicking the small + icon in the styles pane. Markup which looks like:

<h1 id="something">Hello</h1>

Automatically generates the following style rule:

#something { }

Markup which looks like:

<h1 class="some-class">Hello</h1>

Automatically generates the following:

.some-class { }

Markup which looks like:

<h1>Hello</h1>

Generates:

.h1 { }

Markup which looks like:

<h1 class="class1 class2 class3">Hi there</h1>

Automatically generates:

.class1.class2.class3 { }

Of course, style rules can be modified to your liking.

The Elements panel gives you a lot of power with the structure and style of the page, but the dev tools give us many more tools essential to our work.


Resources Panel

The Resources panel shows what resources a page uses. Let’s take a look at what it provides.

The Metrics pane lets you view element dimensions, padding, borders and margins.

  1. The button to active the Resources panel.
  2. The category pane shows the various types of resources we can inspect. A resource header (such as “Frames” or “Session Storage”) may have an error next to it. This indicates there is more information, and clicking on the header reveals that information. This pane is resizable; so make it as large or small as you like.
  3. Page resources including fonts, images, JavaScript, CSS and the page itself can be found here. If the page uses multiple frames (for example using a frameset), then each frame appears as a separate folder within the parent “Frames” folder. This is useful for understanding the relationship between a frame and its resources.
  4. If Web SQL databases are used in the page, this shows their contents.
  5. Similar to Web SQL, IndexedDB displays the contents of the IndexedDB database.
  6. Displays the key/value pairs stored in localStorage.
  7. Displays the key/value pairs stored in sessionStorage.
  8. Lists the cookies created by the domain.
  9. Displays the assets cached according to the cache manifest. This section contains a lot of useful information. For example, a resource such as a JavaScript library will show the resource path, file size, and file type.
  10. Displays the details regarding the selected resource in the left-hand pane.

Extra Information

The developer tools also has a search feature.

  • What: The resources panel shows resources associated with the page.
  • Where: The second panel, directly after the Elements panel and before the Network panel.
  • Why: Viewing the page’s resources is essential for debugging. You might also be curious as to what information other websites store in localStorage, cookies, or any other data storage mechanism. Additionally, certain resources, such as localStorage can be modified via the developer tools.

Viewing Individual Frame Contents

Despite the lack of frames usage in today’s web sites, understanding how to inspect a page with multiple frames is a valuable skill to have. In the following screenshot, you’ll notice a columned page where each column represents a different frame:

viewing multiple frames

You can save a resource to your computer

Each frame is placed inside its own folder. Each folder contains each page's assets, and you can click on each page to show their contents. Viewing the contents of an HTML page is helpful, but we can go dig deeper into each page and view its resources. JavaScript, CSS, images, and even fonts can be viewed! Assets that contain code are displayed in the developer tools' code viewer, which comes with syntax highlighting and line numbers.

Fonts

It's important to note that system fonts, such as Arial or Helvetica, are not listed under Fonts; the font section displays only the fonts that the browser has had to download.

Viewing the fonts of a page

The font scales so that it can fit within the resource content area; therefore, resizing the resource content area also resizes the asset!

Images

It's clear that some thought went into the image viewing UI.

Images within a page from the resources panel

The developer tools displays the image in the content area, and the image scales according to the content area's size. Images with transparency (like the one in the above screenshot) are shown with a checkerboard in the background, making it easier to view the image. Other useful information, such as the dimensions, file size, and MIME type are displayed below the image.

Scripts

The JavaScript! Clicking a script file displays its contents, but not much else.

JavaScript that a page has loaded

But don't despair; viewing assets is simply that: viewing assets. In a future tutorial, we'll look at the dev tools' JavaScript support and capabilities.

Stylesheets

You can view the different stylesheets that the browser loaded for the web page.

Stylesheets from Chrome dev tools

As with JavaScript files, you cannot do much with the stylesheet assets.

Resources that Failed to Load

Occasionally, the browser will be unable to load a particular resource due to network issues or developer error.

A resource which has not been found

When this happens, a small red notification appears to the right of the asset. The number states how many errors occurred, and the content pane provides more details about the error.

Saving and Viewing Resources

Each resource has a context menu; simply right-clicking on a resource shows a menu similar to this:

the context menu shown for assets

You can save a resource to your computer, open a resource in a new tab, and perform many other tasks. Double-clicking the resource opens the asset in a new tab.

Cookies

As I previously mentioned, you can view cookie information for a particular website. For example, navigating to Twitter while being signed in may present similar information to what is shown in this screenshot:

viewing the cookies on a page

Here, we see:

When you’re wondering why some floated elements are not behaving as expected, viewing the margin/padding information can help diagnose the problem.

  • Name - the name of the cookie. For example, there's a name with "remember_checked" which has a value of 1. This is likely to state whether the user has checked a "Remember me" checkbox during the sign in process.
  • Value - the value of the cookie. For the "_twitter_sess" named cookie, there's a long encrypted session ID for the value.
  • Domain - the cookie's domain. .twitter.com allows for any sub-domain on twitter.com.
  • Path - similar to domain, the path field states valid paths. "/" allows for all paths.
  • Expires - the date the browser delete the cookie.
  • Size - the size of the cookie in bytes.
  • HTTP - force the cookie to only be accessed via the HTTP protocol. This prevents accessing of cookies via JavaScript and can help combat cookie stealing through cross site scripting.
  • Secure - instructs the browser to communicate cookie data only through encrypted connections such as HTTPS

You can delete a cookie by right-clicking on a cookie and selecting Delete from the context menu.

It's interesting to note how browsers use cookie information to determine whether you are an authenticated user. While logged in to Twitter, deleting the "auth_token" and "_twitter_sess" cookies prompts us to login after refreshing the page. Twitter likely stores our logged in status and other bits of sensitive information in those cookies.

Local Storage

Storing and viewing key/value pairs in localStorage is rather easy. Rather than storing our own keys, we'll use an existing website as an example. The following screenshot shows the local storage view of a Kitchen Sink Example App made with the mobile web application framework Sencha Touch.

Viewing the local storage on a page

When first viewing the page, the browser makes a request for a CSS file. Refreshing the page feels a lot snappier because Sencha stored the CSS in local storage. The kitchen sink app has some interesting key/value pairs. For example, one key looks like this:

3a867610-670a-11e1-a90e-4318029d18bb-http://dev.sencha.com/deploy/touch/examples/production/kitchensink/resources/css/app.css

The value for that key begins with this:

/*45e6f4ffe818855b26f3dcbfc156025eca58e4f5*/code,pre,pre *{font-family:Menlo,Monaco,Courier,monospace}

Steve Souders wrote about storing assets in local storage; it's an interesting and exciting use of local storage which can improve performance--especially on mobile devices.

Application Cache

The application cache tells the browser which resources it should cache, and the Application Cache category lets us view what has been cached.

the application cache view in the resources panel

There are three columns with this view:

  • Resource - the full path of the resource. File extensions are typically assets and HTML files. One of the resources is the manifest file itself!
  • Type - can vary. The "Manifest" type is a unique type given to the manifest file itself. Another type is explicit: resources that are explicitly defined in the manifest file. The type of fallback indicates a resource that acts as a fallback for another resource. The Master type is the resource which initiated the cache: the page itself.
  • Size - the size of the resource in kilobytes or bytes.

See this tutorial if you're not familiar with HTML5 application cache.



반응형
반응형

10 Best jQuery Google Maps Plugins

구글지도 플러그인

http://designreflect.com/10-best-jquery-google-maps-plugins/


Most of the users on the internet use Google Maps whenever they need to find a location of a certain place. Google Maps is easy to use so it is widely used among internet users. These days it is common to see Google Maps embedded into the websites. People embed Maps to their websites so that their visitors can easily find their location to contact them.

Some premium WordPress theme developers have also started providing the options to embed Google maps by default into their themes. You might have already seen maps embedded into other websites and might be wondering how to embed these maps into your website as well. It seems a complex task at first but using these jQuery plugins you can easily accomplish this task yourself. All these plugins have proper documentation to help you out.

If you want to embed Google maps to your website, here are 10 Best jQuery Google Maps Plugins for you.

gMap – Google Maps Plugin for jQuery

More About gMap – Google Maps Plugin for jQuery

bMap – jQuery Google Maps Plugin

More About bMap – jQuery Google Maps Plugin

jQuery GPS

More About jQuery GPS

Google Maps the jQuery Plugin Way

More About Google Maps the jQuery Plugin Way

jQuery UI Map

More About jQuery UI Map

Google Maps jQuery Plugin

More About Google Maps jQuery Plugin

Googlemaps

More About Googlemaps

Mapbox – Zoomable jQuery Map Plugin

More About Mapbox

gMap3 – jQuery Plugin for Google Maps

More About gMap3

goMap

More About goMap

반응형

+ Recent posts