Advertisement

Results for "Author: rde"

ASP_Volume3 #63458
As$ociative Arrays in VB

As$ociative Arrays in VB. Thanks to: G.M.Adelson - Velskii And E.M.Landis - Herbert Glarner - Julienne Walker - Kelly Ethridge. 54k zip

ASP_Volume3 #63459
A Customizable CD/DVD/Etc Collection Database Program v1.5

This is a customizable CD/DVD/etc collection database program. Use it to document your collection of CD'd, DVD's, or other collection you might have. Uses a simple flat file to store the data. Included is an Excel spreadsheet that can open the flat file db. Update 1.5 no longer requires the default database and allows easier creation of new db's. Update 3rd June - Fixed spreadsheet.

ASP_Volume3 #63460
Callers Add-in [FINAL 2.24 - Sept 12, 2011]

UPDATE 2.21: fixed fatal typo bug introduced in v2.2 ... UPDATE 2.22: fixed 'exclude addin designer' introduced in v1.9 ... UPDATE 2.23: fixed 'underscore' incorrect behavior introduced in v1.8 (Initialize matched Class_Initialize) - thanks heaps to Kenneth Ives (kenaso) for your feedback ... UPDATE 2.24: fixed yet another bug - discovered the VBE Find function searches up to but not including the specified last line. Now correctly handles API declares with line continuation ... DETAILS: I borrowed code from Kamilche, Ulli and Darryl Hasieber to create this quite simple VB add-in that adds something I've sometimes needed as projects get too large and complex ... It adds a couple of entries to VB's code pane context menu so that when you right-click within a procedure (or on a declare) and select 'Callers' you get a popup menu listing all other routines in the project that call this code member ... It displays which routines reference any particular code member in the project, and allows you to select one to go to it - and a second entry called 'Callee' to go back if you wish ... FEATURES: Callee's include all procedures, API declares, Enums and Types, module level constants and variables, Implemented classes and Raised Events. Also identifies parent Type or Enum when right- clicking on one of their members. Finds public Enums of classes without being qualified by class name. Also adds a 'Clear' menu item to the Immediate Window ... This will probably be the last update as it seems to work fairly well now. However, bug reports or suggestions for improvement may see some further updates ... Just compile the project to automatically add the add-in to VB and get two new menu items 'Callers' and 'Callee' on the code context menu ... If you have compiled a previous version compile again with no VB IDE's open by selecting 'Make' on the Caller.vbp's context menu ... 16 kb zip.

ASP_Volume3 #63461
A generic stable indexed data sorting class

With this generic solution you can sort any data that is stored in an indexed data storage structure such as lists, collections, and arrays of all data types, including multi-dimensional arrays and arrays of UDTs ... Three methods are demonstrated - Event raising WithEvents, an Implemented callback, and a clever CallWindowProc technique I picked up from LukeH (selftaught) ... The Implemented callback method is almost twice as fast as the Event raising method, and is also slightly faster than the CallWindowProc method ... This is a complete solution that allows you to cancel sorting within the Compare routine, and also a progress parameter that indicates the percentage completed as a long value of 1 to 100. These features are included in the demo ... Update 21 Feb 2008 tweaked a little speed and attempted to create a level performance test between the CWP method and the other two - now just a few 100ths of a second behind the Implemented method ... Obscure Bug Fix 7 March 09. I documented they 'can sort sub-sets of the array data' but with these indexed versions if you do an error *could* occur without this very small change.

ASP_Volume3 #63462
A Comprehensive Spell Checker Revisited 4 (Update 12 Aug 2012)

