The Latest

DevX - Software Development Resource

Checking the Current CLASSPATH Programmatically

Often, it is helpful to find the current classpath. This can be done from within a Java program by using the following code: System.out.println(System.getProperty( Related Posts HTML Input Placeholder AttributeLabour

DevX - Software Development Resource

What Is a Thunk?

The term thunk dates back to the days of the antediluvian Algol programming language and has stuck since then. A thunk is an invisible and parameter-less function or procedure that

DevX - Software Development Resource

DLLs and Dynamic Memory Allocation

Dynamic linking — either in the form of shared libraries in Unix or Windows DLLs — is not defined by standard C++. However, this is a widely used feature among

DevX - Software Development Resource

An Alternate way to Define Constants in Java

A typical way in which constants or global variables are defined in Java is to define a class so it stores all the constant variables which are marked as Related

DevX - Software Development Resource

Obtain Exception’s Stack Trace as String

It is sometimes necessary to get the exception’s stack trace as String (for logging, reporting, etc.). Unfortunately, the Exception class itself provides only the getMessage() method which does not include

DevX - Software Development Resource

Variadic Macros

The concept of a variable argument list is rather common: void f(const char *format, Related Posts Set Up a Database Dialect in Spring BootHow Much Does It Cost to Build

DevX - Software Development Resource

Provide

It is often helpful to provide a Related Posts Forrester: 100% of Large Enterprises Will Adopt HadoopAchieve Faster and More Controlled Management of MySQL Databases with Updated dbForge Studio for

DevX - Software Development Resource

Passing a UDT(User-Defined Type) Between Forms

There is a very simple way to get around the compile error when passing UDT (user-defined type) in procedure between forms. Just declare the procedure as Friend instead of Public.Example:

DevX - Software Development Resource

Resize the Column Headers to Fit the ListView

This function resizes the column headers to fit the ListView. It can be used in the Form_Resize event or just in Form_Load. ‘Module: Module1Option ExplicitPrivate Type RECT Left As Long

DevX - Software Development Resource

Get Started with JBoss Application Server

he JBoss Application Server is an open-source EJB solution that deserves your attention. Why? Because not only does the JBoss server have some impressive features that Weblogic, WebSphere, and the

DevX - Software Development Resource

Essential JavaScript: 8 Cross-Browser Solutions

here’s a core set of problems that every JavaScript developer will run across sooner or later. In my Web Developer classes, I’ve noticed that some questions arise repeatedly—they’re common problems.

DevX - Software Development Resource

Not Much to ‘C’ in C#

# is getting a lot of attention these days?so much attention that some DevX readers have begun to remonstrate on what they consider excessive coverage, especially for a language that

DevX - Software Development Resource

Form-Building Routines III—the Conclusion

f you’ve been following this series, the last couple of articles (see Resources) focused on writing some useful “form-building” routines in ASP pages. I’ll continue this month by developing routines

DevX - Software Development Resource

A Null Preprocessor Directive

An empty # sign is a null preprocessor directive. A null directive has no effect but you can use it to document your intentions, for example: ifndef HEADER_INCLUDED#define HEADER_INCLUDED#else# //

DevX - Software Development Resource

Wide-char File Streams

The library supports two types of file streams: char-based streams such as std::ifstream and whcar_t streams. The names of wchar_t streams are the same as their char-based counterparts, except that

DevX - Software Development Resource

Repositioning a std::fstream Pointer

Just like the fseek() function of , classes enable you to position the stream’s pointer at an arbitrary location by calling the seekg() member function. For example, you can position

DevX - Software Development Resource

char[] vs. char *

C++ forbids direct assignments of arrays. Therefore, your compiler will flag the following code as an error: char buff[];buff= Related Posts Connecting to a MySQL Database from the Command PromptAuthors

DevX - Software Development Resource

Optimizing the Use of std::string

Here a few guidelines for improving std::string’s performance and avoiding common pitfalls. Consider the following for-loop: std::string str = Related Posts Survey: Back-End Integration, Security Are Top Mobile Development ChallengesNew

DevX - Software Development Resource

Pointers and Arrays

C++ never passes arrays to a function. Instead, the argument is implicitly converted to a pointer that contains the address of the first array element. For example: void f(char s[]);int

DevX - Software Development Resource

Using a Template Member Function

An ordinary class may have template member functions. In the following example, the class A declares a template member function called f(): class A{public: template T f(T t);}; You may

DevX - Software Development Resource

Template Parameters and Template Arguments

The terms template argument and template parameter do not mean the same thing. A template parameter is a symbol, or a placeholder which is replaced by the actual argument when

DevX - Software Development Resource

To DLL or not to DLL?

Many Windows programmers use DLLs abundantly. Although dynamic linking certainly offers some advantages, it can also cause noticeable maintenance and performance setbacks. For starters, DLLs are slower than statically linked

DevX - Software Development Resource

Memory Deallocation Myths

A common myth among programmers says that you can avoid calling delete in your application because the operating system will release the allocated memory when the application terminates anyways. Indeed,

DevX - Software Development Resource

Screen Grabber Utility

This utility, provided as VB source code, captures the desktop and saves your selection as JPG (with quality settings) or BMP. Using it is quite simple: Go to menu and

DevX - Software Development Resource

Open and close the CD drive’s door

Here’s a short code snippet that lets you programmatically open and close the CD door. Note that not all the CD drives support these functions: Private Declare Function mciSendString Lib

DevX - Software Development Resource

The Error Lines Add-in

This is a simple addin that allows the user to add/remove err line numbers in their code and use them in an compiled application through the ERL function. With this