How to Build Microsoft Graph Engine on Red Hat Linux

Microsoft Graph Engine is a distributed in-memory data processing engine. It’s an open source project but the official instructions claim that for Linux, it only supports Ubuntu 16.04. But what if you’re using other distributions of Linux, like Red Hat? Well, it’s possible but it does take quite some effort to build the source. Let’s get […]

MySQL with Entity Framework Core in ASP.NET Core

.NET Core offers.NET developers a great way to create cross-platform applications. If you want to create a web app with some database support, most likely you will use Entity Framework (EF) Core and ASP.NET Core. In this blog post, I’d like to give you some tips if you choose to use MySQL. 1. Db Provider […]

ExpectedExceptionBaseAttribute and “Object reference not set to an instance of an object”

You’re writing unit tests with Visual Studio and you want to verify that you’re throwing the correct Exception. You could use ExpectedExceptionAttribute class but it only allows you to verify the type of the Exception. You might want to verify other properties so you decide to create a subclass of ExpectedExceptionBaseAttribute, which allows you to have […]

Programmatically Paste Clipboard Text to a CMD Window (C# or C++)

To accomplish this, I have tried different approaches: posting WM_PASTE, SendKeys sending ctrl-v… None of the method seems to be working so well. A friend from work suggested trying WM_COMMAND. Since Spy++ doesn’t work with cmd.exe, we had to use brute force to find the correct WPARAM for pasting. The result is really simple, just one line code with C++: // hwnd […]