The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,835 other subscribers

Archive for the ‘Scripting’ Category

Remember: languages automatically evaluate const expressions

Posted by jpluimers on 2026/04/16

The first tweet below reminded me that few people seem to realise that const expressions are evaluated by the compiler/interpreter into the actual const value. Often this is called constant folding (though that can happen outside constant definitions too!)

Truckloads of source code I have come across in all kinds of languages where people put the calculated values in the expression like described here:

[Wayback/Archive] Kevlin Henney on Twitter: “For example: const int secondsInDay = 24 * 60 * 60; There is no need to calculate it yourself: const int secondsInDay = 86400; Or, related to what I’ve just seen: const int secondsInDay = 86400; // 24 * 60 * 60.

In languages that support rich enough types, you can even pass a typed constant like timespan, duration or period around:

[Wayback/Archive] David Kerr on Twitter: “@KevlinHenney The general point is well made of choir course. In java, etc you can pass a Duration object around, no need to interpret an in. Type safety, self documenting.”

My recommendation is to use an expression like the first and maybe document the calculated value (for instance for ease of bug hunting) like here

Read the rest of this entry »

Posted in Conference Topics, Conferences, Development, Event, Scripting, Software Development | Leave a Comment »

Online tools to test JSONPath Queries (plus a small list of Amazon top level domains)

Posted by jpluimers on 2026/04/15

I wanted to parse some JSON being sent back during an XMLHttpRequest (what a wrongly named call is that!) of which I grabbed the content using the web development tools of my Chromium based browser.

Input

I got this list of amazon top level domain names from research I did for my blog postΒ Download your Kindle books soon, because Amazon will block them after February 25, 2025 . The source is [Wayback/Archive] Amazon operating domains by country. Β· GitHub [Wayback/Archive] in the file amazon-domains.json:

{
    "us": "https://www.amazon.com",
    "uk": "https://www.amazon.co.uk",
    "ca": "https://www.amazon.ca",
    "de": "https://www.amazon.de",
    "es": "https://www.amazon.es",
    "fr": "https://www.amazon.fr",
    "it": "https://www.amazon.it",
    "jp": "https://www.amazon.co.jp",
    "in": "https://www.amazon.in",
    "cn": "https://www.amazon.cn",
    "sg": "https://www.amazon.com.sg",
    "mx": "https://www.amazon.com.mx",
    "ae": "https://www.amazon.ae",
    "br": "https://www.amazon.com.br",
    "nl": "https://www.amazon.nl",
    "au": "https://www.amazon.com.au",
    "tr": "https://www.amazon.com.tr",
    "sa": "https://www.amazon.sa",
    "se": "https://www.amazon.se",
    "pl": "https://www.amazon.pl"
}

The list is far from complete, so tomorrow I will post some more sources in Some pages that have lists of Amazon toplevel domains.

The queries and results show you that the original JSONPath (2007) and its RFC 9535 definition (2024, just 2 years ago) do not support getting the key names of the above list the ~ part in the first query below fails, and only the second query works.

This means that finding the right tooling is important.

Example

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Development, Event, JavaScript/ECMAScript, JSON, JSONPath, PHP, Python, Scripting, Software Development, TypeScript, Web Development | Tagged: | Leave a Comment »

Only available on Window, but sometimes useful, the Excel FILTERXML function

Posted by jpluimers on 2026/04/09

Some links on the [Wayback/Archive] FILTERXML function – Microsoft Support.

It is only available on Windows (because of the underlying XPath libraries used, I think it is MSXML), and “only” as of Excel 2013, but still can be useful.

Some links below on FILTERXML and related XPath information so I can more easily find their content back.

Notes:

  • FILTERXML only supports XPath 1.0
  • The quotes are huge, for one because I don’t use Excel enough to be an expert, but have enough software experience to sometimes want to use complex concepts in Excel. Having all this in one place helps me with that goal.
  • You need to ensure your data is either XML in a well-formed document format, or you can translate your data to well-formed XML.

The links and quotes starting with the question that sparked my interest:

Read the rest of this entry »

Posted in Development, Excel, Office, Office 2013, Office 2016, Office VBA, Power User, Scripting, Software Development, Windows, XML, XML/XSD, XPath | Leave a Comment »

Disabling the Windows News and Interests fly-out widget through the registry

Posted by jpluimers on 2026/04/08

I could not find a reliable per-user setting that works with just logoff/logon for Windows 11 like I found for Windows 10 in Disabling the Windows 10 and Windows 11 news (and weather) feeds.

So (for now?) there is only a global Globally which needs admin rights and a logoff/logon sequence:

:: requires admin
reg add "HKLM\Software\Policies\Microsoft\Dsh" /v "AllowNewsAndInterests" /t REG_DWORD /d "0" /f
echo logoff/logon to apply the change, or restart Explorer

Via:

Read the rest of this entry »

Posted in Batch-Files, Development, Power User, Scripting, Software Development, Windows, Windows 10, Windows 11 | Leave a Comment »

Excel: operations involving the last occurence of a substring (with examples getting the current Worksheet, Workbook and file/directory path)

Posted by jpluimers on 2026/04/02

Last month I wrote about CELL function looks interesting but beware: language nightmares coming up….

There I mentioned both formulas from [Wayback/Archive] Get sheet name only – Excel formula | Exceljet and [Wayback/Archive] Insert the current Excel file name, path, or worksheet in a cell – Microsoft Support failing to deliver the expected results

an official Microsoft example of obtaining the Worksheet name which I suspected would not work on systems allowing ] in path names. And indeed it is true: that case fails on both MacOS and Windows in the same way.

Here you see the failures of both the ExcelJet function and the ones from Microsoft Support on two operating systems:

Read the rest of this entry »

