Read Posted April 20, 2012 Share Posted April 20, 2012 (edited) English bad but I try:"I have a combinations .txt file, where is:05 07 13 21 29 4415 16 19 31 35 4502 03 10 20 24 3707 18 22 30 40 47How 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 37Example2:$percent = array(array(02, 100),array(07,100),Script find:05 07 13 21 29 4402 03 10 20 24 3707 18 22 30 40 47I have Big file and sript must have Limit:Limit: 50 combinations Edited April 22, 2012 by Read Link to comment Share on other sites More sharing options...
JoHanatCent Posted April 21, 2012 Share Posted April 21, 2012 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 More sharing options...
Read Posted April 22, 2012 Author Share Posted April 22, 2012 (edited) 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 April 22, 2012 by Read Link to comment Share on other sites More sharing options...
JoHanatCent Posted April 23, 2012 Share Posted April 23, 2012 _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. Link to comment Share on other sites More sharing options...
Read Posted April 23, 2012 Author Share Posted April 23, 2012 (edited) Lines: 9821803Yes, 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 April 23, 2012 by Read Link to comment Share on other sites More sharing options...
jchd Posted April 23, 2012 Share Posted April 23, 2012 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 hereRegExp tutorial: enough to get startedPCRE 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now