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 October, 2020

Notes a on a step by step .NET standard based stack of applications with a central core

Posted by jpluimers on 2020/10/14

The idea is to have a stack of things that can be later put into multiple micro-service pillars.

Helpful: enable “Track Active Item in Solution Explorer”:

  1. Start with an empty repository; add an origin
  2. Add .gitignore / .gitattributes appropriate for C#, for instance from github.com/Microsoft/vswhere, git commit it, and push it withgit push -u origin master.
  3. Add a blank solution using Creating a blank Visual Studio solution without a directory, and sln Format Version numbers and EmptyVisualStudioSolution
  4. Open the solution
  5. Add an “ASP.NET Core Web Application”
  6. Choose “API” in the list of ASP.NET templates, without Authentication or Docker support (let’s keep the balance bit simple enough for now)
  7. Run with Ctrl-F5, then confirm the SSL development certificate, and install it:

    ---------------------------
    Security Warning
    ---------------------------
    You are about to install a certificate from a certification authority (CA) claiming to represent:
    
    localhost
    
    Windows cannot validate that the certificate is actually from "localhost". You should confirm its origin by contacting "localhost". The following number will assist you in this process:
    
    Thumbprint (sha1): 09EA054F 14D5D4CE 6B22C5F1 3E7EBDB5 F7583116
    
    Warning:
    
    If you install this root certificate, Windows will automatically trust any certificate issued by this CA. Installing a certificate with an unconfirmed thumbprint is a security risk. If you click "Yes" you acknowledge this risk.
    
    Do you want to install this certificate?
    
    
    ---------------------------
    Yes   No   
    ---------------------------
  8. Your browser now opens at a port for debugging: https://localhost:<port>/api/values, then tries to download the result as values.json.

    This is configured in Properties\launchSettings.json under "launchUrl": "api/values" (for the browser URL) and Controllers\ValuesController.cs under // GET api/values for the actual implementation.

  9. a

 

 

 

a

a

 

IHostedService

Have any service related stuff implement IHostedService, so it is easy to deploy it in all kinds of processes:

  • console to test
  • windows service
  • ASP.NET Core service
  • Linux host application

Background information at .NET: IHostedService « The Wiert Corner – irregular stream of stuff.

–jeroen

Related:

 

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

Dimensions – Chrome Web Store

Posted by jpluimers on 2020/10/13

[WayBack/Archive.isDimensions – Chrome Web Store: A tool for designers to measure screen dimensions

This extension measures the dimensions from your mouse pointer up/down and left/right until it hits a border. So if you want to measure distances between elements on a website this is perfect. It doesn’t really work with images because there the colors change a lot pixel to pixel.

# Images & HTML Elements

Measure between the following elements: images, input-fields, buttons, videos, gifs, text, icons. You can measure everything you see in the browser.

# Mockups

Your designer handed you mockups as PNGs or JPEGs? Just drop them into Chrome, activate Dimensions and start measuring.

# Keyboard Shortcut

You can start and stop dimensions with the ALT + D shortcut.

# Area Boundaries

Wanna get the radius of a circle? Is text standing in your way? Press Alt to measure the dimensions of a connected area.

–jeroen

Via:

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

Unicode is hard, also for the Delphi compiler and IDE

Posted by jpluimers on 2020/10/13

The Delphi compiler does not see a unicode non-breaking space (0x00A0 as whitespace, and the Delphi IDE does not warn you about it: [WayBack] Delphi revelations #2 – Space characters are not just space characters.

Given that this character was introduced in 1993, I wonder how the compiler tests look like.

These also will not be recognised as whitespace:

Related, as many other tools also do not properly support various whitespace characters:

Via: [WayBack] A Delphi “Aha” experience – Kim Madsen – Google+

–jeroen

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

Find a Table on a SQL Server across all Databases – TechNet Articles – United States (English) – TechNet Wiki

Posted by jpluimers on 2020/10/13

Neither solution on [WayBackFind a Table on a SQL Server across all Databases – TechNet Articles – United States (English) – TechNet Wiki is nice, but the most readable (though undocumented) works:

sp_MSforeachdb'SELECT "?" AS DB, * FROM [?].sys.tables WHERE name like ''%your_table_name%'''

Similar solutions at:

–jeroen

Posted in Database Development, Development, SQL Server | Leave a Comment »

McCollough effect – Wikipedia

Posted by jpluimers on 2020/10/12

Maybe not try this at home: McCollough effect – Wikipedia, as it can lasts for weeks or months.

–jeroen

Read the rest of this entry »

Posted in LifeHacker, Power User, science | Leave a Comment »

Inside a self-testing emergency exit sign. – YouTube

Posted by jpluimers on 2020/10/12

I might to get a few of these for home.

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

Treegonometry: Maths students have the solution for decorating the perfect Christmas tree – Latest – News – The University of Sheffield

Posted by jpluimers on 2020/10/12

A live calculator at [WayBack] Treegonometry: Maths students have the solution for decorating the perfect Christmas tree – Latest – News – The University of Sheffield

Via: [WayBack] 🎅🏻 Victor Hopman 🎄 on Twitter: “Gratis Kersttip, op deze site kun je exact uitrekenen hoeveel kerstballen en slingers je voor je boom nodig hebt, op basis van een wiskundige formule: https://t.co/RJwNby1SlP”

–jeroen

Read the rest of this entry »

Posted in LifeHacker, Power User | Leave a Comment »

Two steps to ensure a family member Skype account is not discoverable

Posted by jpluimers on 2020/10/09

For a family member, I needed a Skype account not to be discoverable. This is a two-part process:

  1. Online part:
    1. Go to https://secure.skype.com/portal/profile,
    2. Logon,
    3. Click “Profie settings” (make the browser window narrower to make that tab visible),
    4. Uncheck “Appear in search results an suggestions”,
  2. Logon to Skype in Windows/Mac/Linux
    1. Old Skype versions (~ 7.x or older)
      1. In the menu, go to Tools > Options > Privacy Settings
      2. Check the “Only allow messages from people on my contact list” box
      3. Click the “Save” button
    2. Newer Skype Versions (8.x or newer)
      1. In the menu, go to Preferences > Manage ho people find you on Skype
      2. Uncheck “Appear in search results and suggestions”

I figured out the first part myself, the initial bit of the second part came from [WayBack] Problem in Discoverability – Microsoft Community, which made me discover the final bit of the second part and the links [WayBack] How do I opt out of being visible in the Skype public search directory on mobile? | Skype Support and [WayBack] How to hide my profile from search in Skype? – Super User.

In the first part, I also unchecked all the other boxes:

–jeroen

Posted in Power User, Skype | Leave a Comment »

The alphabet, in alphabetical order, in various languages – The Old New Thing

Posted by jpluimers on 2020/10/09

I had to lough so loud when I bumped into this [WayBackThe alphabet, in alphabetical order, in various languages – The Old New Thing.

I got there because I wanted a few examples of languages having more than 26 ASCII letters in their alphabet.

Basically all non English languages (:

–jeroen

 

Posted in Development, Fun, LifeHacker, Power User, Software Development, The Old New Thing, Windows Development | Leave a Comment »

7 Free Windows Password Recovery Tools

Posted by jpluimers on 2020/10/09

So when another friend for the umpteeth time asks me to find their Windows password: [WayBack7 Free Windows Password Recovery Tools (June 2018)

Windows password recovery tools are used to recover Windows log on passwords. Here are the 7 best free Windows password recovery and cracking tools.

–jeroen

Posted in Power User, Windows | Leave a Comment »