devxlogo

The Latest

Using the CreateDirectory API function

The VB’s MkDir function creates a directory in a specified path. If the directory already exists, MkDir raises error 75 (Path/file access error); yet, it raises the same error code

SelectItemFromValue – Select the ListControl element with a given value

‘ Select the ListControl element with a given value’ Example: SelectItemFromValue(ListBox1, “hellovalue”)Sub SelectItemFromValue(ByVal lst As ListControl, ByVal value As String) lst.SelectedIndex = lst.Items.IndexOf(lst.Items.FindByValue(value))End Sub Related Posts Understanding Memory Availability and

Build a Lightweight XML DOM Parser with C#

When you don’t need the full capabilities of an XmlDocument object, you can use an XmlTextReader, the SimpleElement class explained by Guang Yang, and a Stack to create the lightweight

Build Your Own Lightweight XML DOM Parser

Editor’s Note: This tutorial is also available in a version for Java developers. Get the Java version. ML is rapidly gaining popularity with application developers as a data storage and

SAP iViews: Portal Components in Java

he Enterprise Portal (EP) is SAP’s corporate portal application that runs primarily on its own J2EE-certified Web application server. Java iViews, the portal components (or portlets) in SAP, deliver business

Writing Data Safely with the CKPTFile Class

sing memory-mapped files can get you tremendous performance gains, but memory-mapped files are very delicate: any change is immediately reflected in the filesystem. This article describes a checkpointing system that

Mock Pugilists Raise Fists Over Pet Shop

s is often the case in title fights, it didn’t really get interesting until the last round. On an otherwise uninspiring Monday night, in the grand ballroom of a Redwood

Generate and Modify Images with GDI+

ost Windows applications need to use graphics or images to let users work with the images directly, or to enhance the user experience. Most applications can accomplish this with static

Automatically Upgrade Your .NET Applications On-the-Fly

ich client, (or in .NET terminology, “Windows Forms”) applications provide a great user experience in terms of functionality, usability, operating system and inter-application integration. Unfortunately, they have also suffered from

TurboVB Lite

TurboVBLite is the freeware version of TurboVB. It provides eighteen add-ins that make VB development easier and faster. It helps sorting and writing procedures and properties, error handlers, variable declarations,

List of Most Commonly Used CGI Equivalents of Servlets

AUTH_TYPE request.getAuthType()CONTENT_LENGTH request.getContentLength()CONTENT_TYPE request.getContentType()DOCUMENT_ROOT getServletContext().getRealPath()PATH_INFO request.getPathInfo()PATH_TRANSLATED request.getPathTranslated()QUERY_STRING request.getQueryString()REMOTE_ADDR request.getRemoteAddr()REMOTE_HOST request.getRemoteHost()REMOTE_USER request.getRemoteUser()REQUEST_METHOD request.getMethod()SCRIPT_NAME request.getServletPath()SERVER_NAME request.getServerName()SERVER_PORT request.getServerPort()SERVER_PROTOCOL request.getProtocol()SERVER_SOFTWARE getServletContext().getServerInfo() HTTP_XXX_YYY Variables of the form HTTP_HEADER_NAME can be accessed using the request.getHeader(Header-Name) Example:

A Quick Way to Convert RecordSet to an HTML Table

Public Function GetHtmlString(rs)Dim StrHtmlDim FldLimiter,RowLimiterFldLimiter=””RowLimiter=””If Not rs.EOF ThenStrHtml=”” ‘Table Tag’Prefix for 1 col valueStrHtml=StrHtml & “”StrHtml=StrHtml & rs.GetString(2,-1,FldLimiter,RowLimiter)’Trim of the Last StrHtml=Left(StrHtml,Len(StrHtml)-Len(“”))’Close TableStrHtml=StrHtml & “”End IfEnd Function Usage: Response.Write(GetHtmlString(rs)) Related

Determine the Identity Value of Inserted Row(s)

IN tblTicker table we have following fields: [CompanyID] INT IDENTITY (1,1) [TickerSymbol] [char] (10) NULL [ClassOfShare] [char] (10) NULL We inserted some rows and deleted some from table tblTicker.Now At

Delete the Contents of a List

This technique allows you to delete the contents of a List at the same time you are storing pointers a list. This same approach can be used for maps or

Pointer to a Constant vs. Constant Pointer

The const keyword in C++ provides a type-safe way to replace some of those #define preprocessor statements that you’re used to writing from C.Whenever you have a value that you

Initialize STL Containers with Predefined Values

This task is quite common task. However, explicit insertion of values can be unacceptable in many cases?like if you need to insert a lot of values. I’ve found that it’s

Listening to All AWT Events

For some programs, it is helpful to create a listener to keep track of all the events being dispatched by the UI. This can be very useful in debugging programs.

The Object-Oriented Evolution of PHP

ew people know this, but when PHP as we know it today was being molded, back in the summer of 1997, there were no plans for it to have any

Create and Modify SQL Server Indexes Properly

Indexes are critical to smooth data retrieval and manipulation in SQL Server. They are the way foreign keys maintain relationships among themselves and the way DB pros enforce order on

Adding a Timer to Your Application

Java swing provides a Timer class to cause an action at a pre-defined rate. For instance, you could have a label that blinks at a pre-defined rate. The class has

Sending HTML and ASCII Formatted E-mails

To do this, you need the javax.mail package. It’s a part of J2EE and available from java.sun.com.Sending a simple e-mail is pretty easy: import java.util.Properties;import javax.mail.*;import javax.mail.internet.*;public class Mail {static