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

Archive for May, 2020

The Defense Innovation Board wants to help the military recognize ‘agile BS’ – Fedscoop

Posted by jpluimers on 2020/05/20

From a while back, but still one of the easiest flow charts to see if your organisation really works in an agile way: “graphical flow chart for separating agile from agile BS”

It is part of [WayBackDIB_DETECTING_AGILE_BS_2018.10.05.pdf (hey, it is military so there are dates and abbreviations).

Source: [WayBack] The Defense Innovation Board wants to help the military recognize ‘agile BS’ – Fedscoop

Via manu links, including:

–jeroen

Read the rest of this entry »

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

How to read network requests in Chrome for new tab or popup window

Posted by jpluimers on 2020/05/20

Cool feature I discovered from [WayBackHow to read network requests in Chrome for new tab or popup window:

chrome://net-internals/#events

It will immediately show all events from all tabs including networking events.

The red bar at the top has a drop down on the right where you can stop them and perform a few other actions.

During or after capture, you can select relevant requests from the list (through checkboxes) so the right of the pane gets their info (which is a lot: not just the request/response content including all headers and cookies, but also any delegates from extensions and their results).

Read the rest of this entry »

Posted in Bookmarklet, Chrome, Google, Power User, Web Browsers | Leave a Comment »

GitHub – NickRing/Delphi-Shortcut-Finder: Shows/find keyboard short-cuts have be assigned, that may be conflicting.

Posted by jpluimers on 2020/05/20

Reminder to self to eventually try to merge this into GExperts: [WayBackGitHub – NickRing/Delphi-Shortcut-Finder: Shows/find keyboard short-cuts have be assigned, that may be conflicting.

And a reminder to ensure if I ever bump into XE7 again, I need to ensure it is at least update 1: Source: QualityCentral Report # 127616: registry key has incorrect value, 20 should be 21.

–jeroen

via: [WayBack] I need some help from anyone who knows RTTI better than me. I’m writing an OTA tool to list all the actions or keybindings that are associated with a s… – David Hoyle – Google+

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

DC12V COB LED Light Strip Panel 5W 10W 20W 50W 200W 300W LED Bulb White Blue Red Flip Chip COB Lamp DIY House Car Lighting 12V-in LED Bulbs & Tubes from Lights & Lighting on Aliexpress.com | Alibaba Group

Posted by jpluimers on 2020/05/19

Interesting for some projects: [WayBack] DC12V COB LED Light Strip Panel 5W 10W 20W 50W 200W 300W LED Bulb White Blue Red Flip Chip COB Lamp DIY House Car Lighting 12V-in LED Bulbs & Tubes from Lights & Lighting on Aliexpress.com | Alibaba Group

Note they are not current limited!

This means I need to read more on current limiting; these might be a start:

Via The biggest LED COB panel yet! Voltage/current tests. – YouTube

–jeroen

Read the rest of this entry »

Posted in Development, DIY, Hardware Development, Power User | Leave a Comment »

ipmi – Linux: Why does Single User mode work on Serial Console but not on the attached Keyboard/Video/Monitor? – Server Fault

Posted by jpluimers on 2020/05/19

From [WayBack] ipmi – Linux: Why does Single User mode work on Serial Console but not on the attached Keyboard/Video/Monitor? – Server Fault (slightly edited; thanks Patrick!):

Because init has not spawned off multiple TTYs yet (getty, mgetty, etc), so you only have the primary TTY. The primary TTY is the last console= parameter on the kernel command line. All the console parameters get the output, but only the last one will be able to act as input.

–jeroen

Posted in *nix, Debian, Linux, openSuSE, Power User, RedHat, SuSE Linux, Tumbleweed | Leave a Comment »

delphi – always pass SEM_FAILCRITICALERRORS to SafeLoadLibrary

Posted by jpluimers on 2020/05/19

The below is based on [WayBackdelphi – Is there any way to catch the error if loading a dll cannot find a dependency? – Stack Overflow which I got via:

The problem is that the [WayBack] SysUtils.SafeLoadLibrary Function (present since at least Delphi 2007, and a wrapper around the [WayBack] LoadLibrary function (Windows)) does many good things – maybe even too many – so you need to take all of them into account:

function SafeLoadLibrary(const FileName: string; ErrorMode: UINT = SEM_NOOPENFILEERRORBOX): HMODULE;
  1. SafeLoadLibrary loads a Windows DLL or Linux shared object file, as specified by Filename.
  2. SafeLoadLibrary preserves the current FPU control word, preventing library initialization code from permanently overwriting precision and exception masks.
  3. Note:
    • On Windows, SafeLoadLibrary temporarily sets the system error mode to ErrorMode. The default, SEM_NOOPENFILEERRORBOX, suppresses error dialogs. The previous error mode is restored before SafeLoadLibrary exits. For a list of error modes, refer to [Wayback1/Wayback2] SetErrorMode in the Microsoft documentation.
    • Note: On Linux, the Dummy argument is ignored.

Most important tips

Do not ever pass 0 (the number zero) as ErrorMode; I’ve seen lots of applications just passing zero for parameters they are not sure about, but in this case it is the worst solution as it will show all errors as a popup.

Do not forget a parameter either: the default value SEM_NOOPENFILEERRORBOX will only suppress a message box when it fails to find a file. But it will fail to enable SEM_FAILCRITICALERRORS which is what you really want.

Loading DLLs from resources

LoadLibrary and SafeLoadLibrary load the DLL from a file. But what if you want to load it from a resource?

Then this post from Thomas Mueller applies: he adopted the SafeLoadLibrary logic to load from a resource:

Other thoughts to keep in mind

The way Delphi sets the FPU control word is not thread safe: QualityCentral Report # 106943: Set8087CW/SetMXCSR are not thread-safe (you could work around in your implementation by using thread safe versions like mentioned in [WayBack] FastMM / Discussion / Open Discussion:Call to GetStackTrace changes 8087CW).

Calling SetErrorMode sets a global application wide setting (by default including all threads) of error code, so it is better to either:

  • decide for your whole application up front which error mode to use, save it and use the same value everywhere:

Because the error mode is set for the entire process, you must ensure that multi-threaded applications do not set different error-mode flags. Doing so can lead to inconsistent error handling.

Second, SEM_FAILCRITICALERRORS prevents an error to pop up when dependencies of the loaded file are not available. You might want to combine (bitwise or) it with other values like SEM_NOGPFAULTERRORBOX.

ErrorMode values

There are many more modes you can pass to the [WayBack] SetErrorMode function (Windows):

  • Value Meaning
    0
    Use the system default, which is to display all error dialog boxes.
     

    SEM_FAILCRITICALERRORS
    0x0001
    The system does not display the critical-error-handler message box. Instead, the system sends the error to the calling process.

    Best practice is that all applications call the process-wide SetErrorMode function with a parameter of SEM_FAILCRITICALERRORS at startup. This is to prevent error mode dialogs from hanging the application.

     

    SEM_NOALIGNMENTFAULTEXCEPT
    0x0004
    The system automatically fixes memory alignment faults and makes them invisible to the application. It does this for the calling process and any descendant processes. This feature is only supported by certain processor architectures. For more information, see the Remarks section.

    After this value is set for a process, subsequent attempts to clear the value are ignored.

     

    SEM_NOGPFAULTERRORBOX
    0x0002
    The system does not display the Windows Error Reporting dialog.
     

    SEM_NOOPENFILEERRORBOX
    0x8000
    The OpenFile function does not display a message box when it fails to find a file. Instead, the error is returned to the caller. This error mode overrides the OF_PROMPT flag.

–jeroen

all via:

Related:

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

hexagonal architecture – Google Search

Posted by jpluimers on 2020/05/18

On my research list: read more about hexagonal architecture – Google Search.

Like:

Related: [WayBack] Learned today: In the praxis most domains are way more than sufficiently complex… – Jeroen Wiert Pluimers – Google+

I think I like a round diagrams better than hexagonal ones, because it gives more clarity to me.

Also on my list:

–jeroen

Posted in Development, Software Development, Systems Architecture | Leave a Comment »

Free Linux cloud shell for Gmail users – shell in the browser that works in all locations I’ve been so far

Posted by jpluimers on 2020/05/18

This is still so cool: [WayBack] Free Linux cloud shell for Gmail users … – Adrian Marius Popa – Google+:

Free Linux cloud shell for Gmail users

https://news.ycombinator.com/item?id=16247577

comments are more interesting

“If you want a free Linux box with a Public IP and SSH, I’d recommend spinning up an f1-micro VM. It’s part of the permanent free tier”

https://news.ycombinator.com/item?id=16248668

Even cooler is that you can use it both from a web browser and from your own console, more on that below.

Cloud Shell from the web

The above links:

Read the rest of this entry »

Posted in Google, GoogleCloudShell, Power User | Leave a Comment »

On my list of things to try: GitHub – arthepsy/ssh-audit; SSH server auditing

Posted by jpluimers on 2020/05/18

This looks like an ssh equivalent to testssl.sh: [WayBack] GitHub – arthepsy/ssh-audit: SSH server auditing (banner, key exchange, encryption, mac, compression, compatibility, security, etc).

It is on my list of things to try, so I’ve put a watch on the repository changes.

–jeroen

Read the rest of this entry »

Posted in Communications Development, Development, Encryption, Internet protocol suite, Power User, Security, SSH, TCP | Leave a Comment »

6502.org • Search: mos6502 G+ posts

Posted by jpluimers on 2020/05/15

With the demise of G+, I am glad that most of the [WayBack] mos6502 posts were archived at [WayBack] 6502.org • Search: mos6502 G+ posts

Via [WayBack] This week, OUP/M, a 6502 CP/M-ish operating system from 1983, in the process of recovery from Jian-Xiong Shao’s Masters Thesis into Github. And a reques… – mos6502 – Google+

[WayBack] mos6502 – Google+

6502 posts – new projects and interesting old projects from the archives

–jeroen

Posted in 6502, History | Leave a Comment »