Tip Bank

DevX - Software Development Resource

Removing an Unused Window Service

Removing an unused Window service involves removing your registry key. Go to Start?>Run?>regedit. Find the key: HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services Locate the service name you want to remove. Press key to remove the

DevX - Software Development Resource

Use a Macro to Improve Your Debug Output

Frequently, and especially during development and debugging, you want to write out the values of a variable. To distinguish these variables, label them by putting this directive in: #define PUTOUT(x)

DevX - Software Development Resource

Hiding Columns in a DataGrid

Using the column index to hide columns in a DataGrid can pose a problem if the index changes. Here’s a quick workaround for when the columns are auto-generated. Using column

DevX - Software Development Resource

Ping with J2SE 1.5.0

The following code shows you how to simulate the “ping” command with the J2SE Tiger InetAddress.isReachable method. import java.io.*;import java.net.*;public class reachable{ public static void main(String args[]) { String[] addrs=

DevX - Software Development Resource

Using the java.lang.reflect.Modifier Class

You know that you can extract constructors, methods, and variables from a Java class file. Generally, when you use Field fields[] = c.getDeclaredFields( ); where c is initialized using Class

DevX - Software Development Resource

A Quick Way to Copy DataRow

Instead of copying DataRow column by column, the following code copies data in one line from the source to the destination row: DataTable dtDest = new DataTable();dtDest = dsActivity.Tables[0].Clone();foreach(DataRow dr

DevX - Software Development Resource

Retrieving a Single Value from a Database

This PHP function pulls a single field from a single record in the database once the MySQL connection has already been established: function getField($field, $tbl_name, $condition = 1){ $result =

DevX - Software Development Resource

Read and Write Strings Using String Streams

String streams allow reading and writing strings just like cin and cout allow reading standard input and writing standard output. String streams may be used by including . Reading from