Posts

Showing posts from October, 2024

YAML

YAML     Advantages:   Human-readable.  Has lots of data types.   Overall:  Unlike JSON, the YAML format looks more like how someone would write down structured data on paper. It was designed specifically to be easier for humans to read.    Uses: I used YAML for deployments scripts for CI/CD pipelines and releases in  Microsoft's Azure when I worked at QuikTrip. I have used YAML for settings and  data that were used by programs written in different languages.     Other similar things: YAML is very similar to XML or JSON in its purpose.   Overall Implementation: It uses the following:     Indentation to represent objects     Colons to separate key-value pairs     Hyphens for arrays     Hashes to denote a comment YAML was originally built to simplify XML.  doe: "a deer, a female deer"  ray: "a drop of golden sun"  pi: 3.14159  xmas: true ...

Deep Copy of List of T

   Deep Copy of List<T>   I wish Microsoft had a clean method of DeepCopy(). Q: How get a deep copy of T? A1:  List<Book> books_2 = books_1.Select(book => new Book(book.title)).ToList(); A2: List<Book> books_2 = books_1.ConvertAll(book => new Book(book.title));   Credit: https://stackoverflow.com/questions/14007405/how-create-a-new-deep-copy-clone-of-a-listt  

(Under construction) Aspire render modes

 Aspire render modes   This seems to be in flux. Especially in Aspire. @rendermode InteractiveServer  @rendermode InteractiveWebAssembly  @rendermode InteractiveAuto = start with web socket connection, but as soon as user reloads the page or component then we will use WebAssembly.  It downloads the WASM files in the background. So now when reload then no web socket connection any more.  Only WASM files come from the cache.   Server 2 Renders a marker for a Blazor server-side application. This doesn't include any output from the component. When the user-agent starts, it uses this marker to bootstrap a blazor application. ServerPrerendered 3 Renders the component into static HTML and includes a marker for a Blazor server-side application. When the user-agent starts, it uses this marker to bootstrap a blazor application. Static...