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

How to Load Data from TXT Files

Question: How do I pick up useful data from a TXT file and insert it into a database? Answer: You can tackle this problem two ways. If your data follows

Running an Image Viewer in a Window

Question: How can I run an image viewer in a window portion of a form in Visual FoxPro alongside a scrolling list box? Answer: Here is how to create a

Allocating Multidimensional Arrays

Question: I have two questions about arrays. I have a 2D array of floats. I want to init everything with 0.0f. There must be a better way than going through

Menus Using Virtual Functions

Question: What is giving me a redefinition of CMenuItems class error in this code? //cmenu.hclass CMenuItem { public: char title[81]; virtual void Do_Command(void)=0;};//*********************//CMDS.CPP Defines and initializes menu commands.#include #include #include

The MBListEx ActiveX control

This extended ListBox control adds many features that are missing in the standard VB control, such as support for bitmaps, control on the height, forecolor, backcolor, and font of individual

Convert a color value to a gray scale

When you have a 32-bit color value, you can convert it to a grey-scale – that is, you can determine how it would appear on a monochromatic display (more or

Quickly create a copy of an ADO Recordset

When you want to process the data in a Recordset without affecting the actual values in the database, often the Clone method isn’t what you need. For example, if you

Extract Red,Green,Blue components of a color

If you have a 32-bit color value in RGB format, you can extract its Red, Green and Blue components using the following routines: Function GetRed(ByVal lColor As Long) As Long

Provide Default Values for Applet Parameters

You can customize your applets by providing parameters at runtime in . But it is a good practice to always provide default values, when specific values for parameters are not

Generate Random Numbers in Java

You can generate Random numbers in Java using the Random class available in java.util package. The following is a code which generates Random numbers between 0 and 100: import java.util.Random

Give Focus to a User-Select HTML Control in VID 6

Although the Scripting Object Model (SOM) in Visual InterDev 6 makes for quick development, it doesn’t cover all the functionality that you need. For example, in Visual Basic it is

Passing Primitive Data by Reference

Primitive datatypes in Java are always a passby value. You can pass them by reference, by wrapping the data in to single element array. Here is the code (Tested on

Prevent Default Value Selections in a List Box

A pretty typical scenario is a drop-down list box with a standard default selection that instructs the user to choose an option. It is enclosed in tags, which the user

GET and POST Requests

Question: How does a servlet handle GET and POST requests? Answer: The HttpServlet abstract class, defined in the javax.servlet.httppackage, contains several methods that simplify interacting with HTTPrequests. Two of the

ResultSet Positioning

Question: How can I access the next and previous rows in a ResultSet when Iconnect to a database through a JDBC driver? Answer: The JDBC 1.0 API only allows you

Multiselect Drop-down Box

Question: I need to have a drop-down box (combo probably) which allows multiple selections. The list box does this but there is no room to have the number of list

ADO and Large Tables

Question: I have several MS Access97 database tables that are larger than 120 MB. When I use ADO to open the entire table it seems to try to load the

Dumping Tables

Question: Using JDBC, how can I turn a database table into a series of SQL INSERT statements that can recreate the table? Answer: Dumping a database table into a set

JDBCTest ClassNotFoundException

Question: I’m trying to test the JDBC-ODBC bridge with JDBCTest tool and itgives me the following error: registerDriver() Failed:java.lang.ClassNotFoundException: sun/jdbc/odbc/JdbcOdbcDriver What’s the problem? Answer: It looks like the jar file

Enumerate Flags for Easier Coding

If you do a lot of work with the Windows API, you might notice that some API functions have flag-type parameters, and you usually pass API constants as the values

Add Option/Checkbox Toggle Capability in VB4/32

VB5 introduced a Style property of the checkbox or option button, with a graphical setting that makes the button or checkbox appear to be a command button instead of its

Prevent Reposting of Forms in VID 6

By clicking the browser’s refresh button, users often add unwanted records into your database. If you are using the Scripting Object Model (SOM) in Visual InterDev 6, you can thwart

Break Out of Frames

Question: What is the correct syntax for forcing a page to break out of a frameset that might call it? Answer: The way to make sure that your document isn’t

Variable Returning Matches in a Select Query

Question: What is the variable that returns the number of matches in a select query? I thought I’d seen a reference to a variable (something like “_COUNT”) but now I

Place JavaScript In Separate Files

Question: I want to create a library of generic JavaScript functions. Is it possible to write different functions in different files, and use the functions within other files by “including”