Experimental Plugin

Experimental Plugin

Postby stan » Wed Nov 02, 2005 8:27 pm

For those who are interested in developing their own statistics and filters I prepared an example plugin with source files. You can download it from this location:

http://www.expertlotto.com/files/plugin ... ources.zip

At the moment the plugin contains two statistics modules. One of them adds a new column in the winning numbers table and package statics table where it shows the count of even numbers in the given ticket. The second module adds a new item to the main statistics page. It is based on Simon69's idea of ticket index digits.

Here are some instructions:
- you'll need java development kit (not just the executable runtime), you can get it from here http://java.sun.com
- you'll also need 'Ant' for the build process, you can get it from here: http://ant.apache.org
- you may want to download and install some development environment, e.g. www.netbeans.org or www.eclipse.org
- download and unpack the plugin sources
- you'll find a complete expert lotto installation inside the unpacked folder. you may want to copy your license file and/or lottery files there
- look at the source files in the 'src' sub-folder
- feel free to experiment with the source files
- to compile and build the plugin open a command line window (in ms windows click start menu - run - type cmd and hit enter)
- switch to the plugin directory
- type 'ant distribute' and hit enter. the plugin will compile and install itself into the included expert lotto installation. (you'll need to have 'ant' in your path)
- start expert lotto from the plugin folder to test the plugin (e.g. 'c:experimentalexpertlottoinexpertlotto.cmd'

- ask your questions here :finger:


i'll add more examples later on - if there's enough interest.
the plugin works only with build 666 or better.
Expert Lotto Team
User avatar
stan
Site Admin
 
Posts: 6338
Joined: Thu Sep 23, 2004 1:01 pm

Java

Postby maroc » Wed Nov 02, 2005 9:53 pm

Hi Stan,

A nice thing.

Please i have try to download from http://java.sun.com for a few dyas i can't get to connect to the site is it my browser or is it the site ?
Thank you.
maroc
 
Posts: 367
Joined: Mon Nov 08, 2004 8:45 pm

Java

Postby Simon69 » Wed Nov 02, 2005 10:28 pm

Hi maroc,

I have no problems with connecting the site....maybe you're on the java sun black-list :cheesy:


Simon69
Simon69
 
Posts: 82
Joined: Sun Jul 17, 2005 11:28 am

Postby stan » Wed Nov 02, 2005 10:41 pm

[quote=maroc]
Please i have try to download from http://java.sun.com for a few dyas i can't get to connect to the site is it my browser or is it the site ?
[/quote]

do u get any error message when connecting to that site? or does it just time out? or do you have problems locating the download link on that site?

or try this link:
http://java.sun.com/j2se/1.5.0/download.jsp
Expert Lotto Team
User avatar
stan
Site Admin
 
Posts: 6338
Joined: Thu Sep 23, 2004 1:01 pm

Postby maroc » Wed Nov 02, 2005 10:43 pm

Hi Stan
I get this message:

Forwarding to:
http://java.sun.com/j2se/1.5.0/download.jsp

Then time out
maroc
 
Posts: 367
Joined: Mon Nov 08, 2004 8:45 pm

Postby stan » Wed Nov 02, 2005 10:54 pm

that's strange. try a different browser (e.g. firefox) or different proxy server (if you're using one)
Expert Lotto Team
User avatar
stan
Site Admin
 
Posts: 6338
Joined: Thu Sep 23, 2004 1:01 pm

Postby maroc » Thu Nov 03, 2005 8:06 pm

Hi Stan

Thank you it was the proxy
maroc
 
Posts: 367
Joined: Mon Nov 08, 2004 8:45 pm

Ant,

Postby Simon69 » Fri Nov 04, 2005 9:27 pm

Hi Stan,

I've got problems using ant. When I execute the command ant distribute in the src dir. I get the following error : Unable to locate tools.jar. Expected to find it in C:Program Filesjavaj2re1.4.2_05lib oolsjar
build.xml does not exits! build failed..

What am I doing wrong? :vogel:

Thanks,

Simnon69
Simon69
 
Posts: 82
Joined: Sun Jul 17, 2005 11:28 am

Postby stan » Fri Nov 04, 2005 9:39 pm

1. 'ant' must be called from plugin's root dir (e.g. in "c:myfilesexperimental", not "c:myfilesexperimentalsrc"). the ant looks for 'build.xml' file which is in plugin's root.

2. your operating system search path for executable files points to java runtime folder instead of the java development kit folder (i presume you already installed it). if you're on ms windows go to 'control panel - system - advanced - environment variables' and add (or edit) new variable 'PATH' and set it's value to e.g. "C:jdk1.5.0_04in;<previous value if any>"
Expert Lotto Team
User avatar
stan
Site Admin
 
Posts: 6338
Joined: Thu Sep 23, 2004 1:01 pm

Postby Simon69 » Fri Nov 04, 2005 10:33 pm

Hi Stan,

Thanks! It works :cheesy:

Simon69
Simon69
 
Posts: 82
Joined: Sun Jul 17, 2005 11:28 am

Postby maroc » Sat Nov 05, 2005 9:12 pm

Hi Stan

I 'm going to give it a try tomorow, Any tip to start Please.

Thanks
maroc
 
Posts: 367
Joined: Mon Nov 08, 2004 8:45 pm

Postby stan » Sat Nov 05, 2005 9:21 pm

[quote=maroc]
I 'm going to give it a try tomorow, Any tip to start Please.
[/quote]

- well, first try if you can execute 'ant distribute' from the command line to verify that your development environment is setup ok.
- then try to open the plugin project in eclipse or netbeans ide
- look at file EvensWnStatsModule.java - it's probably the most simple one and try to modify it. e.g. change it to count odd numbers instead of even ones
Expert Lotto Team
User avatar
stan
Site Admin
 
Posts: 6338
Joined: Thu Sep 23, 2004 1:01 pm

OddsWnStatsModule

Postby Simon69 » Sun Nov 06, 2005 4:28 pm

Hi Stan,

I try to add the Odd stats to the Wining Number section, but after building - and no errors BUILD SUCCESSFUL - they are not visible.

1. First I added this to the ExperimentalPlugin.java file ;

else if( PluginManager.TICKET_STATISTICS.equals( customizationType ) ) {
ReadWriteProperties props = UserProperties.get( "pkg" );
BackgroundFilters bf = BackgroundFilters.getPackageInstance();
OddsWnStatsModule module = new OddsWnStatsModule( props, bf );
try {
if( module.isApplicable() ) {
module.initialize();
modules.add( module );
}
} catch (ApplicationException ex) {
ex.printStackTrace();
}...

2. Second I created the OddsWnStatsModule.java file like the EvensWnStatModule.java file but now counting the odd numbers.
(in the ..expertlottoexperimentalstats directory)

3. I do an ANT BUILD from the experimental dir. ---> BUILD SUCCESSFUL
I open Expert Lotto ( popup new plugin 1.0 created) but the Odd stats are not visible (I expect them next to the Even stats...)

Wat am I doing wrong?

Thanks,

Simon69
Simon69
 
Posts: 82
Joined: Sun Jul 17, 2005 11:28 am

Postby stan » Sun Nov 06, 2005 4:55 pm

each application module has its own unique id - so check method getId() in your new stats module
Expert Lotto Team
User avatar
stan
Site Admin
 
Posts: 6338
Joined: Thu Sep 23, 2004 1:01 pm

Postby Simon69 » Sun Nov 06, 2005 9:09 pm

Stan,

I have an unique id for the module, so that is not the problem I guess....I changed the ExperimentalPlugin.java but now is the Even stats replaced by the Odd stast :vogel: ......

Attached the ExperimentalPlugin.java file.


Thanks.
You do not have the required permissions to view the files attached to this post.
Simon69
 
Posts: 82
Joined: Sun Jul 17, 2005 11:28 am

Next

Return to BETA versions

Who is online

Users browsing this forum: No registered users and 2 guests