Home  |  Introduction  |  Newsletters  |  Programs  |  Feedback

 

 

Search:

Search WWW

Search DelphiForFun.org

Support DFF

 If you benefit from the website,  in terms of knowledge, entertainment value, or something otherwise useful, consider making a donation via PayPal  to help defray the costs.  (No PayPal account necessary to donate via credit card.)  Transaction is secure.

If you shop at Amazon anyway,  consider using this link. 

     

We receive a few cents from each purchase.  Thanks

 

 

The index page for all Programs on the site?

The DFF Play CD?

Zipped file DFF Play CD.zip contains  executable version of about  75 of the 200+ programs from the site, mostly those I particularly liked or thought would be of widest interest for non-programmers.  The file is rather large, about 20mb..

Anything else?

Google
 

 

    

Search WWW

Search DelphiForFun.org

 

Not a programmer (yet)?

 That's OK -  the executable version for any puzzle or  game you find here is available for download.  Just scroll down to the bottom of most any description page and you'll find a "Download executable" link. Downloaded programs are in "zipped" format to reduce size and may require an "unzipper" program unless you are running Win XP or later.  Here's a link to a free one. 

Check  out  the Most Popular  Downloads from DFF   (updated weekly)

First time visitor?

Take a look at the Introduction page to see what this site is about

Notes for Teachers

 

September 6, 2012

Delphi For Fun Newsletter #65

September is here at last!  This is the month for our long planned trip to Switzerland. We'll be spending  a week in our second favorite place in the world, the Bernese Oberland  and a week  ticking off items on our "bucket list" with Glacier Express,  Bernina Express, and William Tell Express scenic rail excursions.   It is expensive, but that just means that we only go once every 3 or 4 years.  Spectacular scenery together with  friendly, industrious residents and good Swiss/German food keep drawing us back.

The usual wide range of topics were visited in this quarter including a new release of our library file of common unit, DFFLIBV14, consolidating a number of unit changes since the previous release.  Also , a new  program that knows how to break words into syllables, one that calculates "Blue Moon" dates,  and one that replays Chess games recorded in PGN notation.   Also an update to help a fellow verify the accuracy of a "gun" used by law enforcement to shoot cutting slugs at potentially explosive devices.  That sounds like a worthwhile project! 

 Here' the entire list::

---------------------------------------------------------------------------------

June 4, 2012:  One more enhancement to help a user debug a customized keyboard problem:  Key  Codes Version 3.0  displays scan codes when  KeyDown as well as  KeyPressed and KeyUp events occur.   This version also lets the user verify that left and right keys for Shift, Ctrl, and Alt  are identified correctly.

June 6: 2012:  Program CutList . assists in creating efficient layouts of rectangular parts for woodworking or other projects.  It is  the most  popular program on DFF but its complexity has made it more than a "for fun"  project so current development is restricted to bug fixes.    A couple of minor printing problems were corrected today - so minor that I'm not updating the version number. But printed diagrams now have a slightly wider part outlines to improve visibility. And the extra blank page preceding printed diagrams under some conditions has been eliminated.

June 11, 2012:  Last month's posting of Clear Blank Lines triggered a number of enhancement requests from users.  Clear Blank Lines Version 3.1 posted today adds these features:

  • Trailing as well as leading blanks can now be removed from non-blank lines
  • Leading  "Tab" characters, previously  treated a spaces and deleted with the "leading blanks" option, may now be optionally  retained or deleted when leading or trailing blanks are removed.
  • A "character select" option allows lines with a specified character to be removed or to be the only lines retained in the output.  This was requested by a user needing to extract email addresses from text files.  Retaining lines with "@" characters will ease the process.
  • A new "case" option allows  text to be converted to upper or lower case. 

June 21, 2012:  A small bug in our UBigIntegersV3 unit resulted in consolidating all of the library file updates from the past 3 years into a new library release, DFFLIBV14.  Also, the RSA encryption demo program, which requires some math with very large random integers, previously used a tailored version of the Biginteger class. Those routines have now been included in UBigIntegersV3 in the new library release.  

It's been a while since I've written a "just for fun" program, but I recently learned the definition of a "Blue Moon" so I'm next going to try generating a "Blue Moon Schedule" for any give date range.  

July 6, 2012: 

Back to work after a break for the holiday.  Blue Moons, a program which calculates occurrences of full moons which are called "blue" even though they are not.   There is speculation that the Middle English word for "blue" which also meant "betrayer", used that meaning because the occurrence of 13 lunar months in some years messed up their use for agricultural and religious purposes.  In any event, the phrase "Once in a blue moon" in English indicates an event or condition that rarely occurs.  There are  two common definitions and the program provides results for both.
   

July 15, 2012:  A viewer recently suggested that I build a CD each quarter with all downloadable program files and offer it on a subscription basis as a way for users to always have the latest versions of everything.  I'm considering the idea, but it raised  the question of the size of those files to be included and the idea to write a file scanner program.  I soon realized that we already have a program to copy files matching a file mask in a selected folder which almost does the job.  Copy Folder Test Version 3.1 adds the option to report counts and sizes of selected files without copying.  It also fixes a couple of other problems including "Web Site" directories being excluded in Delphi's class which lists directories and misreporting sizes for files larger than 4GB.   

July 28, 2012: My one-week project in "syllabizing" (aka "syllabication", aka syllabification) turned into a two week project and could easily have been a month.  The definitions and rules are man-made, not "nature-made" which always leads to complexity.  The program posted today, Syllables Version 3 syllabizes  words from  DFF's  largest dictionary (Full,dic, 63,000 words) by matching them against a large publicly available syllabized word file 180,000 words.  Actually only 40,000 words were matched from that source, another 20,000 were generated one of two ways:

  1. Looking for compound words, i.e. trying  to split the word into two parts each of which we know how to syllabize and then putting the pieces back together with an extra syllable marker between the words; or -

  2. By rules within the program which removes prefixes or suffixes, matches the base word against a known syllabized format and them adds the prefix or suffix back, adding 0,1, or 2 extra syllables. 

When neither of those matches resolve how to syllabize, the final method is to  manually create  a syllabized entry in an update file, currently with about 600 entries.  The update file is automatically added to the syllable data base each time it changes.

Working with syllables resulted in changes to three other word related areas of DFF:

  • The medium dictionary (General.dic) and large (Full.dic) dictionaries both contained a number of foreign words abbreviations which were not identified as such and did not have entries in the Gutenberg reference file.  Rather than manually syllabize those entries, I correctly identified them in the dictionaries and then skipped trying to syllabize foreign words and abbreviations when testing the system.  The updated  dictionaries are available in revised file Dictionaries.zip .

  • The  program used to update the dictionaries was corrected to expand the display area to show all of  longer words whose display was previously truncated.  Also corrected a program crash when attempting to add a zero length word. Revised versions of both DicMaint executable and DicMaint source  are now available.

  • Finally, the Syllables program crashed if an attempt was made to check all words in a dictionary when the dictionary wasn't available.  A change to the UDict dictionary unit now politely informs the user that he cannot do that. The change has been incorporated the Syllables 3 executable, but the UDict source is distributed our library unit DFFLibV14, which has been reposted with the revised UDict unit.         

August 3, 2012:

A user found an actual application for what I thought was just an interesting mathematical exercise:  measuring the smallest circle which will cover a given set of randomly placed dots.  The application's objective is to measure the minimal circle covering the placement of a group of projectiles fired at the center of a target.  In this case, the projectiles were "cutting slugs" designed to punch holes in the target.  If you are designing the tool to fire these slugs, maximizing the accuracy is an important parameter and, if the targets happen to be potentially explosive devices, maximizing the range while maintaining acceptable accuracy might be even more important!     Circle Covering Points, Version 3.2  provides 3 decimal digit accuracy for data points entered.  Hope that accurate enough Mickey - I'll stick to programming!       


 

 August 5, 2012:  Time to squeeze one more program before the real world takes over for the next week or so.  Here is  a Beginners level, Shuffle Demo program in the Delphi Techniques section.  It takes less than 50 lines of user code to simulate "dealing hands" from a "deck" of numbers thanks to our 10 line "Shuffle" procedure!    

August 12, 2012: Library unit UBigIntsV3 performs operations on arbitrarily large integers and includes an "IsProbablyPrime" function which implements the Miller-Rabin primality test .  The unit resides  in our DFFLibV14 library file, reposted  today with a small correction to the function which fixes a potential memory leak under some conditions when temporary memory fields were not released.

August 18, 2012: We had a rewarding trip to Johnson City, Tennessee this past week to attend the "White Coat" ceremony for our granddaughter and 78 other bright college graduates beginning their 4 year journey through the School of Pharmacy at Eastern Tennessee State University.   I was impressed by the school and its staff and learned more than I had imagined about what a Pharmacist is and does.  Apparently they do much more than count pills!   I look forward to learning even more over the coming years.

In the meantime, I also learned this week that there are 44,860 ways to arrange the digits from 1 to 9 into a set of prime numbers ranging from the smallest set with two primes {2, 14567389} to the largest set of with six primes, {2,5,7,43,61,89} .  Here is Primes From Digits written primarily as a coding exercise.   In the process of coding this solution, I spent too long tracking down  the routine which converts mouse clicks on a memo to the line number clicked.   As a result, I coded and posted another little demo program, Memo Clicks to illustrate the process.

August 27, 2012:  A new Utility program, Count Phrases, was posted today.  As the name implies it counts occurrences of 2, 3, and 4 word sequences within a loaded text file.  A developer had asked how to do this as an aid to an SEO (Search Engine Optimization) investigation he is undertaking.  I do not anticipate personally  using  the program  but others may find a use.  It did provide an interesting few hours figuring out how to extend our  Count Words  program previously posted as a Beginners level program in the Delphi Techniques section of DFF.  

 August 29, 2012:  A viewer recently reported an error in the Round procedure TBigFloat class in unit UBigFloatV3 which process arbitrarily large floating point numbers.   Round takes a parameter specifying the number of digits to the right of the decimal point to retain when rounding.  The previous version returned 0 when rounding any value between 0 and 1 to the nearest whole number ( i.e. requesting 0 digits to the right of the decimal point ),  when it should have returned 1 for values between 0.5 and 1.    It  now does.  Library unit DFFLibV14 has been re-posted today with the revised UBigFloatV3 unit. 

September 4, 2012: 

PGN (Portable Game Notation) is a widely used format for recording chess games for historical or study purposes.  There are many playback programs available and the world does not need another.  However a DFF viewer requested it, and  I could not locate an existing one written in Delphi, and it sounded like  (and was) an interesting and challenging project.  So here's the DFF  version of Chess  PGN Player.
 


  • Old age is always fifteen years older than I am. ~Oliver Wendell Holmes

  • Men do not quit playing because they grow old; they grow old because they quit playing. ~Oliver Wendell Holmes

  • Be glad of life, because it gives you the chance to love and to work and to play and to look up at the stars. ~ Henry Van Dyke


To subscribe or unsubscribe from this newsletter, visit http://delphiforfun.org/newsletter.htm

311,000  visitors and 337,000 program downloads in the past 12 months!

  [Feedback]   [Newsletters (subscribe/view)] [About me]
Copyright © 2000-2017, Gary Darby    All rights reserved.