c# – LINQ’s Distinct() on a particular property

EDIT: This is now part of MoreLINQ.
What you need is a “distinct-by” effectively. I don’t believe it’s part of LINQ as it stands, although it’s fairly easy to write:

public static class EnumerableExtensions
{
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)
{
HashSet<TKey> seenKeys = new HashSet<TKey>();
foreach (TSource element in source)
{
if (seenKeys.Add(keySelector(element)))
{
yield return element;
}
}
}
}

Source: c# – LINQ’s Distinct() on a particular property – Stack Overflow

white-space | CSS-Tricks

Here is a table to understand the behaviors of all the different values for property white-space:

New lines Spaces and tabs Text wrapping
normal Collapse Collapse Wrap
pre Preserve Preserve No wrap
nowrap Collapse Collapse No wrap
pre-wrap Preserve Preserve Wrap
pre-line Preserve Collapse Wrap

Source: white-space | CSS-Tricks

Visual Studio Comparison Tools – Visual Studio Marketplace

Visual Studio Comparison Tools is an extension for Visual Studio which uses external tools to compare files, folders and clipboard. Features: Comparing two files, selecting folders for comparison from the solution explorer and comparing (and merging) clipboard to a file or selected area in a file. By default uses Beyond Compare if found, then WinMerge (http://winmerge.org/) and if neither is found uses VSDiff to compare files. Tested to work with Beyond Compare 3 and 4.

Source: Visual Studio Comparison Tools – Visual Studio Marketplace

Angular state inspector – Chrome Extension

Helps you debug Angular component state. Supports Angular 1/2+/Ivy! Angular State Inspector for Angular Supports all versions of Angular: – AngularJs – Angular 2+ – Angular Ivy – Hybrid apps (AngularJs + Angular) Extends the Chrome Developer Tools for Angular web apps. Adds new panel “State” to Elements tab, that displays the state of selected element. Prints state of selected element in console by calling “$state” variable. Depending on angular version it can show: – Component state – Directives – Context, like ngForOf or ngIf values – Event listeners If they are applicable to the current element.

Angular State Inspector also allows you to modify the values in the “State” panel (double click on value)

Source: Angular state inspector – Chrome Web Store

Reqres – A hosted REST-API ready to respond to your AJAX requests

If you’re trying to demonstrate a front-end (JavaScript-based) concept, you don’t really want the hassle of setting up an API, or even a server (especially during a live workshop or demo).
You can just write your HTML, CSS & JavaScript as usual and send Reqres AJAX requests, which will respond with the expected response codes and output. Rapid prototyping of interfaces When prototyping a new interface, you just want an APIthere, with minimal setup effort involved. Normally, I’d point people, who aren’t too familiar with backend programming, to Sailsjs which can auto-generate a REST-API for you from the command line.
However, you will need Node.js installed and some familiarity of how Node.js works. If that sounds like too much hassle and way too daunting, Reqres is just a URL. Sending it an AJAX request is step 1…there is no step 2. Peace of mind It might seem pretty weird to be sending your data to a 3rd party API, but I can assure you, Reqres does not store any of your data at all. Once you send it to us, we just send it straight back…and then it’s gone!
reqres.in/