Posts

Showing posts from April, 2020

An Automatic Table of Contents Generator in Javascript

Build a Table of Contents in Javascript  Web articles and reports can be made easier to navigate with a table of contents. They can be tedious to create and maintain, so let Javascript take the strain.
Web Articles or Reports Do you write articles for the web, or publish reports there? Then you should enhance them with a stylish table of contents so that your reader can find their way around.

And the good things is that you don't need to do much apart from include some Javascript and CSS in your page along with a single <div> tag. By doing this you'll end up with a table of contents that looks like the one on this page.
How it works All of the sections in your article need to be given a header - you doubtless already do this - and the script that I am going to show you will scan those headers, create anchors in the HTML and build the table in a panel at the top of the page.

First we need to settle on a header that we are going to use for our section headings. Let's…

Give your old PC new life with Lubuntu Linux

Image
Got an old pc or laptop? Give it a new lease of life. Install a lightweight Linux, like Lubuntu.
Simple is better I've never been a great fan of complicated user interfaces. To be honest, 20 odd years ago, I would have been perfectly happy to stick with Windows 2000 but my son persuaded me to upgrade to XP.
It's been downhill ever since.

But Linux is different - it's simple to use and most of the applications that you would expect to find on a modern PC are available for it.
"Reduce, Reuse, Recycle" - Jack Johnson Also, moving to Linux had never been easier and updating an old PC is good for the environment if you reuse it rather than buy a new one. "Reduce, reuse, recycle" as the Jack Johnson song goes.

So let's look at how to install Lubuntu, a lightweight version of the popular Ubuntu Linux, and see what the benefits are of a lightweight Linux on old hardware.

The first benefit is performance. I converted an old Windows Vista laptop to Lubuntu…

COVID-19 Data Tracking with Python and Smartable AI

Image
Building a COVID-19 data tracker in Python with the Smartable AI API






The COVID-19 pandemic is extremely worrying for everyone but are the facts and figures that you see in the media clear? Do you sometimes look at the numbers and the graphs that appear on the TV and the web and think something like, “That’s fine but what about trends?” It’s all very well reporting the scary absolute numbers, and we need to know these things but are things getting better or worse? Just how worried do we need to be?



Sometimes the apocalyptic news reports are less than crystal clear about the progress of the virus. But now you don’t have to rely on third party sources. Now you can create your own graphs and do your own analysis.
There are a number of sources for COVID-19 data — Johns Hopkins University is a great example. But you can create your own data tracking app that and derive your own indicators or concentrate on the data that you are interested in, with the Smartable AI API.
It’s free to use alt…