Swap alt and cmd in Windows 10 (MacBook Pro)
As a .Net Developer, I need my MacBook Pro to run Windows. I did so using Boot Camp (which was okay, but my mouse wouldn’t scroll) In Windows I use alt+tab a lot. But the cmd and alt keys are not in the right place (from a Windows keyboard perspective). I use the Windows key a lot too (like Windows+r for run). So let’s swap those keys!
Fixing Air Mouse 2 Scrolling Windows 10 (Boot Camp)
Installed Windows 10 via BootCamp? Missing scrolling on your Air Mouse 2? After hours of searching I’ve found the simple solution: update the Apple software using the Apple updater located in your Program File directory.
Conditioning Knockout Observables: reject values
Wouldn’t it be nice if we could restrict the value written to a Knockout observable? Some values might mess up your model completely while others just don’t make sense. How would one create a conditioned observable that rejects invalid values? It turns out that conditioning an observable is not so hard.
Part 2: Calculations with Roman Numerals using C#
In a previous article I wrote how to parse Roman Numerals in C#. This article will focus on how to calculate with the class in an intuitive way. It will show how to implement implicit casting and the add and subtraction operator overloads. Fun stuff that’s probably useful in other projects.
Part 1: Parsing Roman Numerals using C#
Lately I’ve become fascinated with the Latin language. I’m working on a project that converts photographs of Latin inscriptions on medieval statues into translated text. One of the challenges is parsing years, usually expressed in the form of Roman Numerals.
After building a parser class I noticed that it had a lot of nice characteristics: parsing, operator overloading, implicit conversions. A nice way to play around with C#.
A small batch file to compile and execute… Java
Entering a javac (compile) and a java (execution) command seems tedious, so I wondered if those could be scripted into a good old .bat file.
I’ve created a file called yall.bat to help with the process. It has been a while since I’ve been playing around with batch files. I’ve seen my father do it… it still looks like a dark – and ancient – art to me.
Dynamically map JSON commands to object methods in .Net
Lately I’ve been playing around with USB led lights in .Net. I wanted the animations to be separated from my code. Wouldn’t it be great if you could define what animations are executed in a JSON file? And map it to code?
Normally one would build a mapper that does the conversion of the JSON commands to the methods. I like to use a more generic approach. I’ve created a small utility class that executes commands by mapping and executing them as a method of the object.
Support both Node.js and browser JS in one TypeScript file
But what if you need a TypeScript script that supports both vanilla browser JS and Node.js? What if you need to expose 10+ classes?
Convert QUnit test to Mocha / Chai
Recently I’ve been playing around with NPM. I switched my unit tests from QUnit to Mocha. This was not as straight forward as one would hope. In this blog I’ll show some example code. At the end I’ll link to a side by side comparison of the entire test project. Hopefully it helps you to convert your code. I’ll be using the Chai BDD assertion engine.
How to start Node.js app windowless in Windows