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

Linker Optimizations

While most of the code optimizations are performed at compile time, there are optimizations that only a linker can perform. For example, it can detect unreferenced function calls. These are

Deleting a const Object

In earlier stages of C++, it was impossible to delete a const object, even if that object was constructed on the free store. This could cause memory leaks. However, the

Initializing a Bit Struct

To initialize a struct that contains bit fields, simply use the ={0}partial initialization list: int main(){ struct MP3_HEADER { unsigned Sync:11; unsigned Version:2; unsigned Layer:2; unsigned Protection:1; unsigned Bitrate:4; unsigned

Switch Statement

Question: Does Java have a switch statement that can use doubles and floats? Answer: The Java switch statement only supports values of type char, byte,short, or int. To conditionally execute

Efficiency of STL or Quality of Implementation?

I often hear people ask whether it’s possible to write code that is quicker than STL. This is a paradoxical question: the C++ Standard defines minimum performance requirements with which

Finding the Calling Procedure

Question: Often I place a Break Point in a Function or Procedure for Debugging purposes.How I can find the immediate calling procedure?Or, better how I can find all the previous

Access 97 vs. 2000 Databases

Question: I have a program in VB6 using an Access 97 database. The code I use for all my procedures is as follows: Dim db as DatabaseSet db = DBEngine.Workspaces(0).OpenDatabase(“biblio.mdb”,

Differences Between C++ and Java

Question: In C++, when a programmer intends to write: if (value == 1) { But, they often make the following mistake: if (value = 1) {…… Why doesn’t this problem

DSN-Less with ADO

Question: When I try to implement the code that is in MSDN, I receive Run-time error ‘446’ Object doesn’t support named arguments. Dim cn As New ADODB.ConnectionDim rs As New

Passing Command-Line Parameters

Question: I need to know how to pass a parameter from HTML to Standard EXE, and how to get these parameters in VB after you’ve passed them? Answer: Visual Basic

App Not Running on Other Machines

Question: After compiling my VB app, and installing it on my machine, it will run. But, when I install it on my professor’s machine at school, it doesn’t work at

Replace Function

Question: I just started with VB6 programming and I need to write a short program doing the following: 1. Enter a sentence.2. From this sentence which was entered, pick any

VB Class Module

Question: I have noticed that a termination event won’t be fired unless the class variable is out of scope, or I specifically set the class variable to Nothing (in earlier

Cube Root Function

Question: Would you please tell me the code in Visual Basic for a cube root function on a basic calculator. Answer: It’s very simple, you just have to raise a

ADO Provider Problem

Question: I created a program to help our sales department to keep track of their sale quotes. It uses a MDB database and I used the ADO components to gather

ADO & SQLServer Provider

Question: When opening an ADO connection, how do I specify that it use the SQL Server OLEDB provider with a DSN? Answer: Here’s the connection string you should use. Be

Random Pictures

Question: How would I get a different picture to pop up every 3 seconds in a different position? Answer: It’s pretty simple, actually: Make a form with an image/picturebox control

Image Storage in Access 97

Question: I have an Access 97 database with an OLE Type field containing bitmaps loaded with the LoadPicture() function. This works fine and the images turn up as “Bitmap Image”

Changing Label Caption of a Textbox

Question: I am an extreme newbie with VB. How do I change the caption of a label to the value of a textbox? Answer: Substitute the name of the Label

Accessing Online Databases

Question: I have been using Visual Basic to manipulate databases for some time now and I consider myself skilled at it. The next challenge presented is to establish a connection

Control Focus

Question: When a control has focus, is there some way to determine which control had focus just before it? Answer: Nope, there isn’t any way to do that. But, I

COM in IIS

Question: After I compile my DLL in VB and run the component through IIS, I cannot recompile the DLL and I get a file locking error. I am using VB6

Procedure Declaration Errors

Question: I get the folling error message when I try to run my code: Compile Error: Procedure declaration does not match description of event or procedure having the same name.

Retrieving Info From Listbox

Question: I have a listbox with some names loaded from a recordset, I have also associated the memberID with its associated name as in the following: lstMember.ItemData(lstMember.NewIndex)= rsMembers![MemberId]. I want

JFrame Look and Feel

Question: Is there any way I can make a JFrame look like JInternalFrame? It looks bad at runtime when you change the look-and-feel, but the mainframe doesn’t change. Answer: This

Arrays of Arrays

Question: Is it possible to have an array of character arrays? What about anarray of multidimensional character arrays? Answer: Java arrays are first-class objects. They can be referenced byObject reference

Failure to Resolve Name Remotely

Question: I am trying to get remote access to my e-mail account. Although I can dial in the domain successfully, when I start Outlook, I receive this error message: “Network

Exchange System Attendant Error Message

Question: I am running Exchange 5.5 with about 60 mailboxes. When I try to access the e-mail tab of a newly created mailbox I get the following error: an error