Convert Dates without the Use of Separators
Sometimes the user forgets to enter a date with date separators. A good way to deal with this is to correct the users mistake instead of forcing the user to
Sometimes the user forgets to enter a date with date separators. A good way to deal with this is to correct the users mistake instead of forcing the user to
If you want a form to support context-sensitive help, set the WhatsThisButton and WhatsThisHelp properties on the form to True, and set the WhatsThisHelpID property to a corresponding help-file topic
There are many ways to count the occurrences of a string within a text. Here’s a simple function that uses the InStr() function: Function CountWords(ByVal Text As String, _ ByVal
There is no native function for returning the current date format string. Here’s a simple function that calls the GetLocaleInfo API in order to retrieve the short date format string:
All AWT component classes have a setCursor() method that allows for dynamically setting the cursor for a particular component and any subcomponents.For example, if you set the cursor for a
Sometimes you need variables scoped by thread so that each thread has an independent copy. There’s an easy way to create and manage such variables.The java.lang.ThreadLocal class provides a wrapper
If class B uses only pointers or references of class A, you don’t have to include A.h. You can simply forward declare class A as shown below. //File B.hclass A;
Suppose you want to pass a Boolean system property, -DDEBUG=true or -DDEBUG=false, from the command line. Normally, you’d probably use the following in source code to retrieve it: boolean b
// Quickly zero out a struct. This can be applied// To an array of structs also, since// memset() initializes memory regions#include struct sample {int a;short int b;int c;};struct sample s;//