March 6, 2014: Our Oil Tank
Capacity Chart program displays a chart of remaining gallons for various
liquid depths for a number of standard fuel oil tanks. I recently added
Version 2.1 to include a couple of new sizes at a user's request. Version
2.2. posted today, ,allows users to edit, add, or delete definitions and to
print generated charts. Fractional inch dimensions are now allowed so my
tank chart now matches the nominal capacity within a gallon for all depths!
February 28, 2014: A viewer working on a playback program for Chess games was having trouble building the keys for each rank using FEN notation. FEN uses letters for the chess pieces (P for Pawn, B for Bishops, etc.) and numbers to represent the count of consecutive empty cells. He didn't tell me that objective though until I had written this little demo program, Count Grid Cells which builds keys based on randomly placed letters on an 8x8 grid. The link is to a page of beginner's level Delphi programs. Click on the link within that page or scroll to page bottom to find the download links.
As a bonus, I finally took time to develop a simple way to remove that irritating highlight color drawn for every selected cell in a TStringGrid. I installed it for the two grids it in this program and like so much that I plan to add it to our DFFUtils utility library unit.
February 20, 2014: The Text Search program modifications which writes lines or portions of matching lines to a file was posted a couple of weeks ago. The fellow who requested likes the way it works, but we disagreed on what the default options should be. Text Search Version 2.1 resolves our differences by remembering options selected from run to run. Everyone is now happy.
February 9, 2014:
Brute Force is one of my favorite programs because it solves so many puzzles that can be expressed as algebra problems, including this one. We need to assign coins to the empty squares so that the sums match the given numbers. That requires 12 equations (5 rows, 5 columns, 2 diagonals) with 17 variables (the empty squares) with 4 possible values for each (empty, nickel, dime, quarter). The Brute Force button found the solution in about 30 minutes and verified that it was unique in 15 minutes more after searching all 17 trillion possible solutions.
Brute Force Version 3.0 fixes
a problem with Incremental Solving when multiple variables can
have the same value as in this puzzle . Incremental Solve works by
enumerating each valid solution for the 1st equation, then testing the 2nd
equation to see if there could be a valid solution given the trial solution for
the 1st, then the 3rd given 1st and 2nd, etc.
Once I fixed the problems that kept it from working on this case, the
Incremental Search button finds the unique solution in 0.05 seconds and takes an
additional 0.10 second to verify that the solution is unique!.
February 6, 2014: An error in the FastMult (Fast Multiply) procedure in our Big Integers unit was corrected today. The error was introduced in the November, 2013 update and returns invalid results multiplying integers of more that 1000 or so digits. The corrected UBigIntsV4 unit is available in today's posting in DFF library zip file DFFLibV14_6Feb2014. This introduces a new naming protocol for the library files to enable better tracking of minor updates.
The BigIntsTest program was also reposted to include the changed unit. As a matter of interest, FastMult is 4 to 5 times faster than the regular Mult procedure when multiplying two 50,000 digit integers (0.46 vs. 2.1 seconds, and the results now agree)!
February 5, 2014: Version 1 of the Text Search program was scanned a file and reported matches to a given string. TextSearch Version 2.0 posted today adds these user requested features:
February 1, 2014: Adapting programs to display properly across multiple screen resolutions is a persistent problem for programs which run on unidentified remote systems. I've made a start today by modifying several programs to display properly on screens from 1920x1200 (my system) down to 1024x720 (likely the lowest for LED screens). Links to changed programs are included at Screen Resolution Considerations in our Delphi Techniques section. Please let me know if you find truncated/overlapping display elements in these (or other) programs.
January 27, 2014: A change at our host site prevented DFF site updates and taken me several days to recover site formatting. If you run across format errors or missing or erroneous links, please drop me a line using the feedback link.
January 15, 2014: It didn't take long for a user to find a scaling bug in the MatchStick Puzzle for screen resolutions that don't match mine. It is always a problem when the program draws things (like match sticks) directly on the screen, especially when that fact slips the programmer's mind. I believe I have it fixed for most screens with today's posting. If not, let me know.
January 12, 2014:
back to the Mensa Page-A-Day calendar this year and the problems are much
more program-worthy than last year's puzzle calendar. Here's a
Matchstick Puzzle from the
January 2 page requiring you to "burn" segments of matches on a grid in
such a way that the number of burned segments in each column and row matches
given target values. The program makes it easier than pencil and paper
to burn and "unburn" match segments to solve the puzzle.
January 6, 2014: We visited our son and family in Alabama for Christmas and spent some time playing games including Scrabble. I'm a fairly smart guy, but most males, including me, are genetically handicapped when it comes to language skills and the girls (wife and granddaughter) beat my son and me soundly. Their Scrabble set includes a large book with all valid words and a 3 minute timer. We used most of our 3 minute turns frantically trying to verify that potential words were actually in the book. That led to today's Scrabble Search helper program. Given a set of available letters and information about where they might connect to words on the board, the program will list legal words to choose from. As the author, I claim the right to use it during games with family and to extend usage to other males in the game. Now if the girls will only agree J.
December 24, 2013: Here's wishing a
Merry Christmas and Happy New Year to all !!!
December 18, 2013: I'm trying to resolve outstanding questions before taking a holiday break. Today's involved generating large floating point numbers that someone wants to use as a source of random numbers. I'm not convinced he's on the right track but the effort was worthwhile because my test program revealed a problem introduced with the November update to our Big Integers unit. Big Float uses the Integers unit but is not compatible with the "Operator Overload" operators implemented on November 17. Changes were made to our BigFloatTest program and and a special Big Integers unit were posted today.
December 16, 2013:
The small How Many Cubes program answers (or verifies your answer) to the question:
"How many cubical
arrangements of the small cubes are embedded in this 4x4x4 cube?"
December 13, 2013: I had added a Delphi 7 - XE5 Differences page last month to document considerations, but neglected to announce its availability. I added items to the page today documenting the "Subrange Violation" error described yesterday and it's fix. Also some information the size differences between executable files created by the two compilers. XE5 files are several times larger than D7 files for no reason that I have been able to identify so far but I will be posting Delphi 7 executables whenever possible.
December 12, 2013: A viewer recently asked if other click sound files could be used in our Metronome program. Metronome Version 2.1 posted today allows users to select up to 5 sound files of their choice by right clicking on an existing file and browsing for a replacement. Changes are remembered for future runs.
For programmers: Metronome would not compile under Delphi XE5 because it uses the DFFUtils library unit which contains a number of utility routines. XE5 throws a "subrange violation" error in the LineNumberClicked function even though the parameter is valid. A workaround version has been included in the DFFLibV14 library zip file and reposted today.
December 5, 2013: Thanksgiving, 2013 is history, the 1st deer is in the freezer, and the front deck has a full load of firewood in preparation for the major ice storm heading our way this weekend. I've filled the free time for the past couple of weeks educating myself about random number generators (RNGs) and how to test them. Thankfully, the result is the Chi-Squared RNG Testing program posted today.
The What's New Archives
(Click to expand)
Copyright © 2000-2014 , Gary Darby
All rights reserved.