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,565 other followers

Archive for May, 2019

Not sure if this btrfs error was benign or not.

Posted by jpluimers on 2019/05/17

Booting the VM gave this in the log:

# btrfs balance /
WARNING:

    Full balance without filters requested. This operation is very
    intense and takes potentially very long. It is recommended to
    use the balance filters to narrow down the scope of balance.
    Use 'btrfs balance start --full-balance' option to skip this
    warning. The operation will start in 10 seconds.
    Use Ctrl-C to stop it.
10 9 8 7 6 5 4 3 2 1
Starting balance without any filters.
ERROR: error during balancing '/': Input/output error
There may be more info in syslog - try dmesg | tail
diaspore:~# dmesg | tail
[ 2261.857360] BTRFS info (device sda2): found 144 extents
[ 2261.922014] BTRFS info (device sda2): found 144 extents
[ 2262.003653] BTRFS info (device sda2): found 144 extents
[ 2262.146557] BTRFS info (device sda2): found 144 extents
[ 2262.268034] BTRFS info (device sda2): relocating block group 20951597056 flags data
[ 2268.255631] BTRFS info (device sda2): found 19765 extents
[ 2278.541549] BTRFS info (device sda2): found 19758 extents
[ 2278.685372] BTRFS info (device sda2): relocating block group 14558429184 flags data
[ 2278.714483] BTRFS warning (device sda2): csum failed root -9 ino 269 off 65150976 csum 0x27374190 expected csum 0x7091fbbc mirror 1
[ 2278.714619] BTRFS warning (device sda2): csum failed root -9 ino 269 off 65150976 csum 0x27374190 expected csum 0x7091fbbc mirror 1

Booting from a rescue DVD, then checking with an unmounted /dev/sda2 nothing is wrong:

localhost:~ # btrfs check /dev/sda2
Checking filesystem on /dev/sda2
UUID: 23d33d0f-0468-4408-b73c-b0eec9387d82
checking extents
checking free space cache
checking fs roots
checking csums
checking root refs
checking quota groups
found 6460166144 bytes used, no error found
total csum bytes: 5795704
total tree bytes: 214171648
total fs tree bytes: 193740800
total extent tree bytes: 12910592
btree space waste bytes: 40754145
file data blocks allocated: 35720101888
 referenced 11352182784

Both had the same version:

# btrfs version
btrfs-progs v4.13

If I ever need recovery, then these links likely help:

–jeroen

Posted in *nix, *nix-tools, btrfs, File-Systems, Power User | Leave a Comment »

Formulier SVB PGB voor IBAN-wijziging van een zorgverlener en zorgverleningsovereenkomst versies en met en zonder familie

Posted by jpluimers on 2019/05/17

LET OP! Per zorgverleningsovereenkomst, moet je OOK een zorgbeschrijving indienen: zorgbeschrijving naar zogkantoor, zorgverleningsovereenkomst naar zorgkantoor en SVB.

