© copyright 30.Nov.2009 by Paul Bradley posted under Coding.
It's been a busy month in my day job, we are gearing up for a major software release early in the new year, so I have not had much time to continue the planning of 192 cottages outside of work. However, I have been thinking about how I can integrate the 700 odd pet friendly cottages back into k9directoty. Luckily the supplier of these properties has a data feed which includes all the properties, together with their latitude and longitude map locations.
So I have looked at using the Haversine Formula to list those cottages within a 30 mile radius of a town or village centre. For example, the centre location for Keswick in Cumbria is longitude 54.613337 and latitude -3.127842; and the SQL command to extract properties within a 30 mile radius of Keswick would be:-
SELECT id, name, place, postcode, county,
(3959 * acos(cos(radians(54.613337))
* cos(radians(lat))
* cos(radians(lng) - radians(-3.127842))
+ sin(radians(54.613337)) * sin(radians(lat))))
AS distance FROM property
HAVING distance < 30
ORDER BY distance LIMIT 0 , 10;
All I need to do now, is change the schema for the database, and add the longitude and latitude points for each town within the towns table.
Since installing the Ubuntu Netbook Remix on my Acer Aspire One, I have been a little disappointed with the performance. It seemed to take ages to load, and took a while to acquire a Wi-Fi connection, and once on the Internet FireFox kept freezing on every page making the machine unusable. I just think the Ubuntu Netbook Remix is too heavy weight for the Acer Aspire One.
After reading a magazine article, I decided to give Moblin a try. Moblin was originally developed by Intel to make best use of their Atom™ processors, which can be found in many netbooks. The project has since been handed over to the Linux Foundation, and it has been designed from the ground up to work well on netbook machines.
The installation took around ten minutes, compared to the forty minutes for Ubuntu Netbook Remix. This is largely due to the fact that Moblin does not install Open Office, but I don't see this as a problem as I don't really don't want to use the Acer Aspire One for doing office work. Most people will just want to surf the web, and perhaps show photos to friends and family.
The system boots and shutdowns very quickly, which is want you want from a netbook which you use to quickly check something on the Internet. I think the user interface is gorgeous, and it makes good use of the screen real estate. I really like it.
Take a look at the promotional video:-
It's been a reasonable month for k9directory with 2 new properties signing up to be listed :-
The site has produced £33,287 worth of actual bookings so far this year that I can verify, the actual figure is probably much higher than this, as many hotels and cottages take their own bookings directly. I was hoping to break the £35k barrier before the end of the year, but with only one month to go, it may not happen.
Spent most of the month preparing my first PDF ebook, which I am hoping to put on sale from 1st of January. The publication is probably going to run to over 30 pages, and is a collection of running articles taken from my dailyruns.com site. I am using the PHP class fpdf to produce the encrypted ebook. The publication will sell for $4.95 and I am sharing the revenue with the contributing authors. More about this next month.
14-5
§
Please consider linking to this article, by sharing it with others using social sites like del.icio.us, Stumble Upon or Twitter or by emailing it your friends.