How many squares are there in this image?

On Facebook every now and then someone will post a “How many squares in this image?” riddle, and in the comments the answers will range from acurate to ignorant to outlandishly stupid. Today I came across this image:

Thousands of comments with answers from 6 to 18, so I set out to write a little PHP and Javascript program to count and visualize the squares.

For those not sure of the terminology:

  • all the shapes in this image are rectangles, i.e. their corners are all 90º;
  • however, not all of them are squares, i.e. equilateral rectangles, with four identical sides.

Also, while there are only four shapes in this image which are themselves squares, combinations of two or more shapes also form squares and will be counted as such.

So here we go:

rect1
rect2
square1
square2
rect3
rect4
square3
square4
rect5
square5
square6

As this demonstrates, there are:

  • 6 single, simple squares (1-6),
  • 5 composite squares made up of two to four single squares 7-11), and
  • finally the whole image is also a square (12),

which makes a total of twelve squares.

Michael Connely Book List

Taken from Wikipedia for my own reference.

 

Title Book num­ber Pub­li­ca­tion date Featuring Also featuring
The Black Echo 1 1992 Harry Bosch (1) Eleanor Wish
The Black Ice 2 1993 Harry Bosch (2)  
The Concrete Blonde 3 1994 Harry Bosch (3)
The Last Coyote 4 1995 Harry Bosch (4)
The Poet 5 1996 Jack McEvoy (1) Rachel Walling
Trunk Music 6 1997 Harry Bosch (5) Eleanor Wish, Roy Lindell
Blood Work 7 1998 Terry McCaleb (1) Jaye Winston
Angels Flight 8 1999 Harry Bosch (6) Eleanor Wish, Roy Lindell
Void Moon 9 2000 Cassie Black  
A Darkness More Than Night 10 2001 Terry McCaleb (2), Harry Bosch (7) Jaye Winston, Jack McEvoy
City of Bones 11 2002 Harry Bosch (8)  
Chasing the Dime 12 2002 Henry Pierce
Lost Light 13 2003 Harry Bosch (9) Eleanor Wish, Roy Lindell
The Narrows 14 2004 Harry Bosch (10) Rachel Walling, Eleanor Wish
The Closers 15 2005 Harry Bosch (11) Kiz Rider
The Lincoln Lawyer 16 2005 Mickey Haller (1) Maggie McPherson
Echo Park 17 2006 Harry Bosch (12) Rachel Walling
The Overlook 18 2007 Harry Bosch (13) Rachel Walling
The Brass Verdict 19 2008 Mickey Haller (2) Harry Bosch, Jack McEvoy
The Scarecrow 20 2009 Jack McEvoy (2) Rachel Walling
Nine Dragons 21 2009 Harry Bosch (14) Eleanor Wish, Mickey Haller, David Chu
The Reversal 22 2010 Mickey Haller (3), Harry Bosch Maggie McPherson, Rachel Walling
The Fifth Witness 23 2011 Mickey Haller (4) Maggie McPherson
The Drop 24 2011 Harry Bosch (15) David Chu, Dr Hannah Stone
The Black Box 25 2012 Harry Bosch (16) David Chu, Dr Hannah Stone
The Gods of Guilt 26 2013 Mickey Haller (5)  
The Burning Room 27 2014 Harry Bosch (17) Rachel Walling, Lucia Soto
The Crossing 28 2015 Harry Bosch (18) Mickey Haller, Lucia Soto
The Wrong Side of Goodbye 29 2016 Harry Bosch (19) Mickey Haller
The Late Show[33] 30 2017 Renee Ballard (1)  
Two Kinds of Truth[34] 31 2017 Harry Bosch (20) Mickey Haller
Dark Sacred Night 32 2018 Renee Ballard (2), Harry Bosch (21)  
The Night Fire[35] 33 2019 Renee Ballard (3), Harry Bosch (22) Mickey Haller
Fair Warning 34 2020 Jack McEvoy (3) Rachel Walling
The Law of Innocence 35 2020 Mickey Haller (6), Harry Bosch  
The Dark Hours 36 2021 Renee Ballard (4), Harry Bosch (23)  
Desert Star 37 2022 Renee Ballard (5), Harry Bosch (24)
Resurrection Walk 38 2023 Mickey Haller (7), Harry Bosch
The Waiting 39 2024 Renee Ballard (6), Harry Bosch (25), Maddie Bosch (1)

Win11: Stop Taskbar Auto-hiding

On a newly installed Windows 11 machine I recently had the problem that the taskbar would auto-hide despite the feature being turned off. Some searching in Google identified the cause and provided the solution:

