Friday, December 16, 2016

Shallow Copy an array in JavaScript

Who knew?
var copyOfArray = originalArray.slice();
Apparently Array.slice, if called with no parameters, returns a copy of the entire array. Kinda cool!

Wednesday, December 07, 2016

Formatting in ReSharper vs. formatting in Visual Studio

Interesting. Ctrl-K Ctrl-D reformats a file using Visual Studio rules, while Ctrl-Alt-Enter reformats a file using ReSharper rules.

Here's an example, using Visual Studio formatting (Ctrl-K Ctrl-D):
            var patient = new Patient { AccountNumber = accountNumber };
And the same code using ReSharper formatting (Ctrl-K Ctrl-F):
            var patient = new Patient {AccountNumber = accountNumber};
I would have thought that ReSharper would take over the Ctrl-K Ctrl-D and Ctrl-K Ctrl-F keyboard shortcuts, but it does not.

Saturday, November 26, 2016

Testing fonts for ambiguity

This is the string used by Visual Studio's font configuration that indicates whether a font is ambiguous or not for developers:

Tuesday, October 25, 2016

Setting Environment variables in ASP.NET Core

"Turns out environment variables for ASP.NET Core projects can be set without having to set environment variables for user or having to create multiple commands entries....
"This way you do not have to create special users for your pool or create extra commands entries in project.json. Also, adding special commands for each environment breaks build once, deploy many times' as you will have to call dnu publish separately for each environment, instead of publish once and deploying resulting artifact many times."