Click here to Skip to main content
15,112,252 members

Articles by David A. Gray (Articles: 19, Tip/Tricks: 10, References: 5)

Articles: 19, Tip/Tricks: 10, References: 5

RSS Feed

Average article rating: 4.58

Database Development
SQL Server
Posted: 26 Oct 2008   Updated: 26 Oct 2008   Views: 26,921   Rating: 3.25/5    Votes: 4   Popularity: 1.96
Licence: The Code Project Open License (CPOL)      Bookmarked: 17   Downloaded: 380
Please Sign up or sign in to vote.
MD5 Digest XSP with error trapping and full Unicode support, in and out.
DevOps
Posted: 17 Jun 2016   Updated: 17 Jun 2016   Views: 12,840   Rating: 3.47/5    Votes: 8   Popularity: 3.13
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 290
Please Sign up or sign in to vote.
A Microsoft Excel worksheet for accurate, easy, fast design and application of Windows forms and resource strings
General Programming
Debugging
Posted: 8 Jun 2017   Updated: 8 Jun 2017   Views: 15,203   Rating: 5.00/5    Votes: 11   Popularity: 5.21
Licence: The Code Project Open License (CPOL)      Bookmarked: 15   Downloaded: 263
Please Sign up or sign in to vote.
Historically, ETW has been portrayed as having a very steep learning curve, along the lines of the effort required to summit Everest. Realizing its potential value, I set about to reduce the effort to that required to summit Pike's Peak.
Programming Languages
C
Posted: 4 Aug 2018   Updated: 4 Aug 2018   Views: 7,882   Rating: 5.00/5    Votes: 7   Popularity: 4.23
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 78
Please Sign up or sign in to vote.
Beware the abandoned stack frame, for it can be plundered at will.
C#
Posted: 12 Jun 2016   Updated: 12 Jun 2016   Views: 9,331   Rating: 3.86/5    Votes: 3   Popularity: 1.84
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 69
Please Sign up or sign in to vote.
What happens when you have more items in your list than you have items in your control string?
Posted: 16 Sep 2018   Updated: 17 Sep 2018   Views: 11,602   Rating: 5.00/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 0
Please Sign up or sign in to vote.
Some claim that it's hard to use DocFX to generate GitHub Pages, but I discovered that it is pretty straightforward, once you mark all the booby traps.
Posted: 23 Jun 2019   Updated: 23 Jun 2019   Views: 9,345   Rating: 4.00/5    Votes: 2   Popularity: 1.20
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 0
Please Sign up or sign in to vote.
Some JSON strings need a little help fitting into a C# object.
Posted: 10 May 2015   Updated: 10 May 2015   Views: 13,600   Rating: 4.67/5    Votes: 7   Popularity: 3.94
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 192
Please Sign up or sign in to vote.
This article describes a class that adds color to console program displays.
Posted: 19 Jun 2019   Updated: 23 Jun 2019   Views: 8,372   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
This is the first of a two-part series about string conversion issues that recently arose in my practice.
C# 3.5
Posted: 7 Sep 2014   Updated: 7 Sep 2014   Views: 12,812   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 1
Please Sign up or sign in to vote.
Join me for an adventure in time zone conversion.
Posted: 16 Jun 2016   Updated: 16 Jun 2016   Views: 8,050   Rating: 3.50/5    Votes: 3   Popularity: 1.67
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 55
Please Sign up or sign in to vote.
When I needed to compute the Daylight Saving Time transitions for any year, I had to dig a bit deeper into the time zone information stored in the Windows Registry.
C# 7.0
Posted: 2 Sep 2018   Updated: 7 Oct 2018   Views: 6,370   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The BSD License      Bookmarked: 2   Downloaded: 112
Please Sign up or sign in to vote.
This article demonstrates a class library that supports command line parameters with default values stored in application settings.
C++
Posted: 10 Apr 2019   Updated: 10 Apr 2019   Views: 10,493   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 0
Please Sign up or sign in to vote.
The article walks through the steps necessary to create native Windows on Arm builds of several popular libraries.
Typescript
Posted: 1 Jun 2018   Updated: 7 Jun 2018   Views: 8,594   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 57
Please Sign up or sign in to vote.
If you use the Angular CLI, you need a custom command prompt, along the lines of the Visual Studio Developer Tools command prompt.
VC++
Posted: 9 Apr 2015   Updated: 2 Jun 2015   Views: 12,380   Rating: 4.75/5    Votes: 3   Popularity: 2.27
Licence: The Code Project Open License (CPOL)      Bookmarked: 12   Downloaded: 408
Please Sign up or sign in to vote.
Use static buffers to guarantee that error message reporting succeeds, even when token replacement is required, and memory is low.
Posted: 1 Jun 2015   Updated: 19 Jan 2016   Views: 21,540   Rating: 4.95/5    Votes: 18   Popularity: 6.22
Licence: The Code Project Open License (CPOL)      Bookmarked: 17   Downloaded: 117
Please Sign up or sign in to vote.
This article documents issues that I have identified in the new secure overloads of the CRT buffered print routines.
XML
Posted: 3 Apr 2017   Updated: 1 Aug 2021   Views: 12,931   Rating: 5.00/5    Votes: 16   Popularity: 6.02
Licence: The BSD License      Bookmarked: 20   Downloaded: 214
Please Sign up or sign in to vote.
Though useful and mostly harmless, pitfalls can lead unwary developers astray.
Web Development
HTML
Posted: 7 May 2015   Updated: 12 Jul 2016   Views: 16,191   Rating: 5.00/5    Votes: 6   Popularity: 3.89
Licence: The BSD License      Bookmarked: 4   Downloaded: 151
Please Sign up or sign in to vote.
Share Win32 string resources without the risk of conflicting resource IDs
Posted: 25 Jun 2016   Updated: 12 Jul 2016   Views: 17,173   Rating: 4.92/5    Votes: 15   Popularity: 5.64
Licence: The BSD License      Bookmarked: 10   Downloaded: 183
Please Sign up or sign in to vote.
The Excel powered resource generator, version 2, is vastly improved and better documented.
Node.js
Posted: 25 Apr 2017   Updated: 25 Apr 2017   Views: 7,651   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 48
Please Sign up or sign in to vote.
This article describes a handful of powerful shell scripts that I use to further automate my Angular 2 application development.