There is another setting in Taskbar Setting → Taskbar Behaviors, called “Optimize taskbar for touch interactions“. Apparently that gets turned on automatically if the computer supports touch and when it is turned on, the taskbar gets taller with bigger icons, and it autohides regardless of the setting “Automatically hide the taskbar“.

Recently I have been using both ChatGPT and Google’s pendant Gemini to ask such questions and find solutions, and usually that works pretty well, but this time both ChatGPT and Gemini failed to solve the problem.

The answer was provided by Cameron Sidhe in his post on answers.microsoft.com .

Proxmox on a Raspberry Pi 5

Until I retired four years ago I used to run a Lenovo Thinkcenter as a kind of universal server, using Proxmox as the  virtualization solution.

Proxmox is based on Debian Linux and integrates QEMU/KVM for virtual machines and LXD for containers. When I first encountered it it only ran on x86_64 machines (i.e. Intel and AMD processors), but recently support for the ARM architecture (aarch64) has been added.

So I am going to begin a project of installing it on both a Raspberry Pi 4 and a Raspberry Pi 5, primarily as an experiment and to keep my mind busy and in the game.

I will be using the tutorial, “How to Install Proxmox on the Raspberry Pi” by Emmet at the PiMyLifeUp site, an Australian project and resource site for all things Raspberry Pi, Linux, Arduino, etc.

First I need to get my Raspberry Pi up and running with an M.2 SSD in an Argon One case; I find the connectors for the ribbon cable between the Pi’s SSD port and the one on the Argon board challenging, to say the least.

I will update this post as I make progress.

 

Through Theology In One Year

I am just starting to watch a video podcast series called “Through Theology In One Year“, produced and presented on YouTube by Michael Patton[1] Michael is a graduate of Dallas Theological Seminary and presents theology from an Evangelical, Reformed perspective.

As of today there are 16 episodes online and they are presented in a YouTube playlist which would be very useful –except that the playlist is arranged with the most recent episode at the top, and so will play in reverse order, and YouTube does not offer a way to reverse the order in which playlists are presented.

Because I do not fancy having to navigate backwards so I was looking for a solution outside YouTube — and in this article I just found one: The website Playlist.Tools allows you to find a playlist URL and paste it in a text box on the site, and will then present you with the playlist in reverse order — i.e. with the first episode at the top.[2]

For my own convenience and for anyone else interested I am presenting the URL of the reversed playlist for “Through Theology In One Year” right here, hoping that it is persistent and doesn’t change over time or when new episodes are added (we might have to deal with that if it happens).

Here we go: “Through Theology In One Year” in correct viewing order.

__________
  1. C. Michael Patton has been in ministry for twentyfive years as a pastor, author, speaker, and blogger. Find him on Patreon. Th.M. Dallas Theological Seminary (2001), president of Credo House Ministries and Credo Courses, author of Now that I’m a Christian (Crossway, 2014) Increase My Faith (Credo House, 2011), and The Theology Program (Reclaiming the Mind Ministries, 2001-2006), host of Theology Unplugged, and primary blogger at Parchment and Pen. But, most importantly, husband to a beautiful wife and father to four awesome children. Michael is available for speaking engagements. Join his Patreon and support his ministry.[]
  2. I would have preferred to use a browser plugin but I could not get any of the plugins presented to work.[]

Hostile Take-Over! My old FB account is now in enemy hands …

This past Saturday I was contacted on FB Messenger by a friend in England who said she had locked herself out of her Facebook account and needed help recovering it. Could I receive an authorization code for her and forward it? Trying to be helpful I said, Sure, but tell me how we met so I know this is really you and not some hacker. Her answer was correct, so I received and forwarded the code.

HOWEVER, this wasn’t really my friend but the hacker who had hijacked her account and who had obviously done his homework so he could answer my question, and the authorization code was not for my friend’s account but for mine. The hacker immediately changed the password and removed my e-mail and phone number from the account, so I had no quick way to regain control — Facebook’s recovery tools all presuppose that you still have a way to receive a one-time code by e-mail or SMS or WhatsApp to an address or phone number linked to your account, and that was unfortunately all gone.

Now, I will admit that in a way, this was my own fault. I am supposed to be sufficiently computer and internet savvy to not all for such scams. All I can claim as extenuating circumstances is the fact that I am getting older and probably more senile, that it was late at night, and that my “friend” correctly answered my question about how we became acquainted. But other than the hacker I can only blame myself.

