create your own plugin

create your own plugin

Postby stan » Thu Sep 07, 2006 11:23 pm

i've just uploaded source file for a new plugin that adds odd/even stats for first and last digits:

http://www.expertlotto.com/files/preview/digits.zip

download the zip archive and unpack it. then you'll need netbeans IDE (www.netbeans.org) to open the project and compile the plugin. the zip includes a complete expert lotto installation where the plugin gets installed. note - the plugin needs build 805 or better, it is included in the zip file.

it's very simple to implement similar stats (i think). here are the lines of code that do the actual stats calculations:

Code: Select all
    /**
     * Calculate the index (the row number in the table starting with zero) for the
     * numbers of the given package ticket.
     * @param numbers ticket numbers
     * @param bonuses ticket bonus numbers, only for powerball lotteries
     * @param mask flags indicating whether the ticket number at given position is masked or not
     * @param index ticket's index in the package (starting with zero)
     */
    protected void doUpdate( int[] numbers, int[] bonuses, boolean[] mask, long index ) {
        //number of first odd digits found
        int firstOddCount = 0;
        //number of last odd digits found
        int lastOddCount = 0;
        for( int i=0; i<numbers.length; i++ ) {
            if( mask[i] )
                continue; //ignore masked numbers
           
            //get the first digit
            int firstDigit = numbers[i] / 10;
            if( firstDigit % 2 > 0 )
                firstOddCount++; //first digit is odd, increment the counter
           
            //get the last digit
            int lastDigit = numbers[i] % 10;
            if( lastDigit % 2 > 0 )
                lastOddCount++; //last digit is odd, increment the counter
        }
        //update hit & skip stats
        firstDigits.hitTotal( firstOddCount );
        lastDigits.hitTotal( lastOddCount );
    }


the plugin sources include an extra module for high/low stats for first digits that you can implement yourself.


so consider how much you can achieve with a few lines of code:
- add stats tables including all latest, skip, rank columns for package tickets and winning numbers
- add charts for the first and last digits
- add filtering capabilities for the given parameter (odd/even digits, high/low digits, digit sums etc...)

if there's enough interest i can prepare plugin templates for other types of statistics as well.

if you implement your own stats and want to share them with other, just email your plugin to me and i'll publish it at our web site.
Expert Lotto Team
User avatar
stan
Site Admin
 
Posts: 6338
Joined: Thu Sep 23, 2004 1:01 pm

Postby Maryland » Fri Sep 08, 2006 10:17 am

Stan, if I'm not familiar with making my own plugins, is it safe to say I shouldn't try? I have no idea what netbeans is or any of the programing language you have shown. Of course if there is anyone who could show step by step how I'd be more than willing to try. I know your busy that's why I asked if any other member ;-)
Maryland
 
Posts: 504
Joined: Sun Nov 07, 2004 4:18 pm

Postby stan » Fri Sep 08, 2006 11:09 am

[quote=Maryland]
Stan, if I'm not familiar with making my own plugins, is it safe to say I shouldn't try? I have no idea what netbeans is or any of the programing language you have shown. Of course if there is anyone who could show step by step how I'd be more than willing to try. I know your busy that's why I asked if any other member ;-)
[/quote]

well, look at the code i posted to see if it makes any sense to you. if you're not able to guess what it does and you have no experience with e.g. visual basic or delphi or any other programming language then i don't think you should try yourself. instead, encourage other expert lotto users to give it a shot and wait till they publish their own plugins ;-)
Expert Lotto Team
User avatar
stan
Site Admin
 
Posts: 6338
Joined: Thu Sep 23, 2004 1:01 pm

Postby stan » Tue Sep 12, 2006 9:03 pm

i have uploaded yet another set of source files that add quad statistics. the download link is:
http://www.expertlotto.com/files/preview/exstats.zip

the procedure is the same as before: download, unpack, use netbeans to open the sources, compile and run expert lotto installation within the unzipped folder
Expert Lotto Team
User avatar
stan
Site Admin
 
Posts: 6338
Joined: Thu Sep 23, 2004 1:01 pm


Return to BETA versions

Who is online

Users browsing this forum: No registered users and 8 guests