npm init -y
Create a folder called src and add an empty index.js file. The code that webpack compiles goes in here including any Javascript modules and the main Tailwind file.
namespace Csharp11Demo.Models; | |
string[] consonants = { "b", "d", "k", "l" }; | |
string[] vowels = { "a", "e", "o", "l" }; | |
consonants is ["b", "d", "k", "l" ]; // returns true | |
vowels is ["b", "d", "k", "l"]; // returns false | |
consonants is ["b", "d", "k"]; // returns false | |
consonants is [_, "d", "k", _]; // returns true | |
vowels is [.., "l"]; // returns true |
<link rel="shortcut icon" width=32px> | |
<canvas style="display: none" id="loader" width="16" height="16"></canvas> | |
<script> | |
class Loader { | |
constructor(link, canvas) { | |
this.link = link; | |
this.canvas = canvas; | |
this.context = canvas.getContext('2d'); | |
this.context.lineWidth = 2; |
import { InjectionToken } from '@angular/core'; | |
// We create an interface for the configuration JSON object | |
export interface Configuration { | |
readonly apiUrl: string; | |
readonly timezone: string; | |
readonly websocketUrl: string; | |
} | |
// We use a dependency injection token to access the configuration |
This is a simple setup for reflectionless logging with serilog using caller information (and a single static class).
See also https://stackoverflow.com/a/46905798
Create your own Log.cs
in your Root-Namespace (you can use the class below).
This class is required to detect where the call is coming from; it uses Caller-Information to speed up the program execution, because the attributes are resolved at compile-time.
import {Injectable} from '@angular/core'; | |
import {FlatTreeControl} from '@angular/cdk/tree'; | |
import {CollectionViewer, SelectionChange} from '@angular/cdk/collections'; | |
import {BehaviorSubject, merge, Observable} from 'rxjs'; | |
import {map} from 'rxjs/operators'; | |
/** Flat node with expandable and level information */ | |
export class DynamicFlatNode<T> { | |
constructor(public item: T, public level: number = 1, public hasChildren: boolean = false, public isLoading: boolean = false) {} |
// ... | |
const dotenv = require("dotenv"); | |
// ... | |
console.log(`Bundling application for entryPath ${entryPath}...`); | |
dotenv.config() | |
const isUppercase = key => key.toUpperCase() === key; | |
const envKeys = Object.keys(env); |
Angular CLI version | Angular version | Node.js version | TypeScript version | RxJS version | |
---|---|---|---|---|---|
~16.0.0 | ~16.0.0 | ^16.13.0 || ^18.10.0 | >=4.9.5 <5.1.0 | ^6.5.5 || ^7.4.0 | |
~15.2.0 | ~15.2.0 | ^14.20.0 || ^16.13.0 || ^18.10.0 | >=4.8.4 <5.0.0 | ^6.5.5 || ^7.4.0 | |
~15.1.0 | ~15.1.0 | ^14.20.0 || ^16.13.0 || ^18.10.0 | >=4.8.4 <5.0.0 | ^6.5.5 || ^7.4.0 | |
~15.0.5 | ~15.0.4 | ^14.20.0 || ^16.13.0 || ^18.10.0 | ~4.8.4 | ^6.5.5 || ^7.4.0 | |
~14.3.0 | ~14.3.0 | ^14.15.0 || ^16.10.0 | >=4.6.4 <4.9.0 | ^6.5.5 || ^7.4.0 | |
~14.2.0 | ~14.2.0 | ^14.15.0 || ^16.10.0 | >=4.6.4 <4.9.0 | ^6.5.5 || ^7.4.0 | |
~14.1.3 | ~14.1.3 | ^14.15.0 || ^16.10.0 | >=4.6.4 <4.8.0 | ^6.5.5 || ^7.4.0 | |
~14.0.7 | ~14.0.7 | ^14.15.0 || ^16.10.0 | >=4.6.4 <4.8.0 | ^6.5.5 || ^7.4.0 | |
~13.3.0 | ~13.3.0 | ^12.20.2 || ^14.15.0 || ^16.10.0 | >=4.4.4 <4.7.0 | ^6.5.5 || ^7.4.0 |
/* | |
In JavaScript, objects can be used to serve various purposes. | |
To maximise our usage of the type system, we should assign different types to our objects depending | |
on the desired purpose. | |
In this blog post I will clarify two common purposes for objects known as records and dictionaries | |
(aka maps), and how they can both be used with regards to the type system. |