One of the external software modules I need is written using Unicode for characters. Whoa,... All of the software I've written for about 50 years has been using good old ascii (ansi, 8 bit) characters. So I have endeavored to upgrade all of the code in my stable to use Unicode. This has not been as straightforward as I would have liked but its done now.
The source files of the following applications are maintained in GitHub. It allows others to see the code and also prevents unintended loss should the computer die unexpectantly.
some are personal and at least one is a modification of an open source application.
Thunderbird keeps an address book and incoming eMail addresses are also captured (if configured that way). Some of the eMail addresses are long, complex and totally useless. There may be duplicates also. This application attempts to remove duplicates and long, complex eMail addresses.
Manipulating/managing the address book in Thunderbird is troublesome. There are so many eMail addresses collected over the years that one could spend a great deal of time normalizing and deleting addresses. So I wrote a program to do this for me. The program allows one to merge multiple address books (Thunderbird will hold multiple books).
The csv file that is produced by Thunderbird's export function contains a header line that names each field in each record. The BuildData program reads the first line ot the csv file and prepares a .h and .cpp file that is used to manipulate the csv data. This is needed because of the number of fields in each record (37 at this time).
Sort the file names by the name of the file rather than the "path\filename" in a VS17 project file: <ProjectName>.vcxproj. Sorts the Resource Files in the order "...rc", "...rc2", image file. Unfortunately, the sections are sorted separately due to the organization of the project file.
Note, Visual Studio 2022 seems to do a good job of putting the file names in the proper order. SlickEdit also seems to be putting the files in the right order. So this might be redundant at this point in time. We'll see.
I wrote an short article about a c++ vector that will expand as needed. It was not received with much enthusiasm. Oh well. Actually having written the article I've made some useful changes and I will up date the example and the article and put it all in GitHub.
Expandable is a template that implements a single column array (a vector). Each element of the array is a member of a single class or struct. Each reference to the array has the potential to increase the size of the array. Of course this comes at a cost, the cost of copying elements from the array from one place to another.
Adding data to the array can be achieved in three separate ways:
- Manually by indexing into the array
- Appended to the array by using a "+=" operator
- Inserted into the array according to a user defined sort order by using an "=" operator
Expandable Test App
Encrypted Ftp App
First let me point out that this application works on Yahoo Small Business Web Host. I do not have the resources to test it at many, several or even two different web hosts.
Web Hosts are getting a bit smarter about login protocols for updating web sites. An old version of Dreamweaver stop updating my web site because they are now requiring login to the site to be encrypted. However, just because the login is encrypted the rest of the transactions to update a web site are just plain old ftp.
This app uses OpenSSL to perform the encrypted part of the update process and then the ftp is allowed to go forward.
When this first happened I turned to OTS products to update my web site. FileZilla Pro seemed to work and I am able to update the web site with it. However it requires the user to figure out which files need updating. Filezilla helps by highlighting various files it deems might require updating but there a lot of false positives. FtpApp attempts to make this job easier.
The first task the user must perform is to create a database containing all the files on web site. The goal is to get a list of all the files that are needed by the web site host with size and date attributes that are consistent with the local version of the web site. Unfortunately, many web hosts use Unix/Linix server and the file sizes are different for text files (Linix does not require a line feed to help define lines whereas Windows does). Furthermore dates at a web host are not necessarily consisten with either the uploading of the file or the dates on the local copy of a file.
The dilema is resolved in FtpApp by saving the local file attributes after a file is uploaded to the web host. Thus the next time changes are made to the local files a comparison may be made with the assurance that only changed files will be noted. Comparison is made using the files size and modification date.
However, there is a little issue at the beginning. If the web site already exists and FtpApp is being used for the first time to update the web site then there is not past history database for the web site. In this case, the web host is contacted and all the web site files are downloaded and placed in the "Previous" version of the web site. Since the dates and sizes are probably all different for the previous and current local site, they will all need to be uploaded so that the web host and local files are consistent and the "previous" files list is updated with the local files date and size. After the initial upload FtpApp will only indicate changed fiels for uploading.
And there is one other case. Suppose one does not have a local copy of the web site. There is a command to download all the files from the web host. This will establish a local copy and save the date and size of the local copy of the files in the "Previous" database for the web site.
Furthermore, since both lists include all files on both sites it is possible to discover new files and old files. If a file exists in the local site in the older list and doesn't exist in the current list but still exists on the remote site then it has probably been deleted for the local site and should be deleted from the remote site.
It should also be noted that changes suggested by FtpApp must be confirmed by checking a box for each file for which an action is suggested (or selecting the "Check All" button).
In any event this application works more like Dreamweaver in that it alerts the user to files that need updating on the web site and facilitating the update.
When preparing an application there are object files, compilation and library support files, library files and even data files. Clearly some of these files are not needed on GitHub. This application removes these files from the Git copy of the source.
Read San Jose Radio Amateur Civil Emergency Service badge barcodes to facilitate check-in and check-out at events. Also allows members without badges and visitors to check-in and check-out. Allows check-outs to be performed by someone after everyone is gone. Prepares Excel spreadsheet reports.
The source, executable and installer are being maintained in a git repository.
An ICS-214 is an Activity Log. It's original intention was to record the activity of a single event. Furthermore, the individual activities were only noted at the beginning of the activity, that is, the start time was recorded by the end time was not.
Clearly, during this pandemic we are constrained to stay within safe boundaries. This prevents most of us going to some activity with numbers of people in attendance. So our activities become little things over the course of weeks or months. The purpose of this application is to allow capturing the time spent on each of these little activities over the course of a long period (e.g. a month). The application captures the start time, end time and a comment on the activity. During the display of the log, the total time is computed and displayed.
The source, executable and installer are being maintained in a git repository.
This is primarily a Last Pass Import/Export Extension to KeePass 1.40.1 (C++ Version).
I like Password Vaults and a few years ago the password vault I was using got a little confused and deleted all my passwords. I abandoned that vault and decided that the next vault I used would have a backup. I chose LastPass based on comments but I was determined to save the passwords on my personal computer too. So KeePass also received good marks and the source is available. Being a veteran C++ SE I chose it in the C++ version. Last Pass keeps changing its export function so this version will process the latest version of its export file (Early 2022). Since It might be necessary to restore the passwords to LastPass there is an export function included in the KeePass/LastPass extension. It will produce the same file as what was imported. I have not attempted to load it into LastPass...
The library is an ongoing project and is included at each Git repository of the applications.
The modules named with a prefix of "Acc" define a basic interface to a Microsoft Access Data Base (i.e. Access). They are used in Codegen to produce modules that allow manipulation of tables and records in Access (using the "Acc" modules. The remaining modules in the project are designed specifically for the Radio Amateur Civil Emergency Service (RACES) database and are referenced in three applications.
There are three groups of modules in this directory. They must be compiled directly in a project rather than be included in a static or dynamic library. The modules include resource (i.e. .rc2) files that must be included in the project's resource (.rc2) file. The modules are:
- About Box -- A standard dialog box for displaying the information in a projects resource file (i.e. .rc)
- Calibrate a 12 pt Courier Font for display and printer
- Options dialog for scaling the font for printing and display
Visual Studio will generate an MFC Single Doc/View application. The standard MFC Single Doc/View application has been enhansed a bit with:
- Each of the principle modules has a parent class, CApp, CDoc and CScrView.
- Examples of toolbar standard and elongated buttons, drop down combo boxes and edit boxes
- An easy way to output data in text form to the window
- An easy way to output data in the window or any other data structure to a file
There are three main parts to the MFC application?
- The main module which has an InitInstance and ExitInstance functions. This is generally named with the name of the app (e.g. TestApp). They allow a point to initialize everything that needs initializing. Then the command vector in the Doc module is used to initiate actions on behalf of the user.
- The Doc Module contains the command vector for most of the commands implemented by the app. The main module has command vectors for the help file and the print setup as these functions need elements contained only in the main module.
- The View Module contains function that are called in response to view()->Invalidate() which is implemented in the MFC modules. Displaying data as text is implemented from this module. An example of this is the NotePad module. The specific functions called during display output depends on an enum, DataSource, defined in the Doc header file and stored in the Doc variable, dataSource.
There are features for storing data between executions of the app in an initialization file
A little program to arrange Audio Book tracks into a single directory. Unicode, 11/19
Pch Clean -- Remove references to pch files from VS Project File
Some time ago I wrote a little utility program on on of the mainframe computers that I was then working on called pp. The program had only one or two endearing qualities. It would print any program source file that I could describe using wildcard characters on a command line. It knew the difference between a source and object file by the extension.
Furthermore it would break pages at useful places in the program source. Back in the day there existed something called fan-fold paper. A printer would just print right over the edge of one page and onto the next. It was useful to print pages not continuous streams of text. Once the idea of pages was introduced into the print program I noticed that I did not care for the functions/blocks of code to be spread across two pages (provided that it would fit on one page). The program, pp, was then given the job of partioning the source code so that blocks of code separated by two blank lines as much as possible was printed on one page.
RACES Contact Lists
Used to maintain the RACES database. Unicode 11/19
Wix is a Windows Installer Program. It produces an ".msi" file that when selected will install almost anything onto a Windows PC. It is a difficult program to understand and the documentation is only fair. However, over the past week or so I have managed to create an installer for pp. One goal of the installer for pp was to add the path to pp to the System.Path. This is necessary due to the command line nature of pp. Ok, I could have put a windows front end on pp, but why bother. It was more interesting to see if I could get an installer to add the pp path to the System.Path. The description of the WixApp that creates a Product.wxs file is here. Unicode 11/19.
Popup Window Example
To display a lightbox click here