Posts

Showing posts from June, 2018

Tests not discovered in Visual Studio Test Explorer Window

Visual Studio caches the test runner adapters, and in the most of the cases a corrupted cache is the reason for this. To clean the cache, you have to do the following: 1.       Close all Visual Studio instances 2.       Go to  %TEMP%\VisualStudioTestExplorerExtensions\ 3.       Delete specrun related folders 4.       Try again

Bootstrap 4 hidden element

Update for Bootstrap 4 (2018) The  hidden-*  and  visible-*  classes  no longer exist  in Bootstrap 4. If you want to hide an element on specific tiers or breakpoints in Bootstrap 4, use the  d-*   display classes  accordingly. Remember that extra-small/mobile (formerly  xs ) is the default (implied) breakpoint, unless overridden by a  larger  breakpoint. Therefore,  the  -xs  infix no longer exists in Bootstrap 4 . Show/hide for  breakpoint and down : hidden-xs-down (hidden-xs)  =  d-none d-sm-block hidden-sm-down (hidden-sm hidden-xs)  =  d-none d-md-block hidden-md-down (hidden-md hidden-sm hidden-xs)  =  d-none d-lg-block hidden-lg-down  =  d-none d-xl-block hidden-xl-down  (n/a 3.x) =  d-none  (same as  hidden ) Show/hide for  breakpoint and up : hidden-xs-up  =  d-none  (same as  hidden ) hidden-sm-u...

JS array equivalents to C# LINQ methods

TypeScript vs. C#: LINQ TypeScript TypeScript has no equivalent for the language-integrated-natural-query aspect of LINQ. (hey, isn't that  literally  the whole acronym?) True, you  can't  write the following LINQ statement in TypeScript var adultUserNames = from u in users where u . Age >= 18 select u . Name ; However, the  IEnumerable<T>  extension methods, which are at the heart of LINQ, have equivalents in TypeScript (or can be emulated). Aggregate All Any Append Average Cast Concat Contains Count DefaultIfEmpty Distinct ElementAt ElementAtOrDefault Empty Except First FirstOrDefault List.ForEach GroupBy Intersect Last LastOrDefault Max Min OfType OrderBy / ThenBy Reverse Select SelectMany Single SingleOrDefault Skip SkipWhile Sum Take TakeWhile Union Where Zip Aggregate // C# var leftToRight = users . Aggregate ( initialValue , ( a , u ) => /* ... */ ); // TypeScrip...