The Latest

DevX - Software Development Resource

Declaring References to Functions

You can declare a reference to a function, just like you can declare a pointer to a function. For example: void f(int n){ ++n;}int main(){ void (&rf) (int) = f;

DevX - Software Development Resource

More on Default Arguments

The order of evaluation of function arguments is unspecified. Consequently, parameters of a function may not be used in default argument expressions. For example, the following declaration is illegal: int

DevX - Software Development Resource

The Underlying Type of bool and wchar_t

It is guaranteed that sizeof(char), sizeof(signed char) and sizeof(unsigned char) all equal 1. Applying sizeof to any other fundamental type returns an implementation-defined value. In particular, sizeof(bool) and sizeof(wchar_t) need

DevX - Software Development Resource

Text Box and an Array

Question: I opened a ASCII text file into an array. Now I want to print the data into a text box. I tried something like this: txtResult.text = flight(i) The

DevX - Software Development Resource

MDI Forms and DLL

Question: Is there a way to host an MDI form from an ActiveX DLL in a Main application’s MDI Parent Form? Answer: Although I’ve never tried it, I don’t think

DevX - Software Development Resource

Using the random_shuffle Algorithm

STL includes the random_shuffle() algorithm. As the name suggests, this algorithm randomly shuffles the elements of a sequence. It takes two arguments, the first of which is an iterator that

DevX - Software Development Resource

Image Won’t Display in ASP Page

Question: I am building a Web site that is hosted on Microsoft’s Personal Web Server. I have an Active Server Page (ASP) with some graphics on it. Everything works fine

DevX - Software Development Resource

What Are Java Server Pages?

Java Server Pages (JSP) are a complementary Java API to Java Servlets. They let you publish dynamic Web content. A JSP can contain HTML tags, scripts written in Java code,

DevX - Software Development Resource

What’s the Time Stamp of a File?

JDK 1.1.x’s java.io.File class has a lastModified():long method. You can use the value returned by lastModified method to create an instance of java.util.Date class and, thus, get a hold of

DevX - Software Development Resource

Variable Length Ordered Lists Using XSL

Question: I’m attempting to create an ordered list every time the Sequence attribute of a Para element has been set to ‘Begin’. The list should continue until it reaches a

DevX - Software Development Resource

Including XML Element in URL

Question: I have the XML structure: …….. I use this segment in an XSL template to create a list of hyperlinks that take me to the product page where [orderno]

DevX - Software Development Resource

Advantage of Using GET Method in ASP Forms

We all are familiar with disadvantages of GET method when compared to POST method. However, there is a real advantage of using GET when you are creating a link that

DevX - Software Development Resource

Right Place to Free up Resources

It is always recommend to free all object and variables at the end of a procedure. This can be done using the syntax MyVariable = Nothing. However, you should use

DevX - Software Development Resource

Construct Proper SQL Queries to Improve Performance

Use of inequality operators in SQL queries force databases to use table scans to evaluate the inequalities. These queries generate high I/O if they run regularly against large tables. You

DevX - Software Development Resource

Use Escape Key to Close Your AWT Dialogs

It has become customary for Microsoft Windows users to close an active window by pressing the escape key. It is not that easy to intercept key events in Java. This

DevX - Software Development Resource

Distributing VFP Executables

Question: When I build a VFP executable file and copy it to another machine, I cannot seem to run the executable. I obtain messages like “cannot …..file support library.” What

DevX - Software Development Resource

Copying/Renaming Files

Question: How do I use a memory variable as a filename when copying and renaming a file? Answer: For sake of example, let’s say that you have a character variable

DevX - Software Development Resource

Creating Threads

Question: How do I create threads in PowerBuilder? Answer: You can create separate threads in PowerBuilder by using the Shared Object features of PowerBuilder. Although this feature was initially created

DevX - Software Development Resource

Length of a PowerBuilder Structure

Question: How can I determine a length of a PB structure? Answer: There is no way in PowerBuilder to do this. If you require the size of the structure for

DevX - Software Development Resource

Using Access 97 to Connect to FoxPro Tables

Question: When linking to the FoxPro tables from Access 97 I see the tables, but when I double-click on the tables I get #ERROR in every field. Can you please

DevX - Software Development Resource

Pictures in Global Address List

Question: Is there any way that pictures of users can be downloaded into the system so that when you pull up their name and select “Properties” you can get a

DevX - Software Development Resource

Disallowing Users from Auto-forwarding E-mail

Question: Is there a server-side method to disallow Exchange users from auto-forwarding to external e-mail providers for personal use, especially when they leave the company? Answer: Yes there is. On

DevX - Software Development Resource

Creating Submenus During Run Time

Question: I’m trying to create a drop-down sub menu in a VB form. I’ve tried almost every applicable API32 call and have not been able to do it. Answer: If

DevX - Software Development Resource

Datawindow Sorting for Datawindowchild

Question: I have a datawindow where I sort the data by clicking on the column header. In one of the columns I have a drop-down datawindow attached. Whenever I click