This is an improved version of the spell checker from Shelz's COTM "A Comprehensive Spell Checker" at txtCodeId=65992. It includes a modified Russell Soundex phonetic algorithm and the Levenshtein Distance algorithm. It is now a *very* fast and effective spell checker solution... It impressed me with its most effective and concise spell checking algorithms, a perfect demo project, and the smart way it provided a complete database of words in a 1.3 MB download... But like many other spell checkers it had a common limitation... The basic aim of the Soundex algorithm is for names with the same pronunciation to be encoded the same so that matching can occur despite minor differences in spelling. The Soundex for a word consists of a letter followed by three numbers: the letter is the first letter of the name, and the numbers encode the remaining consonants. Therefore, only words beginning with the same first letter are compared for similar pronunciation using the standard algorithm... This version of the Russell Soundex algorithm has been modified to allow the matching of words that start with differing first letters so as not to assume that the first letter is always known. In this version the encoding always begins with the first letter of the word... The Levenshtein Distance algo marries perfectly with the results to identify the correct spelling for the given (mis-spelt) word every time! A search on the word "apolstry" with the minimum successful Levenshtein Distance returns just four words where one of these is "upholstery"... [Version 2] - Removed the dependence on the DAO library and is contained in a single text file. The Soundex encoding has been extended to include a 'reverse soundex' of all words (encoding from the end of the words backwards as well). On my 866MHz PC the access database took minutes to create the words database and was quite slow processing the lookup query, particularly after adding the reverse soundex to the query. Creating the database now takes 25 seconds and the lookups are now fast enough to be in real time (updated with every text entry change event)... [Update 18 Feb 09] - Improved speed of data loading at form load from 1.2 to 0.9 seconds on 866MHz PC. On my Athlon 4000+ the database builds in under 10 seconds and the data loads at form load in well under 0.5 seconds. On your average PC this would be fast enough to unload the form every use and re-load it when needed without the user experiencing any delay... [Update 21 Feb 09] - Added code to normalise words file to expected format (removes empty lines and converts comma delimited files)... [Version 3] - Considerably improved speed of both Soundex and Levenshtein Distance algos by eliminating Mid$(s,i,1) creating a temp string for every character and comparing chars, to using copymemory to grab the unicode value and comparing int's instead. I think the MidI code used was authored by Bruce McKinney, but if it is yours let me know and I will give you credit... [Version 4] - Injected some asm machine code into the database creation sub and now builds the database in a blink! Big thanks to Robert Rayment for your generous help with as$embler Happy coding, Rd :)

ASP_Volume3 #63463
Pretty File Names v2.2 - Final 2-16-08

Hi again all. This module will sort string array items of file paths which may contain numeric characters in a more natural order. I created this in response to a comment made on a previous submission. It is complete with demo and sample files so you can easily load and sort to see the results of the different settings available. ++++++++++++++++++++++++++++++++++++++++++++++++ It is intended for sorting file names, and will apply the same intuitive order for folders in the file path if they contain numeric characters. It will take into account all occurences of numbers in the string item including in the extension. ++++++++++++++++++++++++++++++++++++++++++++++++ Specifying a path is not required, neither do they need to have extensions, in fact, they do not need to be file names at all; just strings that may contain numeric characters within the string text. In other words, it can be used for normal pretty-sorting operations as well. But please note, this is intended for sorting file names and is a little slower than the included Pretty Number Sorter because of extra code to handle the extensions. ++++++++++++++++++++++++++++++++++++++++++++++++ It can order the items by extension, whilst still producing an intuitive order of the file path and names that may have numbers within them and that have the same extension. Or you can group by folder but still include extensions in the comparisons without grouping by them. ++++++++++++++++++++++++++++++++++++++++++++++++ Also included is a compare function that can be used in place of VB's StrComp that will order the filename items it compares based on the settings described above. It does not sort an array of items but compares just two items and returns the result. ++++++++++++++++++++++++++++++++++++++++++++++++ This is version 2 (2-5-08) in response to a request to add the handling of numbers in the extension. Bug Fix update 2-6-08. ++++++++++++++++++++++++++++++++++++++++++++++++ Version 2.1 (2-7-08) adds Indexed versions of my Pretty Sorters. Included in this module: strPrettyFileNames, strPrettyFileNamesIndexed, StrCompFileNames, strPrettyNumSort, strPrettyNumSortIndexed, StrCompNumbers, strPrettySort, strPrettySortIndexed, ValidateIdxArray, strStableSort2Indexed, strSwapSort4Indexed, InitedArray ++++++++++++++++++++++++++++++++++++++++++++++++ Update (2-8-08) removed the 260 character limit on the three file name routines. ++++++++++++++++++++++++++++++++++++++++++++++++ Update (2-15-08) with latest and final version of Stable QuickSort v2.2. ++++++++++++++++++++++++++++++++++++++++++++++++ Update (2-16-08) I just had to fix a design weakness. Removed the requirement to initialize the index array before passing to the indexed sorters. Final number 2! ++++++++++++++++++++++++++++++++++++++++++++++++

