The trick will come if you are using the Local Location.
Tuesday, November 5, 2019
A simpler, maybe too simple, alternative to using a module as a static service in Angular.
As opposed to this, something like this could live in a file by itself somewhere.
export class Redundant {
public doubleUp(key: string):string {
return key + key;
}
}
You could import it where you need it as you would normally and then turn around and use it like this:
let song:string = "Daddy's little baby loves" + Redundant.doubleUp(" shortnin");
Monday, November 4, 2019
Make the same method conditionally return different stuff with MOQ.
playerRepository.Setup(p => p.FindPlayer(It.IsAny<long>())).Returns((long id) => id==1
? new Player() { PlayerId = 1, PlayerIp = "127.0.0.1" }
: new Player() { PlayerId = 2, PlayerIp = "128.0.0.1" }
);
custom application development
No! Here is a less glamour note. If I just want to start a new message in Microsoft Teams, how do I do that? There is an icon at the upper left inside the blue top bar that looks like a pencil scribbling on a piece of paper. You can start a thread there and find someone you've not found before to correspond with as well. I guess this merits a blog posting as I couldn't find this today, well, not easily anyways. Dear reader, I know you are hoping for something more exciting than this. I guess I have failed in that regard.
Saturday, November 2, 2019
I saw Jason Webb speak on accessibility Wednesday night at JavaScript MN.

There was some emphasis on American law. The Rehabilitation Act of 1973 was mentioned and it addresses the idea of discrimination based on disability but is really only applied to federal government work life. Of course Section 508 is an amendment to this, but a 504 amendment was also mentioned as well. It prohibits discrimination in programs that benefit from federal assistance. Opening the umbrella up farther yet is the Americans with Disabilities Act (ADA) which spills beyond any federal boundaries. This came to be in 1990. Domino's Pizza got in trouble, per the ADA, for having a web presence that was not accessible to the handicapped. This turned into a lawsuit and I guess they didn't avoid the Noid in that regard. Honestly, what could be worse than the "thirty minutes or it's free" campaign that actually killed some people? The lawsuit was likely comparatively easier. I digress. Anyhow, normally things don't escalate to the point of a lawsuit. Instead a "demand letter" will likely be submitted to an offending company and the offending company will shape up. At the web semantic tags in HTML get you 90% of the way to accessibility, things like header, footer, and main in-between, and, yes, there is a main tag. The 10% gap is closed by ARIA. WAI-ARIA is the Web Accessibility Initiative for ARIA of the World Wide Web Consortium, its spec for doing ARIA. CodePen is a coding playground where you may test this stuff and see other people's snippets for solutions. Because there is not an HTML tag for an autocomplete or a carousel, you have to delve into the ARIA stuff herein, as things gets trickier, beyond what sematic tags can express to a screen reader like JAWS. The header, footer, and main tags are "landmark tags" for similar concerns. The use of mobile devices as "assistive devices" has become super popular though 80% of the market for accessibility concerns is still just Windows operating systems flavored computers and laptops. JAWS and NVDA are just for Windows and testing just on Windows with just them in the screen reader space is seen as enough. Touch sticks help individuals with limited mobility tap the screen on assistive devices. Create a checklist in testing and Vox Product Accessibility Guidelines are recommended for as much. In personas for requirements building, have a persona with accessibility needs. The WCAG has twelve guidelines for accessibility based on four principles. The four principles follow and for the third one text should be written at a particular grade level slated as a standard. In the fourth, AT stands for accessibility technology.
- Perceivable – everyone can access the content
- Operable – everyone can interact with it
- Understandable – UI and content is clear
- Robust – works with many user agents and AT

Emotion and styled components were two libraries mentioned by a Ben Ragsdale in a lightning talk before the main presentation by Jason Webb. He offered that if you tie CSS directly to a component you can know that it is only used for that component. Often times, this sort of thing takes place in template literals. Frequently at JavaScript talks the mention of a component will carry the subtext of a React component and at JavaScript MN in particular there seems to be a bit of a React bias. I guess React does have the largest "market share" of use and adoption in the modern JS space. Before the Ben Ragsdale lightning talk there was another lightning talk titled "Using the intersection of observers and hooks for SVG animations" and, yes, herein hooks implies React hooks. usehooks.com was recommended for getting into using hooks. You will want to import useState, useEffect, and useRef from 'react' to get the SVG animations stuff afloat. The IntersectionObserver will fire a callback when there is an overlap with the viewport as it was explained to me. Some code around as much was:
useEffect(() => {
const observer = new
IntersectionObserver(
([entry]) => {
setIntersecting(entry.isIntersecting);
},
{ threshold: 0 ]
);
if (ref.current) {
observer.observe(ref.current);
}
return () => {
observer.unobserve(ref.current);
};
], []);
As a term, viewport just refers to the visible area of a web site in a web browser. It is not React-specific but the Intersection Observer API is. It will react to elements that change position relative to that of the viewport as best as I can tell. FramerMotion is an animation library that may be used with web hooks to get all of this to work smoothly. The observers/hooks/SVG lightning talk was given by a Dakota Sexton who works at White House Custom Colour. github.com/tinykite has her code.

Friday, November 1, 2019
Change the workspace before you unshelve in TFS to make sure the thing you unshelve ends up in the right file folder.
Before doing this, click the blue arrow above the "Check In" button (which may be greyed out) at the "Pending Changes" tab.
Edit a workspace at TFS to change up its friendly name at the list of workspaces.
Follow the first four steps here to make the edit. You'll see the place to change the name.