
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.
In Java, you can use either a Vector or a one-dimensional array to store an ordered collection of objects. The difference between the two types of storage is that the
An exception specification is not considered part of the type of a function. Therefore, you cannot declare two distinct functions that differ only in their exception specification: void f(int) throw
Redirecting based on browser type is easy. If you use a JavaScript function to check navigator.userAgent for the string
When testing properties and methods of an object that you’re writing, you don’t have to run a test project or form to test it. Instead, open the Immediate window and
In the latest tips supplement [“101 Tech Tips for VB Developers,” Supplement to the February 1998 issue of VBPJ], I noticed a tip titled “Determine Next/Previous Weekday.” This code is
VB doesn’t display the Min and Max buttons in a form’s caption area when you specify BorderStyle Fixed Dialog. If you set the MinButton and MaxButton properties on the form
This VBA Microsoft Word routine purges a document when it’s opened after a predefined expiration date. I’ve only tested this macro with Word 97: Sub Purge() Dim ExpirationDate As Date
Unlike other forms, MDI forms don’t have MinButton and MaxButton properties to enable or disable the form’s Minimize and Maximize buttons. If you add this code to an MDI parent
Although Java borrows a lot of concepts and syntax from C++, it also leaves out some of C++’s main features to meet its goal of simplicity. For example, Java excluded
You can safely bind a reference to a temporary object. The temporary object to which you bind the reference persists for the lifetime of the reference. class C { int
Although you can’t add tooltips to links in Netscape Navigator, you can easily add them in Microsoft Internet Explorer. All you have to do is add a TITLE attribute to
The Standard Template Library provides the specialization vector. The specialization is implemented in a way that squeezes each element into a single bit, rather than a bool variable. When a
The simple BetterNow() function, shown here, replaces the built-in Now() function. It’s faster (10 microseconds vs. 180 microseconds on a Pentium 166MMX) and more accurate, potentially supplying one-millisecond resolution, instead
Anonymous classes in Java are defined inside another class (i.e., they are inner classes), do not have a name, and are defined inside a Java expression such as an assignment
Adding this code to a form causes it to tile the image stored in Picture1 across the entire form whenever the form requires a refresh: Private Sub Form_Load() With Picture1
Have you ever wanted to add nodes to a TreeView control using a full path instead of adding a node at a time? You can do it with this code:
The member function capacity() returns the total number of elements that a vector can hold without requiring reallocation: #include #include using namespace std;void main() { vector vi; vi.reserve(10); //make room
Java provides a convenient function for detecting whether a character is alphanumeric (1-26 and 0-9) or not. This function is available in the class Character. Some of the other related
When a container has exhausted its free storage and additional elements have to be inserted to it, the container re-allocates itself. First, a new memory buffer large enough to store
If Microsoft Outlook is installed, you have an easy way to send e-mail from VB5. To use this technique with VB3, remove the With construct and fully qualify each object
Objects in Java have hash codes associated with them. An object’s hash code is a signed number that identifies the object (for example, an instance of the parent class). An
Developers often need to load forms with information, which is time-consuming. The form is often a list box filled from an outside source, and this causes the list-box contents to
Question: How do I compare dates to determine if one comes after or before another? Answer: You can just use the normal IF statement: IF ld_date1 < ld_date2 THEN ...
Question: When rebuiling indexes I receive an error. Error 1501:[SQL Server] Sort Failure What is happening, and what do I need to do to fix this problem? Answer: I was
Question: How can I program the NT Command Scheduler (AT command) using VB5? What are the API calls? Right now I’m just using Shell to run AT. Is this my
Question: Can you import Excel files into SQL Server tables using bcp? if so what is the command line? Answer: You can’t execute bcp directly against an Excel file. However,
Question: As part of a normal Visual Studio 6 upgrade on an NT Server 4.0 SP3 machine, Setup rebooted the machine “to continue the install.” I then got a blue
Question: I set the usri3_home_dir and home_dir_drive when I create an NT account using VB code. I also need to create the home directory on a specified NT server. Any
Using Active Server Pages, you can easily get the values of fields on a form to display on another Web page for user validation as a simple confirmation page. In
The standard class string (unlike MFC CString for example) doesn’t have a char * conversion operator for two reasons. First, implicit conversions can cause undesirable surprises when you least expect



