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,854 other subscribers

Archive for May, 2021

Notities over corona vaccinatie, gele vaccinatieboekje en vaccinatieboekje app

Posted by jpluimers on 2021/05/13

In het internationaal erkende gele vaccinatieboekje (ook wel vaccinatiepaspoort) kun je je corona vaccinatie laten bijschrijven. Dit kan ter plekke na de vaccinatie of op een later moment (maar op een later moment is het veel lastiger).

[Wayback] Je vaccinatie tegen corona mag in je vaccinatiepaspoort, maar je moet er wel zelf om vragen – EenVandaag

Het ministerie van Volksgezondheid Welzijn en Sport zegt in een reactie dat je als je wil, je een geel boekje kan gebruiken wanneer je wordt gevaccineerd. Maar dat het ze zelf geen boekjes aanbieden en dat er zéker geen verplichting is.

[Wayback] Gele vaccinatieboekje | Sdu

vaccinatieboekje: het internationale bewijs van inenting waar vaccinaties voor bijvoorbeeld gele koorts, dtp, hepatitis A en B in geregistreerd worden. Hier kan de coronavaccinatie (Covid-19) eenvoudig aan toegevoegd worden.

De [Wayback] Vaccinatieboekje app lijkt niet rechtsgeldig, maar wel handig voor reminders.

Registreer je (rijks) vaccinaties online en download de app: Vaccinatieboekje. Lees welke vaccinaties als je op reis gaat en leer meer over infectie-ziekten.

Gerelateerd:

Via:

jeroen

 

Posted in About, Health, LifeHacker, Personal, Power User, Vaccinations | Leave a Comment »

Het hopelijk tijdelijke afscheid door Haagse Insider🕵🏻‍♂️ (@HaagseInsider) | Twitter

Posted by jpluimers on 2021/05/13

Gisteren was er een (hopelijk tijdelijk) afscheid door [Archive.is] Haagse Insider🕵🏻‍♂️ (@HaagseInsider) | Twitter.

De indrukwekkende draad is helaas niet beschikbaar op Archive.is, maar wel beschikbaar op het web archief.

Sowieso wens ik meer rust en afstand voor HaagseInsider. Daarnaast duim ik dat het een weerzien wordt.

jeroen

Posted in Power User, SocialMedia, Twitter | Leave a Comment »

Delphi: EInvalidOp exception, might just mean you have a use-after free scenario, or an out-of-bounds value

Posted by jpluimers on 2021/05/13

Quite some time ago, I was researching spurious exceptions in a Delphi application, then finally replicated them in a unit test suite.

One of them was occurring almost all of the time: EInvalidOp.

It is one of the floating point exceptions (incidentally exampled at [WayBack] Exceptions: Declaring Exception Types) all inheriting from the [WayBack] EMathError Class:

EMathError is the base class for floating-point math exception classes. EMathError itself is never raised.

The following exceptions descend from EMathError:

Meaning
Parameter out of range
Processor encountered an undefined instruction
Floating-point operation produced result too large to store
Floating-point operation produced result with no precision
Attempt to divide by zero

Run-time exception information is saved in fields provided by [WayBack] EExternal.

Use-after-free

In my first case (which I described in delphi – Invalid floating point operation calling Trunc()), not all input scenarios had been tested in a certain scenario. In a production environment, one of the inputs was really high.

In a later case, the actual cause was not a floating point problem at all, but a use-after-free scenario that overwrite a floating point value with something not so compatible also causing a simple Trunc statement to fail in the same way.

In that case, the production data could never reach the big numbers that failed, so no new tests were needed.

–jeroen

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

Golang written: nefertiti-tradebot.com

Posted by jpluimers on 2021/05/12

[WayBack] dutchdelphidude on Twitter: “ik doe nu dit ermee nefertiti-tradebot.com … “

nefertiti-tradebot.com

–jeroen

Read the rest of this entry »

Posted in Development, Go (golang), Software Development | Leave a Comment »

Reminder to self: check if @NS_online finally accepts email addresses having a plus sign in them

Posted by jpluimers on 2021/05/12

Quite a while back, @NS_Online (Dutch railroads) did not accept plus signs in email addresses. I verified a few times over the years and not much progress.

This is a reminder to myself to re-check.

Edit 20230418: it has started working, see further below.

Below the fold the Twitter thread that started with [WayBack] Jeroen Pluimers on Twitter: “Toch jammer dat @NS_online valide email adressen met een plus-teken erin weigert.… “

Hopefully by now they retraced themselves from the bad company of many other parties failing to adhere to clear and long existing internet standards: [WayBack] User:Me at work/plushaters | Mozilla Community | FANDOM powered by Wikia.

Their web care team and their developers made some very inexcusable assumptions there:

  • questioning the use of a + in email addresses
  • questioning the email address used
  • diminishing the popularity of using a + inside email addresses
  • when you never heard of something, it does not exist
  • you can validate an email address without actually trying to deliver it

Some links on email addresses and their validity:

Read the rest of this entry »

Posted in Development, Power User, Software Development, Web Development | Leave a Comment »

FastMM4: turn warnings W1047 and W1048 off

Posted by jpluimers on 2021/05/12

(Tagged FastMM4 as that’s the first code I saw these warnings to be turned off)

Delphi 7 introduced introduced warnings for unsafe constructs like W1047 and W1048 so you could prepare your code for the first Delphi .NET compilers .

The oldest online documentation on this is in Delphi 2007:

After Delphi 2007, the .NET compiler got shelved, but the errors and warning stayed as they serve a good purpose for native code as well.

Delphi 2007 did not document any of the other directives.

Unlike the D2007 documentation, however, the UNSAFECODE should be written UNSAFE_CODE as with using {$WARN UNSAFECODE ON}, you will get this error:

E1030 Invalid compiler directive: 'UNSAFECODE'

Looking at the library code and example code that ships with Delphi, these are the valid $WARN compiler directives having to do with UNSAFE:

  • UNSAFE_CAST (since Delphi 7, but only used in Vcl.WinXPanels.pas introduced in Delphi 10.2 Tokyo and up)
  • UNSAFE_CODE (since Delphi 7, but still documented as UNSAFECODE)
  • UNSAFE_TYPE (since Delphi 7)
  • UNSAFE_VOID_POINTER (since Delphi XE3, as precursor to the NEXTGEN compilers)

The ultimate source for these is the file DCCStrs.pas that has shipped since Delphi 2009: [WayBack] warnings – Identifiers for Delphi’s $WARN compiler directive – Stack Overflow.

A problem is that current documentation still lists the wrong name in many places:

This one finally got it right: [WayBack] Warning messages (Delphi) – RAD Studio

UNSAFE_TYPE W1046
UNSAFE_CODE W1047
UNSAFE_CAST W1048

Note it also documented UNSAFE_VOID_POINTER:

UNSAFE_VOID_POINTER W1070

[WayBack] W1070 Use of untype pointer can disrupt instance reference counts (Delphi) – RAD Studio

And these warning messages still do not contain the directives, but do explain the underlying code construct better:

You have to use these directives:

// Get rid of "W1047 Unsafe code 'ASM'", "W1047 Unsafe code '^ operator'", "W1047 Unsafe code '@ operator'" and similar

{$WARN UNSAFE_CODE OFF}

// Get rid of "W1048 Unsafe typecast of 'TFreedObject' to 'PByte'" and similar

{$WARN UNSAFE_CAST OFF}

Back in the days, some people were not amused and disabled the warnings, for instance in [Archive.is] Re: How can I eliminate these warnings in Delphi 7 which did not appear in Delphi 5. – Google Groups:

Dennis Passmore:
I have one include file that I usually include in all projects as follows—– WarningsOff.inc —————-
{$IFDEF CONDITIONALEXPRESSIONS}
  {$IF CompilerVersion >= 14}
{$WARN SYMBOL_PLATFORM OFF}
{$WARN SYMBOL_DEPRECATED OFF}
{$WARN SYMBOL_LIBRARY OFF}
{$WARN UNIT_DEPRECATED OFF}
{$WARN UNIT_LIBRARY OFF}
{$WARN UNIT_PLATFORM OFF}

