Week Numbers in C#
One of the options in bootstrap-datepicker is to show the week number on the same row as the days of the week. This numbers the weeks using the ISO-8061 standard which is fine (though it would be nice to have Read more…
One of the options in bootstrap-datepicker is to show the week number on the same row as the days of the week. This numbers the weeks using the ISO-8061 standard which is fine (though it would be nice to have Read more…
If you want to send some URL encoded content to an API you can use the built in FormUrlEncodedContent to convert an IEnumerable<KeyValuePair<string, string>> to a correctly coded content object. The most basic way to get the required KeyValuePair IEnumerable Read more…
IdentityServer4 is an OpenID Connect and OAuth 2.0 framework for ASP.NET Core 2 which can be used to manage authentication for web applications. In my case I wanted to set up OAuth 2.0 authentication using a SQL backend for an Read more…
Although there’s plenty of documentation by Microsoft on how to use their Bing Ads API the documentation on how to initially connect to it seems a bit fragmented so this is an attempt to summarize all the steps required to Read more…
This site is built using WordPress and styled with the Hestia theme. Hestia uses Bootstrap as a layout framework with the main boxed element being a container, this has a max width of 1170px on viewports over 1200px wide. As Read more…
You can host images (or other files) in Azure Storage by making the container with them in public but if you want them to be private and only accessible to authorized users then you can either generate a short-lived SAS Read more…
The Azure computer vision API can be used to retrieve information about an image including tags, descriptions and categories along with their associated confidence scores. The Microsoft quickstart guide to using this is here and my releated code is below. Read more…
Azure Data Warehouse has a nice feature where it can access GZipped file blobs directly from Azure Storage as linked tables. The below code is for downloading zipped files from an SFTP site, extracting them, gzipping them and then uploading Read more…
SendGrid is a pretty good ESP and has a nice API, it also has a free tier available through the Azure Portal. The C# library for it available through NuGet makes it easy to call the API but the documentation Read more…
While trying to take the URL parameters from a page view and append them to an API call from a Razor web page in an MVC web application I kept on getting the URI encoded version of the ampersand from Read more…