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

Archive for July, 2021

Abel Wang, a true legend, is gone.

Posted by jpluimers on 2021/07/30

Hopefully my response to his spouse was appropriate enough:

Thanks for this tribute. It’s amazing, lovely, wonderful, all at the same time.

Abel is one of the persons that I would have loved to meet in real life.

I’m forever grateful that Scott Hanselman got me into touch with Abel Wang. Abel informed and motivated me. After that we stayed in touch every now and then about being ill and how to deal with that.

I had to contemplate for a while as this hit me harder than I thought, especially given the “always positive Abel” he is in my – and many others’ – minds.

So to all his close ones: remember the positivity and try to be like that. Abel expects that from us.

Glad I could send him some good thoughts last week, and miss him already.

Related twitter links (Image by Donavan Brown) as my memory still is not what it used to be:

Read the rest of this entry »

Posted in About, Facebook, Personal, SocialMedia, Twitter | Leave a Comment »

How to auto start virtual machines in Windows 10 Hyper V – YouTube

Posted by jpluimers on 2021/07/30

One day I will need this: How to auto start virtual machines in Windows 10 Hyper V – YouTube.

Via [WayBack] windows 10 automatically start a vm – Google Search.

Requires Hyper-V to be installed, so these should be useful:

–jeroen

Read the rest of this entry »

Posted in Hyper-V, Power User, Virtualization, Windows, Windows 10 | Leave a Comment »

Some links on getting MacOS network interfaces and DHCP information

Posted by jpluimers on 2021/07/30

One day I’ll put this in a script that shows all DHCP information for all network interfaces.

For now some links I will need when writing that script.

Many of the below commands are also in [WayBack/Archive] Command-Line Tools: The Missing Manpages (Mac OS X for Unix Geeks).

Read the rest of this entry »

Posted in Apple, Mac OS X / OS X / MacOS, macOS 10.13 High Sierra, Power User | Leave a Comment »

Is warshipping still a thing?

Posted by jpluimers on 2021/07/30

Reminder to self to see if warshipping is still a thing, and in which regions.

Related:

Via:

–jeroen

Read the rest of this entry »

Posted in Power User, Security | Leave a Comment »

Methods on enums by using extension methods: Unity sample MonoBehaviour explaining how to associate simple strings with enums.

Posted by jpluimers on 2021/07/29

Reminder to self (as I keep forgetting how versatile extension methods can be):

[WayBack] Mark Pintar sur Twitter : “The nice thing about extension methods is one can add it to most types. Even works of int, float and other primitive types… “

An interesting way of allowing methods on enumerated types is by using extension methods: [WayBack] Unity sample MonoBehaviour explaining how to associate simple strings with enums. · GitHub.

A more elaborate example from [WayBack] NoraGrace-Chess/Position.cs at master · ericoldre/NoraGrace-Chess · GitHub is below the fold.

Via:

 

using System;
using System.ComponentModel;
using UnityEngine;

public class EnumDescription : MonoBehaviour
{
    public enum PlayerState
    {
        Unknown,
        [Description("Alive and kicking")]
        Alive,
        [Description("Dead as a duck")]
        Dead
    }

    // Start is called before the first frame update
    void Start()
    {
        var state = PlayerState.Dead;
        Debug.Log("Player is " + state.GetDescription());
    }
}

public static class EnumExtensions
{
    public static string GetDescription(this Enum value)
    {
        var type = value.GetType();
        var name = Enum.GetName(type, value);
        if (name != null)
        {
            var field = type.GetField(name);
            if (field != null)
            {
                if (Attribute.GetCustomAttribute(field,
                  typeof(DescriptionAttribute)) is DescriptionAttribute attr)
                    return attr.Description;
            }
        }
        return name;
    }
}

Read the rest of this entry »

Posted in .NET, C#, Development, Software Development | Leave a Comment »