Posted in Conference Topics, Conferences, Development, Event, Excel, Office, Power User, Scripting, SocialMedia, Software Development, Twitter | Leave a Comment »

Sweep the Strait: Minesweeper, but in the Straitt of Hormuz (plus some tests with RawGit alternatives)

Posted by jpluimers on 2026/03/31

Forgot to schedule this one when I saw it two weeks ago: [Wayback/Archive] Sweep the Strait.

Apart from demonstrating that Trump never had a plan, does not and will not have a plan, it is cool to see Minesweeper developed in JavaScript, HTML and CSS mapped with some geodata onto a real map of the Strait of Hormuz.

Cool idea!

It has a function Windows 3.x UI with functional menu (Game -> New Game; Help -> How to Play)

At first, I thought the original developer is this:

However, in fact the developer is:

Read the rest of this entry »

Posted in CSS, Development, HTML, JavaScript/ECMAScript, Opinions, OS/2, Power User, Retrocomputing, Scripting, Software Development, Web Development, Windows, Windows 3.11 | Leave a Comment »

Some links on non-official Ring API libraries and tools

Posted by jpluimers on 2026/03/26

There is no official Ring API. But there are libraries and tools around that can talk to a Ring ecosystem, mostly written in JavaScript or Python.

Some links I found:

Read the rest of this entry »

Posted in *nix, *nix-tools, cURL, Development, Hardware, IoT Internet of Things, JavaScript/ECMAScript, Network-and-equipment, Power User, Python, Ring Doorbell/Chime (Amazon), Scripting, Software Development | Leave a Comment »

nvaccess/nvda: NVDA, the free and open source Screen Reader for Microsoft Windows

Posted by jpluimers on 2026/03/25

On my research list: [Wayback/Archive] nvaccess/nvda: NVDA, the free and open source Screen Reader for Microsoft Windows

A bit more background is in NonVisual Desktop Access – Wikipedia

NonVisual Desktop AccessΒ (NVDA) is aΒ free and open-source, portableΒ screen readerΒ forΒ Microsoft Windows.Β The project was started by Michael Curran in 2006.

NVDA is programmed inΒ Python. It currently works exclusively with accessibilityΒ APIsΒ such asΒ UI Automation,Β Microsoft Active Accessibility,Β IAccessible2Β and the Java Access Bridge, rather than using specialized video drivers to “intercept” and interpret visual information. It is licensed under theΒ GNU General Public LicenseΒ version 2.

It opens a ton of possibilities to use during software development for instance for automation or GUI testing.

It is an open source alternative for JAWS (screen reader) – Wikipedia.

Via this remark in [Wayback/Archive] Angrynerds 086 – Gone in 37 minutes – YouTube (around the 29:30 and 30:30 time marks)

#08 Windows11 gaat 32bit systemen kapotslopen. Dat is niet leuk voor bepaalde toegankelijksopties.

–jeroen

Posted in C++, Development, Python, Scripting, Software Development, Testing | Leave a Comment »

sjinzh/awesome-yolo-object-detection: πŸš€πŸš€πŸš€ A collection of some awesome public YOLO object detection series projects.

Posted by jpluimers on 2026/03/24

On my research list: [Wayback/Archive] sjinzh/awesome-yolo-object-detection: πŸš€πŸš€πŸš€ A collection of some awesome public YOLO object detection series projects.

YOLO (You Only Look Once) is a series of computer vision algorithms and libraries based on training data that does ultra-fast object recognition. Most of it is written in Python with the more recent versions all using Pytorch, though interface from various other languages and environments are available. The above article lists them all.

A long time ago I gave a presentation on a few conferences using computer vision of which I blogged about the first one:Β Spoken @ DevDays 2009 NL – download is online: .NET & hardware – capture video & control servos, in a fun application

My presentation (.NET & hardware – capture video & control servos,Β in a fun application) was as a GeekNight session.
That imposed geeky stuff, but in addition it addressed an important point: there will be many more means of interaction.
In particular, my β€˜geek’ combination of hardware and software would react on movements seen by the webcam by pointing the beam of the laserpointer towards the largest area that moved.

So it is cool to revisit the topic by for now a link dump: Read the rest of this entry »

Posted in .NET, AI and ML; Artificial Intelligence & Machine Learning, Development, Python, Scripting, Software Development | Leave a Comment »

Odido-router verzamelt analytics van je huishouden en stuurt het door naar AI toko lifemote

Posted by jpluimers on 2026/03/04

Dit is net zo nalatig als de Odildo hack waar alle klantgegevens mee op straat kwamen te liggen:Β [Wayback/Archive] Odido-router verzamelt analytics van je huishouden

Bevindingen in het kort

  • De Odido-router haalt bij een nieuwe WAN-verbinding een bash-script op over een onversleutelde HTTP-verbinding.
  • Je kan dit script manipuleren om een root shell op je router te krijgen.
  • Als je TLS-verkeer mitm’t zie je analytics-data over de lijn gaan; de scripters hebben TLS-validatie uitgezet (`curl -k`) dus je kan dit ‘versleutelde’ analytics-verkeer inzien.
  • Je router stuurt namen en MAC-adressen van devices in je huis door naar Lifemote. Verder deelt het ding de SSID’s en MAC-adressen van WiFi-netwerken in de buurt. En wat analytics-stats over je dataverbruik. Lifemote adverteert met β€œAI-Powered Home Wi-Fi Solutions for ISPs”. Het voelt wat vies dat zij AI’s gaan trainen met data uit mijn huishouden. Daar vind ik wat van.

--jeroen

Posted in *nix, *nix-tools, bash, bash, Development, ISP, Odido (ex Dutch T-Mobile), Power User, Python, Scripting, Software Development | Leave a Comment »