background preloader

Javascript Cheat Sheet

Javascript Cheat Sheet

OverAPI.com | Collecting all the cheat sheets 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.

2 Learning HTML Learning HTML Are you ready to learn HTML? This tutorial will give you an understanding of the basics of HTML so that you can make your very own web page. Lessons: Extra Stuff: Quick Reference of tags covered in this tutorial. This resource originally created by Deborah Dunk.

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.

Android HTTP Access Android HTTP Access - Tutorial Copyright © 2010, 2011, 2012 Lars Vogel Performing HTTP operations with Android This article describes how to access web resources via HTTP in Android. It is based on Eclipse 3.7, Java 1.6 and Android 4.0 (Ice Cream Sandwich). 1. Android contains the standard Java network java.net package which can be used to access network resources. The base class for HTTP network access in the java.net package is the HttpURLConnection class. The preferred way of accessing the Internet according to Google is the HttpURLConnection class, as Google is focusing their efforts on improving this implementation. 1.2. To access the Internet your application requires the android.permission.INTERNET permission. To check the network state your application requires the android.permission.ACCESS_NETWORK_STATE permission. Within an Android application you should avoid performing long running operations on the user interface thread. StrictMode.ThreadPolicy policy = new StrictMode. 4. Tip 6.

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.

Related: