devxlogo

The Latest

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=

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

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

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 =

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

Nine ASP.NET Site Navigation Problem Solutions: Part 2

art one of this series introduced the first seven common site map navigation problems and their solutions. This part explores more advanced techniques with the final two problems: Hiding unauthorized

XLinq Part 2: Using Standard Query Operators

n Part 1 of this article series, you looked at XLinq’s ability to create, modify, and delete XML data. Building on that background, this installment focuses on XLinq’s query features,

Security at Home: Shore Up Your Home Network

ost people would never leave home with their doors and windows unlocked?leaving an invitation for someone to steal their valuable possessions. Neither should they leave the entrances to their personal

Web Control Templates Explained

n my travels I’ve had a chance to spread the good word of Web control development to many around the country; and I’ve also had a chance to meet many

Putting Content on a Diet

don’t know about you, but I fight a constant battle with weight. I’m sedentary, writing and coding, 99 percent of the time. The occasional huffing and puffing on the bicycle

Heard on .NET Rocks!: Talking .NET with Tim Huckaby

am the host of “.NET Rocks!”, an Internet audio talk show for .NET developers online at www.dotnetrocks.com and msdn.microsoft.com/dotnetrocks. My co-host Richard Campbell and I interview the movers and shakers

Whither T-SQL?

number of developments over the past 12 months have brought me to a conclusion: Transact SQL (T-SQL) must go. The trusty old workhorse language that powers our SQL Server databases

Build a Low Overhead Test Bed for Your JDBC Code

here’s a good chance that your enterprise applications interact with a database. Testing your application code against a database is important in making sure that your application works as expected.

The Value of Data Archiving

Table(s) holding every day transaction data can grow huge in size over period of time. This not only slows down applications, it also causes database contention leading to maintainence nightmare.A

Folder Sharing in Windows

Have you ever needed to share many folders simultaneously? Windows provides an executable to do just that. It’s called the “Share Creation Wizard.” Call this wizard by typing SHRPUBW in

Activate Your Word Documents with VSTO

he word processor was invented to simplify the preparation of words to be printed on paper. It offered font management, layout management, and the ability to type words onto a

Batch Processing in Hibernate

Suppose you need to insert 200,000 records into a database in Hibernate. You’ll need to adjust the following settings: //set the JDBC batch size (it is fine somewhere between 20-50)hibernate.jdbc.batch_size

Gain Control of your .NET Logging Using log4net

have always considered logging a critical function of any production application; however, it’s often overlooked. Logging is often added to the application only after the functionality is already defined and

Mono IDEs: Going Beyond the Command Line

ike the freely downloadable Microsoft .NET Framework 2.0 SDK, the free open source Mono platform provides a number of command line utilities used to compile .NET source code and manipulate

Cooperative Multithreading in BREW with IThread

y last article mentioned the BREW IThread as a possible solution to the challenges of dealing with blocking code on BREW. Whether you’re porting existing code to BREW or writing

Determine Whether a Table Has an Identity Column

This code is for MSSQL Server, but applicable for MS SSQL Server 7 or above. Check in T-SQL: SELECT OBJECTPROPERTY(object_id(‘TableToBeChecked’), ‘TableHasIdentity’) SQL Server returns 1 if the table has an