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.
The following example program prints out both the total and free memory sizes, allocates a chunk of memory, and then prints the memory sizes again. If the initial size of
Font properties that affect the rendering of strings are represented by the FontMetrics class. You can determine the FontMetrics of the current font in a graphics context with Graphics.getFontMetrics(). If
Consider this scenario, you define a public static final variable in one java file, and access the variable in other java file. Now, if you change the value of static
Question: How can I discover the size of a remote file stored on an HTTP server? Answer: The HTTP protocol supports the transfer of extra information about thecontent referenced by
Question: How do I find the size of the heap memory that is available for Java program? Answer: The maximum size of the Java heap is fixed by the JVM
Question: I want to collect form data in a JSP page where the form issubmitted by one of many possible links (possibly passing values usingURL rewriting). In one case, I
Question: In VB, you can release the object’s memory with the following: set object = nothing How do you accomplish the same thing in Java? Answer: The analogous way of
Question: How do I do a string comparison where I want to determine if onestring is contained within another? For example: Str1 = “Degree in IT”;Str2 = “Diploma or Degree
Question: How do I pass both the option value and option label parameter through ASP? select one Answer: Create a hidden input (text) box within the form: Then, write code
Question: My Java server compiles perfectly, but when I try to run it on mymachine I get an error when it tries to open up the ServerSocket onport 2525. I
Question: On a POSIX-compliant system, is there a way to get the process ID ofthe JVM running the current code? Answer: There is no standard means of obtaining the process
Question: I have a ResultSet created using JDBC and it contains some datefields. Now I want to subtract one date from the other. Howdo I do this? Answer: Date arithmetic
Question: How can I force a reload of a JavaBean that is being used in a JSPpage? The problem is I am developing a JSP-based Web application andI need to
Question: I have two tables: Items_table: Item_id (primary key) Description (foreign key) Item_priceDescrip_table: Description (primary key) Item_type How do I enter information into the two Description columns simultaneously? Answer: An
Question: Is it possible to change the name of a column within a table after it has been created? For example, I want to change the column “Name” to “FName”.
Question: When I build my application as an EXE and run it, the application comes up and then immediately disappears. What is wrong? Answer: You need to create an event
Question: How can I fill a numeric field with a sequence of numbers using SQL? For example, I want a field named NUMBER to contain the numbers 1 for the
Question: We have a private WAN network with Exchange Server 5.5 and also have one inbound/outbound Internet mail service for all people to use to send Internet e-mail. I want
Question: I created a command button on the main form. It runs another wizard-generated form that edits a table in the database container. It works in test, but when I
Question: I’m having a problem creating a context menu in a grid (by clicking on the right button of the mouse). I created this menu by programming a method that
Question: How do you open a specific Word document through a Visual FoxPro program? Answer: You simply add the document to the Word.Application’s Documents collection. Here is a code sample
Sometimes is useful to know how many buttons the user’s mouse has. This value can be obtained by calling GetSystemMetrics. The constant to pass as parameter is SM_ CMOUSEBUTTONS. Here’s
Have you ever needed to open a Windows dialog such as Internet Properties, New Hardware, Modem Properties or any other dialog you can find in the Control Panel? Well, it’s
If you need to know how Windows was started you have just to call an API function: GetSystemMetrics. Passing the SM_CLEANBOOT constant as parameter, the function returns a Long value
It takes only a handful of lines of code to create Windows inspector program, that is, an utility that lets you display the handle, the class name and the contents
The dialog you see when you start an Internet connection is implemented in the RNAUI.DLL file, and the specific function is called RnaDial. To open this dialog from your application
As you know, when you press CTRL+ALT+CANC the Task List window appears. This dialog allows you to see all the running processes and also to terminate them. If you don’t
Browsers Targeted: Internet Explorer 4+ Dates can be a pain to deal with when working with scripting. Fortunately VBScript 5.0 supports a number of different functions that can simplify the
Browsers Targeted: Internet Explorer 3+, Netscape Navigator 3+ You can take advantage of the new XHTML standard in your own code, regardless of your browser, to enhance the capabilities of
Question: I would like to force data entered into a form to be uppercase. This is probably basic, but I can’t figure it out! Answer: What you are looking for











