Welcome Guest
( Log In | Register )
The time is now 9:28 pm
You last visited January 21, 2017, 8:34 pm
All times shown are
Eastern Time (GMT-5:00)

code project to generate all combos of 5 in pool of 15

Published:

10/6/07 After reading the post at (LP>Lottery Systems>Wheel Generator 1.5) I decided to convert the code I had written in an Access database that generates all possible combinations of 5 draws from a pool of 15 numbers (or any N of X).  The migration, which started last Saturday, would be to newer technology and a more powerful database engine: SQL Server 2005.  VB.NET would fill in as the programming language when it was quicker to prototype objects and functions than a stored procedure (sp is basically a query on steroids) in the database.  I was rather distracted since I did the work while hanging out with my wife and soon to be 3 year old daughter in the living room on Saturday/Sunday. 
 
09/30/07 is Sunday day two of this undertaking, same development style: hang out with family and work at same time or occasionally. First thing in the morning I’m looking at it with a fresh pair of eyes and a new perspective as I continue building it.  Maybe I undid the last thing I did yesterday while trying to keep working when tired.
 
By 10/01/07 6:11 AM California time, I am 1 hour into my third day of development, I’ve almost got pre v1.0  recordset function working in .NET.  Everything is in one class (thus far) as properties and reusable functions and a few stored procedures in the DB.  I spun my wheels trying the new version of Array object and ArrayList in this latest version of VB.NET.  I added a set of “ifs” as a temp workaround for the sake of “quick prototyping”, but also because I could not proceed to any next step without the array and sorting functions.  At 2PM, I get another good hour here at home to do some coding, quick debugging, and I’ve got it working!!  Or, I have what I think are the tricky parts completed, the remaining pieces should be straightforward.  I was so ecstatic that I took a break from this multi-hour fun though occasionally frustrating project.
 
Failed driver causes laptop crash: after giving wholehearted thanks to above, I restart my laptop and get copies of my latest work over onto to my more powerful machine where I also have Visual Studio and SQL Server 2005 installed; the programming environments I’m using for this project.  I really like working with the  Developer and DB tools it has built in; I liken it to being at the controls of a helicopter or small aircraft.
 
“Carpe (Dev) Diem” is my mantra du jour, “sieze the Development time at all hours of day” or when possible; that has taken on new importance now that my daughter has lost her interest in taking afternoon naps.  I temporarily got in a groove of programming time and progress and my household tasks quickly piled up.  Wife complains.
 
10/6/07 I return to the code that generates all combos of N from a pool of X  Now I’m thinking I also have to code in a number of filters, such as kick out draws where all 5 numbers are odd or even, or exclude the “1,2,3,4,5” types of draws.  I have a clustering query that breaks the draws into 5 buckets (1–8, 9-16, 17–24, 25-32, 33-39) and gets an aggregate count of the different types of distributions –that’ll be a starting point for what to filter out.  Better yet, I’ll add as much user defined functions as I possibly could.  Anyone have a other ideas to filter against?  I’m right near that point in the building phase of all this. I am hoping to get huge amounts done today and tomorrow 10/7. 

Entry #3

Comments

1.
CARBOBComment by CARBOB - October 8, 2007, 9:06 am
For filters use Odd/Even, Sum, Last Digit, will this be only for a 5/39 or will it be flexible enough for any Pick 5 game?
2.
LottoMiningComment by LottoMining - October 12, 2007, 1:55 pm
I plan for it to be flexible enough to also be for other pick 5 games. On the filters: "Last Digit" - does that mean the last digit of each draw being different?

I got a good amount done last Sunday (slightly less than I hoped), I should be able to get more done this weekend. A bit of "scope creep" got in there, with more ideas coming up as I worked on it.

You must be a Lottery Post member to post comments to a Blog.

Register for a FREE membership, or if you're already a member please Log In.