Buiten SVB om:

  • [WayBack/Archive.isZorgkantoor Zorg en Zekerheid: Zorgbeschrijvingen en zorgovereenkomsten: Website van de Zorgkantoren Zuid-Holland Noord & Amstelland en de Meerlanden, met informatie over de AWBZ, het zorgaanbod in de regio, zorgverstrekking en eigen bijdrage, het persoons gebonden budget etc. Het zorgkantoor is verantwoordelijk voor de uitvoering van AWBZ-zorg in de regio.
    • Sinds 2014 geldt er een maximum tarief van € 20,- per uur voor niet-professionele zorgverleners. Dit speciale tarief voor niet-professionele zorgverlening is van toepassing wanneer:
      • een ouder of familielid zorg levert, ook als deze hiervoor wel gediplomeerd is, of;
      • de zorgverlener niet beschikt over een zogenaamde BIG-registratie, of;
      • de zorgverlener of instelling niet is ingeschreven in het handelsregister als zijnde verlener van zorg.
    • Het speciale tarief voor niet-professionele zorgverleners geldt niet wanneer u al PGB genoot voor 2014.
  • [Archive.is] PGB | Vraag en Antwoord | Deskundig | Gratis Dé specialist persoonsgebonden budget (PGB) geeft (met 20 jaar ervaring) op deze pagina snel en correct antwoord op PGB vragen.

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

The Initialization-Block of a unit that is part of a package. Is it run as part of DLLMain?

Posted by jpluimers on 2019/05/16

The interesting question a while back [WayBack] The Initialization-Block of a unit that is part of a package. Is it run as part of DLLMain? – Alexander Benikowski – Google+ has a simple TL;DR answer: “it depends” on the actual usage of those units.

Way more elaborate, as I dislike language stuff that you need to track down by trial and error what is actually used:

Well, seems so(in our case). Rootcall which triggers the initialization is:
ntdll.ldrLoadDLL
I did not mention, that the BPL is used by a DLL(DLL links against package) which means the package is loaded/initialized by the Os when the DLLMain runs. Odd combination but that seems to be the culprit here.

David Heffernan
Yes, it is triggered from DllMain. And yes, this has massive consequences for what can and cannot be done in initialization sections.

Alexander Benikowski
+David Heffernan in my case. When a packages unit is already initialized by being used from an Exe(which links to the Package), it is not from within a DLLMain.
In my case, both the Application and the dll it loads, both link to the same package. But the unit in question is unused until the DLL is loaded.

Uwe Raabe
The docs for InitializePackage say it calls the initialization parts of all contained units in the package – not only the used ones.

David Heffernan
+Alexander Benikowski​ In that scenario we have load time linking and I guess the package framework handles it differently.

David Millington
Related: don’t forget that class constructors and destructors effectively run in the initialization and finalization sections too. Restrictions or side effects apply there too. docwiki.embarcadero.com – Methods (Delphi) – RAD Studio

Stefan Glienke
+Uwe Raabe Which is not being done when you use it as runtime package. Only initialization sections from unit being used are being run. This caused us several problems in the past where 2 modules (A being the host application exe and B being some DLL that gets loaded at a later point via LoadLibrary) were using a runtime package but only B used a particular unit from the package which caused the initialization code for that unit being executed when B was loaded and hence being executed in the context of the dllmain of B.

The usual solution is then to put those units into some dummy unit forcing the initialization of that unit to be run in A.

Another solution according to your statement could be to call InitializePackage on all the used runtime packages – and there the question is: couldn’t the RTL do that somehow?

+Stefan Glienke I am not sure if that is desirable when done unconditionally. Even when compiled with packages I wouldn’t expect units to be initialized which aren’t actually used. That would perhaps change the behavior of the application depending on whether it is compile with runtime packages or without.
The case is different with dynamic loaded packages. The units in there are obviously not directly used in the first place. As no one can know which units of such a package are used or not, initializing all of them seems like a viable decision.
Of course there will be situations where your proposed behavior might come in handy, but I doubt that this will be a fit for all.

Source: The Initialization-Block of a unit that is part of a package. Is it run as pa…

Related:

–jeroen

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

Reset Linux Desktop To Default Settings With A Single Command – OSTechNix

Posted by jpluimers on 2019/05/16

To reset Ubuntu Unity or any other Linux desktop with GNOME/MATE DEs to its default settings, run:

dconf reset -f /

Source: [WayBack] Reset Linux Desktop To Default Settings With A Single Command – OSTechNix

I need to check if it works on OpenSuSE with XFCE as there the dconf command is installed, but I still have a default desktop (mainly because most of the work I do is using a terminal over ssh).

–jeroen

via: [Archive.is] Never thought about dconf reset… Joe C. Hecht – Google+

Posted in *nix, *nix-tools, Linux, Power User, X11 | Leave a Comment »

How to Design Early Returns in C++ (Based on Procedural Programming) – Fluent C++

Posted by jpluimers on 2019/05/15

One more thing to take away from Procedural Programming: It’s Back? It Never Went Away – Kevlin Henney [ACCU 2018] – YouTube was explained in [WayBack] How to Design Early Returns in C++ (Based on Procedural Programming) – Fluent C++.

Though in C++, it applies to all programming languages that stem from a procedural background (Pascal, C#, Java, golang, to name just a few).

The article is about keeping an if/else-if/else tree, even when they can be removed becomes some of their bodies perform an early return, as

In C++, as well as in other languages, the return keyword has two responsibilities:

  • interrupting control flow,
  • yielding a value.

It basically comes down to this argument:

Essentially, the argument for Code #1 is that you need to know less to understand the structure of the code.

Indeed, if we fold away the contents of the if statements, Code #1 becomes this:

The structure of the code is very clear. There are 4 different paths based on the year, they’re independent from each other, and each path will determine the boolean result of the function (if it doesn’t throw an exception).

Now let’s see how Code #2 looks like when we fold away the if statements:

And now we know much less. Do the if statements contain a return? Maybe.

Do they depend on each other? Potentially.

Do some of them rely on the last return false of the function? Can’t tell.

With Code #2, you need to look inside of the if statement to understand the structure of the function. For that reason, Code #1 requires a reader to know less to understand the structure. It gives away information more easily than Code #2.

–jeroen

via [WayBack] Kevlin Henney – Google+: How to Design Early Returns in C++ (Based on Procedural Programming) – Fluent C++

Posted in .NET, C, C#, C++, Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »

 
%d bloggers like this: