Archive for April, 2007

Google Checkout in the UK

After running successfully in the US for a number of months Google Checkout has now been opened up to UK sellers. While examining the system with a view to integrate it with the Karova Store e-commerce framework I ran up this overview of the features, the good points, the bad and the everything else.

Its only a very high level overview, but if you’re interested in it and want to quickly get an idea of what Google Checkout is and what it can do you can find it here.

If you don’t feel like reading it, I’ll sum it up. It’s good. And the engineer’s have clearly been working hard to aid easy integration from a developers standpoint. The api’s all seem very well rounded and intuitive, so much so I’m actually looking forward to getting some time free to work on the full integration with Karova Store 2.x.

Read Integrating Karova Store with Google Checkout.

Enigma 1438 - Soccer Stats

set by Susan Denham

Question

In a league of five teams, each team plays each of the others once a season. Below is a league table at the end of last season. Three of the numerical entries are incorrect.

Whats are the scores in Arnsley’s four games?

Won Drawn Lost Goals for Goals against
Arnsley 2 1 1 2 2
Boldham 3 1 0 2 1
Cleeds 1 3 0 1 0
Drochdale 1 2 1 1 1
Erby 1 0 3 1 3

Enigma 1437 - Two Squared

set by Richard England

Question

Harry and Tom each replaced each asterisk with a digit in such a way that the three numbers that could be read across and the two numbers that could be read down were five different perfect squares each of which consisted of three different digits (with no leading zero). Tom did not use any of the 3-digit squares that Harry used.

Which three 3-digit squares (of three different digits with no leading zero) did neither of them use?

shape1

Answer

First lets get all the 3 digits perfect squares (of which there are 13). They are as follows:

169, 196, 256, 289, 324, 361, 529, 576, 625, 729, 784, 841, and 961 (corresponding to squares of integers 13 - 31)

We could just put these numbers in the format and test them, so that’s what I did first.

After some trail and error I came upon a solution.

soln1

These two worked fine but wait. I turns out there are three possible ways of arranging the numbers.

soln2

and

soln3

After comparing all three of these we can see that they only use the same 10 squares out of the thirteen. So the three digits that the were not used turned out to be 324, 729, 784. And just for the hell of it, here’s a graphic for that too.

missing

Oh the fun. We can only hope they’re going to get harder some time soon.

(On a side note, as I don’t always get the time early in the week to solve the puzzles as they are set so instead of holding back posting the complete question/solution when I have, I’m going to post up the question when I get them - usually Thursday/Friday - and update them when I’m happy I have a solution. If anybody fancies a crack at them please feel free.)

300 is an excellent film and living as we do in such an inclusive age, the film studio has made a pg version of the film for the younger viewer. So go ahead and watch the trailer for it. It certainly looks … enjoyable.

A Five Step Guide For an Excellent Poo

Step 1

Be certain to enter the room with a dignified air. If you have to inform anybody that you need to visit the bathroom first, do so in an authoritative manner. Once you have entered the room, survey the scene before you. If you wish to appear more distinguished bring along a walking cane or monocle.

Step 2

Make a check of the immediate area. Is there enough paper on the roll? If the roll is not AT LEAST 3/4 full, are there back up rolls within an arms reach of the toilet? Check the lock on the door, are you sure it is securely fastened - only when you are certain of a secure environment for your deification can you be properly relaxed. Extra checks can include the whereabouts of air freshener and hand towels.

Step 3

Lift the lid of the toilet and proceed to briefly sanitize the middle ‘ring’ seat with a torn off and folded piece of toilet paper. (If there is no paper available - see step 2) If both parts of the toilet seat are already up, be aware of the potentially dangerous area you are in, for if the seat is up you must be in uncultured savage territory. Once you are certain of a clean seating are, swiftly unbuckle your belt and lower your trousers and underwear. There is no need to dawdle over this part.

Seat yourself on the middle ‘ring’ toilet seat.

Step 4

Now seated, find your reading material. If the WC you are occupying is not in your own home it is prudent to bring along your own reading material for just this purpose. Your enjoyment will be greatly increased if you have your own reading material with you. Spend this time now finding where you are up to in your book/magazine/movable printed type.

If you do not have your own reading material flick through the available materials on hand. If there is no materials on hand, stand up, raise your pants and leave this establishment. You will find no enjoyable poos here.

Given you are ready to commence and all is well at this point you may continue to the next and final step. If you are at all uncomfortable with anything at this point return to step one and repeat.

