
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.
Forgetting the names of global variables is easy to do. You can solve this problem by letting VB remember the variables for you by making the variables into fields of
Using a Date literal is about 12 times faster-according to NuMega TrueTime-than using the CDate function and converting a string literal. Here’s an example: Dim TestDate as Date ‘The following
This subroutine lets the user perform look-ahead typing, as in Netscape Navigator, Microsoft Internet Explorer, and other apps. The sub takes an array of strings and a TextBox control as
When you use the Scripting Object Model (SOM) in Visual InterDev 6, keep in mind that the script library is biased towards JavaScript. Your perfectly valid VBScript may produce strange
Java simplifies I/O by providing a rich library of classes that support stream interfaces. Among these classes, the combination of PipedInputStream and PipedOutputtStream closely resembles a UNIX system “pipe.” The
Question: How can I convert integers to strings? I’m using a gcc compiler under Solaris 2.6. itoa, which I used in VC++, doesn’t work. By the way, how can I
Question: I am a beginner to C++ and have looked into several resources but still have some questions. Can you tell me what a void pointer is and what it
Question: I want to write a DOS program that takes command line parameters and uses them in the program.For example, if the program was comline.exe and you typed in the
Question: I am not new to C++, but I am new to VC++. The question I have pertains to the usability of MFC versus the ease and power of VB.
Question: 1) What is the difference between a int and a short variable? 2) How do I convert a number to binary from decimal? Answer: 1. Depending on the platform,
Question: I have a date stored as an integer — days from 1/1/1900. iis there an algorithm out there to display the day, month, and year? Or is there an
Question: I’m using the sizeof() operator to find the length of my integers just like the Q&A section said, but it consistently returns a 4 regardless of integer length. What
One of Visual Basic’s handiest functions is the Dir function, which allows you to find all the files with a given filespec. VBScript does not have an identical function, but
The stack trace is a useful debugging tool that you’ll normally take advantage of when an exception has been thrown. It provides information on the execution history of the current
ARCHIVE is a new attribute of the
The java.awt.Image class does not implement the java.io.Serializable interface. As a result, attempts to serialize or “marshal” instances of the class will fail. For example, they cannot be passed as
Visual InterDev 6 installs with its own keyboard mapping scheme, which you can customize to suit your preferences. For instance, you may want to use the F12 key from within
If you find that your Java programs are starting to use too much memory, there are methods available that can help you diagnose how much memory is allocated. The freeMemory()
When a component event such as a mouse click occurs, Java provides the cursor coordinates relative to the top left corner of the component in which the event took place.
Objects constructed on a pre-allocated buffer by using placement new must be destroyed explicitly. #include #include using namespace std;class C{public: C() { cout
The compiler ignores the access specifier of friend functions. However, you should declare them as public to make the code readable: bool operator ==( const Date & d1, const Date&
You can create selection box options dynamically using JavaScript 3.0’s Option object. The syntax for its constuctor is: Option(text, value, [default selected], [selected]) Here is an example:
Some programmers tend to add an empty exception specification to constructor destructor, assignment operator, and copy constructor of a class: class C {public: C() throw(); ~C() throw(); C(const C&) throw();
When you open VB5’s Components list, you’ll see many controls and libraries not available for your development. Some are controls you downloaded from Web pages; others come from who knows
For some enum types, it may be useful to define overloaded operators, such as ++ and –, that can iterate through the enumerator values: #include using namespace std;enum Days {Mon,
A class may have const and reference data members. These members must be explicitly initialized by a member-initialization list: class Allocator{private: const int chunk_size; const string & serialization_path; // file
A single object, employing a single set of event routines, may be used across all pages in the SSTab control. Draw the object on the form that contains the SSTab
It can be useful to create generic controls of similar properties. For example, if a project has 10 textboxes on different forms that need to accept numeric input only, instead
Use this quick and dirty routine to help find empty recordsets: Public Function IsEmptyRecordset(rs As Recordset) As Boolean IsEmptyRecordset = ((rs.BOF = True) And (rs.EOF = True))End Function
When working with or fixing Access databases and Excel spreadsheets created by users at my company, I often have to use their strings from the table or spreadsheet to save
