The Latest

DevX - Software Development Resource

Year 2000K Compliant

Question: How do I make my date and time JavaScript Y2K compliant? Thank you. Answer: To the best of my knowledge, JavaScript, the language, is already Year 2000 compliant. Internally

DevX - Software Development Resource

Search Hard Drive

Question: I need a script that will allow users to search their hard drive for a file that they can send me. If you can help, I’d appreciate it! Thanks.

DevX - Software Development Resource

Access 2.0 to Visual Basic 5.0 Conversion Product

Question: Is there a product to convert Microsoft Access 2.0 applications to Visual Basic 5.0 applications? Answer: Unfortunately, Access forms are significantly different than Visual Basic forms (in any version,

DevX - Software Development Resource

How to change a picture format to JPEG

Question: I have recently bought a scanner and now have the capability to put pictures on my computer. How do I save pictures in JPEG format instead of bmp format.

DevX - Software Development Resource

Be cautious with unsigned integers

Unsigned integers are sometimes unavoidable, like when dealing with raw binary data. A good example is a mail server reading an incoming binary stream. But more often than not, the

DevX - Software Development Resource

A template’s template argument

Standard C++ supports templates’ template arguments. For instance, a mail server class can store incoming messages in a vector of vector(s) of bytes: vector< vector > vmessages; Please note that

DevX - Software Development Resource

Structs as a shorthand for public classes

Traditionally, structs serve as data aggregates. However, in C++ a struct can have constructor(s), destructor and member functions just like a class. The only difference between the two is the

DevX - Software Development Resource

Hiding a base class member function

A derived class may hide a member function declared in its base class by using the same function name, but with a different signature, or list of arguments. Usually, this

DevX - Software Development Resource

Disabling the Browser Back Button

Question: Is there a method that will prevent a user from going back to the previous page without modifying the browser code? (Does it matter if it is a CGI

DevX - Software Development Resource

Out-of-process components

Question: When attempting to instantiate an object contained in an ActiveX EXE the following message is received. “Only InProc Server components should be used. If you want to use the

DevX - Software Development Resource

Changing trademark symbol in VID 1

Question: We have trademark symbols sprinkled in our HTML Although MSIE 4.0 has no trouble with it, some browsers cannot interpret [ampersand]trade”. We try to replace them with the ASCII

DevX - Software Development Resource

Cross-platform socket communication

Question: I am writing a server written in Java that needs to take input from a game written in Visual Basic and sends the output to clients on the Internet.

DevX - Software Development Resource

Object passing between threads

Question: Am implementing a network simulation program thatrequires a sender and receiver thread, with a frame object being passed between the two threads.Could you suggest a way of connecting the

DevX - Software Development Resource

Java and videoconferencing

Question: I am conducting a study of operating system capabilities to support desktop videoconferencing.Would Java be a good Operating System for this purpose? Answer: Java itself is not an operating

DevX - Software Development Resource

File permissions

Question: How do you change UNIX file permissions in Java? I’ve seen it done and I need to replicate it. Answer: There is no platform-independent way of changingfile permissions in

DevX - Software Development Resource

StringTokenizer

Question: After: StringTokenizer st = new StringTokenizer(line); Do I have to write: String key = new String(st.nextToken()); or is it enough to write: String key = st.nextToken(); Answer: It is

DevX - Software Development Resource

Environment Variables

Question: How do I access environment variables? Answer: There is an undocumented method in java.lang.System with the signature: public static String getenv(String) You can use this method to fetch the

DevX - Software Development Resource

Templates in java

Question: Any suggestions on a good way to implement templates in java? Answer: The normal way to implement template behaviorin Java is to create an interface defining thecommon behavior that

DevX - Software Development Resource

Clipboard

Question: I’m having problems with application clipboard usage for “non strings”. If I try to create my own dataflavor it still seems to think the clipboard is a string. Answer:

DevX - Software Development Resource

Can Java be compiled as excutable Win95 program?

Question: I am curious if Java can be compiled as Windows 95 executable program? Answer: Yes, various Java compilers now support the optionto compile Java directly to native code. Visual

DevX - Software Development Resource

Coming Events

If you are extending an AWT Component, such as a Canvas to write your own control, then you will probably want it to trigger events that the super class does

DevX - Software Development Resource

Which Browser is Running Me?

While Java’s ability to run on numerous computer platforms makes a developer’s task easier, it is sometimes necessary to customize code to match the abilities of the environment. A good

DevX - Software Development Resource

Some Objects Are More Equal Than Others

A Vector is a convenient tool for keeping track of a set of objects, particularly when you don’t know in advance how many will be in the set. You can

DevX - Software Development Resource

Overloading postfix and prefix ++

For primitive types the C++ language distinguishes between ++x; and x++; as well as between –x; and x–;For objects requiring a distinction between prefix and postfix overloaded operators, the following

DevX - Software Development Resource

Assignment operator is not inherited

Unlike ordinary base class member functions, assignment operator is not inherited. It may be re-defined by the implementer of the derived class or else it is automatically synthesized by the

DevX - Software Development Resource

Tame Truncated Text

You may notice that the first or last character in a Label’s text can get partially chopped off by some implementations of the Java Virtual Machine. Older versions of browsers

DevX - Software Development Resource

Manage the Margins

LayoutManagers control the locations of AWT Components, such as Labels, Buttons and TextFields within Containers, such as Frames, Applets and Panels. Some of the five LayoutManagers included with Java 1.1

DevX - Software Development Resource

How to use a pointer to a pointer to an int

Question: How do you use a pointer to a pointer to an int?Like this: ————–int **IntPtr;————– How do you access the value “underneath” two pointers? Answer: You can deference a

DevX - Software Development Resource

Pointers

Question: On a test in college an instructor asked if it was possible to multiply and divide pointers. In the book we are using it says nothing about it, and