Author: Martijn van der Corput

How to convert Json Epoch date string to C# DateTime

  The method below converts a Json Epoch Date string to a .NET string with a given format. public string JsonEpochDateToDateTime(string jsonEpochDate, string resultFormat) { string result = string.Empty; if (jsonEpochDate.Contains(“Date(“) && jsonEpochDate.Contains(“)”)) { jsonEpochDate = jsonEpochDate.Replace(“Date(“, string.Empty).Replace(“)”, string.Empty); } long milliseconds = 0; long.TryParse(jsonEpochDate, out milliseconds); if (milliseconds > 0) { var epochDate = new […]

Windows taskbar divider

Introduction The Windows taskbar is probably on of the most frequently used Windows features, so optimizing it to your needs could boost your windows experience. Personally, one thing that annoys me is that i accidentally click wrong icons and startup applications that i don’t want to start while using the taskbar. Application After some googling […]

Comparing performance of javascript forEach and for loop on array of items

Introduction Last week i had to optimize javascript code that didn’t perform well enough in Internet explorer (11). Chrome was also not performing very well, so i started searching for performance gains. There were many Arrays in code and there where many forEach loops. I changed some foreach loops to for loops and performance improved quite […]

VS2015 TypeScript Cannot compile modules unless the ‘–module’ flag is provided build error

Introduction In Visual studio 2015 i had big troubles using TypeScript import statements in combination with exporting modules. At build i got TypeScript compiler errors stating : Cannot compile modules unless the ‘–module’ flag is provided build error. I used TypeScript and modules before without running into this problem, but in those cases i didn’t use […]

Transforming resx files into TypeScript models before build (npm)

Introduction For a while now i have been looking for a way to work with resources from .resx files in web applications where i use TypeScript. I don’t like the manual labour of creating models/interfaces, but i want to work with intellisense in TypeScript and without having to use magic strings (or even enums) while using […]

MvcBuildViews setting depending on build configuration

Introduction By default, in a MVC web application, MVC Razor views (.cshtml files) are not compiled at build time, so any errors in these parts of the application will only occure during run time. When you are editing a .cshtml file your Error window will show the errors in that specific file, but these errors will […]

Creating Visual Studio 2015 project template

Introduction A while ago i wanted to play with some new frameworks, but it took me some time to get the Visual Studio project setup correct and as minimal as possible. So i thought to myself, what if i had a project template so that i won’t have to do this over and over again. I […]

DNX Console application spinner example

Introduction If you need a spinner/busy indicator in a console application, you can find thread based examples on how to do this easily via Google or other search engines, however I could not find working spinner examples for DNX console applications. This article shows how to implement a simple spinner in a DNX console application. […]