An ASP.NET Core loading bar with cancellation button using SignalR in 10 minutes
05 May 2021
The aim here is to demonstrate the simplest way to use SignalR (ASP.NET Core version) in ASP.NET Core to create a loading bar that will automatically update itself whenever we push through SignalR the latest progress amount of a long running task to it.
I won’t go into details of every function and class necessary here, it’s just an example...
Translating R's poly() output to transform polynomial variable inputs for model prediction in .NET
02 May 2021
When performing a linear regression in R and other stats platforms, polynomial variables are often transformed ‘orthogonally’, rather than raw.
For example, when trying to find the optimal prediction model, consider the simplified model:
y = β0 + β1x + β2x2 + β3x3 + ... + βnxn
We are trying to find how much variance in Y is...
Blog move to GitHub Pages
01 May 2021
I’ve moved my blog from my ASP.NET Core site to a static file site hosted with GitHub Pages.
The main reason - GitHub Pages offers free hosting, and free SSL certificates for custom domains using Let’s Encrypt.
My ASP.NET Core site hosted on Azure needed a backend database and a non-free App Service plan to allow a custom domain....
C# HttpClient Wrapper for Asynchronous REST resources
08 May 2020
In a previous post I showed how to use the asynchronous REST pattern to work around the problem of R Plumber only being able to serve one request at a time. Now I’m going outline a HTTP client wrapper that abstracts the process of issuing the POST create resource request, polling the status of the resource and returning and...
Stop EF Core creating expensive Azure SQL Database configurations on start up
07 May 2020
If you’re developing an application that uses Azure SQL Databases for development and testing, you usually just want the bare minimum configuration, the Basic or Standard options, so you don’t waste cash.
If you’re using EF Core as your ORM and you automatically run migrations on startup, if it doesn’t find the database on the server specified in your connection...
A template for handling Asynchronous REST Operations in R Plumber
06 May 2020
Serve concurrent requests with R plumber without creating multiple instances with complex load balancing solutions
The single-threading Problem
R Plumber is great for easily opening your R analytics to other services to access via HTTP. If you’ve got a web application front end that serves analytics results to the client for example, there...
Browser Caching Basics
01 March 2019
Browsers cache web content to deliver previously visited pages faster.
This caching can be controlled by the web server with the HTTP header cache-control (sometimes also using the header e-tag), as explained later.
If the cache-control header is not set, the browser will use heuristics to determine the length of time to cache the resource, usually 10% of the...
New Blog Site
01 January 2019
Hello! I’m Mike, a .NET-oriented developer, and this is my tech blog. I’m not usually the blogging type but as a developer you accumulate so much random knowledge that often gets lost or forgotten - it seemed like it was time to start recording some of it, so I can refer back to it, and if it helps anyone else...