Jump to content

Percent


Read
 Share

Recommended Posts

English bad but I try:

"I have a combinations .txt file, where is:

05 07 13 21 29 44

15 16 19 31 35 45

02 03 10 20 24 37

07 18 22 30 40 47

How to make a program that determines the percentage of combinations among.

Example:

$percent = array(

array(02, 100),

array(03,100),

array(10,100),

array(20,100),

array(24,100),

array(37, 100);

Script is looking to combinations with the highest percentage.

Script find: 02 03 10 20 24 37

Example2:

$percent = array(

array(02, 100),

array(07,100),

Script find:

05 07 13 21 29 44

02 03 10 20 24 37

07 18 22 30 40 47

I have Big file and sript must have Limit:

Limit: 50 combinations

Edited by Read
Link to comment
Share on other sites

Question:

Is the line always sorted from small to big numbers?

If so I suggest creating one array entry per line eg $ArrayOne = "05 07 13 21 29 44"

This will enable you to count the combo's with a loop.

If the file is very very big rather consider using _SQLite . . . . .

And last question is this for a lotto predictor? (You don't have to answer this qiestion) ;)

Link to comment
Share on other sites

All: Yes! :)

AutoItScript is not a good solution?

Question:

Is the line always sorted from small to big numbers?

If so I suggest creating one array entry per line eg $ArrayOne = "05 07 13 21 29 44"

This will enable you to count the combo's with a loop.

If the file is very very big rather consider using _SQLite . . . . .

And last question is this for a lotto predictor? (You don't have to answer this qiestion) ;)

Edited by Read
Link to comment
Share on other sites

Lines: 9821803

Yes, I have PHP script but Allowed memory size of...

_SQLite ... is available from AitoIT!

How many lines do you have in your dokument?

Do you have any running Script. Will be easier to help you from there.

Edited by Read
Link to comment
Share on other sites

Definitely switch to SQLite to handle this. If you need guidance to help you building and efficient schema, just ask.

Hint: don't simply store lines of draws "as is" (or worse: as 6 columns for each draw), that would be utterly painful to query!

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...