Re: getBetHistory php
September 3, 2008 by inksmithy
As far as using the MySQL data in the new linux version of MySQL goes, I have to say I'm not sure. That said thoug, I wouldn't have thought it was that much of an issue - you could probably just use phpmyadmin to dump the databases to an sql file, then open it up on the linux machine and restore it from there. Probably not a bad idea to do it that way anyway.
There are a few commands in linux which I find incredibly useful
chmod +x /path/to/file - allows a fille (bash script and so on) to be executed. Not a good idea if you don't know what the script does, but if you have just written it, thats the command to get it going.
chown -R username:usergroup /path/to/directory - the -R makes the permissions change work recursively through any directories in the path you supplied
Three variations on sudo:
sudo - the main one, useful for when you just need to run a single command
sudo su - makes you the superuser until you type 'exit' - useful for when you have to do a few things in the console
gksudo [gnome program name] - opens up the gnome program in superuser mode. Dangerous, but useful. Use it when you need nautilus to move files around in /opt or when you want to edit a config file but can't be arsed using nano.
Someone should probably have warned you about all those permissions - sorry bout that.
Re: getBetHistory php
August 31, 2008 by inksmithy
Captain Sensible - It is dead easy, almost like it is designed for it. Can't count how many free editors and testing tools there are available for php scripting on Linux and just about every one of them can be linked with the php parser so you can test your scripts out without hassle.
If you fancy having a go, download an ISO from Ubuntu and use wubi to install it (you will see the instructions when you put the disk in the drive). Basically works just like installing something in windows, except you end up with a dual boot enviroment.
Once you have your linux install, go to www.apachefriends.com and download the linux version of xampp. That includes apache, mysql and php as well as ftp servers and mail servers. You can turn the ones you don't want off and just use the ones you like.
Follow the instructions on the apachefriends site and you will be off in no time at all.
I've just gone through the process of installing xampp myself and was suprised at how easy it was.
Alan
Re: Axis Dodgyness
August 23, 2008 by inksmithy
Re: What looks to be a decent hosting solution
August 23, 2008 by inksmithy
What looks to be a decent hosting solution
August 20, 2008 by inksmithy
http://linuxvps.org/
Nothing flashy, but they look like they do a decent hosting service.
Re: regexes for parsing compressed strings
August 10, 2008 by inksmithy
Thanks again.
Re: regexes for parsing compressed strings
August 5, 2008 by inksmithy
Using the Java version you wrote and it works like a dream. Have no idea what it is saying (except I know you need four backslashes in order to escape one in Java) but the rest of it has me boggled. If you fancy explaining it, I - and probably a few others who are unfamiliar with regexes - would greatly appreciate it. If not, then I will have to put it on the list of Things I Need To Understand and work it out myself. In any case, thanks heaps.
Re: Recognise anyone?
July 6, 2008 by inksmithy
The scary thing is it would probably work!
Re: Historical Data
June 24, 2008 by inksmithy
Re: Historical Data
June 24, 2008 by inksmithy
Alan
Re: GetAllMarkets strangeness.
June 21, 2008 by inksmithy
21054938~Match Odds~O~ACTIVE~1214073900000~\Soccer\Euro 2008\Quarter Finals\Fixtures 21 June\Netherlands v Russia~/1/4574657/19215516/19231797/19231798/21054938~0~1~CHE~1214063923283~3~1~5943866.86~N~Y
Re: GetAllMarkets strangeness.
June 19, 2008 by inksmithy
I've just had a look at the string returned from the GetAllMarkets request re the GermanyPortugal game and there is indeed an oddity to it.
21052444~Match Odds~O~ACTIVE~1213901100000~\Soccer\Euro 2008\Quarter Finals\Fixtures 19 June\Portugal v Germany~/1/4574657/19215516/19221886/19221887/21052444~5~1~CHE~1213905271276~3~1~1.450023758E7~N~Y
According to the documentation, the third last field should be a double which equates to the total matched on the market. What the hell is 1.450023758E7 then?
I have a feeling it is scientific notation, meaning so much money has been matched that the double type can't keep up with it, although that would surprise me if it were so.
GetAllMarkets strangeness.
June 19, 2008 by inksmithy
I'm trying to call GetAllMarkets using the following code:
Date now = new Date();
long atm = System.currentTimeMillis();
long oneTwoFive = ((60 * 1000) * 125);
long gtm = atm - oneTwoFive;
now.setTime(gtm);
GregorianCalendar gToday = new GregorianCalendar();
gToday.setTime(now);
GregorianCalendar tomorrow = new GregorianCalendar();
tomorrow.setTime(now);
tomorrow.add(GregorianCalendar.DATE, 1);
DatatypeFactory df = DatatypeFactory.newInstance();
XMLGregorianCalendar xmlGToday = df.newXMLGregorianCalendar(gToday);
XMLGregorianCalendar xmlTomorrow = df.newXMLGregorianCalendar(tomorrow);
request.setFromDate(xmlGToday);
request.setToDate(xmlTomorrow);
APIRequestHeader theHeader = ExHeader.makeHeader();
request.setHeader(theHeader);
ArrayOfInt returnEvents = new ArrayOfInt();
returnEvents.getInt().add(1);
request.setEventTypeIds(returnEvents);
com.betfair.publicapi.types.exchange.v5.GetAllMarketsResp result = port.getAllMarkets(request);
and All I'm getting is a poxy Chile v Venezuala return. Whats more, for some reason it isn't going into the JTable the way it should. Now if I change the request.setFromDate() period to tomorrow and the request.setToDate() period to three days from now, I'm getting results which are doing what they are supposed to do, but for some bizarre reason, I can't seem to get the Germany/Portugal match.
I've tried setting the setEventTypeIds parameter to 14, but I'm still not getting that match. I don't understand whats happening and its driving me insane.
Re: Java
June 18, 2008 by inksmithy
Also busy at the moment playing with my new lcomputer which I bought for £20 at the markets. P4 2ghtz, I just stuck a gig of ram and a decent graphics card and kubuntu 8.04 on it, it is a dream. All up I've spent £40 on th damn thing, its unreal. My next step it to stick a web server on it, sort out iptables and expose it to the worl. Might look at writinng a jsp bot then.
Re: getCompleteMarketPricesCompressed
June 11, 2008 by inksmithy
Alan
Re: getCompleteMarketPricesCompressed
June 10, 2008 by inksmithy
cheers,
Alan
Re: getCompleteMarketPricesCompressed
June 10, 2008 by inksmithy
I'm impressed.
peteb, thanks for that code, I'm such a newb at programming that I find it tricky to follow the logic of most other languages, but that looks close enough to Java that I can puzzle it out.
Re: getCompleteMarketPricesCompressed
June 9, 2008 by inksmithy
bmsleight, thanks very much for that, I'm having a look at it now. Thanks heaps.
Re: getCompleteMarketPricesCompressed
June 9, 2008 by inksmithy
Re: Euro 2008
June 8, 2008 by inksmithy
Re: Platform / hosting / connectivity choices
June 6, 2008 by inksmithy
Re: Java
June 4, 2008 by inksmithy
Alan
Re: Bot-Writing Experiences
June 3, 2008 by inksmithy
This link gives you a decent little guide to doing it.
Alan
Re: Bot-Writing Experiences
June 2, 2008 by inksmithy
ahaha, its all good.
I completely understand the sentiment though. It doesn't matter how shiny the gui is, if the theory behind it isn't firm, it might as well be a plate of jelly for all the good it will do. I quite like that metaphor, I just made it up!
All a good GUI does is prove you can design a GUI.
Unfortunately for me, I got into computing quite late, in 1996 when I was just over 25 years old. Consequently, I never really had to learn how to deal with command lines and shells. I can now, because my eyes were opened to the unbelievable pile of poo which is Microsoft and I have pretty much boycotted them. Ironically, I'm typing this on my Vista laptop which shares its hard drive with a Kubuntu install. Unbelievably, the Open University decided to do a course on a platform independent programming language, then supplied the software needed to do the course only for Windows machines.
All this doesn't change the fact that when I think about writing a program, I generally think about how it looks first, then put the logic in later. Curse of a GUI driven computing upbringing perhaps.
For general waffle myrddin, it was a remarkably well aimed shot sir! Perhaps just call it a stray round.
Cheers and thanks for the welcome, looking forward to bouncing some ideas off you all. At the moment I'm struggling with parsing GetMarketPricesCompressed. The method I have works well when all the fields are full, but when there is no money in the market it all falls to pieces and I can't figure out why.
Alan
Re: Bot-Writing Experiences
June 1, 2008 by inksmithy
Just joined here and thought this is probably a decent thread to say hello in.
I started writing bots because I was doing a Java programming course at Open Uni and thought a bot would be a nice little personal project. As it turns out, it has been a hell of a learning experience. Just started placing my first real bets yesterday with the bot (done a lot of simulated bets) and so far everything seems to be going pretty swimmingly. I post on the bdp forums as thenakeytaxidriver and very occasionally in the soccer forums at betfair as ThanksFish.
Now into the 15th or 16th evolution of my bot - amazing how many times a rewrite is necessary - and I think I have it down to nice object oriented, gui driven code. Nice to see a decent forum out here about this - I was going a bit silly thinking the forums at bdp.betfair were all that was out there.
Alan
