background preloader

Javascript Cheat Sheet

Javascript Cheat Sheet

8 free sites that teach you how to program Developed in 2011, the main focus of Code Academy is to teach you how to code so that you can transform your career. It features a number of success stories from individuals who knew little to nothing about coding and went on to have fruitful careers as programmers. Code Academy covers a lot of ground, including how to make interactive websites. The courses on Code Academy are free and it has become a well-known and respected resource for anyone yearning to learn how to code. Associative arrays, looping, and JScript.NET Objects as Associative Arrays As you may know, the dot (.) operator can be used to access the [] operator used with arrays. The important thing to notice is that in the object syntax the property is an identifier, whereas in the array syntax, it's a string. The obvious benefits of using an array syntax to access an object is because of the literal data type, you can easily concat strings and play around with them to access an object. For this to work with the standard syntax, an eval() would need to be used. How do I loop through properties in an object? You need to use a for/in loop. What about JScript.NET? Once you have mastered JScript, you will find it easy to move over to .NET As the .NET compiler will compile your code into the IL (Intermediate Language) you have the same power to create fully fledged applications as a C# programmer. If you are making complicated Interfaces and such, there is no automatic recognition for this. You may now explicitly set the data type for a variable.

OverAPI.com | Collecting all the cheat sheets JavaScript and Object Oriented Programming (OOP) JavaScript and Object Oriented Programming (OOP) Credits: This tutorial is written and contributed by Tim Scarfe. Edited by JavaScriptKit.com for content/ structure. Please see footnote for more information on author. JavaScript is an excellent language to write object oriented web applications. What's so great about objects? Objects work so well because they act just like real life objects- objects have properties and methods. JavaScript gives you the ability to make your own objects for your own applications. Creating objects using new Object() There are several ways to create objects in JavaScript, and all of them have their place. We define a custom object "person," then add to it its own properties and method afterwards. Creating objects using Literal Notation Another inline way of defining an object is via literal notation.

The Big Android Dictionary: A Glossary of Terms You Should Know The Big Android Dictionary: A Glossary of Terms You Should Know Android comprises an entire ecosystem of apps, games, functions, and features, so it would only make sense that it has its own lexicon. Words, phrases, and acronyms that didn't exist 7 years ago are now used in an off-the-cuff style by developers and support technicians across the web. As the platform matures, this list of unique Android words continues to evolve, which makes it hard to stay on top of the latest terminology. But breaking things down into simple terms is what we do best here at Gadget Hacks, so below, we'll cover all of the latest Android lingo in layman's terms. Hint: If you're looking to define a specific term, use the "Find" function in your browser (Ctrl + F or Command + F) to jump right to it. Activity A screen or menu within an app that can be called on specifically. Short for Android Debug Bridge. Also see: Our full guide for installing ADB on any computer Android Short for Android Open Source Project. App

JavaScript Guide - JavaScript The JavaScript Guide shows you how to use JavaScript and gives an overview of the language. If you need exhaustive information about a language feature, have a look at the JavaScript reference. This Guide is divided into the following chapters. Introduction Grammar and types Control flow and error handling Loops and iteration Functions Expressions and operators Numbers and dates Text formatting Indexed collections Keyed collections Working with objects Details of the object model Promises Iterators and generators

Form Design For Dummies: 10 Simple Tips On Designing A Form That Converts | Outside The Jar Web forms have become an integral part of most websites and the internet in general. Their primary purpose is to help both users and businesses achieve their separate goals by establishing a relationship or initiating a conversation between the two. Registration forms are what allows people to become members of online communities or services. Think of Facebook – their 1 billion+ users all joined through a registration form;Checkout forms allow transactions to happen through the web. Subscribing to a paid service and people purchasing products are a couple of examples which happen through a checkout form;Data submission forms are how people share knowledge, post information and communicate online. Even with their extensive importance online, it is surprisingly common to come across very poorly made forms – which is a shame. First off, let’s explore what elements a form is made up of and some best practices. Labels Input fields Input fields are what allow your users to fill in your form.

Forms: The Complete Guide–Part 2 Forms are one of the most important parts of any site or app—they are the most common way for our users to give us the information that we need to help them do what they want to do. But in many instances, we design forms statically, often as wireframes. But so often, what makes or breaks a form is what it’s like to interact with it. When the user clicks on a particular radio button, some additional inputs appear. How does that happen? Things like this are next to impossible to explore using static deliverables. This series does not try to explain what your form should contain, how the fields should be grouped and laid out, where to put primary and secondary buttons, and so on. No. In the first post in this series, I showed you how to lay out a form and align the labels the way you want, using HTML and Foundation. In this post, I’ll show you the different types of inputs available to you and how to use them. Input types There are several different HTML elements that are used in forms. Text

Implement Custom Gestures — Web Fundamentals Add Event Listeners Touch events and mouse events are implemented on most mobile browsers. The event names you need to implement are touchstart, touchmove, touchend and touchcancel. For some situations, you may find that you would like to support mouse interaction as well; which you can do with the mouse events: mousedown, mousemove, and mouseup. For Windows Touch devices, you need to support Pointer Events which are a new set of events. Touch, mouse and Pointer Events are the building blocks for adding new gestures into your application (see Touch, mouse and Pointer events). Include these event names in the addEventListener() method, along with the event’s callback function and a boolean.

Related: