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 4,182 other subscribers

Archive for July 6th, 2021

Diagrams om task states and transitions

Posted by jpluimers on 2021/07/06

For my link archive, a bunch of task state diagrams that include transitions between the states.

The diagrams are in no particular order.


Read the rest of this entry »

Posted in Development, Software Development | Leave a Comment »

Where my tweet about testing in production gained me knowledge about the Covid QR code systems

Posted by jpluimers on 2021/07/06

Even though RIVM twitter-care did not respond at all on my raised issue that the production environment leaded an acceptation environment URL, it did gain me some knowledge on their systems and the (then upcoming) European QR code systems.

[] Jeroen Wiert Pluimers on Twitter: “Onhandig op de #CoronaCheck site van het @rivm de link hier (1) wijst nog naar de acceptatie omgeving en daar heb je authorisatie voor nodig. Zonder “.acc” werkt het ook niet: (2) Dit werkt wel: (3) CC @locuta‚Ķ “


The problem digging into it was that it only reproduces when inside the [] Coronacheck Print Portaal after you have logged on via DigiD, so you cannot save it in the WayBack machine nor

This print portal isn’t a straightforward hierarchy of web-pages, but an actual Vue.js app that injects itself into [Wayback/] nl-covid19-coronacheck-website/index.html at main ¬∑ minvws/nl-covid19-coronacheck-website and dynamically changes the URL depending on the application state.

It also means that you cannot archive pages like or as the Vue.js app will not understand state from those sub-URLs and go back to

The only other results of¬†[Wayback] “” – Google Search¬†were:

Acceptance URLs in production

I had a hunch the CoronaCheck code would be open source, though finding it through the most obvious [Wayback] open source coronacheck app – Google Search failed. Since the web-site and app look very similar to the CoronaMelder web-site and app, I tried [Wayback] open source coronamelder app – Google Search and found the page with links: [Wayback] Colophon – Stop the spread of the coronavirus, download CoronaMelder.

Note that [Wayback] Open-Source Project Corona-Warn-App is a different beast. Though internationally available and released way earlier than the Dutch apps, the Dutch government has a huge ego (maybe even abbreviatable to Hugo) resulting in severe “not invented here” syndrome despite having had to be bailed out when “code black” happened in hospitals.

One thing that I learned is that there is one version of the code behind in the main branch of that has only acceptance URLs. They are in these locations:

Apparently, replacing these with production URLs is done during deployment, but I could not find the code that does it in the main repositories at [Wayback]

European Corona/COVID-19 Green Pass QR certificate

One answer to my tweet was [] Joel Haasnoot on Twitter: “‚Ķ “ which provides more information on the European

These are the links I thought were interesting:


Read the rest of this entry »

Posted in Development, JavaScript/ECMAScript, Scripting, Software Development, Vue.js, Web Development | Leave a Comment »

SQL Server, [] brackets, keywords and special characters

Posted by jpluimers on 2021/07/06

A few links for my archive:

  • [WayBack] sql server – What is the use of the square brackets [] in sql statements? – Stack Overflow answer by Michael Haren:

    The brackets are required if you use keywords or special chars in the column names or identifiers. You could name a column¬†[First Name]¬†(with a space)–but then you’d need to use brackets every time you referred to that column.

    The newer tools add them everywhere just in case or for consistency.


  • [WayBack] tsql – What characters are valid in an SQL Server database name? – Stack Overflow answer by Scott Munro:

    Delimited names Рsurrounded by square brackets or double quotes (if QUOTED_IDENTIFIER is set to ON) Рcan contain basically anything other than the delimiters themselves. It is even possible to use the delimiters within the name with some escape logic. Note though that it is only the closing escape character that must be escaped. In the first example below, the single instance of the opening escape character in the name does not need to be escaped whereas the closing escape character does have to be escaped (by replacing the single instance with two). I guess the logic here is that whatever code that is parsing these statements is looking for a closing escape character and has is not interested in nested opening escape characters.

    • [Test[Test] -> Test[Test
    • [Test]]Test] -> Test]Test

    The following is a description of the rules surrounding non delimited (nonquoted) identifier names in SQL Server 2012. It is an extract from the document Guide to Migrating from MySQL to SQL Server 2012.

    Schema Object Names

    In SQL Server 2012, an object name can be up to 128 characters long.

    Nonquoted identifier names must follow these rules:

    • The first character must be alphanumeric, an underscore (_), an at sign (@), or a number sign (#).
    • Subsequent characters can include alphanumeric characters, an underscore, an at (@) sign, a number sign, or a dollar sign.
    • The identifier must not be a Transact-SQL reserved word. Guide to Migrating from MySQL to SQL Server 2012 8
    • Embedded spaces or special characters are not allowed.

    Identifiers that start with @ or a number sign have special meanings. Identifiers starting with @ are local variable names. Those that start with a number sign are temporary table names.

    To quote an identifier name in Transact-SQL, you must use square brackets ([]).

  • [WayBack] Database Identifiers – SQL Server | Microsoft Docs:
    1. Classes of Identifiers
    2. Rules for Regular Identifiers
    3. See Also




Posted in Database Development, Development, SQL, SQL Server | Leave a Comment »

Delphi: bumped into System.Classes.TLoginCredentialService while doing a “DefaultUsrPwDm” – Google Search

Posted by jpluimers on 2021/07/06

Doing a¬† “DefaultUsrPwDm” – Google Search, I bumped into the System.Classes.TLoginCredentialService class.

There is hardly any documentation.

It was introduced as [WayBack] System.Classes.TLoginCredentialService – XE2 API Documentation with the standard TObject template:

TObject is the ultimate ancestor of all objects and components.

System.Classes.TLoginCredentialService inherits from System.TObject. All content below this line refers to System.TObject.

TObject is the ultimate ancestor of all objects and components.

Although TObject is the based object of a component framework, not all objects are components. All component classes descend from TComponent.

Note: TObject is never directly instantiated. Although it does not use programming language features that prevent instantiation, TObject is an abstract class.

The documentation was updated in Delphi XE4 to [WayBack] System.Classes.TLoginCredentialService – RAD Studio API Documentation

TLoginCredentialService provides functionality for login action, regardless of framework.

TLoginCredentialService represents an extensible, framework agnostic, login credential service with support for callbacks (success, failure). It includes methods for:

  • Getting user credentials:¬†Domain,¬†Username¬†and¬†Password.
  • Registering and unregistering credentials from handlers.

See Also

That version also added [WayBack] System.Classes.ELoginCredendialError – RAD Studio API Documentation

ELoginCredendialError is the exception class for handling invalid login credentials.

ELoginCredendialError is raised when an application attempts to get specified, but unexisting, login credentials.

Nothing ever got added, no examples, no documentation, just look at for instance the Delphi Rio documentation:

Luckily, I found this for my research list (code at [WayBack] : [WayBack] delphi – TLoginCredentialService usage example – Stack Overflow which uses globals, but that’s not the point of the demo (you can use different storage in your actual code)

I’ve just created a small demo of how to use it

Click here to download the code

In the following I’ll show some of the code:

First I need a record to hold Credentials, and a list of them :

  TCredential = record
    Username, Password, Domain: string;
    constructor Create(const aUsername, aPassword, aDomain: string);
    function AreEqual(const aUsername, aPassword, aDomain: string): Boolean;

  TCredentialList = class(TList<TCredential>)
    function IsValidCredential(const aUsername, aPassword, aDomain: string): Boolean;

then we need to define a context in wich we are calling this. Thats just a application unique string wich identifyes each Loginfunction

  Context = 'TForm1';

In Form create I create my list and add dummy data to it

procedure TForm1.FormCreate(Sender: TObject);
  CredentialList := TCredentialList.Create;
  //Add Dummy data
  CredentialList.Add(TCredential.Create('AA', 'AA', 'DomainAA'));
  CredentialList.Add(TCredential.Create('BB', 'BB', 'DomainAA'));
  CredentialList.Add(TCredential.Create('CC', 'CC', 'DomainAA'));

  // Register your Login handler in a context.
  // This method is called when you try to login
  // by caling TLoginCredentialService.GetLoginCredentials();
  TLoginCredentialService.RegisterLoginHandler(Context, LoginCredentialEvent);

I have placed a button on my form from wich I make my call to login :

procedure TForm1.Button1Click(Sender: TObject);
  // The actual call to login
  // First param is the context
  // Second Parameres is a callback function given to the event handler.
    function { LoginFunc } (const Username, Password, Domain: string): Boolean
      //The actual user validation
      Result := CredentialList.IsValidCredential(Username, Password, Domain);

Finally I just need to implement my loginhandler:

//This is the "onLogin" event handler.
//This is called durring a login attempt
//The purpose of this event handler are to call tha callBack function with correct information
//and handle the result
procedure TForm1.LoginCredentialEvent(Sender: TObject; Callback: TLoginCredentialService.TLoginEvent; var Success: Boolean);
  //Call the callback
  Callback(Sender, LabeledEdit1.Text, LabeledEdit2.Text, LabeledEdit3.Text, Success);

  //Handle the success.
  if Success then
    Label1.Caption := 'Yes'
    Label1.Caption := 'No';

Hope this answers the question.Dont forget to download the complete code here


Posted in Delphi, Development, Software Development | Leave a Comment »

%d bloggers like this: