Home  |  Introduction  |  Newsletters  |  Programs  |  Feedback

 

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.

In Association with Amazon.com

   

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

 

July 6, 2007

 

Delphi For Fun Newsletter #46 

 

We just returned from a great 10 day vacation in our island state, Hawaii.  Kauai, the "Garden isle", was the consensus favorite for a future longer term visit with Maui and the "Big island" running as close seconds.    By the way, be aware that Hawaiians are quick to remind you of their statehood when you mention differences or how things are "in the states".   I'm about half way through  James Michener's epic historical novel "Hawaii", tracing the islands development.  So far we've covered many generations from the original Polynesian settlers, through the missionaries, whaling ships, and the Chinese laborers imported to work the plantations.             

In week or so we're heading out again to Michigan for a 50-year high school reunion and to visit a few surviving relatives in our old home state.  50 years - whew! 

In the other spare hours this spring and summer, here’s what I've posted:  

April 5, 2007: A small fix for Cutlist  was posted today which should only affect those who used the manual method to layout pieces to be cut.  Assume that a manual solution is saved and the program stopped.  On next  usage if the case is reloaded and an auto-solve solution is created, the manual solution might not have displayed correctly when reloaded.  It should now

April 13, 2007:  Viewer Samuel from The Netherlands recently sent me the semitones for a Minor scale to add to the Major scale used in a BeepExDemo in our Delphi Techniques section.  BeepExDemo was written originally to play notes on the PC speaker for all versions of  Windows (the capability was missing from Win95, 98 and ME).  I added the Minor scale as well as a Chromatic scale and, just for fun,  a PlayTune procedure to play a predefined tune for you on your special day.   

 

April 29, 2007:  There have been distractions from programming this month between spring time outside stuff, planning our vacation to Hawaii in June, and ferrying my wife around as she went through surgery for a herniated disk.   Her doctor now has her on a walking program starting at a mile per day and working up to 3 miles per day in the next few weeks.   I'll be walking with her, which should do us both good.  And good preparation for climbing the 270 steps up to the Diamond Head overlook in Honolulu when we visit!

I did post the first bug fix today for the CuttingStock program  posted early this month.  Non-integer stock or part lengths were not handled properly.  The Pascal code I adapted has integer dependency deeply embedded.  Until I find a better solution, I now recognize decimal values and scale the lengths up by 10 or 100 to convert them to integers before solving.  Then of course, divide all lengths by the same value before reporting results to users.  (This works because, for example, the best away to cut parts of length 15 and 25 from stock of length 100 is  has the same solution as cutting the same number of parts of length 1.5 and 2.5 from stock of length 10.)

April 30, 2007:  A Large Files listing program was posted about 5 years ago has worked without error since then.  Well there was an error that just was not recognized until Colin K found it the other day.   The program lists the N largest files on a drive  and worked fine unless a file exceeded the maximum value which could be contained in a 32 bit integer (about 2.1 Gigabytes).    Sizes up to 64 bit integer capacity (9*1018)are now handled OK.  That should be large enough for awhile J   

  May 4, 2007: Here is one definition of a "magic" sequence:  A sequence of N integers with the property that, if the elements are assigned a rank from 0 to N-1 based on their position in the sequence, then each element represents the number of occurrences of its rank value in the sequence.  Wrap your brain around that one for awhile!  For example, for N=4 the sequence {1,2,1,0} is "magic" because it contains 1 zero,  2 ones, 1 two, and 0 threes.  Can you find another sequence for N=4?    My Magic Sequences program posted today generates more examples but is really a study in how to do it efficiently.  

May 11, 2007:  Every recreational programmers' repertoire should include some version of Conway's game of Life.  Today's posting corrects that deficiency at DFF.  John Conway defined the simple rules of the "game" in 1970.  It is not actually a game at all, except for fun of designing initial patterns of occupied cells in a rectangular grid and watching them move, multiply and die off in successive generations created by two simple rules based on how many neighbors a cell has.  For each new generation, occupied cells with 2 or 3 neighbors are happy, other occupied cells die.   Empty cells with 3 neighbors give "birth" and become occupied.   Here are two versions, a simple one for beginner programmers looking for simple programming examples, and one that has a few features to make it more playable.      

"Closed" 6X6 Knight's Tour

 May 14, 2007: Today's update is to our Knights Tour program , a program that allows users or the computer to search for paths by which a chess knight can  visit every square on the board exactly once.  The chess knight can only move horizontally and vertically, two squares in one direction and one square in the other.  The last update in 2004 added some features including closed tours (last move could make a valid move to the starting square),  starting the tour in a specified square, and adding other constraints to the tour by requiring that specific moves land on specific squares.   This update, also at a user's request, implements variable board sizes.  I added 4x4 (no solution) to 12x12 board selection options  to the program.   
 .   

 

 

 

 

 