{$WARN UNSAFE_TYPE OFF}
{$WARN UNSAFE_CODE OFF}
{$WARN UNSAFE_CAST OFF}

  {$IFEND}
{$ENDIF}
———————and it gets ride of all unwanted warnings in the IDE or even DCC32.exe when compiling the project
from the command line.

I just add the following line to the project .dpr file and do not worry about the rest.

{$I WarningsOff.inc}

Dennis Passmore

“If you cannot conceive the idea you
will never achieve the desired results”

I disagree with such an approach, as those warnings have their purpose.

Knowing how to selectively disable/enable them however, is important.

–jeroen

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

Solved: Very slow speed on SSD |VMware Communities (via “Building a lab with ESXI and Vagrant – DarthSidious”)

Posted by jpluimers on 2021/05/11

Via [WayBack] Building a lab with ESXI and Vagrant – DarthSidious while researching the possibility of running Vagrant (software) – Wikipedia on VMware ESXi – Wikipedia for building and distributing development environments:

[WayBack] Solved: Very slow speed on SSD |VMware Communities “solution” that seems to work for ESXi 6.5 and 6.7:

ESXi 6.5 includes a new native driver (vmw_ahci) for SATA AHCI controllers, but that introduces performance problems with a lot of controllers and/or disks.

Try to disable the native driver and revert to the older sata-ahci driver by running

esxcli system module set --enabled=false --module=vmw_ahci

in an ESXi shell.

Reboot the host to make the change effective.

which solves it for some who now get much faster results:

Your suggestion worked for me, now i am getting avg speed 250Mbps from SATA III SSD .

ssd.jpg

Hope will get the full I/Ops from SSD.

However:

One issue I still have is that my 4 port Syba PCIe controller card now vanishes after disabling vmw_ahci and I am restricted to using the SATA ports on the motherboard.

and you need backups:

WARNING: Doing this at least for me erases all the VMs on the aforementioned drive. Migrate as needed.

There was no response for a more permanent fix:

What is the permanent fix for this issue, should we expect a corrected native driver from VMware, or will this require a firmware upgrade on the part of the drive vendors?

and there seem to be other bottle-necks:

tried the command on a 6.7.

Deploying an OVA and I am getting 22.82….

I have a Samsung 860 EVO mSATA 1Tb SSD.

i re-enabled it, I got max 11.81.

Kind of crappy either way. Not SSD speeds IMO.

–jeroen

 

Posted in Development, ESXi6.5, ESXi6.7, Power User, Software Development, Testing, Virtualization, VMware, VMware ESXi | Leave a Comment »

Gasexplosie en grote brand aan Westestraat in Sassenheim

Posted by jpluimers on 2021/05/11

De buurt was tot laat afgesloten (veiligheid, onderzoek, genoeg redenen), dus voor nachtopvang van mijn verstandelijk beperkte broer moeten zorgen omdat Wlz zorginstelling geen crisiszorg kon leveren en op WSW werk geen leidinggevende beschikbaar was om zorg af te stemmen.