ASP_Volume3 #63464
Stable QuickSort v2.3 - SAFEARRAY Final (7th March 2009)

Grab hold of your snow boards folks - Rd's stable non-recursive quicksort algorithm the Avalanche just got even faster ... This is the latest and final version of my non-recursive quicksort based algorithm that has been written from the ground up as a stable alternative to the blindingly fast quicksort ... It is not quite as fast as the outright fastest non-stable quicksort, but is still very fast as it uses buffers and copymemory and is beaten by none of my other string sorting algorithms except my fastest non-stable quicksort ... A standard quicksort only moves items that need swapping, while this stable algorithm manipulates all items on every iteration to keep them all in relative positions to one another. This algorithm I have dubbed the Avalanche ... See included html page in 21k zip for details ... Also included is an Avalanche based pre-sorter and the latest version of my insert/binary hybrid Twister algorithm which utilizes the pre-sorter ... Obscure Bug Fix 7 March 09. I documented it 'can sort sub-sets of the array data' but with the indexed version if you do an error *could* occur without this very small change ... This is definitely the final version of this unique algorithm, I have very much enjoyed developing it. I hope you like it. Happy coding from Rd :)

ASP_Volume3 #63465
FileTime - Files date and time module (Bug fix 24 May 09)

FileTime API declares and handy wrapper functions. Bug fix 24 May 09 in FileTimeToDosTime and SysTimeToDosTime funcs.

ASP_Volume3 #63466
ArrPtr/StrArrPtr function for vb5 and vb6 (FIXED!)

This function returns a pointer to the SAFEARRAY header of any Visual Basic array, including a Visual Basic string array. Substitutes both ArrPtr and StrArrPtr. This function will work with vb5 or vb6 without modification. Normally you need to declare a VarPtr alias into msvbvm50.dll or msvbvm60.dll depending on the vb version, but this function will work with vb5 or vb6.

ASP_Volume3 #63467
String array pointers fast caching technique

This is a simple string pointer caching technique that speeds up the testing of algorithms that manipulate string array pointers such are string sorting routines ... I found the most time consuming part of sort testing was the resetting of the test array before every test ... This is a solution that removes the need to re-assign strings into a test array before every test is started ... This module contains two sub-routines named CacheArrayPtrs and ResetArrayPtrs ... You call CacheArrayPtrs whenever the array is loaded with new items ... You call ResetArrayPtrs before every test and instantly be ready to test the original cached array ... Update 16 Oct 09 to correct an error in the documentation only ... Usage code included in 3kb zip.

ASP_Volume3 #63468
A Better Synonym Checker Revisited

This is an extension of 'A Better Synonym Checker' submission by Zaphod that can be found at www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=32832&lngWId=1 ... His SynonymCheck method keeps M$ Word hidden, and does NOT require the M$ Word 9 Object Library ... This 4k class contains the following functions: GrammarCheck, SpellCheck, SynonymCheck, SpellCheckResults, SynonymCheckResults ... The last two do NOT display an M$ dialog box, but return an array of possible results ...

ASP_Volume3 #63469
Array Basics (FIXED 18-Apr-08)

Array basics for beginners

ASP_Volume3 #63470
Arithmetic operations on memory address pointers

Function to enable valid addition and subtraction of unsigned long integers. Treats the passed value as an unsigned long and returns an unsigned long. Allows safe arithmetic operations on memory address pointers. Assumes valid pointer and pointer offset. Rather fast too, has very small performance hit compared to unsafe in-line calculation, even in intensive loops. The code for addition came from PSC (LukeH) but I needed subtraction as well, thought I'd share. Confirmation that this produces valid results would be appreciated.

ASP_Volume3 #63471
Fast Sub-String Count (aka InStrCount)

