April 18, 2007

Everyday Use of Generics

he .NET 2.0 Framework now supports a new style of strongly typed collections called generics. This article demonstrates how to use generics in your .NET code. It would be nice

Improved Pinging in .NET 2.0

Using the Send method of the Ping class (in System.Net.NetworkInformation namespace) takes the hostname as a parameter. This captures the reply in the PingReply object, as shown below: //CodePing ping

Get the Keys for Rows Added by an INSERT Statement

This tip shows how to get the keys generated for the rows added by an INSERT statement. Statement st=null;PreparedStatement pst=null;Connection conn=null;ResultSet rs=null;ResultSetMetaData rsmd=null;…try { st= conn.createStatement(); }catch (SQLException e) {System.out.println(e.getMessage());}try

Workaround for the SQL DISTINCT Clause

The SQL DISTINCT clause isn’t case sensitive, which means that your query might end up pulling records with different cases. A simple fix for this is to use the COLLATE

An Overview of HTML 5

he Web Hypertext Application Technology Working Group (WHATWG) is formalizing a specification known as HTML5 or Web Applications 1.0 that should standardize some of the ambiguities and disconnects that have

Convert “Little-Endian” to “Big-Endian”

This tip outlines two simple methods that help you to convert a number from the “little-endian” format to the “big-endian” format. // 2-byte numberint SHORT_little_endian_TO_big_endian(int i){ return ((i>>8)&0xff)+((i