Voor mijn off-line geheugen (bijna allemaal via [Archive.is] #sassenheim hashtag on Twitter):

–jeroen

Read the rest of this entry »

Posted in About, Personal | Leave a Comment »

Chrome supported extension IDs

Posted by jpluimers on 2021/05/11

I wonder how you can programmatically open a Hangouts link from Chrome?

These dit not help:

So did some more digging.

TL;DR: did not find a solution; so any help is appreciated.

I found the IDs of then in [WayBack] extensions/common/constants.cc – chromium/src.git – Git at Google

namespace extension_misc {
const char kPdfExtensionId[] = "mhjfbmdgcfjbbpaeojofohoefgiehjai";
const char kQuickOfficeComponentExtensionId[] =
    "bpmcpldpdmajfigpchkicefoigmkfalc";
const char kQuickOfficeInternalExtensionId[] =
    "ehibbfinohgbchlgdbfpikodjaojhccn";
const char kQuickOfficeExtensionId[] = "gbkeegbaiigmenfmjfclcdgdpimamgkj";
const char kMimeHandlerPrivateTestExtensionId[] =
    "oickdpebdnfbgkcaoklfcdhjniefkcji";
const char kProdHangoutsExtensionId[] = "nckgahadagoaajjgafhacjanaoiihapd";
const char* const kHangoutsExtensionIds[6] = {
    kProdHangoutsExtensionId,
    "ljclpkphhpbpinifbeabbhlfddcpfdde",  // Debug.
    "ppleadejekpmccmnpjdimmlfljlkdfej",  // Alpha.
    "eggnbpckecmjlblplehfpjjdhhidfdoj",  // Beta.
    "jfjjdfefebklmdbmenmlehlopoocnoeh",  // Packaged App Debug.
    "knipolnnllmklapflnccelgolnpehhpl"   // Packaged App Prod.
    // Keep in sync with _api_features.json and _manifest_features.json.
};
// Error returned when scripting of a page is denied due to enterprise policy.
const char kPolicyBlockedScripting[] =
    "This page cannot be scripted due to an ExtensionsSettings policy.";
}  // namespace extension_misc

The odd thing is that the source does not match the Chrome web store designation:

Hangouts ExtensionId Source name Web store name
nckgahadagoaajjgafhacjanaoiihapd kProdHangoutsExtensionId Google Hangouts
ljclpkphhpbpinifbeabbhlfddcpfdde Debug Google Hangouts (Extension, Beta); GOOGLE CONFIDENTIAL – FOR INTERNAL USE ONLY
ppleadejekpmccmnpjdimmlfljlkdfej Alpha Google Hangouts (Extension, Debug)
eggnbpckecmjlblplehfpjjdhhidfdoj Beta Google Hangouts (Extension, Alpha)
jfjjdfefebklmdbmenmlehlopoocnoeh Packaged App Debug 404 error
knipolnnllmklapflnccelgolnpehhpl Packaged App Prod Google Hangouts; Hangouts Chrome App is deprecated. Please switch to the Hangouts Chrome Extension.

You can not start the extensions in a tab; they need to start their view through the extension.

So these links do not work:

  • chrome-extension://nckgahadagoaajjgafhacjanaoiihapd/mainapp.html?uv_main_window
  • chrome-extension://ljclpkphhpbpinifbeabbhlfddcpfdde/mainapp.html?uv_main_window
  • chrome-extension://ppleadejekpmccmnpjdimmlfljlkdfej/mainapp.html?uv_main_window
  • chrome-extension://eggnbpckecmjlblplehfpjjdhhidfdoj/mainapp.html?uv_main_window
  • chrome-extension://jfjjdfefebklmdbmenmlehlopoocnoeh/mainapp.html?uv_main_window
  • chrome-extension://knipolnnllmklapflnccelgolnpehhpl/mainapp.html?uv_main_window

–jeroen

Read the rest of this entry »

Posted in Chrome, Development, Google, GoogleHangouts, Power User, Software Development, Web Development | Leave a Comment »

file – String format procedure similar to writeln – Stack Overflow

Posted by jpluimers on 2021/05/11

Cool Format feature from [WayBack] file – String format procedure similar to writeln – Stack Overflow:

The cool thing about using Format is that you use for Format Strings not only to parameterize things like width and precision inside that Format String, but also as parameters like you normally would provide values.

You can get very close to using a width of 8 and a precision of 2, like the example in your question.

For instance, to quote the documentation:

Format ('%*.*f', [8, 2, 123.456]);

is equivalent to:

Format ('%8.2f', [123.456]);

That is a much overlooked feature of Format and Format Strings.

Edit 20250910:

This was part of my answer¹ there to mimic WriteLn formatting behaviour which was not even documented at the now deleted [Wayback/Archive] Standard Routines and I/O.

Normally deleted information like above results in worse information at their current documentation site.

This time however was an exception: the current documentation is better².

¹ the start of my answer:

Read the rest of this entry »

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