devxlogo

The Latest

Running Another Program from Java

You can use Java to execute another program and display its output (via a BufferedReader). Here’s the code: import java.io.*;import java.util.ArrayList;public class ExecDemo{ static public String[] runCommand(String cmd) throws IOException

Include Files Using SCRIPT Tags With IIS 5.0

Previous versions of Internet Information Server (IIS) allowed an ASP page to include the contents of another file using code like this: With IIS 5.0, you can include the file

Formats for Uploading Files

When you transfer files from Windows to the Macintosh, the files become DOS text files. This can be a problem if you convert movies to Java on a Windows computer

Using the C Pre-Processor

If you are porting code from C to Java it is often useful to be able to use the C pre-proccessor (cpp or cc -E). This tip shows you how

Shifting Focus Away from a JTextArea with the Tab Key

Under most circumstances, pressing the tab key within a JFC/Swing GUIapplication will cause the focus to shift from the currently focusedComponent to the next focus-traversable Component. This is not thecase,

Embedding Multiple Applets in a Web Page

To embed more than one applet in a single web page, put each applet in its own subfolder within the folder that contains the HTML document. Use the APPLET tag’s

Buy an ActiveX Control or Develop Your Own?

Question: I am endeavoring to provide a graphical booking sheet metaphor (i.e. timeslots v. names) in an ActiveX Document. The third party grids I’ve tried, purchased and tested don’t allow

Which Install Method–Win9x or Win2K?

Question: I need to upgrade my Installshield, so I have been researching available products. Both Installshield and Wise (and others) seem to produce excellent installers. However now that the Windows

ADO Connection String

Question: What is the syntax for accessing a FoxPro 2.5 table using an ADO connectionstring? I want to be able use a DSN-less connection and access different tables depending on

Take Advantage of ADO Optimizations

A common user scenario in a development environment is where the code typically opens a connection, executes a row or non-row returning command, processes results, and closes the connection. For

Avoid File DSN Usage Whenever Possible

The File DSN usage should be avoided whenever possible. Instead, use System DSN; it is, on average, twice as fast. Also, File DSN is less secure because the database name,

Select Maximum Five Result

Question: How do I find out the top-five best sale items? I want the maximum five items to be listed. Answer: In version 7, SQL Server has conveniently provided the

Query Performance Comparison

Question: What is faster: two LIKE statements or one BETWEEN? ((MyData LIKE ‘02105_’) OR ((MyData LIKE ‘02106_)MyData BETWEEN ‘021050’ AND ‘021069’ Please advise. Answer: When trying to decide which is

Refer to Members of a Collection With the Full Name

You can access all variables directly by calling Request(variable) without the collection name. In this case, the Web server searches the collections in this order: QueryString Form Cookies ClientCertificate ServerVariables

Windows 2000 Boot Disk

Question: I have installed Windows 2000 on my laptop. I would like to create an emergency start disk akin to Windows 98. My current partition is FAT32. I created a

Dual Processor Support

Question: Does Microsoft plan on implementing dual processor support in Windows “Millenium” and will it be based on NT? I’m just trying to decide whether I should upgrade my Win98

NT Workstation 4.0 Home Network

Question: I have two PCs at home which are used by various members of my family. I want to connect them as a small network. Can I do this by

Schedule a Batch File

Question: I need to schedule a batch file to automatically run at night. I have tried every variation of the “AT” command from a command line on the Windows NT

Object Containment and Member Initialization

Question: I would like to know for containment (having objects as data member), what is meant by “if the inner class object’s constructor requires parameters, the initialization syntax must be

Defining an Array of Strings

Question: I have 20 predefined strings that I want to put into an array of strings. Here is my idea: #include static std::string array[20]; If I do just this, I