devxlogo

Tip Bank

Two-Dimensional Arrays in JavaScript

Technically, JavaScript doesn’t support multi-dimensional arrays, but you can simulate a two-dimensional array by creating an array of arrays. This can be particularly useful if you want to create a

Inheriting From the Object Class

The Object class in Java is a superclass for all other classes defined in Java’s class libraries, as well as for user-defined Java classes. In object-oriented terms, an object is

Detecting Your Machine’s Endian

The term endian refers to the way a computer architecture stores the bytes of a multi-byte number in memory. If bytes at lower addresses have lower significance (Intel microprocessors, for

Initializing a Union

It is possible to initialize a union. Yet, unlike struct initialization, the initialization list of a union must contain a single initializer that refers to the first member in the

Collision Detection in DHTML

Collision detection is a fundamental part of game programming. It is also useful for many other aspects of user interface design. Being able to tell if one screen object has

Spawning New Processes From a Java Program

The Java Runtime Environment (JRE) shields Java developers from the system level burdens of starting and stopping processes. A Java application runs inside the JVM, while a Java applet runs

Detecting the Browser Window Size With DHTML

Some users always maximize their browser window, while others like to keep it small. Not knowing the size of the client window can cause formatting problems for HTML pages; tables