November 8, 2005

A Quick Way to Display Text from a Database in ASP

Suppose you are creating a dynamic page in ASP. Most of the page elements are dynamic and you need a few of the headers to have the first letter of each work to be capitalized. With a very small amount of CSS, you can avoid using VBScript for string manipulation.

The Remove_if() Algorithm

If you are familiar with the remove_if() algorithm, you’re used to applying remove_if() followed by erase(). For example, suppose you’re given a predicate to determine whether a number is even: vector::iterator p = remove_if(coll.begin(), coll.end(), even);coll.erase(p, coll.end()); This code takes a vector with the contents: 1 2 3 4 5

Resolve DB2 Instance Creation Failure on UNIX

On AIX, and UNIX in general, DB2 instance creation fails with vague errors: Update DBM cfg SYSADM_GROUP errcode = 8DBI1281E The database manager configuration file could not be initialized. Explanation: An error occurred when attempting to initialize the database manager configuration file. A DB2 instance could not be created or

Extract JAR and ZIP Entries with JarURLConnection

Use the following code to extract JAR and ZIP Entries with JarURLConnection: import*;import*;import java.awt.*;import java.util.*;import java.util.jar.*;class read extends Frame{URL url=null;JarURLConnection URLcon=null;JarFile jar=null;TextArea TA=new TextArea(15,35);public read(String titlu){ super(titlu);}void init(){ setLayout(new FlowLayout()); setSize(300,300); add(TA); setVisible(true);}public void getURLContent(){ try { //local file //url=new URL( //”jar:file:/C:/Program%20Files/Java/jdk1.5.0/jre/lib/jsse.jar!/” //); //remote file url=new URL( “jar:!/”);

Combine Multiple .NET Assemblies into One

You can use Microsoft’s ILMerge tool to merge .NET assemblies?even those written in different .NET languages?into a single assembly for easier distribution, something that’s not possible using Visual Studio alone.

Windows Communication Foundation: The Security Model

n today’s world, if you cannot communicate securely using technology you may as well not communicate at all. There are countless ways that information can be taken and misused by others to the detriment of you and your business. For these reasons, Windows Communication Foundation has security at its heart,