Average blogs rating:

No blogs have been submitted.

Average tips rating: 4.25

Desktop Programming
Win32
Posted: 10 Jan 2016   Updated: 27 Feb 2016   Views: 8,722   Rating: 4.75/5    Votes: 4   Popularity: 2.86
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 0
Please Sign up or sign in to vote.
Operating Systems
Windows
Posted: 24 Apr 2018   Updated: 24 Apr 2018   Views: 5,971   Rating: 5.00/5    Votes: 7   Popularity: 4.23
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 0
Please Sign up or sign in to vote.
Run many (hundreds, even) files through a program or script, using nothing but CMD.EXE.
Posted: 15 Jul 2019   Updated: 17 Jul 2019   Views: 9,141   Rating: 4.65/5    Votes: 8   Popularity: 4.20
Licence: The Code Project Open License (CPOL)      Bookmarked: 11   Downloaded: 0
Please Sign up or sign in to vote.
I finally discovered a reliable way to use the same file from two or more directories.
Programming Languages
C
Posted: 17 Jul 2016   Updated: 17 Jul 2016   Views: 7,041   Rating: 4.82/5    Votes: 6   Popularity: 3.75
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 0
Please Sign up or sign in to vote.
Sparsely documented cause of compiler error C2143
C#
Posted: 17 Nov 2017   Updated: 17 Nov 2017   Views: 5,590   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The BSD License      Bookmarked: 0   Downloaded: 46
Please Sign up or sign in to vote.
Calculating the day on which a reporting period that ends on a specific day of the week is not as easy as it looks.
C# 4.0
Posted: 1 May 2015   Updated: 14 Jan 2020   Views: 29,043   Rating: 3.52/5    Votes: 6   Popularity: 2.74
Licence: The Code Project Open License (CPOL)      Bookmarked: 22   Downloaded: 82
Please Sign up or sign in to vote.
The routines in this library can parse any string that I can throw at it, including Common Name strings read from X.509 Digital Certificates.
C++
Posted: 11 Nov 2016   Updated: 11 Nov 2016   Views: 7,782   Rating: 4.67/5    Votes: 2   Popularity: 1.40
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 0
Please Sign up or sign in to vote.
This tip describes how I resolved a C4183 compiler error emitted by the Visual C++ 2013 compiler.
VC++
Posted: 1 Jun 2015   Updated: 1 Jun 2015   Views: 8,800   Rating: 2.50/5    Votes: 4   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
Variable scope in C++ can be devastatingly subtle, as in this function.
Visual C++ 12.0
Posted: 28 Jun 2015   Updated: 28 Jun 2015   Views: 7,950   Rating: 3.89/5    Votes: 4   Popularity: 2.34
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
While you can often get away with ignoring compiler warnings, failing to at least scan them can bite hard!
Web Development
HTML
Posted: 5 Jan 2018   Updated: 5 Jan 2018   Views: 5,371   Rating: 3.67/5    Votes: 2   Popularity: 1.10
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
URL Encoded Text is URL Encoded Text, wherever you find it, even if it happens to be in and old school Windows INI file.

