Home About

Peter Daugaard Rasmussen

A blog on thoughts, ideas and solutions in the world of software development, programming, web development and software architecture.

← Newer Posts Page 3 of 22 Older Posts →

Javascript - How to remove all elements in a list (HtmlCollection) within a loop

I recently wanted to remove certain elements on my page. They all shared the same class, but I ran into problems when the last one in »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Javascript, Web development 07 October 2020

Javascript - how to get a child element with a specific class, attribute or any other selector

In order to get a child element or several child elements I would suggest you use the querySelectorAll or QuerySelector functions. Yes these can be both »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Javascript, Vanilla javascript, HTML, Web development 05 October 2020

How to check if IP anonymization/masking is enabled for Google analytics

I previously made a post on how to disable cookies for Google analytics. In the same post I mentioned that I had used Google analytic's IP »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Google 03 October 2020

How to stop Google analytics from setting cookies on your website

You are likely on this page due to GDPR or the cookie consent policy. I am in no way an expert on law, GDPR or the »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Google 26 September 2020

C# - How to put or post XML using the HttpClient in .Net Core

It is quite easy to send XML using the HttpClient in asp.net core. In order to do this you need to use the StringContent object, »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, HttpClient, Web 23 September 2020

Ghost blog - Getting rid of the <br> tag and space added between text and image when inserting images from Unsplash

I recently tried the feature "Add image from Unsplash" on my Ghost blog. However I quickly found out that there is a lot of »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Ghostblog, HTML 19 September 2020

C# - When to use value tuples and when to use classes

Value tuples were introduced with C# 7. The original tuples have been around since 2010 when they were released with .Net Framework 4.0. Even though »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, Valuetuple 16 September 2020

How to make prism.js word-wrap (line-wrap) code snippets

I recently made a post where I needed to show some code that would look better without word wrap as it was basically one or two »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Javascript, Web development, Blogging, CSS 12 September 2020

Visual Studio - How to diff/compare two different files in your solution

Given how long Visual Studio has been out there I sometimes wonder why there is no built in function to compare two files. Using for example »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Visual Studio, File 10 September 2020

xUnit - How to assert that a call throws an exception

A year ago I made a post on the absence of the DoesNotThrow assertion in xUnit. In this post I show how you can assert if »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on XUnit, Testing, Unit tests 09 September 2020
← Newer Posts Page 3 of 22 Older Posts →
Rss
Twitter
LinkedIn
profile for Peter Rasmussen at Stack Overflow, Q&A for professional and enthusiast programmers
Peter Daugaard Rasmussen - developer, Consultant, Blogger © 2021 Cookie policy