July 30, 2008

Invoke a Parent Window Function from Another Window in JavaScript

Sometimes, you need to call a JavaScript function that’s in a parent window from a child window. For example, suppose you wanted to update a field in the parent window when a user enters or selects some value in a child window. You can achieve this using the window DOM

Using Templates for Concurrent XSLT Transformations

As you know, you may not use a Transformer object (from the TrAX API) in multiple threads running concurrently. To do this, you need to use Templates. The following three example threads demonstrate: Used documents: C:Data_LocalxmldocsAirWings_xslt.xmlC:Data_LocalxmldocsAirWings_xslt.xsl Result documents: three HTML documentsimport javax.xml.transform.*;import javax.xml.transform.stream.*;import java.io.*;class xslt extends Thread{String doc;int nr_doc=0; public

Calling C Libraries from .NET

Suppose your library is in C and and your code is in .NET or VC++ (for a UI-based application). Further, suppose you want to display a message box whenever the library raises any error. In that situation, the following code is useful: #include &ltstdio.h&gtHWND g_AdtDlgWnd = NULL;void UserWarning(char* arg1,char* arg2,

Quickly Determine Which Tables Need Indexes in SQL Server

A quick way to determine which tables need indexes is to use the SQL Server Profiler Create Trace Wizard with “Identify Scans of Large Tables.” Doing so shows you the tables that need indexes. Without an index, a query must scan the entire table.

Relational Database Integration with RDF/OWL

WL ontologies allow you to describe data and relationships between data items. Common examples of this include complex knowledge domains such as pharmacology, but you can use OWL ontologies with simple, straightforward data that most companies already have stored in a relational database package. When you add metadata to existing