devxlogo

Tip Bank

Display a Partial Text File Using FSO

This script reads specific lines of text from any text file and then stores the lines in an array that you can assign to a variable for data display.

FindFiles – Finding all files with a given filespec

‘ Finding all files with a given filespec into an ArrayList. Optionally scan ‘ also subdirectories of the input dir” Example:’ Dim files As New ArrayList’ FindFiles(files, “D:Articles”, “*.doc”, True)’

Use Lazy Initialization to Conserve Resources

Say you have an object with a property that uses a relatively large amount of resources?and you know the property may never be accessed. Consider waiting to create the property

Remove an Element in a Sorted Array

To remove an element at a given position in a sorted array, shift all the elements above it down one position. void erase(int a[], int& n, int index) { //