Adding missing days for charts

I’ve created a function which adds missing days in an event count overview chart.

Starting dataset

  1. 01/04/2016;”ErrorCode”;10
  2. 03/04/2016;”ErrorCode”;12
  3. 04/04/2016;”ErrorCode”;2
  4. 06/04/2016;”ErrorCode”;32
  5. 07/04/2016;”ErrorCode”;103

After conversion

  1. 01/04/2016;”ErrorCode”;10
  2. 02/04/2016;”ErrorCode”;0
  3. 03/04/2016;”ErrorCode”;12
  4. 04/04/2016;”ErrorCode”;2
  5. 05/04/2016;”ErrorCode”;0
  6. 06/04/2016;”ErrorCode”;32
  7. 07/04/2016;”ErrorCode”;103

Continue reading

Polymorphism & Func

While implementing a Guard pattern for my current project I came across following strange behavior.

Polymorphism

This code causes a reference problem to occur. It seems like compiler can’t tell the difference between the Func & string overloads. I have absolutely no idea why this is the case.

Doing this fixes the issue:

PolymorphismFixed

If anyone reading this; knows why. Please explain in the comments section.

Highway Simulator

I created a Highway Simulator in C#.

Cars all have different speeds,

Simulator In Action

Simulator In Action

Dark blue windscreens mean that the road ahead is not safe at current speed, which is when brakes are applied (red line). Busses are heavier and have a larger stopping distance.

Light blue car, which is driving off road is the one that can be controlled by arrow keys. Other cars also react to it.

Fun stuff 🙂

Gif of application running.

Gif of application running.

Sharepoint 2013 Styling Animated Metro Buttons

Styling your own Metro Buttons in SharePoint 2013

MetroButtons

I have managed to create Metro Style buttons for SharePoint 2013 navigating. I have a SP solution that manages the Expense Reports of a company. They wanted easy buttons to allow users to select a Expense Report Template of their country and start editing the InfoPath template. “It would be great if they were animated” they said.

Continue reading