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

Single Quotes in Queries

Question: When using PowerBuilder as a front end for doing SQL queries, I get the following pop-up message when I look for someone with a single quote in their name

Searching PBD for User Object at Runtime

Question: I am currently writing a generic system where user object names are stored in a database and instantiated upon request. This is currently working beautifully, but I fall short

Protected Inheritance Bug

Question: What is the standard rule on access specifiers associated with superclasses? Old C++ compilers would not allow protected superclasses. But, the book I’ve read about OOAD allows it. Example:

Exchange 4.0 and 5.5 Home Server Incompatibility

Question: Is there a compatibility problem between users with Exchange 4.0 as their home server and users with Exchange 5.5 as their home server? As a user who has Exchange

Syntax Question

Question: What does “Today – @sub” equate to in Oracle and what does it mean? Answer: It doesn’t look like anything in Informix, and I couldn’t find any reference on

Soundex – Determine the phonetic code of a word

‘ The Soundex code of an alphabetical string” you can use Soundex code for phonetic searches’ Beware: this isn’t bullet-proof!” UPDATE: this version corrects a bug in the original routine’

InstrWord – Search a whole word

‘ Return the next occurrence of a whole wordFunction InstrWord(start, Text, search, compareMethod) As Long Dim index As Long Dim charcode As Integer ‘ assume the search fails InstrWord =

ReplaceWord – Replace whole words

‘ Replace a whole wordFunction ReplaceWord(Source As String, Find As String, ReplaceStr As String, _ Optional ByVal Start As Long = 1, Optional Count As Long = -1, _ Optional

Drop the Parentheses in a VBScript Sub

Beginners are sometimes stymied when they get error messages on code that works perfectly elsewhere. For example, this code produces the error message, “Cannot use parentheses when calling a Sub”:

Using Your Own VB Components in ASP Pages

Question: I want to create a three-tier application that has a browser front end and a Visual Basic middle-tier. How do I access my VB code from ASP? Should I

Formatting Your SQL Statement Correctly

Question: I am trying to set up a recordset from the results of a form. On the ASP page, I have set a variable to the entry from the form

Determine if a PDF File Exists From ASP

Question: We have an ASP page that displays product information from a database. We also have a button to download/view a related PDF file that should only appear on the

Stringtokenizer That Works with Empty Strings

import java.util.*;import java.io.*;class Class1 { static Vector split(String string,String delimiter) { //StringTokenizer that works with empty strings boolean wasDelimiter=true; String token=null; Vector vector=new Vector(); if(string!=null) for(StringTokenizer stringTokenizer=new StringTokenizer(string,delimiter,true);stringTokenizer.hasMoreTokens();) { if((token=stringTokenizer.nextToken()).equals(delimiter))

Customizing a JComboBox

The JComboBox API provides a programmer with very little directcontrol over how list items are displayed. This is because, in trueobject-oriented fashion, a JComboBox object knows or cares very littleabout

Doing an [import java.package.*]

This tip is probably cosmetic, but it could result in great convenience. Doing a [import java.package.*] would allow usage of [public] classes in theaforementioned package without the usual required verbosity.

How to Format Numeric Values

At times you want to output the numeric values in specific format, for example, you may want to display monetary value with two decimal points, or scientific data with five

Java Applications and the “Current Directory”

A recurring question in the Sun Java Forum groups is, “How do Ichange the current directory of my Java application?” The correct answer is that you don’t! Java applications don’t

Keep HTML Totally Separate From Java Code

I have been working on Java Servlets and HTML for quite a long time and have always had a problem keeping HTML code separate from Java code, but now I’ve

Remove Unused Controls From Projects

If you usually load many controls into your VB project during development, you often have controls loaded that aren’t used any more by the time the project’s finished. If the

Multiply Conditions for Boolean Result

You often have to test for multiple conditions when enabling a confirmation button or other control that commits user input. Instead of using complex If…ElseIf statements or inline If functions,

Save Forms’ Size and Location at Run Time

You’ve noticed how some apps display forms and toolboxes in the same location and size as when you last closed them. Here’s some simple code that gives your VB app

Use an Easier Autohighlight Method

Most of us have a routine we call to autohighlight the entire contents of a textbox when it receives focus. And most of us type the name of the textbox

Test for Illegal Characters

Use this fast function to test for the occurrence of nonalphanumeric characters in a string: Private Declare Function StrSpn Lib “SHLWAPI” Alias _ “StrSpnW” (ByVal psz As Long, ByVal pszSet

Turn a Textbox or Label Into a Marquee

Sometimes you need to display information longer than the biggest textbox or label control you can have onscreen. I’ve written a routine that displays a textbox’s or label’s contents in