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

Sometimes a race condition is in just two lines of code

Posted by jpluimers on 2019/07/30

A race condition can be this small:

if Assigned(Setting.OnChanged) then
  Setting.OnChanged(Setting);

If in between these lines, the value of Setting.OnChanged becomes nil, then you have an access violation.

It is a very slim, but real chance.

–jeroen

Posted in Delphi, Development, Multi-Threading / Concurrency, Software Development | 4 Comments »

scripting – Run Multiple Powershell Scripts Sequentially – on a Folder – Combine Scripts into a Master Script – Stack Overflow

Posted by jpluimers on 2019/07/30

Cool tip by mjolinor to execute the scripts 1.ps1, 2.ps1 and 3.ps1 from a master.ps1 script in the same directory:

&"$PSScriptroot\1.ps1"
&"$PSScriptroot\2.ps1"
&"$PSScriptroot\3.ps1"

Source: [WayBackscripting – Run Multiple Powershell Scripts Sequentially – on a Folder – Combine Scripts into a Master Script – Stack Overflow.

It uses $PSScriptroot which got introduced in PowerShell 2 in modules and extended in PowerShell 3 to be available in all scripts. More information in [WayBack] about_Automatic_Variables | Microsoft Docs

–jeroen

Posted in CommandLine, Development, PowerShell, PowerShell, Scripting, Software Development | Leave a Comment »

What’s New In Python 3.0

Posted by jpluimers on 2019/07/30

Old, but I keep bumping in old Python code that needs conversion to work in Python 3.x: [WayBackWhat’s New In Python 3.0 — Python 3.6.3 documentation.

Via: [WayBack] Version 3: History of Python – Wikipedia

–jeroen

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

My website is marked as unsafe. How can I change this? | Facebook Help Community

Posted by jpluimers on 2019/07/29

For my link archive: [Archive.is] My website is marked as unsafe. How can I change this? | Facebook Help Community

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

Logging to syslog on a VMware ESXi machine

Posted by jpluimers on 2019/07/29

Since “esxi write entry to syslog” didn’t return results on how to add new syslog entries, only how to configure syslog.

It was much easier than I hoped for:

logger TEST

With a default configuration this then ends up in /var/log/syslog.log:

grep TEST /var/log/syslog.log

2019-07-29T10:48:31Z root: TEST

Now I know the command, I found

–jeroen

Posted in Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »