Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
VB VB (1648)
VB.net VB.net (736)
C# C# (15)
ASP.net ASP.net (779)
ASP ASP (41)
VC++ VC++ (25)
PHP PHP (0)
JAVA JAVA (4)
JScript JScript (5)
  Database
» SQL Server (708)
» ORACLE (5)
» MySQL (0)
» DB2 (0)
Automation
» C/C++/ASM (11)
» Microcontroller (1)
» Circuit Design (0)
OS/Networking
» Networking (5)
» Unix/Linux (1)
» WinNT/2k/2003 (8)
Graphics
» Flash (0)
» Maya (0)
» 3D max (0)
» Photoshop (0)
Links
» ASP.net (2)
» PC Interfacing (1)
» Networking (4)
» SQL Server (4)
» VB (23)
» VB.net (4)
» VC (3)
» HTML/CSS/JavaScript (10)
Tools
» Regular Expr Tester
» Free Tools

Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )

ASin, ACos, ACot, ASec, ACsc - Missing inverse trig functions
Total Hit (3138) «Code LangId=1»' arc sine ' error if value is outside the range [-1,1] Function ASin(value As Double) As Double If Abs(value) <> 1 Then ASin = Atn(value / Sqr(1 - value * value)) Else ASin = 1.5707963267949 * Sgn(value) End If End Function ' arc cosine ' er ....Read More
Rating
ASinH, ACosH, ATanH, ACotH, ASecH, ACscH - Hyperbolic inverse trig functions
Total Hit (3813) «Code LangId=1» ' hyperbolic arc sine Function ASinH(value As Double) As Double ASinH = Log(value + Sqr(value * value + 1)) End Function ' hyperbolic arc cosine ' error if NUMBER is inside the range [-1,1] Function ACosH(value As Double) As Double ACosH = Log(value + Sqr(value ....Read More
Rating
Atn2 - Arc tangent of Y/X
Total Hit (3466) «Code LangId=1»' arc tangent of Y/X - returns values in all four quadrants Function Atn2(x As Double, y As Double) As Double If x = 0 Then Atn2 = Sgn(y) * 1.5707963267949 ElseIf x > 0 Then Atn2 = Atn(y / x) Else Atn2 = Atn(y / x) + 3.14159265358979 * Sgn ....Read More
Rating
Base Conversion module - A module to convert numbers between any bases
Total Hit (4192) «Code LangId=1»'----------------------------------------------------------------- ' Module: mBases ' (C) 2000 Trinet Ltd, http://www.trinet.co.uk ' Author: R. Deeming (richard@trinet.co.uk) ' ' Purpose: To provide simple conversion between different ' number ba ....Read More
Rating
Bin - Convert from decimal to binary
Total Hit (2790) «Code LangId=1»' convert from decimal to binary ' if you pass the Digits argument, the result is truncated ' to that number of digits ' Function Bin(ByVal value As Long, Optional digits As Long = -1) As String Dim result As String, exponent As Integer ' this is faster than creating t ....Read More
Rating
BinToDec - Convert from binary to decimal
Total Hit (4112) «Code LangId=1»' convert from binary to decimal ' Function BinToDec(value As String) As Long Dim result As Long, i As Integer, exponent As Integer For i = Len(value) To 1 Step -1 Select Case Asc(Mid$(value, i, 1)) Case 48 ' "0", do nothing Case 4 ....Read More
Rating
BitClear - Clear a bit in a value
Total Hit (2731) «Code LangId=1»Function BitClear(ByVal value As Long, ByVal bit As Long) As Long ' simply AND with the negation of the bit mask ' Range checking is performed in Power2() BitClear = (value And Not Power2(bit)) End Function ' Raise 2 to a power ' the exponent must be in the range [ ....Read More
Rating
BitCount - The number of "1" bits in a number
Total Hit (2704) «Code LangId=1» ' The number of 1's in a binary number ' ' This routine is based on the following property ' of binary numbers: n And (n-1) always clears the ' least significant "1" bit in the number Function BitCount (ByVal number As Long) As Integer Do While number number = ....Read More
Rating
BitSet - Set a bit in a number
Total Hit (2877) «Code LangId=1»' Set a bit in a value ' ' NOTE: requires Power2() Function BitSet(ByVal value As Long, ByVal bit As Long) As Long ' simply OR with the bit mask ' Range checking is performed in Power2() BitSet = (value Or Power2(bit)) End Function ' Raise 2 to a power ' the e ....Read More
Rating
BitTest - Test the value of a bit
Total Hit (3580) «Code LangId=1»' Test the value of a bit ' ' NOTE: requires Power2() Function BitTest(ByVal value As Long, ByVal bit As Long) As Boolean ' simply AND with the bit mask ' Range checking is performed in Power2() BitTest = (value And Power2(bit)) End Function ' Raise 2 to a po ....Read More
Rating
BitToggle - Invert a bit in a value
Total Hit (2961) «Code LangId=1»' Toggle a bit in a value ' ' NOTE: requires Power2() Function BitToggle(ByVal value As Long, ByVal bit As Long) As Long ' simply XOR with the negation of the bit mask ' Range checking is performed in Power2() BitToggle = (value Xor Power2(bit)) End Function ....Read More
Rating
CComplexNumber - A class for dealing with complex numbers
Total Hit (2764) «Code LangId=1»Option Explicit '------------------------------------------ ' A class for dealing with complex numbers '------------------------------------------ ' The main properties Public Real As Double Public Imaginary As Double ' Initialize this complex number ' (returns Me) Fu ....Read More
Rating
Ceiling - The integer equal or higher than a given value
Total Hit (2686) «Code LangId=1»' Returns the integer equal or higher than its argument Function Ceiling(Number As Double) As Long Ceiling = -Int(-Number) End Function «/Code»
Rating
CompareValue - Check whether a value is in a list of values
Total Hit (2808) «Code LangId=2»' Compares a numeric or string value with a list of other values. ' Returns the 1-based index of the matching value, or zero if the ' value doesn't appear in the list. ' String comparisons are case-sensitive. ' ' This function can conveniently replace a Select Case or a list ' ....Read More
Rating
DisplayExceptionInfo - Displaying error information
Total Hit (2885) «Code LangId=2» ' A reusable routine that displays error information ' Note: requires Imports System.Reflection Sub DisplayExceptionInfo(ByVal e As Exception) ' Display the error message. Console.WriteLine(e.Message) Dim st As New StackTrace(e, True) Dim i As Integer ....Read More
Rating
GetApplicationPath - Retrieving the path of the running application or add-in
Total Hit (3474) «Code LangId=2»' Return the application's path. ' Note: it also works with add-ins's dll, whereas Application.StartupPath ' returns ' Visual Studio .NET's startup path instead ' Example: MessageBox.Show(GetApplicationPath()) Function GetApplicationPath() As String Return System.IO.Pa ....Read More
Rating
IfNull - If the first argument is Nothing or a null string return the 2nd argument
Total Hit (2737) «Code LangId=2» ' If the first argument is Nothing or a null string return the 2nd argument Function IfNull(ByVal value As String, ByVal defaultValue As Object) As String If Not value Is Nothing AndAlso value.Length > 0 Then Return value Else Return CStr(defaultValue) ....Read More
Rating
IsAssembly - Check whether a specified file is a .NET assembly
Total Hit (2754) «Code LangId=2» ' Check whether a specified file is a .NET assembly Function IsAssembly(ByVal filename As String) As Boolean Try Dim asm As [Assembly] = [Assembly].LoadFrom(filename) ' if no exception is thrown, this is an assembly Return True Catch e As Excep ....Read More
Rating
IsComDLL - Check whether a DLL is an COM self-registering server
Total Hit (3133) «Code LangId=2»<System.Runtime.InteropServices.DllImport("kernel32")> Shared Function _ LoadLibrary(ByVal path As String) As Integer End Function <System.Runtime.InteropServices.DllImport("kernel32")> Shared Function _ GetProcAddress(ByVal hModule As Integer, ByVal procName As String) ....Read More
Rating
IsNumeric - Check whether an object is storing a numeric value
Total Hit (2968) «Code LangId=2»' Check whether an object is storing a numeric value ' Examples: ' Dim s As String = "hello" ' Dim d As Double = 2.4 ' Dim i As Integer = 5 ' Debug.WriteLine(IsNumeric(d)) ' => True ' Debug.WriteLine(IsNumeric(s)) ' => False ' Debug.WriteLine(IsNumeric(i) ....Read More
Rating
IsValidEmail - Validate an email address
Total Hit (2704) «Code LangId=2» 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 Then ' rule out the null string case Return Not IsRequired ....Read More
Rating
IsValidRegularExpression - Checking whether a given regular expression is in valid format
Total Hit (3532) «Code LangId=2» ' Check whether a given regular expression is in valid format ' Examples: ' Debug.WriteLine(IsValidRegularExpression("^((\(\d{3}\) ' ?)|(\d{3}-))?\d{3}-\d{4}$")) ' => True ' Debug.WriteLine(IsValidRegularExpression("^[|)$")) ' => False Function IsValidRegularExpression( ....Read More
Rating
IsValidUsPhoneNumber - Validating a US phone number
Total Hit (3085) «Code LangId=2» ' Validate a US phone number ' Example: ' MessageBox.Show(IsValidUsPhoneNumber("(123) 456-7890")) ' True ' MessageBox.Show(IsValidUsPhoneNumber("(123) 456-78901")) ' False Function IsValidUsPhoneNumber(ByVal phnNum As String) As Boolean Return System.Text.RegularExp ....Read More
Rating
IsValidEmail - Validate an email address
Total Hit (3598) «Code LangId=2» 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 Then ' rule out the null string case Return Not IsRequired ....Read More
Rating
IsValidUsPhoneNumber - Validating a US phone number
Total Hit (3035) «Code LangId=2» ' Validate a US phone number ' Example: ' MessageBox.Show(IsValidUsPhoneNumber("(123) 456-7890")) ' True ' MessageBox.Show(IsValidUsPhoneNumber("(123) 456-78901")) ' False Function IsValidUsPhoneNumber(ByVal phnNum As String) As Boolean Return System.Text.RegularExp ....Read More
Rating
IsValidUsSSN - Validating a US Social Security Number (SSN)
Total Hit (4065) «Code LangId=2» ' Validate a US Social Security Number ' Example: ' MessageBox.Show(IsValidUsSSN("123-12-1234")) ' True ' MessageBox.Show(IsValidUsSSN("123-123-1234")) ' False Function IsValidUsSSN(ByVal ssn As String) As Boolean Return System.Text.RegularExpressions.Regex.IsMatch( ....Read More
Rating
IsValidUsZip - Validating a US ZIP code
Total Hit (2865) «Code LangId=2» ' Validate a US ZIP code ' Example: ' MessageBox.Show(IsValidUsZip("12345")) ' => True ' MessageBox.Show(IsValidUsZip("12345-1234")) ' => True ' MessageBox.Show(IsValidUsZip("12345-12345")) ' => False Function IsValidUsZip(ByVal zip As String) As Boolean Re ....Read More
Rating
KeepInRange - Ensure that a value is in a given range
Total Hit (2615) «Code LangId=2» ' 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 types and with objects ' that implement the IComparable interface Function KeepInRange(ByVal va ....Read More
Rating
RunningAsExe - Determine whether the code is running in an EXE or DLL
Total Hit (2623) «Code LangId=2» ' Return True if the application is running as an EXE ' Return False if the application is running as a DLL Function RunningAsExe() As Boolean ' get the codebase of the running assembly Dim codeBase As String = Reflection.Assembly.GetExecutingAssembly.CodeBase ' ....Read More
Rating
Any2Dec - Convert from any numeric base to decimal
Total Hit (3320) «Code LangId=1»' convert from any base to decimal ' BASE can be in the range 2-36 Function Any2Dec(ByVal otherBaseNumber As String, ByVal base As Integer) As Long Dim index As Long Dim digits As String Dim digitValue As Long ' check base If base < 2 Or base > 36 T ....Read More
Rating


(Page 110 of 133) 3968 Result(s) found  ... 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 ...

Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.