This function searches the passed string for occurences of the specified sub-string. It has the ability to make case-sensitive or case-insensitive searches. It can also perform whole-word-only matching ... This SubStrCount implementation offers extended functionality which allows it to be used in a similar way to other token style functions ... SubStrCount will return the number of matches or zero if none.

ASP_Volume3 #63472
A ShellSort with a twist - Revised and even faster! (7 March 2009)

This shell algorithm is founded on a very solid performer that was originally developed by vb2themax, and optimized further by several very talented coders, before I twisted a little more out of it in this hybrid version. ---- This latest version employs a clever SAFEARRAY substitution technique to trick VB into thinking the four-byte string pointers in the string array are just VB longs in a native VB long array, and is now much faster. ---- Also uses valid addition and subtraction of unsigned long integers to guarantee safe arithmetic operations on memory address pointers. ---- Includes both Shell and ShellHyb algorithms with indexed versions in 25kb class and demo project. ---- Update 21 June 2008 inspired by comments from Roger Gilchrist. Improved indexed sorting support routine to better exploit fast re-sorting performance, and added much needed index sorting documentation. ---- Obscure Bug Fix 7 March 09. I documented they 'can sort sub-sets of the array data' but with the indexed versions if you do an error *could* occur without this very small change.

ASP_Volume3 #63473
Addin Extensibility Quick Reference + Tutorials

Addin Extensibility Quick Reference + Tutorials The VB5/6 IDE exposes a powerful object model that lets you manipulate VB's environment. It gives you control of your projects, components, modules, procedures, and even individual lines of code. You can customize all the menus and toolbars of the environment; trap nearly every user action, such as adding a new component or renaming an old one; open, scroll, move, and close all the code windows ... All this power comes at a price, however: the extensibility object model is rather complex, and you must spend some time acquainting yourself with how it works ... Hopefully, this extensibility quick reference will help you familiarise yourself more quickly and offers this information in a handy code format ... Now includes some tips and a couple of small MSDN tutorials ... Please report any errors or omissions - happy coding.

ASP_Volume3 #63474
Working with the Visual Basic IDE

This is a guide to help total beginners familiarize themselves with the Visual Basic development environment.

ASP_Volume3 #63475
MultiInStr (Update Nov 7, 2009)

This is an improvement on the MultiInStr function that appears in other peoples code now and again ... I don't know who the original author was, so I hope who-ever you are you don't mind ... The original code would search through a string looking for occurences of single characters, while this pair of functions search for single-or-multi character terms within the given string ... Included are MultiInStr and MultiInStrR functions ... Hope someone finds them useful ... Update 25 May - improved versions added thanks to contributions from Kenneth Buckmaster ... Update 7 Nov - Reset string len bug fix in Ken's MultiInStr ... Happy coding

ASP_Volume3 #63476
A Complete set of VB6 functions not available in VB5

Demonstrates how simple functions written in pure VB can be faster than many of VB's built in functions. For example, the super short and simple Split function is 30% faster than VB's. The Replace function with no API optimizations is 2 times faster than VB's, and over 3 times faster on large strings ... All functions are written in pure VB. Also declares the GetLocaleInfo API for use with the First Day Of The Week related functions, and for default system settings for the Formatting functions ... This would be a great learning tool for newbies. Of course, it would also be a great resourse for anyone using VB5, just plug this module into any project to enable all the VB6 functions it uses.

ASP_Volume3 #63477
Fix Line Endings Program

This VB5 program can parse large text files reading in a chunk at a time and will replace UNIX Lf chars with Windows CrLf's, or vice-versa. It uses API to boost performance and is very fast. Demonstrates finding and replacing text that crosses over the chunk boundaries - and is further complicated by the need to access the previous char to avoid replacing a Lf with CrLf if already preceded by a Cr. Uses no VB6 only functions and is just 32k compiled with no compiler optimizations. Includes word list to parse - a tiny file really at 4.5 MB but parses in a blink even in the IDE. Hope someone finds it interesting, or even useful! Happy coding, Rd :)

Languages
Top Categories
Global Discovery