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

DevX - Software Development Resource

Suppress Trailing Zeros on Output

The format string “%f” in printf() call displays trailing zeros of its argument: float num = 1.33; printf( “%f”, num); // output: 1.330000 To get rid of the trailing zeros,

DevX - Software Development Resource

Absolute Layout Manager

Question: Do you know of any LayoutManager that would allow me to lay out components exactly where I want them, or any other way of doing so? Answer: There is

DevX - Software Development Resource

Converting IP Address Formats

Question: Is there a Java equivalent class or method for the Unix Internet address manipulation routines like inet_ntoa()? Answer: Java does not have direct analogs for the inet functions that

DevX - Software Development Resource

RMI method invocation

Question: I want my RMI server application to populate a java.awt.List with data on the client with a method invocation. What’s the best way to do this? Answer: When writing

DevX - Software Development Resource

JTable Headers

Question: I would like to add an icon to the header of a column of a JTable indicating the direction the column is currently sorted. Answer: It can be pretty

DevX - Software Development Resource

Installing Own Colormap

Question: How can I make my Java application install its own colormap? Answer: The ability to allow a Java application to install its own colormap is not supported by the

DevX - Software Development Resource

HTML File to Download CAB File

Question: I have a CAB file produced by Wise Installation System 7.0 that contains an application setup.exe. I need to create an HTML file that will download the CAB file.

DevX - Software Development Resource

Function Try Blocks

A function try block is a function whose body consists of a try block with its associated handlers (catch-statements). A function try block is probably most often used in a

DevX - Software Development Resource

Exception Specifications are Checked at Run Time

A function can specify explicitly what type of exception it may throw. An exception specification, however, is not checked at compile time, but rather at run time: class X {};int

DevX - Software Development Resource

Square Buttons in the JToolBar

When placing JButtons in the JToolBar, use gif icons that are 25 x 25 pixels. Then create a ToolButton class that sets the insets to zero so that the buttons

DevX - Software Development Resource

Alternative Java Coding Environment

For quick Java development, consider using MicroEdge’s Visual SlickEdit (http://www.slickedit.com) instead of an IDE. It recognizes and highlights Java keywords and inserts braces and indents code correctly. To make it

DevX - Software Development Resource

Alpha to Integer Conversion

C and C++ programmers are accustomed to using the atoi() function to convert strings to numeric integer values. Although Java doesn’t have an atoi() method, it provides the same capability

DevX - Software Development Resource

Finalization and Cleanup

Although Java does not provide a destructor as in C++, you can use an overridden finalize() method for similar purposes. The overridden finalize() method is invoked on an object before

DevX - Software Development Resource

Constants in Java

Even though Java does not have a constant type, you can achieve the same effect by declaring and initializing variables that are static, public, and final. After the variables have

DevX - Software Development Resource

Interoperable Dates and Times in SQL Queries

Many developers using ODBC, JDBC, OLE DB, and ADO are unaware that there is a standards-compliant solution for expressing dates, times, and timestamps in SQL statements. When writing queries in

DevX - Software Development Resource

ODBC and JDBC Compliance

“ODBC-compliant database” and “JDBC-compliant database” are nonsequiturs. ODBC and JDBC clients can connect to databases that store behavior in the form of methods, triggers, constraints, and stored procedures. The ODBC

DevX - Software Development Resource

Starting NT Services for SQL Databases

The Windows NT installation process for SQL servers from Oracle, Microsoft, IBM, Sybase, and Informix installs NT services. Not all products include a graphical tool that enables you to start

DevX - Software Development Resource

Make HTML File Management Easier

This tip works equally well in both the Windows NT and Windows 95 browsers, and makes managing HTML files a bit easier by adding some file-type specific menu items to

DevX - Software Development Resource

Namespaces do not Incur Additional Overhead

Namespaces do not incur runtime or memory overhead. The technique used to represent namespaces is called name mangling. This same technique is used to create unique names for overloaded functions

DevX - Software Development Resource

Put an Ampersand (&) in a Menu or Command Button

When creating menus and command buttons, use the ampersand symbol to create a shortcut key for that option. For example, you might use “&Cancel” for a command button with a

DevX - Software Development Resource

Place a Variable-Length String in Text

VB doesn’t have a function to replace part of a string (of n-length) with another string (of x-length). The Mid() statement works only with target and replacement strings of the

DevX - Software Development Resource

Add Columns to a Standard VB List Box

Use the Win32 API to set tab stops in a Visual Basic list box by creating these declarations and routine in a module: Public Const LB_SETTABSTOPS = &H192Declare Function SendMessage

DevX - Software Development Resource

Force Uppercase Characters in a Text Box

To change text in a text box to uppercase as soon as the user types it in, use this code: Private Sub txtname_KeyPress(KeyAscii As Integer) ‘Puts in uppercase as soon

DevX - Software Development Resource

Register ActiveX Components Manually

Not all ActiveX DLL and OCX files include installation programs to properly register the control. You need to run REGSVR32.EXE manually to perform the registration. You can save time by

DevX - Software Development Resource

Destroying Collections’ Items

Many programmers mistakenly believe they can remove all the items from a collection by setting the collection itself to Nothing: Dim children as New Collection…Set children = Nothing This technique

DevX - Software Development Resource

Invalid File Pointer, Exception EAccess Violation

Question: I have developed an application in Delphi 3.0 Client/Server Suite. It reads and validates records from an Access 95 database and then writes to AS400. The software processes 606

DevX - Software Development Resource

Win API

Question: Is there a way under Delphi 3 and 4 to determine if a previous instance of the application is already running? Answer: Yes, there is a way to determine