- Nov 2023
-
bayfronttechnologies.com bayfronttechnologies.com
-
The HTML encoding of this document contains several errors, some of which substantially affect the way it's read. This fixes one of those problems in Appendix II:
javascript ([ ...document.querySelectorAll("op") ]).reverse().forEach((op) => { let f = document.createDocumentFragment(); f.append(document.createTextNode("<OP>"), ...op.childNodes); op.parentElement.replaceChild(f, op); })
The problem show be apparent on what is, at the time of this writing, line 4437:
html <code>IF ?w THEN ?x<OP>?y ELSE ?z<OP>?y</code>
(The angle brackets around the occurrences of "OP" should be encoded as HTML entities. Because they aren't they end up getting parsed as HTML
op
elements (which isn't a thing) and screwing up the document tree.)
-
- May 2022
- Aug 2021
-
github.com github.com
-
Using a flag to disable prettier for a line, the next line or until I activate it again (ESLint like syntax). // prettier-disable border: { sep: "║", topLeft: "╔", topMid: "╦", top: "═", topRight: "╗", midLeft: "╠", midMid: "╬", mid: "═", midRight: "╣", botLeft: "╚", botMid: "╩", bot: "═", botRight: "╝" }, // prettier-enable
-
- Dec 2019
-
developer.mozilla.org developer.mozilla.org
-
// reduce() without initialValue [ { x: 22 }, { x: 42 } ].reduce( maxCallback ); // 42 [ { x: 22 } ].reduce( maxCallback ); // { x: 22 } [ ].reduce( maxCallback ); // TypeError // map/reduce; better solution, also works for empty or larger arrays [ { x: 22 }, { x: 42 } ].map( el => el.x ) .reduce( maxCallback2, -Infinity );
-
-
-
┊
First sighting. First time I've seen a literal, non-whitespace character (┊) used to show indentation. Looks pretty nice. But breaks copy-and-pastability.
-
- Nov 2019
-
stackoverflow.com stackoverflow.com
-
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { MaterialModule } from '@angular/material'; import { MyInterface } from './my.interface'; import { MyService } from './my.service'; @NgModule({ imports: [ CommonModule, FormsModule, MaterialModule.forRoot() ], declarations: [ MyInterface],//<- this is causing the message exports: [ MyInterface], providers: [ MyService ] }) export class MyModule { }
-