But I DO blame Facebook for their abysmally inadequate and ineffective support. Not only is it impossible to actually talk to a support person; when one reports such an incident nothing at all seems to happen. I reported this through their help center as well as per e-mail to security@facebookmail.com, and several of my friends also reported the account as compromised. Four days later the account is still active and being used by the hacker to try and scam my friends in the same way I was scammed, and Facebook has done absolutely nothing.

I set up a new account and created a post explaining what had happened and immediately began to receive recommendations for people and services who could recover my account. I picked one whose online presence seemed pretty professional and paid a moderate amount to have my account recovered. Well, next he needed a special piece of software costing twice what I had already paid, and then, when he claimed he had gained control of the account, he demanded a further, even higher payment before he would provide me with the necessary information to access and secure the account. This not only exceeded my budget, I also suspected that he would string me along with one payment demand after the other. So I pulled the plug, decided to write off the money I had paid  and abandon the account. As far as I am concerned the ball is now in Facebook’s court to protect their users from a scammer they have been told about.

Nevertheless I asked a friend who can still see the old account to make screen dumps of the list of “friends” and I will see how I can warn as many as possible that my old account “Wolf N. Paul” is compromised.

My new Facebook-Account is “Wolf Paul” (without the “N.”), and I am slowly rebuilding my friends list. I thought about abandoning FB altogether, but it has been so helpful in reconnecting with people I had lost touch with and I don’t want to miss that.

What did I learn from this?

  • To be extremely wary of requests to help people with authentication problems; if an authentication code is sent to you, chances are very good that it is for your account rather than for someone else’s.
  • To expect no support from Meta or it’s subsidiaries; while they are obviously making money from us in the form of an ever increasing flood of advertising, they are not charging us directly for the service and thus have no obligation toward us.
  • To never agree to designate a payment with PayPal “for Family and Friends” rather than “for Goods or Services” — for the latter one can open a dispute and get the money back if the promised service is not delivered, but the former is irretrievably lost.
  • To never store material important to you (photos, videos, texts, chats) in an online service like Facebook, WhatsApp, or any of Google’s or Microsoft’s services without having one or more backups offline or in another service.

And now we get on with life — on and offline.

Upgrade Windows 11 Home to Pro using an OEM key

I have recently run into a problem which I finally solved and want to share the solution here.

Here is the problem: 

When you purchase a computer with a Windows (10 or 11) Home license, and you want to upgrade to Windows Pro, normally you just purchase a Pro license key, go to “Settings–»System–»Activation“, click on “Change License Key” and enter your new Pro key. However, that only works with full-price, retail license keys, for example from the Microsoft store.

If you bought a (typically much cheaper) OEM or “system builder” key this will not work — you’ll simply be informed that the key is not valid. Supposedly Microsoft does not want OEM keys sold apart from a new machine and therefore refuses to accept it tu upgrade a computer which is already linked to a different Windows license. Even if you wipe Windows and re-install, your Pro license key will not work (because ever since Windows 10 licenses are stored in the cloud).

In other jurisdictions the sale of OEM licenses may indeed be illegal, but in Europe it is perfectly legal[1]), and there are vendors who sell OEM Windows 11 Pro licenses for under €50, so this is a very attractive alternative to a €150 or so retail license.

So how can you still use such an OEM license key to upgrade a computer with an existing Windows 11 Home license to Windows 11 Pro?

We need to uninstall the existing license or “divorce” the computer from it. To do this, open a Command Prompt window and type the following:

slmgr /upk

Then restart the computer. Once it has restarted, you can go to “Settings–»System–»Activation“, click on “Change Product Key” and enter your OEM key. Your Windows installation should now be activated as Windows Pro.

Some explanations of this procedure seem to suggest that you will lose all your data and settings; that did not happen to me when I carried out this procedure recently, but your mileage may vary.

I admit that I am a bit puzzled by the fact that there are plenty of vendors selling Windows 10 and 11 OEM licenses, at prices ranging from €20 to €50; it seems to me that Microsoft could keep a tighter reign on these licenses. The fact that they don’t, and that the “slmgr /upk” route works, suggests to me that somewhat begrudgingly Microsoft would rather that folks install these OEM licenses than that they switch to Linux (which I did with another computer recently, before I found this workaround).

