Skip to main content

Posts

COALESCE vs ISNULL

A good read.    Deciding between COALESCE and ISNULL in SQL Server (mssqltips.com) Key Points :  The COALESCE and ISNULL SQL Server statements handle data type precedence differently COALESCE determines the type (and length) of the output based on data type precedence.   ISNULL takes the first parameter.  The SQL Server COALESCE statement supports more than two arguments COALESCE and ISNULL perform about the same (in  most  cases) in SQL Server ISNULL is not consistent across Microsoft products/languages COALESCE is ANSI standard

Get original and actual filename MacOS Photo Library - SQL to link ZASSET with ZADDITIONALASSETATTRIBUTES. -

  SELECT      a. ZDIRECTORY || '/' || a. ZFILENAME LocationOnFileSystem      , att. ZORIGINALFILENAME FROM ZADDITIONALASSETATTRIBUTES att JOIN ZASSET a ON att. ZASSET = a. Z_PK      -- WHERE att.ZORIGINALFILENAME = 'IMG_0938.JPG'      WHERE a. ZFILENAME = '6E44872E-FA7C-424A-9136-6B0DC24D7E8F.jpeg' NB: the photo is located at: /Users/ username /Pictures/Photos Library.photoslibrary/originals The sqlite file is at: /Users/ username /Pictures/Photos Library.photoslibrary/database/Photos.sqlite If you want the time, just grab , a. ZDATECREATED This is the seconds since Monday, 1 January 2001 12:00:00 AM or "Apple Cocoa Core Data timestamp"

Manage Exchange Mailbox rules with Powershell

  Get All rules for a mailbox       Get-InboxRule -Mailbox mailbox Gives something like  Name                  Enabled Priority RuleIdentity ----                  ------- -------- ------------ Forward mail to Yahoo True    1        nnnnnnnnnnnnnnnnnnnnn Select all rule properties  Get-InboxRule -Mailbox mailbox -Identity nnnnnnnnnnnnnnnnnnnnnnn

Creating a Developer Certificate for IIS, and having it trusted by the computer, not just you.

  There's a few different ways to do this, but for me, with a Blazor Server application and backend API, this seemed to work the best.  Step 1 - Create Certificate  I got this script from  Develop Locally with HTTPS, Self-Signed Certificates and ASP.NET Core (humankode.com) It's fairly well documented, but there's a few things to note:  - Change Subject and Dnsname to your preferred name  - Note the certifcate store location, in your personal store - Note the hard coded password  YourSecurePassword - I don't know what the TextExtension field does, need to research that - Note that the created cer file is deleted at the last step   However, this process didn't get me in a position where the server itself trusted the certificate, which is what I needed for Blazor, see Step 2 below. # setup certificate properties including the commonName (DNSName) property for Chrome 58+ $certificate = New - SelfSignedCertificate ` - Subject localhost ` - D...

WIndows Update on Server 2019

Having problems with Windows Update on a Windows Server 2016 on AWS Lightsail.  AWS turn off Windows Update by default, and there is some other tool AWS uses to process update, however I don't think it manages LightSail machines.  I made some changes to the group policy, and that seems to have started Windows Updates, but they don't seem to be installable on demand.  I found this at  https://docs.microsoft.com/en-us/answers/questions/356003/windows-10-updates-kb2267602-security-intelligence.html Run Windows update troubleshooter firstly, this tool can diagnose and repair update issue automatically. Then, restart computer and check for updates again. If still no help, reset Windows update component manually: Open an elevated command prompt windows, type the following commands one after the other, and hit Enter: net stop wuauserv net stop bits rename c:\windows\SoftwareDistribution SoftwareDistribution.bak net start wuauserv net start bits Open an elevated Command Prom...