SemiCRC – A fast CRC-like algorithm
‘ Evaluate the 16-bit Checksum of an array of bytesFunction SemiCRC(ByVal source() As Byte) As Integer Dim crc, temp As Integer, i As Long Const divisor As Integer = 32768
‘ Evaluate the 16-bit Checksum of an array of bytesFunction SemiCRC(ByVal source() As Byte) As Integer Dim crc, temp As Integer, i As Long Const divisor As Integer = 32768
‘ 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
long with the proliferation of the Internet and large-scale intranets, the requirements of enterprise applications have evolved. Launching a service in an expanding enterprise could put an ever-increasing load on
‘ Display a text with 3D effect” g: a Graphics object’ text: the text to be displayed’ coords: the Point with the X and Y coordinates’ col: the text color’
‘ Ask a Yes/no question’ returns True if the user replies “Yes”‘ Example: MessageBox.Show(AskYesOrNo(“Do you like me?”, “ME”, True))Function AskYesOrNo(ByVal text As String, ByVal title As String, _ ByVal defaultAnswer
‘ Change the icon of a drive’ Example: ChangeDriveIcon(“d”, “c:myicon.ico”)Sub ChangeDriveIcon(ByVal driveLetter As String, ByVal icoPath As String) ‘ create the parent key Dim regKey As Microsoft.Win32.RegistryKey = _ Microsoft.Win32.Registry.LocalMachine.CreateSubKey(
‘ Increment the numeric right-most portion of a string’ Example: MessageBox.Show(IncrementString(“test219”)) ‘ => 220Function IncrementString(ByVal text As String) As String Dim index As Integer Dim i As Integer For i
‘ Display the “Open with…” dialog and open the specified file with the ‘ selected program’ Example: ShowOpenWithDialog(“d: est.txt”) Shared Function _ ShellExecute(ByVal hwnd As Integer, ByVal lpOperation As String,