The Latest

DevX

Delimit, Unparse, or Concatenate to Strings

A common operation in many applications requires you to concatenate a list of objects (usually strings) and separate them by commas, or some other character for display (the opposite of

DevX

Understanding Stack Trace

Stack trace is a collection of methods and objects that lists from the origin of the exception to the point where the nested call begins. class StackTrace{ StackTrace() { divideByzero();

DevX

Dynamic Class Loading

The java.lang.Class provides the forName() method which allows you to load a class dynamically. The argument to this method is the fully qualified name, i.e., the complete name of a

DevX

Mastering Top-N and OLAP Queries in DB2

ith the help of today’s Web integration and GUI tools, it’s now much easier to build reports without any programming. SQL provides GROUP BY and ORDER BY clauses, to collate

DevX

A simple expression evaluator

While any Windows user could pop up the Calculator accessory to perform any type of math calculations, it would be great if you could offer him or her the capability

DevX

Download a file with one API call

If you have Internet Explorer 5 or later version, you can use an API call to download a file from the Internet withouth displaying any message box. The following code

DevX

Combine Default attribute with other attributes

When building an ActiveX control, you can set a default property or method using the Procedure Attributes dialog box, after clicking on the Advanced button. However, if your default property

DevX

ClearRunHistory – Clear Windows Run history

‘ Clear the Run History’ Notes:’ 1) This routine requires the DeleteRegistryKey and CreateRegistryKey ‘ routines,’ you can find them in the CodeBank’ 2) The MRU list is kept available

DevX

Making Linked Lists More User-Friendly

inked lists are perhaps the most widely used data structure. Yet writing a linked list from scratch is an arduous task. In a previous 10-Minute Solution, you learned how to

DevX

EJB Messaging, Part I: JMS and JavaMail

he proliferation of enterprise applications (CRM, ERP, SCM, etc.) and disparate enterprise resources (RDBMS/OODBMS, legacy data store, data warehouse, XML/flat file repository, etc.) has required many a developer to integrate

DevX

SetIEOptionsEnabled – Decide whether IE Options dialog is enabled

‘ Set whether the IE Options dialog is enabled’ Note: requires the SetRegistryValue, CheckRegistryKey and CreateRegistryKey ‘ routines, you can find them in the CodeBank’ Example:’ SetIEOptionsEnabled FalsePublic Sub SetIEOptionsEnabled(ByVal

DevX

SetIEContextMenuEnabled – Decide whether IE context menu is enabled

‘ Set whether the IE context menu is enabled’ Note: requires the SetRegistryValue, CheckRegistryKey and CreateRegistryKey ‘ routines, you can find them in the CodeBank’ Example:’ SetIEContextMenuEnabled FalsePublic Sub SetIEContextMenuEnabled(ByVal

DevX

Vemod PropertyWindow

This PropertyWindow control is similar to the one found in the VB 6 IDE. Youcan add how many properties you want and specify if a property acceptsstring, numerical, boolean or

DevX

Getting a pixel color

The Point method returns the color value of a given pixel, but is rather slow because it has to convert its argument from twips (or whatever ScaleMode is currently active)

DevX

Count distinct characters in a string

When you need to count how many occurrences of a given character are in a string, you might be tempted to go along the “traditional” Visual Basic way: ‘ count

DevX

Animated form icons

You can add a professional touch to your apps by showing an animated icon when the main form is minimized. To achieve this effect, prepare an array of Image controls,

DevX

Counting characters in a file

Ever needed to count how many characters of a given type are in a file? For instance, how many alphabetical characters, or digits, or spaces? You might read each line

DevX

Setting a pixel color

The PSet method is much slower than it should actually be, and in most cases you will find it convenient to substitute it with direct calls to the SetPixel API

DevX

A Quick Guide to Installing Tomcat on Windows

akarta Tomcat, an Open Source Servlet and JSP container, provides a simple (and free) environment for developing and testing Web applications. Tomcat is the reference implementation for the Servlet API

DevX

CheckUSState – Validate a US state initial

‘ Return True if the passed State initials are valid’ Example:’ MsgBox CheckUSState(“NY”)Public Function CheckUSState(ByVal State As String) As Boolean If Len(State) = 2 And InStr(“,AL,AK,AZ,AR,CA,CO,CT,DE,DC,FL,GA,HI,ID,IL,IN,I” _ & “A,KS,KY,LA,ME,MD,MA,MI,MN,MS,MO,MT,NE,NV,NH,NJ,NM,NY,NC,ND,OH,OK,OR,P” _