Step 5

Poo.

Enigma 1436 - One More Step

Here’s this weeks problem:

Consider the following set of numbers:

1, 3, 7, 13, 21…

Send in the following:

a) The 600th member of the series

b) A member of the series above the first with less than five digits which is a perfect cube

c) A member of which is a five-digit palindrome which can also be read as a binary number

d) The smaller of the two consecutive members which are 1000 apart

Oh the joys. Yet another one that can be solved with a brute force method.

First we have to find out an how the sequence is generated. Looking at it carefully we can see it increments first by 2, then 4, 6, 8… To generate this sequence we do simply this: (n-1) * n + 1

A - 600th member

To calulate this just set n to be 600. This gives us: 599 * 600 +1 = 359401

B - perfect cube first with less than 5 digits.

Perfect cubes is simply the third power of an integer. To solve this we need to get all the perfect cubes with up to 4 digits and compare them against the members of the series. Lets do it with some php. First the cube array.

$cubesArray = array(); for($a = 2; $a <= 21; $a++) { $cube = $a*$a*$a; array_push($cubesArray,$cube); }

We know that the cube of 21 is the largest perfect cube with less than 5 digits so we only need the cubes up to there. No we need the corresponding array for the series and then loop through them and compare.

$seriesArray = array(); for($b = 1; $b <=600; $b++) { $value = ($b-1) * $b+1; array_push($seriesArray, $value); } foreach ($cubesArray as $currentCube) { if (in_array($currentCube, $seriesArray) { echo ‘Perfect Cube in Series: ‘.$currentCube; break; } }

From this we get the answer to be 343

C - The palindrome

This is relatively simple. The two contraints of it being the number being a palindrome, 5 digits and being able to be read as a binary leave us with only 4 options, 10001, 10101, 11011, 11111. Of these, a little bit of trial and error, leaves us with the answer as 10101. Simple

D - consective 1000 apart

Oooo. Harder. No, well not really. We can do this again with a simple bit of php.

for ($c = 0; $c <=599; $c++) { if(($seriesArray[$c] + 1000 == $seriesArray[$c+1]) { echo ‘the lowest consecutive member is: ‘.$seriesArray[$c]; break; } }

This spits out the answer 249501.

So to recap my answers are as follows:

  • a) 359401
  • b) 343
  • c) 10101
  • d) 249501

Go Maths!

pretty sweet internet, pretty sweet

filehippo

One of the problems with all this computer lark is how fast things go out of date. Take for instance Firefox. With the amount of extensions I use almost every time I start up there is a slew of update to my extensions. I like this. This is good. It keeps things up to date, and running smoothly.

What I don’t like is things that don’t automatically update, or at least don’t give me the opportunity to do it automatically. “A newer version of this software is available”. Fine, but don’t make ME go and get it.

But here’s a solution. A nifty little program from File Hippo, imaginatively called Update Checker.

Its a tiny little program that you can get here. It just quickly runs through everything installed on your system and checks them against the most recent versions. If it finds any it displays them in a browser window with links to the updates. It even does beta updates if you happen to be that way inclined.

How lovely. While its not a thing I would use on a daily basis, maybe scheduling it to run every week or so would be quite nice. If you find it of use let me know. (On my first run I had 20 updates - beat that)

Serenity knocks Star Wars off the top

Sci Fi movies have a way of hanging around a while. Star Wars has been on the top of the ‘official’ top ten list of sci fi movies for quite some time. Until now that is.

Here’s the new list:

The Top Ten:

1. Serenity (2005)

2. Star Wars(1977)

3. Blade Runner(1982)

4. Planet of the Apes(1968)

5. The Matrix(1999)

6. Alien(1979)

7. Forbidden Planet(1956)

8. 2001: A Space Odyssey(1968)

9. The Terminator(1984)

10. Back to the Future(1985)

So Star Wars has finally been knocked off the top spot by Serenity. Now, its nothing against Serenity. I love Firefly as much as the next person. I’ve watched the series and the film over and over (even rather sadly read the graphic novels). But does Serenity deserve to knock of Star Wars for the number one spot?

Honestly? No.

All this shows is the number of fan boy’s Firefly/Joss Wedon has out there. And it just goes a little way further to proving that some studio somewhere should get off their backsides and get talking to Josh seriously about picking up Firefly again.

Oh we can hope.

darthandriver

Next entries »