Advertisement

Results for "Category: String Manipulation"

7_2009-2012 #219498
HTTPSafeString

Makes a string http querystring friendly by replacing all non-alpha and non-numeric characters with the appropriate hex code. Helpful when using the wininet API. example: "(Find This)" becomes "%28Find%20This%29"

7_2009-2012 #219501
NitroSort

Sort Arrays at lightning speeds! I guess you could say this is the sequal to the TurboSort routine I recently uploaded. One of the comments pointed out that the CopyMemory API was about as fast as VB could swap strings, but the sort algorythm (BubbleSort) was poor and that the QuickSort algorythm was much faster.After some searching on the mothership, I found out how the QuickSearch algorythm worked and viola, here it is. This truely is fast. Here are the tests results. My system is a P233 with 128MB of RAM. I generated an array of 10,000 rows. Each row contained 100 random characters ranging from A-Z. I performed three tests. Here are the times in milliseconds. BubbleSort QuickSort Test 1 131,195.3 398.438 Test 2 131,351.6 421.875 Test 3 130,882.8 390.625 Whew!

7_2009-2012 #219502
TurboSort

Sort arrays much faster with a better string swapping routine! Wow, I couldn't believe all the rewrites of the same sorting routines in PSC. "Look at mine", "No, use mine", yadda, yadda, yadda. They all use the horribly slow: vTemp = String1 String1 = String2 String1 = vTemp Geezzzz - When you have to sort 30,000+ strings this is slllooooowwwwwww. Here's a solution. It uses the the same sorting routine (or choose your own), but implements a much faster swap routine using the CopyMemory() API. Now, instead of swapping strings, which in my case could be up to 9,000 characters, you are only swapping a 4 byte memory address. Rock On!!

7_2009-2012 #219509
FindPhoneNo

This function searches a text string for possible phone numbers and returns an array of those numbers. It allows you to specify a default area code, too. (If you know an easier or more elegant way to do this, let me know!) Doesn't work for international numbers.

7_2009-2012 #219519
GetList32 - Get 32 Bit Listbox Text with VB3

This code will get text from listbox's on 32 bit software using VB3. I've been trying to find a way to do this for a long time now. It was not possible in the past because getting listbox text using vb3 for 32 bit programs, required User32 and Kernel32 which vb3 did not allow. So I looked and looked for a way to do it and I found it. A DLL called "Call32.dll" allowed me to use 32 bit dll's. So here it is. If you like the code, please vote for me. Also, if someone can lead me on the right path for creating a .HLP file in vb3, I will create a help file on using Call32.dll. Jeffrey C. Tatum - http://www.oaknetwork.com/vb

7_2009-2012 #219520
AIM Toc 2.0 Logon Algorithm

This will create the 8 or 9 digit number that goes along with the log on packet for the newest version of the AIM TOC Protocol (version 2.0). The number that it makes, is based on the screen name and password. I guess it was a security feature added in, to prevent users from making AIM Crackers.

7_2009-2012 #219713
C++ OO Database library

The Variable Block Database (VBD) is a collection of C++ classes used to build portable database applications. Release 1031 features built-in support for multi-user and single user access. Database access methods include a B-tree with iterator and memory caching, navigational access, fixed and variable-length records. Includes general-purpose data structures such as linked lists, stacks, queues, balanced binary trees and others as well as a variable length string class, a postscript driver, and HTML driver. Ships with an advanced database recovery utility plus other text and binary utilities. Several example programs with are provided to demonstrate each of the concepts presented. This release has been built and tested under Windows 95/98, MSDOS, HPUX 10.20, Solaris 2.4, and RedHat Linux 5.2. All documentation is an HTML format, covering the class library, the example programs, and the utility programs included with the distribution. http://www.trumphurst.com/cpplibs5.html#Libraries_available_via_FTP__Q_Z_ Copyrighted freeware--Copyright © 1997 Douglas M. Gaer.

7_2009-2012 #219741
Rich Text Tag Editing Demo

This demo shows some of the capabilities of editing RichTextBox tags to achieve very fast global formatting. Great for Syntax Highlighting etc.

7_2009-2012 #219746
Fit Text to Picture Box

Finds the most appropriate font size to display a piece of Text in a picture box. Allows user to determine the Alignment of the text (Left, Right, Centre or Full justification). Options to include a drop-shadow, and the direction of the shadow are also included. Includes test form with example.

7_2009-2012 #219757
AI Chat

A REALLY simple way to do AI chatting. Uses the instr function to see if a word exists in a question. Show how to use instr, arrays, sesquentenial file reading/writing. I haven't programmed in much question's (open chat.dat in notepad) follows structue keyword1,keyword2,keyword3,answer (comma seperates, must do comma even if you use only 1 or 2 keywords)

7_2009-2012 #219760
Quotes in Strings

If you ever wanted to have a string with quotes inside this is a handy tip.

7_2009-2012 #219779
Batch Update using ADO

ADO has a great batch update feature that not many people take advantage of. You can use it to update many records at once without making multiple round trips to the database. Here is how to use it.

7_2009-2012 #219780
ADO Transactions

Transactions are atomic operations that allow you to do multiple operations on a database as one operation. For example, if you were creating a banking application in which you deducted $100 from one account and added it to another account, you wouldn't want the operation to fail right in the middle, because the money would be 'lost'! The solution is to wrap the SQL in a transaction. If the operation is aborted in the middle (the pc gets shut off for example) the database will rollback the changes so that the initial account was never debited the $100. This will make you feel good, especially if its your bank account!

7_2009-2012 #219781
ADO GetRows example

You can use ADO GetRows to output and ADO recordset to an array. This is often useful in n-tier applications when you are moving data between tiers--or if you want to persist your data in another way. http://adozone.cnw.com/default.htm

7_2009-2012 #219785
Database Basics: Part I

Since ASP is especially good at reading and writing to databases, let's start with a very simple database and scripts that we'll eventually build into a guestbook... Reprinted with permission from http://www.web-savant.com/users/kathi/asp

7_2009-2012 #219786
RDS Like connection on a ASP Page with a Combo Box

This is not real RDS but a simulation (Like Access's Not_In_List event). This functions gives the user the ability to 1) Add a new Value into a Database table and 2) update and select the value in the combobox WITHOUT REFRESHING the page from the server. I found this to be a life saver with large ASP pages with comboboxes on them that need to be dinamicaly filled. (You don't have to worry about the controls on the pages)

7_2009-2012 #219793
Check if a string is an email address

This code returns a boolean expression that declares if a string is a valid email address or not. It returns true if the string is valid, false if not

7_2009-2012 #219794
Convert UNIX files to DOS files and vice versa

This code converts UNIX files to DOS files and DOS files to UNIX files

7_2009-2012 #219827
backup_mySQL beta

This code gives a dump(backup) of your local or remote database. I use this in combination with vb to backup my remote database. If you are interested in the vb_code to do so... let me know....

7_2009-2012 #219828
sub select for mySQL

how to do subselects in mySQL

Languages
Top Categories
Global Discovery