devxlogo

Tip Bank

Install CVsup to Stay Current with FreeBSD

If you have just installed FreeBSD’s ports collection using a CD-ROM, you must upgrade to the latest releases of the ported software you need. If you have just installed FreeBSD

Linux Commands: Using the “Manpage”

For newcomers to Linux, the “manpage” is the UNIX/Linux equivalent of the classic DOS question mark (?) command-line parameter. It shows you information about the command. To see the manpage

Convert Your Data to Decimal/Integer Value

Generally speaking, the data you’re being asked to process most likely has not been input in the format you need. It comes in hexadecimal, octal, or even in binary formats.

Capturing Key States from a Non-active Window

Sometimes you need to determine whether a particular key is pressed or not?even though the application is not active. “GetAsyncKeyState” comes to the rescue. This function takes a virtual key

Check for Duplicates in an ArrayList

This is a simple method to check for duplicates in an ArrayList: checkDuplicate : Methodpublic static boolean checkDuplicate(ArrayList list) { HashSet set = new HashSet(); for (int i = 0;

Send an Exception to a JSP Error Page from a Servlet

Use this code to explicitly send an exception to the JSP error page from a servlet: public void doPost(HttpServletRequest request, HttpServletResponseresponse) throws ServletException, IOException { … //Create your exception Exception

Displaying a Value in a Listbox Control

First, bind a data control with the listbox. When you’ve bound a listbox control to a field within a recordset, the control will display the value in the field only