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

Paranoid and Proud of It: Part I

t is a natural tendency?and normally a very healthy attitude?to look for the best in any situation, to be optimistic about opportunities and life in general. However, when it comes

New PL/SQL Features in Oracle 8i: Part I

L/SQL is Oracle’s procedural extension to industry-standard SQL. Prior to Oracle 8i, PL/SQL was in a sort of static condition. It has not been changed much since Oracle 7. I

Jabber: Instant Messaging at Its Best

nstant messaging services are really just turbocharged e-mail systems. While the protocols, clients, and servers are very different, the result is very similar to an on-the-fly exchange of short e-mail

The MB BrowseForFolder Control

If you want to show the “Browse for Folder” dialog in your own application, this is the tool for you. It enables you to change any dialog’s property, such as

Always use “$-typed” string functions

VB official documentation seems to encourage you to use “$-less” string functions, e.g. Left, LTrim or UCase, instead of their time-honored Left$, LTrim$ and UCase$ counterparts. If you do so,

LenB has changed from VB5 to VB6

Visual Basic stores UDTs in unpacked format, that is it alignes all UDT elements to the double word (except that Integers and Boolean are aligned to the word, and byte

Conversion to proper case

When dealing with proper names, you may want to capitalize the first letter of each word, e.g. convert “john smith” into “John Smith”. Under VB3 you had to write a

Error Handling and Corrections

The following is an example to handle errors in VB. It combines “On ErrorGoTo” and “On Error Resume Next” to handle all errors (minor orserious ones), as well as attempting

How to See If Data is Numeric or Non-numeric

In JavaScript you can use isNaN to check if the given data is numeric ornon-numeric.Syntax : isNaN(testdata)ReturnValue :True if the testdata is non-numeric.False if the testdata is numeric.Here’s an example:

Methods of Class Instantiation

The following methods can be used for creating new instance of your classes, depending on your specific needs. import java.lang.ClassLoader;import java.net.URLClassLoader;import java.net.URL;public class InstantiateClass { testFinally newInstance() throws Exception {

Using Verbose to Debug

Using the -verbose option during compilation and execution is very helpful&#151both for obtaining more information about the classes being loaded by the compiler and the interpreter and to find out

A Problem in Using Enumeration

Once you are finished iterating through the values of an Object implementing the Enumeration interface, the next time youtry to use hasMoreElements() it will return false. Many developers are not

How to Rethrow an Exception in Your Code

Use the fillInStackTrace() method to rethrow a Throwable type of exceptional condition in your code. This is useful if you want to rethrow a exception occurred while using a method

Creating a Numeric-Input JTextField

Validating user input that is typed into a JTextField can becumbersome, especially if the input string must be converted to anumeric value such as an int. By subclassing JTextField, however,

Boolean Literals

The keywords false and true are Boolean literals that evaluate to 0 and 1 respectively. Note that in other programming language, VB for instance, false equals -1 and true equals

Casting Pointers To Members

C++ allows casting a pointer to member functions of one type to another pointer to member, as long as the signatures of the two match. However, the results of such

Hardcoded Char Arrays

Does your C++ compiler accept the following code? char s[3]=”abc”; // illegal in C++, no place for ” The standard requires that the size of a char array initialized with

Violating an Exception Specification

The implementation ensures that functions having an exception specification should throw only exceptions that are listed in their exception specification. For example: class X{};class Y{};void f() throw X{ throw Y();

Binding a Reference to an Rvalue

In a previous tip, http://www.devx.com/free/tips/tipview.asp?content_id=1585 , I explained the concept of lvalues and rvalues. Binding a reference to an rvalue is allowed as long as the reference is const. The

Extracting a Program’s Name

The name of the executable is stored in the string argv[0]. To access it, declare your main() function as follows: int main(int argc, char ** argv) Even if the application

Helper Functions

The interface of a class consists of its public members. Usually, private members represent implementation details and are not exposed to other classes and users. Private members can be member

JDBC Transactions

Question: Does “Connection.setAutoCommit(false)” mean “begin a transaction?” Answer: By default, JDBC connections start in autocommit mode. This means that every executed statement is treated as a separate transaction. A transaction

Storing InitialContext in Servlet Sessions

Question: Suppose a client of a Web application logs in using a login-handler servlet, and then some back-end operations using EJBs need to be performed. Can I store the initial

JavaBeans vs. Enterprise JavaBeans

Question: What is the difference between a JavaBean and an Enterprise JavaBean? Answer: It is natural to be confused regarding the relationship between JavaBeans and Enterprise JavaBeans (EJBs), because they