The Latest

DevX - Software Development Resource

Persist ADO.NET extended properties

Many ADO.NET classes, including DataSet, DataTable, and DataColumn, use the ExtendedProperties property to enable users to add custom information. Think of the ExtendedProperties property as a kind of generic cargo

DevX - Software Development Resource

Continue After Hitting an Error

If you use VB6 to write COM programs that raise errors, it seems impossible to continue after hitting one of them. However, the (almost undocumented) commands ALT+F8 and ALT+F5 let

DevX - Software Development Resource

Generate Rule-Based Random Strings

Use this function to generate random strings that abide by certain criteria. It Related Posts Verizon Quietly Closes Its Cloud Computing ServiceThe Fundamentals of Windows LoggingGoogle launches free dark web

DevX - Software Development Resource

Change Oracle and SQL Server Passwords

You can change database passwords from within VB to control more of your application Related Posts How to Disable Auto-commit Mode in Spring BootDisappointing story on memory optimizationSecurity and Speakers

DevX - Software Development Resource

Generate OLE DB Connection Strings

Many VB projects need a database connection string. But there Related Posts Scientist Tool Helps Rewrite Ruby CodeClimate change threatens coastal property valuesMeta Quest 3S VR headset price leakedHow to

DevX - Software Development Resource

Create installations with Visual Studio Installer

Introducing Visual StudioInstaller VisualStudio Installer is a free tool from Microsoft for creating installations forWindows applications. Visual Studio Installer is available in two Englishversions: version 1.0 works on Windows 98

DevX - Software Development Resource

Cleanup Your IF Statements with IN

IF statements can become quite long when you’re testing for multiple values. Using the IN expression can make them more readable.So, instead of typing: IF (@testvar = 1 or @testvar

DevX - Software Development Resource

Use enum Terminated with count

Always use an enum instead of defines and always close the list with an additional count. This makes life simpler and helps the compiler.Instead of defines: #define TypeA 0#define TypeB

DevX - Software Development Resource

OpenXML for Multiple Trips to the Database

Suppose you need to make multiple inserts (or updates or deletes) to a SQL Server database?for instance, inserting items in a shopping cart. In the past, you needed to loop

DevX - Software Development Resource

Fixed-length Strings Using Templates

Instead of writing a string class that contains a (char *), why not write a string class with a fixed char array? Of course, it would be repetitive if you

DevX - Software Development Resource

A Sparse Array of Any Type with Fast Access

A sparse array saves memory by not allocating memory for elements that are not initialized or to which you don’t need access. They’re quite easy using the STL map.This example

DevX - Software Development Resource

Output Data into a File

Use the following code: #include void main(){ char name[15]; double salary; ofstream outFile(“FileName.txt”, ios::in); while (outFile){ outFile >> name >> salary; }} Related Posts Google Cloud Databases Now Generally AvailableSchedule

DevX - Software Development Resource

Outputting Currencies

How to print out a Currency in Java is an often overlooked topic. How should Currency be printed out in an international, standardized way?The java.text.NumberFormat class is used for outputting

DevX - Software Development Resource

Copy Data from One File to Another

This wrapper class “FileCopier” copies data from one file to another. This class uses another class: “StreamCopier”. /** * Class: FileCopier * Author: Vivek Bagade * Date: 8/31/2001 * Description:

DevX - Software Development Resource

Generate Thumbnails Out of a Larger Image

This is useful in a Web-based Photo Gallery kind of application, where you need to automatically generate multiple sizes of the same image. class ThumbnailGenerator { public void generateThumbnail (String

DevX - Software Development Resource

A Cleaner Way of Doing String Comparison

If you have a method into which you pass a String parameter that you compare with another string then: void foo( String str ){ String CONST_STR = “bar”; // DON’T

DevX - Software Development Resource

Debugging Variables Made Easy

At one time or another, all ASP progrmmers have used RESPONSE.WRITE to write out a variable on the screen, ensuring that the variable is passing correctly or has the correct

DevX - Software Development Resource

More Efficient LPad Function for Large Padding Lengths

function LPad(ContentToSize,PadLength,PadChar) { return GetRepeatedCharString(PadChar, PadLength -ContentToSize.length) + ContentToSize;}function GetRepeatedCharString(Char, Size) { if (Size < 1) return ""; else if (Size == 1) return Char; else return GetRepeatedCharString(Char, Size /

DevX - Software Development Resource

Generate a Script-name Independent HTML Form

This tip is useful for large, server-side scripts containing lots of functions/procedures that generate HTML forms. Say you’ve hardcoded the script name (for the same script) in the ACTION tag

DevX - Software Development Resource

Find the Encryption Algorithm Used in SSL Requests

Servlet 2.3 provides an API that finds the algorithm used a Web app’s SSL requests. The attribute “javax.servlet.request.cipher_suite” is provided to get the information.Here’s the code: String cipherAttribute = “javax.servlet.request.cipher_suite”;String

DevX - Software Development Resource

How to Trim a Method in Javascript

/** * Function that will remove the leading and trailing spaces. */function trim(str){ return( rtrim(ltrim(str)));}/** * Function that will remove the trailing spaces. */function rtrim(str){ re = /(s+)$/; return str.replace(re,

DevX - Software Development Resource

CUSerFunction utility class

This VB6 class contains three methods for querying the name and group of the current Windows NT user: IsAdmin (true if the user is an Administrator), IsNTGroupMember (true if the