Learn the Line App

Privacy Policy The Learn the Line App distributed via Apple's App Store collects no data of any kind. Support If you have any support questions regarding the Learn the Line app please use the contact form below [ninja_form id=1]
Read More
Retro Gaming – Space Raiders

Retro Gaming – Space Raiders

Dylan's favourite t-shirt is his Game Over shirt which always reminds me to Space Raiders from the ZX Spectrum days. I found the cassette tape quite easily but it took a significant amount of searching to find the Spectrum itself and included in the box was the tape recorder as well! Unfortunately when I set about loading the game it didn't work. It probably was a lot to ask after 30+ years. The audio sounded a bit low and the tape player was at maximum. I tried connecting it via an amplifier but that didn't help. I connected the tape drive to my Mac and looked at the file in Audacity. Apart from being very quiet, zooming in showed that after the guard tone it was impossible to see the…
Read More
Which Funds Have Exposure to NetFlix?

Which Funds Have Exposure to NetFlix?

So dabbling in the markets by way of investment funds is amusing. I use Hargreaves Lansdown to do this. HL have a fund research section which lets you look at a given fund and view the top 10 holdings so you can base your decision to invest in your belief in the underlying stock. How do you tackle it from the other direction? Suppose you want to invest in NetFlix but which fund(s) has expose to their stock? The search tool on HL's website doesn't let you search the fund's holdings. Firstly, we can get a list of funds starting with a by visiting the link https://www.hl.co.uk/funds/fund-discounts,-prices--and--factsheets/search-results/a. There are 25 more to go plus 0 for anything starting with a number. These pages are HTML unordered lists ul, of hyperlinks…
Read More
Latin Square

Latin Square

Looking at the latest video from Presh Talwalkar about solving the Latin square where each row is the first row multiplied by the row number I decided it was time to see if I could remember any C++ and code a solution. https://youtu.be/KXOjtmNUSH0 Include the files standard C++ header files we need #include <iostream> #include <algorithm> #include <vector> #include <sstream> #include <string> #include <iomanip> using namespace std; CheckDuplicates() comes from ideas presented in this Stack Overflow question. The function determines whether there are any repeated digits in a vector by sorting the vector and then searching for adjacent items which are the same. Since std::sort changes the source vector I've created a local copy using the vector constructor function. bool CheckDuplicates(vector<unsigned int>* v) { vector<unsigned int> c (v->begin(), v->end()); sort(c.begin(),…
Read More
Prime Numbers in PowerShell

Prime Numbers in PowerShell

Dylan was using a number square to calculate prime numbers so it amused me to code up a couple of algorithms to show just how quick the sieve method actually is. I've done these in PowerShell because ... reasons. So as a baseline, here's a basic way to calculate a prime. Start with a number and try to divide it by every number starting from 2 up to the square root of the number. I've used throw in a try/catch block to move to the next iteration of the outer loop without executing the Write-Host line. for ($n = 3; $n -lt 100000; $n++) { try { for ($d = 2; $d -le [Math]::Sqrt($n); $d++) { if ($n % $d -eq 0) { throw } } Write-Host -NoNewLine "$n "…
Read More

Splicing Three Strand Rope

My sudden interest in rope splicing stems entirely from bell ropes. There seems to be three, perhaps four, splices to learn for this application. Links below to YouTube videos explaining how to do them: Eye Splice Short Splice Long Splice End/Back Splice Above the sally you'd probably use a long splice as it's thinner than the short splice for running over any pulleys. Below the sally, either a short splice to the tail end if it doesn't see much wear, or an eye splice if the tail end is changed frequently, typical on larger bells. The back splice could be used on the top end to give a nice finish to the rope. I'm amazed how straightforward they are to do and how strong they are given that it's just…
Read More

Pentominoes

One day I was clearing out some old papers and I came across this programming assignment from university. I can't recall which of the problems I tackled at the time, after all it was twenty-five years ago, but glancing over it now the pentomino problem caught my eye 5 The Pentomino Problem There are twelve different (ie. non-congruent) pentominos, shown below left. The pentomino problem is to fit them into a tray of dimensions 6 x 10 without overlapping. Some of the 2339 possible solutions are shown below right. Write a program to find a solution to the pentomino problem. {Note. Pretty output is not required.) Looking on Wikipedia it seems that the shapes have been named by Golomb so I'm going to use those names too. I started out…
Read More

Place Notation

Thomas Barlow has taught me place notation using Strike Back Surprise Major as the example. The notation for that is x38x14x58x16x12x38x14.12.78 l.e. 12. There are plenty of guides online on how to interpret it, such as this one on the CCCBR website. Briefly an x in the notation causes all bells to swap places. A group of numbers indicates that the bells in these places remain fixed while all others swap places. In this example, giving a starting order of rounds: 12345678 the first x would yield 21436587. The subsequent 38 indicates that the 3rd placed and 8th placed bells are fixed, so bells in position 1 and 2 swap as do 4 and 5 and 6 and 7 resulting in 12463857 and so on. As many methods are symmetrical,…
Read More

Sample Page

This is an example page. It's different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this: Hi there! I'm a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like piña coladas. (And gettin' caught in the rain.) ...or something like this: The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham…
Read More

Appendix 3: vSRX configuration

Final vSRX JunOS configuration set version 12.1X47-D20.7 set system services ssh set interfaces ge-0/0/0 unit 0 family inet address 172.20.0.248/20 set interfaces ge-0/0/1 unit 0 family inet address 10.0.0.1/16 set interfaces ge-0/0/2 unit 0 family inet address 10.1.2.1/24 set routing-options static route 0.0.0.0/0 next-hop 172.20.0.1 set security nat source rule-set outgoing from zone dmz set security nat source rule-set outgoing from zone trust set security nat source rule-set outgoing to zone untrust set security nat source rule-set outgoing rule outgoing match source-address 0.0.0.0/0 set security nat source rule-set outgoing rule outgoing match destination-address 0.0.0.0/0 set security nat source rule-set outgoing rule outgoing then source-nat interface set security nat static rule-set static-nat-untrust from zone untrust set security nat static rule-set static-nat-untrust rule rule-view-pcoip match destination-address 172.20.0.249/32 set security nat static rule-set…
Read More