Average reference rating: 5.00

DevOps
Posted: 29 Jun 2016   Updated: 29 Jun 2016   Views: 9,144   Rating: 5.00/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 229
Please Sign up or sign in to vote.
A reference chart that doubles as the engine behind a data structure mapper
Posted: 4 Apr 2019   Updated: 4 Apr 2019   Views: 8,562   Rating: 5.00/5    Votes: 4   Popularity: 3.01
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 174
Please Sign up or sign in to vote.
Here I present a cheat sheet that I assembled for my own use, in the hope that others may as well find it useful.
Operating Systems
Windows
Posted: 14 May 2019   Updated: 14 May 2019   Views: 2,750   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 103
Please Sign up or sign in to vote.
Use this reference table to expedite the use of specialized fonts, such as Wingdings.
Posted: 29 Dec 2018   Updated: 29 Dec 2018   Views: 4,452   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 116
Please Sign up or sign in to vote.
When the command-line help falls short, we improvise.
Programming Languages
C
Posted: 20 Jun 2018   Updated: 20 Jun 2018   Views: 4,751   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 37
Please Sign up or sign in to vote.
This article demonstrates every documented strftime substitution token, and provides a tool to generate your own list for your platform.

Average project rating:

No projects have been posted.

David A. Gray
Software Developer (Senior)
United States United States
I deliver robust, clean, adaptable, future-ready applications that are properly documented for users and maintainers. I have deep knowledge in multiple technologies and broad familiarity with computer and software technologies of yesterday, today, and tomorrow.

While it isn't perceived as sexy, my focus has always been the back end of the application stack, where data arrives from a multitude of sources, and is converted into reports that express my interpretation of The Fundamental Principle of Tabular Reporting, and are the most visible aspect of the system to senior executives who approve the projects and sign the checks.

While I can design a front end, I prefer to work at the back end, getting data into the system from outside sources, such as other computers, electronic sensors, and so forth, and getting it out of the system, as reports to IDENTIFY and SOLVE problems.

When presented with a problem, I focus on identifying and solving the root problem for the long term.

Specialties: Design: Relational data base design, focusing on reporting; organization and presentation of large document collections such as MSDS libraries

Development: Powerful, imaginative utility programs and scripts for automated systems management and maintenance

Industries: Property management, Employee Health and Safety, Services

Languages: C#, C++, C, Python, VBA, Visual Basic, Perl, WinBatch, SQL, XML, HTML, Javascript

Outside Interests: Great music (mostly, but by no means limited to, classical), viewing and photographing sunsets and clouds, traveling by car on small country roads, attending museum exhibits (fine art, history, science, technology), long walks, especially where there is little or no motor traffic, reading, especially nonfiction and thoughtfully written, thought provoking science fiction