May 20. 2007:  

There was a contest to guess the number of jelly beans in a jar. Sarah guessed 33, Vivian guessed 28, Leslie guessed 32, and Eric guessed 29. One guess was off by 1, one was 4 jelly beans too high, one was off by 3, and one was correct.   How many jelly beans were in the jar?

Guessing Game Puzzles is a program to solve this class of puzzle using the same method  I use to do it with pencil and paper.

 

May 28, 2007:  Version 3.4 of our Cutlist program was posted today.  It fixes some problems which prevented finding solutions even when they existed.  The algorithm for large cases was also improved when the "Combined" rip and cross cut option was selected so that more and better solutions are found.     In the "Arrange Parts Manually" form the user can now paste a previously found program solution into the form as a starting point for manually arranging parts. 

June 4, 2007:  Here's one for the Delphi programmers out there.  I recently investigated techniques for rearranging listbox items using drag/drop mouse movements (moving the mouse over an item to be moved and then holding left mouse button down while dragging it to a new location).   ArrangeListBox describes and provides source code for three versions, from simplest (12 lines of user code) to one which has the features I wanted (visual indication of drop point and "auto-scroll" to drag across multiple pages; 150 lines of user code). 

June 10, 2007:   Print Preview Demo  Program V2.0:

Page 1

Page 2

Version 2 of our Print Preview demo program was posted today in the Delphi Techniques section.   The preview unit previews memo string data and string grids as they will appear when printed (and allows you to print them).  The primary new feature is to automatically break a string grid when it crosses a page boundary and repeats the column header cells at the top of each continued page.    

 

June 14, 2007:  We're off on vacation!   Hawaii this year with all the kids, kids-in-law, and grandkids.  We're doing the 7 day cruise ship tour that visits each of the 4 major islands for a day or two.   This is our 2nd extended family vacation and  I just hope this one is as successful as the last.  The occasions when everyone can make it will be harder to arrange as the grandkids grow up (our oldest granddaughter starts college this fall).   Dang, I don't feel that old!

I'll catch up on your feedback emails when we get back home. 

In addition to checking and worrying about travel arrangements this week, I did find time to finish one more program; an electronic tuner called FFT_Tuner.   The FFT stands for "Fast Fourier Transform", a "magic" technique which converts a set of numbers representing the amplitude of a signal over to time into a set of frequencies, amplitudes, and phases which if added back together would approximate the original input.   This program simply displays the frequency with the largest amplitude, updated about once per second.  You can read more about it and/or download the executable program and the source code at the above link.

 

June 28, 2007:  Back from vacation.  We had a great time.  Kauai, the Garden Isle, was our favorite although everyone agrees that we need at least a week per island next time.  We did all of the normal tourist stuff: swimming, snorkeling, helicopter rides, hiking, and, for the girls in the family, shopping of course!   Only a half  dozen or so emails requiring action so I'll be getting to those in the next few days.

June 29, 2007:  Need more Graph Theory?  A "minimal spanning tree" would be a good way to lay out a pipeline or cable service to a set of locations from a central site.  It would not be a good route for a traveling salesman!      A young Chinese student  has an assignment to explain both Prim's and Kruskal's Algorithms for finding minimal spanning trees  using code samples from any source.  I had several emails from him asking for help waiting when I returned from vacation.    Today I added a Prim's button to the Minimal Spanning Tree Demo program which had already contained Kruskal's method.   Prim's actually predates Kruskal's, is simpler, and slower.  

July 2, 2007:  Here's a little Dictionary Scan Demo program posted in the  Delphi_Techniques section of DFF.   In relatively few lines of code it scans our 50,000 word dictionary looking for words with three sets of double letters, including the one word which has three adjacent double letter pairs.

July 4, 2007:  Here is the monthly update to Cutlist.  Cutlist lays out cutting diagrams for a set of rectangular parts from a given set of supply material.  It is one  of the few programs on the site which may actually serve a practical purpose.  Several thousand woodworkers have downloaded the program and at least some of them are using it.  As a result, lots of users = lots of errors getting detected.     Cutlist Version 3.4.1  fixes some problems in the "Arrange manually" form with the "Paste program solution" option added last month.  Solutions which had rotated parts caused problems with displaying, saving, and printing the results.  It now comes a step closer to working correctly.


Gary Darby

http://www.delphiforfun.org/


"When Blake taught the first Chinese boy the alphabet, the old system of indentured labor was doomed.  Because a boy who could read would sooner or later come upon a book that would give him an idea, and a boy with an idea could accomplish almost anything."   -- James Michener in "Hawaii".   

 

 


 

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

197,000 home page visitors since Sept 2000.      360,000 program downloads in the past 12 months!



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