Anti-nuisance lawsuit warning: The purpose of these notes is to remind me, Zoegond, of stuff or to help me work stuff out. They may contain mistakes.

Quick

  • ($a, $b....) = unpack("A2A7...", $packed)
  • push( array, list )

Friday, November 11, 2016

Vindictive Vole

Ubuntu left me in the ditch today, pretending it couldn't see any of the repositories because, it said, I'd fallen too far behind with upgrades.

This page got me back on the road in terms of updating 14.10.

But further action was needed to get it to try and upgrade to 15.04 - I had to manually edit /etc/apt/sources.list so that it also had entries pointing to old-releases for utopic (14.10) and also entries pointing to archive for vivid (15.04). After doing this, apt-get -dist-upgrade actually started doing an upgrade instead of pretending it couldn't see any of the repositories.

Like so many other things about Linux, this is hard to understand because there are about 4 different GUI-based ways of editing the same data, none of which actually allow you to make the settings you need. If you've been fiddling with GUIs for more than 10 minutes, and the problem isn't fixed yet, you're going to have to edit some text file somewhere instead.

Updated to say: the word on the street now is that you shouldn't be mixing versions in sources.list - you should be using do-release-upgrade. But be sure btw to change references to archive, security and extras to old-releases - despite the name, extras does seem to be essential.

Wednesday, July 27, 2016

OS 1:50000 v 1:25000

1:25000 OS maps have one major advantage over the 1:50000 series, and that's the way they show the difference between 'roads generally more than 4m wide' and 'roads generally less than 4m wide'.

The 1:25000 maps show <4m roads as yellow, and >4m as yellow-orange, with the latter being a distinct colour from the orange used for B roads.

The 1:50000 maps use the same orange for B roads, but show <4m and >4m both as yellow, with the latter having wider lines. It's not always easy to tell which width a yellow road is intended to be.

You might wonder why the 4m distinction is important: basically on a >4m road you can expect to pass a car coming the other way quite easily. On a <4m you can expect to spend your journey keeping mental track of how far back the last passing place was.

I personally never plan a journey using a <4m road, unless it's a very short, very useful connection between wider roads.

Wednesday, June 22, 2016

Twilight

  • Civil. Sun 0-6 degrees below horizon.
    • Morning: It's daytime, but the sun's not come up yet.
    • Evening: It's still daytime, but it's getting dark.
  • Nautical. Sun 6-12 degrees below horizon.
    • Morning: It's still dark, but there's light in the sky.
    • Evening: It's dark, but there's still light in the sky.
  • Astronomical. Sun 12-18 degrees below horizon.
    • It's dark, unless you're out in the countryside, in which case if you're away from any artificial lights you might, after a few minutes, perceive some light still in the sky.

Wednesday, March 16, 2016

POSIX::strftime

POSIX::strftime is very useful, but NB it expects a strict Perl time year, an offset from 1900 - eg 116 not 2016.

I was caught out by this because I got too used to Time::Local's easygoing acceptance of eg 2016.

Friday, January 1, 2016

Google Sheets mortgage functions

Ensure that you use opposite signs for payment and principal with functions like NPER. I blithely expect money functions either to assume the correct sign, or to produce the correct result with the wrong sign.

So for example with a 5% mortgage, principal £110,000, payment £643 per month:

=NPER(5%/12, 643, -110000)

and

=NPER(5%/12, -643, 110000)

both give the correct answer (~ 300 months/25 years), whereas

=NPER(5%/12, 643, 110000)

gives the answer -129, which one might easily mistake for 10-11 years if in the habit of mentally knocking off an unexpected minus sign.

Followers

Blog Archive