Skip to content

Justin's Linklog Posts

Links for 2010-08-05

Links for 2010-08-02

  • Kaprekar’s constant : ‘6174 .. is notable for the following property: Take any four-digit number, using at least two different digits. (Leading zeros are allowed.); Arrange the digits in ascending and then in descending order to get two four-digit numbers, adding leading zeros if necessary; Subtract the smaller number from the bigger number; Go back to step 2. The process will reach 6174 in at most 7 iterations’
    (tags: 6174 constants cool maths mathematics numbers kaprekar wow)

Links for 2010-07-30

Links for 2010-07-26

Links for 2010-07-23

Links for 2010-07-15

Links for 2010-07-14

Links for 2010-07-09

  • xboxdrv : ‘a driver for Xbox and Xbox360 gamepads. It works by reading the raw data from the controller with the userspace library libusb and then passes the interpreted data to the kernel via uinput. This allows xboxdrv to provide regular joystick and event devices, which makes it compatible with all Linux software.’
    (tags: drivers xbox360 controllers remote linux ubuntu xboxdrv joystick input)

Links for 2010-07-05

Links for 2010-07-01

Links for 2010-06-29

Links for 2010-06-23

Links for 2010-06-21

Links for 2010-06-17

Links for 2010-06-14

Links for 2010-06-11

Links for 2010-06-10

Links for 2010-06-03

E-mail Address Validating Regular Expressions – a Warning

This page has been floating around in links over the past couple of weeks, as a collection of test cases to compare e-mail address validating regular expressions. However, watch out: it’s wrong.

RFC822/2822 defines an email address with a bare IP address domain part as using:

  domain-literal  =       [CFWS] "[" *([FWS] dcontent) [FWS] "]" [CFWS]

In other words, this test case is not valid at all:

  IPInsteadOfDomain@127.0.0.1

Instead, it should be:

  IPInsteadOfDomain@[127.0.0.1]

ditto for the other addrs using IP addresses in the domain part. They’re rare, but the non-bracketed form is definitely not legal and should not be considered so in the test cases.

I sent a mail to the author a few days ago without response, hence this post.

Links for 2010-05-31