devxlogo

We are an award-winning tech entrepreneurship website where trusted experts can provide value globally.

Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.

devxlogo

Trusted for 26 years

Over 30K Articles

1M+ Readers

Expert-reviewed

10K+ Tech Terms

As seen in:

microsoft logo
business_insider_logo
wired_logo
berkley
arstechnica_logo
hackernoon

The Latest

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

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

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

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 /

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

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

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,

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

CreateDataReader_OleDb – Create an OLEDB Data Reader

‘ return a DataReader over an OleDbConnection” CONNSTRING is the connection string’ SQL is the SQL Select statement to be executed” the connection will be automatically closed when the DataReader

Copying menu controls from one form to another

If you’re building a project with multiple similar forms, it’s nice to be able to cut-and-paste controls from one form to another. However, in VB6, you can’t do this for

VB6 Task Management Add-in

This VB6 add-in provides you a handy project management console that helps you to track the bugs and pending tasks of the source code. You can mantain the list of

Determine whether a string is uppercase

Here’s a quick-and-dirty method to determine whether a string contains only uppercase characters ‘ the string to test is in the SOURCE variableIf System.Text.RegularExpressions.Regex.IsMatch(source, “^[A-Z]+$”) Then Console.WriteLine(“Uppercase string”)End If If

Determine whether a string is lowercase

Here’s a quick-and-dirty method to determine whether a string contains only lowercase characters ‘ the string to test is in the SOURCE variableIf System.Text.RegularExpressions.Regex.IsMatch(source, “^[a-z]+$”) Then Console.WriteLine(“Lowercase string”)End If If

VBMatch Add-in

When installed, this add-in adds an entry to the right-click menu in VB code window. You can then select or right-click on opening parenthesis or quotation mark or VB keyword,