The Latest

DevX - Software Development Resource

Multitasking in a serial world

Many applications can benefit from using lazy processes or running routines in the background inside a single VB application. Designing a TaskThat was the fifty cent tour of what the

DevX - Software Development Resource

Hex – Convert from decimal to hexadecimal

‘ convert from decimal to hexadecimal’ if you pass the Digits argument, the result is truncated to that number of ‘ digits” you should always specify Digits if passing negative

DevX - Software Development Resource

IsValidEmail – Validate an email address

Function IsValidEmail(ByVal Value As String, Optional ByVal MaxLength As _ Integer = 255, Optional ByVal IsRequired As Boolean = True) As Boolean If Value Is Nothing OrElse Value.Length = 0

DevX - Software Development Resource

Hex2Dec – Convert from hexadecimal to decimal

‘ convert from hexadecimal to decimalFunction HexToDec(ByVal value As String) As Long ‘ we just need a call to the Convert.ToInt64 static method Return Convert.ToInt64(value, 16)End Function Related Posts How

DevX - Software Development Resource

Define JNI Functions and Convert Java Parameters to C++ Parameters in VC++

Include the following definition: #include The function definition goes like: JNIEXPORT jboolean JNICALL MethodName( JNIEnv *env,/*env variable: must*/ jstring functionId,/*String variable*/ jobject objectId/*Object variable*/){ const char *str = env->GetStringUTFChars( functionId,

DevX - Software Development Resource

Find Missing Numbers in a Sequence

There are several cases where you may write algorithms only to find missing numbers in a sequence. There is an efficient way to do this. Let’s say you have a

DevX - Software Development Resource

How to Read a Value from a Registry?

You can read a key from a particular path in registry by using the RegQueryValueEx function. The following piece of code reads a particular key under HKEY_LOCAL_MACHINESoftwareDevx: void GetKeyValue(char *key,

DevX - Software Development Resource

Hit a Website from the Command Line Repeatedly

Here’s the code: public class IncreaseCounter { public static void displayURL(String url) { boolean windows = isWindowsPlatform(); String cmd = null; try { if (windows) { // cmd = ‘rundll32

DevX - Software Development Resource

Has Sun Given Up on the Desktop?

ava is no longer the new kid on the block. Its original promises are no longer “wait and see” propositions. We have waited. We have seen. And though I could

DevX - Software Development Resource

An Easier Way to Trap Exceptions

Exception handling can be a real chore Related Posts Why Your Proprietary Software and Your Open Source Software Need Separate Brand NamesUnderstanding Memory Availability and UsageSkip Weekends SQL FunctionUsage of

DevX - Software Development Resource

Solving Global Namespace Clashes

The C++ language provides a single global namespace. This can cause problems with global name clashes. For instance, consider these two C++ header files: // file1.hfloat f ( float, int

DevX - Software Development Resource

ASP Message Board

This is an ASP based Message Board. It is driven by a SQL Database and it supports attachments (uploads are handled by SoftArtisan FileUP component, but it can be easily