devxlogo

We are an award-winning tech entrepreneurship website where trusted experts can provide value globally.

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.

devxlogo

Trusted for 26 years

Over 30K Articles

1M+ Readers

Expert-reviewed

10K+ Tech Terms

As seen in:

microsoft logo
business_insider_logo
wired_logo
berkley
arstechnica_logo
hackernoon

The Latest

Printing Components

Question: How do I print out a component? Answer: Java 1.1 introduced the java.awt.PrintJob and java.awt.PrintGraphicsclasses. It also added the print(Graphics) and printAll(Graphics)methods to java.awt.Component, and the printComponents(Graphics) methodto java.awt.Container.

Java and NT Services

Question: How can I run a Java server application as an NT service? Answer: You can run a Java server appliation as an NT service if you use theMicrosoft SDK

Parsing a string into a date

Question: I’m writing a class that reads a log file containing timestamps.My StringTokenizer returns the timestamp as a String and I then haveto store it in a date container. Should

Completely hidden application

Question: Here is one that I couldn’t figure out for months!Will I be surprised if anyone can come up with a solution to this. How do you create a program

Java Product Version Confusion

Question: I’m reading a book on Java 1.1 that refers to various classesthat do not exist in Microsoft Visual J++ Professional Edition,Version 1.1, which apparently installs V1.02 libraries. How canI

Always on top window

Question: Is it possible to create an ‘always on top window’ in java? Answer: The short and perhaps not so sweet answer is “No.” At least not in 100%Java. You

Taskbar Icon for Dialog

Question: How can I set the icon image for a java.awt.Dialog like you can fora java.awt.Frame using setIconImage? Answer: Unfortunately you cannot do this. A Dialog inherits the icon of

Java File date

Question: Is there anyway with java to get a file’s date? Answer: Unfortunately, there seems to be no platform-independent way of doing this.The lastModified() method in java.io.File returns a system

Tool Tips

Question: How do I get a tool tip to appear in a java application? Answer: Tool tips were not a part of the AWT packages in the 1.0.2 and 1.1releases

Appending to existing files

Question: Is there a way to open a file for writing in append mode? Answer: The FileOutputStream and FileWriter classes both have constructors thatwith the following signature (String, boolean). The

Default button

Question: How can I implement a “default” button in a window? Answer: You can explicitly request the focus using requestFocus(), but thebutton can still lose the focus. Therefore you have

Indirectly working with a structure in C++

Question: I am trying to create a class that can be given the pointer to a structure. The class has other means to know what goes into the structure, but

Doubling Quotes in SQL Server

This routine parses a string and returns an equivalent string where all the instances of a given substring are doubled. This is especially useful for doubling quotes within SQL statements

Enhancing Vector’s Performance

Standard vector dynamically allocates the required amount of memory it needs; which saves you the bother of memory management. However, letting vector acquire additional memory slowly one chunk after another

Avoid name conflict by using namespaces

In large-scale software projects, short and elegant names for types and functions are problematic because they can cause a name conflict, i.e., the same name is used more than once

A Button Constructor for Java 1.1

With JDK 1.1, you can define an action command String for a Button that is independent of the text displayed in the Button. At the least, this enables you to

Free System Resources

Question: Is there an API call to find the amount of free system resources in Windows 95? Answer: Good news and bad news, here. Yes, there is. But, no, you

Double quotes in queries

Question: OK, suppose you need to include in a query a string which contains both single and double quotes, for example:UPDATE Books SET Title = “Gulliver’s Travels”I need to save

Compilers for Windows CE

Question: I’m developing a project that will use H/PCs. But which compilers are available for Windows CE? Answer: Currently, Microsoft is the only vendor offering a compiler for Windows CE.

Enumerating Function Parameters

Question: I’m writing on an OCX Control with VB5. I have a lot of functions in it and I dont want to scare the end user with a lot of

Control in what Container?

Question: Is there a way to find out if a control that I am writing in VB5 is inside a container such as a picture box and then find out

Member or Global Function?

Question: I have a function that takes 2 classes as arguments. Should I make the function global or inside the class? If that should be a member function, is there

Casting

Question: Hi,got a problem with a cast. Maybe someone out there knows how to solve it. How can I get this void pointer to act like (point to) my object?example:

Reading a data file in C++

Question: I’m trying to read a data file that I can read just find in Visual Basic, but the integers don’t seem to work when I use Visual C++. Note:

Formatting Text

Question: I am doing a word processing programs which perform a task called center justification on one paragraph user enters–similar with the center justification function performed by MS-Word.I have to

C++ Linked list

Question: How would you reverse a linked list? Have looked in books at school library, and in tutorial. Hope you can point me in the right direction. Thank you for

Adding/Subtracting Time

Question: How do I add/subtract a series of time values of format hh:mm:ss (for example, 02:45:32 + 00:35:43 + and so on)? Also, how do I set the mm:ss format?

System Tray

Question: Can you program C++ to allow a program run in the system tray (next to the clock) like VB? If so, is there sample code somewhere? Answer: This task