__________
  1. This is based on the principle of exhaustion of copyright, which is enshrined in EU law. This principle states that once a copyright holder sells a copy of a work, they have exhausted their right to control the further distribution of that copy. So once Microsoft sells an OEM license to a system builder, that system builder is free to resell the license to end users. Microsoft cannot prevent this from happening, even if the license is sold separately from the hardware, and it has to accept the licence at least once to activate Windows (it does not need to permit you to move the license to another computer, and indeed does not do so[]

Forgetting Backups can be Disastrous

One of the YouTube channels I follow, Life Uncontained, just posted that their Apple Macbook suffered a fried mainboard, and since that Macbook has the SSD soldered to the mainboard they lost everything on there.

It is probably pointless to say this to hardcore Apple fans, but this is in part Apple’s fault: why solder the SSD? An M.2 SSD slot and SSD hardly takes more space, and the SSD is replaceable. I have a couple cheap mini Windows computers and netbooks which have the main storage soldered, but even Apple’s cheapest Macbook is pricey enough to make this inexcusable. When I originally posted this on Facebook someone commented that recent Dell notebooks also have the SSD soldered — they’re also more pricey than cheap netbooks. Shame on both manufacturers, and any others that do not at least provide an M.2 slot as well.

Apparently the “Life Uncontained” folks do backup everything on external hard disks, but not frequently enough, so they lost about a month’s worth of work. I would strongly encourage anyone in this situation (any computer with soldered storage) to use an external USB SSD to work on, rather than storing your stuff on the soldered storage — with USB 3.x this should be fast enough to work; and I would encourage everyone to get into the habit of leaving the computer on overnight with your backup drive attached, and when you are done for the day, start the backup job. By the morning everything should be backed up. A backup job, once set up, should run unattended while you sleep. And considering the minimal physical size and weight of an extra SSD, this should be possible even while you are travelling.

Apple provides TimeMachine to set this up with either external hard disks or SSD, or network shared storage. Windows has a similar feature called File History, and both programs can be set up to either more or less continuously back up files, or once a day, by setting the backup interval. Or you can simply start a copy job from your external work SSD to your external backup SSD

Linux Mint Mate: Menu Scripting

I have been playing around with the Mate menus. Specifically I wanted a convenient way to create desktop files and stick them into the menu, or specifically into a submenu. I know there is webapp, but I wanted something a bit more customizable.

So, I wrote two scripts:

  1. mksubmenu, which takes a name and an icon and creates an xdg *.directory file in $HOME/.local/share/desktop-directories. This effectively creates a new submenu under “Applications“.
  2. mkwebapp, which takes a name, url, icon, menu, and Chromium custom parameter and constructs an xdg desktop item in $HOME/.local/share/applications to call the url via the Chromium browser, with an optional Chromium custom parameter, using the specified icon and sticks it into the specified submenu or into “Other” if none is specified. I prefer this to the app shortcuts created from within the browser using the “Create Shortcut” (Chrome/Chromium/Iron/etc) or “Save as an App” (MS Edge) commands because my script creates shortcuts which are easier to edit and which survive browser changes or re-installs.

I have yet to create a script to create and install a desktop item for some random program, and there are some things I have not yet figured out:

  1. How to install a desktop item into one of the system submenus for which no xdg *.directory file exists, such ad Office or Internet;
  2. How to place new menus anywhere other than at the very top of the menu tree, just under Applications.

So I still need to use the “Edit Menus” feature to move things around.

Google Translate has become almost usable

I’m very impressed with the progress Google Translate has made.

A few years ago I was asked to translate a book from German to English and as an experiment and in the hope that this would save me at least some of the tedious (and boring) backbreaking work, I sent the text through Google Translate . The result was unusable; the necessary post-editing would have taken more time and effort than a complete re-translation. Since then, I’ve only used the service to create short Facebook posts or comments, or emails, in French or Dutch, which I then edit; I find it harder to write in both languages ​​than to speak, but due to extensive reading I have a good feel for the languages and can edit the translations a bit.

Yesterday I wanted to translate an article about the Ascension of Christ, and because I am currently bedridden, I am somewhat restricted in terms of typing on a keyboard, so I sent the article through Google Translate .

To my astonishment, the result was vastly better than my experience of a few years ago. While there were a few glitches (snippets of text that had gone missing, a few bits that were gibberish for one reason or another), overall the text was quite readable. Most of the post-processing involved formatting.

This raises a similar question for me as using the ChatGPT AI engine . Most of the time ChatGPT answers questions correctly and in such elegant German and English that one can use them almost without editing; would it then be ethical to pass off such an answer as my own? In the end I decided to either attribute the answer to ChatGPT , or (if I’ve significantly edited or added to it) to call it a result of my collaboration with ChatGPT .

The more Google Translate (or other similar services) improves, the less post-processing is needed, the more problematic it becomes to pass off such a translation as my own. Again, indicating support from the translation service seems to be the ethical solution.

Next, I will try other translation services, such as Bing Translator from Microsoft or Deepl Translate , as well as ChatGPT for shorter texts (which currently has an output limit of 2048 characters per answer, even for paying subscribers).