
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.
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
‘ 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
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
‘ Keep the first argument in the range [lowLimit, highLimit]’ If the value is adjusted, the fourth (optional) argument is set to True” This function works will all basic data
‘ Return the position of the argument in a list of values’ or zero if the argument isn’t included in the list’ It works for both regular values and for
‘ 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
// this Command will return the server Names running on local NetworkExec Master..xp_CmdShell ‘osql -L’OUTPUT Eg:Servers: Server1 Server2 Server3 Server4 Server5
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,
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
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,
Here’s the code: public class IncreaseCounter { public static void displayURL(String url) { boolean windows = isWindowsPlatform(); String cmd = null; try { if (windows) { // cmd = ‘rundll32
‘ Returns the date that Rosh Hashanah begins’ for the requested year. It is important to note that’ Rosh Hashanah is based on the Lunar cycle so the Holiday’ actually
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
In other words, you don’t want anyone to be able to pass the object of your class “by Value” to a function.To achieve this, override the copy constructor of your
Threads can hang indefinitely if one thread is Entered in a critical section but returned without Leaving it. There is a simple solution to make sure that this doesn’t happen.
The following is a way to programatically set the text in the combo box without adding to the list box portion.When using a combo box, if the style is CBS_DROPDOWN,
Exception handling can be a real chore
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
‘ convert from any base to decimal’ BASE can be in the range 2-36Function Any2Dec(ByVal otherBaseNumber As String, ByVal base As Integer) As Long Dim digits As String Dim digitValue
‘ convert a positive number to any base’ BASE can be in the range 2-36Function Dec2Any(ByVal number As Long, ByVal base As Short) As String Dim index As Integer Dim
The Convert class offers a few static methods that let you easily and quickly convert a binary, octal, or hexadecimal number(stored in a String) into the equivalent Byte, Short, Integer,
The ToString method of the Convert class lets you easily and quickly convert a decimal value into a string representation of that number to binary, octal, or hexadecimal base: ‘
‘ These two VBScript routines can be use to encrypt data passed on the ‘ querystring, ‘ so that users can’t decode what is being passed between ASP pages.’ USE:
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
‘ a class to display the BrowseForFolders dialog’ usage:’ Dim diag As New BrowseForFoldersDialog()’ diag.Description = “Select a directory”‘ If diag.ShowDialog() = DialogResult.OK Then’ ‘ the user selected this directory’
You can host the WebBroweser in a Windows Forms application, similarly to what you can do with any other ActiveX control. You just need to right-click on the control toolbox,
The System.Net.Dns class exposes a few static methods that let you resolve an internet domain name – such as www.vb2themax.com – into a 4-part numeric IP address, also known as
The .NET framework includes a ByteViewer control, that you can use on your own forms to display data stored in a Byte array or in a file. The ByteViewer control
The String.Format function supports many formatting options, but none allows you to display right-aligned columns of numbers, as in: 1.00 12.00 123.00 1,234.00 However, you can easily create a helper
Private Type DEVICE_MEDIA_INFO Cylinders As Double MediaType As STORAGE_MEDIA_TYPE TracksPerCylinder As Long SectorsPerTrack As Long BytesPerSector As Long NumberMediaSides As Long MediaCharacteristics As LongEnd TypePrivate Type GET_MEDIA_TYPES DeviceType As Long











