Weekender numbers

August 16, 2015

A Weekender number is, for any integers k ( > 1) and n ( > 0)

W = ( n / 2 ) ( ( ( k – 2 ) n ) + 4 – k ) where W is divisible by k

k is described as the order of the Weekender number. W/k is the count.

There is a trivial solution, W = k for any k, when n = 1.

Weekender numbers of count <= 8 are considered feasible.

The Weekender Theorem is that there are no non-trivial, feasible Weekender numbers of order > 8. I believe there is a proof of this, but it currently escapes my recollection.

Weekender numbers were first proposed by Patrick Heesom and Rupert Morrish ~1992 as an exercise in arranging beer bottles in k-gons where k drinkers are drinking equal numbers of beers.

Bandwidth caps for B&Bs

September 18, 2012

We provide free wireless internet access for our B&B and holiday home guests. Up till now they have just been using our home wireless network, and we’ve been hoping they don’t (a) hack us or (b) use up our 120GB/month quota with Telecom. We’ve also been forced to get them to type a 26-character WEP password, as our home wireless network has to be that dumb to allow the Wii to attach. Filtering on IP address would have been a lot of work, as the B&B quota is separate from the HH quota, and both sets of guests may bring multiple devices.

Anyway, I’ve now thrown hardware at the problem. For the princely sum of NZ$102, I’ve acquired 2 Linksys routers – a WRT54G and a WRT54GL (the GL is still in the mail). Once installed with OpenWRT, they get limited to 1GB of transfer, renewed at noon each day.

Setting up the quota involves editing the file /etc/firewall.user. Here’s how I’ve done it. FORWARD_main is the default FORWARD chain. iptables -E doesn’t allow you to rename the built-in chains.

iptables -N FORWARD_main
iptables -A FORWARD_main -m state –state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD_main -j forwarding_rule
iptables -A FORWARD_main -j forward
iptables -A FORWARD_main -j reject
iptables -A FORWARD_main -j REJECT
iptables -N FORWARD_quota
iptables -A FORWARD_quota -m quota –quota 1000000000 -j FORWARD_main
iptables -F FORWARD
iptables -A FORWARD -j FORWARD_quota
iptables -A FORWARD -j REJECT

Then, to renew the quota every day, I have the following script in /etc/quotareset:

date >> /var/log/quotareset
iptables -L FORWARD_quota | grep quota: >> /var/log/quotareset

iptables -R FORWARD_quota 1 -m quota –quota 1000000000 -j ACCEPT

date >> /var/log/quotareset
iptables -L FORWARD_quota | grep quota: >> /var/log/quotareset

which gets called by cron. Here’s the crontab

root@asphrtr:~# crontab -l
0 12 * * * /etc/quotareset

Anyway, that should be enough for me to repeat the feat when the next router arrives. Hopefully it wil help someone else, too.


September 18, 2012

I’m mostly (i.e. about once a blue moon) blogging over at my crossword blog lately. But there’s another post coming here any minute now.


July 11, 2011

Rationalist – 2011-07-07

Are you missing a reference?

June 1, 2011

No, I’m not. The dll compiles fine, the class I’m trying to use is visible in the output and public, and the reference is pointing to the right file. The IDE recognises it, and will even navigate to the definition, but it won’t compile.

Are you missing a reference?

No. The problem may be that the target framework of the dll is .NET Framework 4 and the the target framework of the exe is .NET Framework 4 Client Profile. Client Profile is the default target framework for Windows Services and Console Applications. Change it to .NET Framework 4 and all should be well.


March 10, 2011

This magic Guid is how Visual Studio 2010 decides whether or not your project is a self-hosted WCF service. If the is found in the ProjectTypeGuids element, the WCF debugging client will be started, no matter which other project(s) you have set up as the startup for the solution.

More details here.

Just closed my Paypal account

December 8, 2010

I feel cleaner already.


November 27, 2010

About 10pm last night, north of Albany, moving West to East, apparently at about the speed of aircraft, but very bright, and orange. Two of them, closer than aircraft usually get. Could have been something coming out of Whenuapai. If not, I guess it must have been aliens.


November 27, 2010

Not only will they not let me use my Paypal account in a way that realizes the international nature of the internet, their your credit card authorization service does the same utterly retarded things.

I have a Target Visa. The billing is between me and Retailers National Bank. It’s not up to Paypal to tell them that they’re not allowed to have customers in New Zealand.

I want to buy Christmas gifts for my niece and nephews in England. The internet allows me to have gifts shipped to them from retailers in the UK, saving shipping costs and CO2 emissions. But you won’t let me enter a shipping address outside New Zealand. I have to have their gifts shipped here first, and then ship them back again, a round trip of 25 thousand miles.

I hope they’re proud of themselves.


December 1, 2008

To whoever sent me the bottle of Warre’s for my birthday, thank you very much!