devxlogo

We are an award-winning tech entrepreneurship website where trusted experts can provide value globally.

Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.

devxlogo

Trusted for 26 years

Over 30K Articles

1M+ Readers

Expert-reviewed

10K+ Tech Terms

As seen in:

microsoft logo
business_insider_logo
wired_logo
berkley
arstechnica_logo
hackernoon

The Latest

Making an Alert Pop Up With a Message

Question: How do I make an alert that pops up and says “this site best viewed with IE4 at 1024 x 768”? Answer: Making such a popup is easy. Just

You Cannot Change the Title of an Alert Box

Question: How can I change the title of a JavaScript alert box from “www.www.www (JavaScript Application)” to whatever I want? Answer: Simple?you can’t. Unfortunately, JavaScript coders don’t have any control

Internationalizing Currency Value Displays

As with dates, different countries and regions use different symbols and formats when displaying currency values. Java 1.1 provides a simple facility for displaying a currency value in a manner

The qq Function for Long Strings in Perl

If you write CGI programs in Perl, you probably find yourself using a lot of long print statements for outputting HTML. HTML uses a lot of double quotes, so it’s

Assigning the Size of an Array at Run Time

When delaring an array of primitive types in C and C++, you have to assign a constant for the array size. Since Java treats arrays as objects, the size of

Generating a Series of Unique Colors

Graphs, charts, and maps often use color to help the user tell data points apart. For instance, a line graph comparing processor benchmarks might show the Motorola processor in red,

URL Redirection With Perl

Once your Perl CGI program has run and you’re ready to display the results, you have a couple of choices. If the results are dynamic and different for every user,

Layers or DIVs?

The world of DHTML is a chaotic one right now. Netscape Navigator 4.x and Internet Explorer 4.x have sufficiently different implementations of the Document Object Model (DOM) that cross-browser DHTML

Use MouseMove for Easy StatusBar Updates

You can easily make your program show descriptive text on a StatusBar control in response to mouse movement. Assign the text to the appropriate panel in the MouseMove events of

Easy Confirmation

Sometimes you want to give your users the chance to confirm that they wish to proceed with the closure of a form. Instead of using a MsgBox function and a

Show Data With Outlook Grid

You can easily create a calendar grid similar to the one in Outlook to show data. First, start a VB project, then place an MSFlex Grid on the form, with

Provide a Horizontal Scroll Event for a Listbox

Subclassing a listbox allows you to monitor horizontal scrolling. To subclass a listbox, you store the original WndProc in the UserData area of the listbox, allowing a single replacement of

Base Class Constructor With Arguments

When a constructor has to pass arguments to its base class constructor or to an embedded object, you must use a mem-initializer: class base {private: int num1; char * text;public:

Pseudo Destructors

Fundamental types have a pseudo destructor. A pseudo destructor is a syntactic construct whose sole purpose is to satisfy the need of generic algorithms and containers. It is a no-op

Exception Type Match

When an exception is thrown, the exception handling mechanism searches for a matching handler for it. The matching rules for exceptions are more restrictive than the matching rules for function

Overloaded Operators May Not Have Default Parameters

Unlike ordinary functions, overloaded operators cannot declare a parameter with a default value (overloaded operator() is the only exception): class Date{ private: int day, month, year; public: Date & operator

Including Boilerplate Text

If you have header or footer material which appears on every page in your site, such as navigation or copyright information, it makes sense to store it centrally and use

Selecting an Item From a JComboBox…Again

The default behavior of the JComboBox is sufficient enough in most cases. If you select an item from the pull down list, an action event is generated and sent to

Qualifying an Element of Priority Queue

The Standard Template Library defines a specialized form of the queue container called priority_queue. A priority_queue is a queue whose elements are internally sorted according to their priority. Thus, an

Using the EventObject Class

The EventObject class is the base class for transferring events in Java (see Tip “Understanding the Listener Pattern”). It provides these methods: public EventObject (Object source) // Constructor. The “source”

Show a Random Image

A bit of randomness can help keep your Web site from getting stale. You can use the JavaScript rand() function to display random text or a random image. function goRand()

Unconsting a const Variable

There are two types of const data storage: true const and contractual const. const int cn = 5; // true const A contractual const variable is a non-const one, which