Helpers and examples for unit testing on Angular applications and libraries.
| import { NgbDateAdapter, NgbDateStruct } from '@ng-bootstrap/ng-bootstrap'; | |
| import { Injectable } from '@angular/core'; | |
| import * as moment from 'moment'; | |
| // Might need to polyfill depending on needed browser support... | |
| const isInt = Number.isInteger; | |
| @Injectable() | |
| export class NgbMomentjsAdapter extends NgbDateAdapter<moment.Moment> { |
| -- Enumerate prime numbers below N using only SQL | |
| -- DDL | |
| create table primes( | |
| value integer primary key, | |
| sieved boolean not null default false | |
| ); | |
| create index prime_sieve_idx on | |
| primes(value, sieved); |
You can test with the iOS Simulator that comes with Xcode. Navigate to the Xcode app in the Finder, right click and select "Show Package Contents":
Then navigate to Contents > Applications, and open the shortcut to "iPhone Simulator" (it may be called "iOS Simulator" depending on which version of Xcode you're running):
| diff --git a/node_modules/postgraphile/build/postgraphile/http/createPostGraphileHttpRequestHandler.js b/node_modules/postgraphile/build/postgraphile/http/createPostGraphileHttpRequestHandler.js | |
| index 73bc159..1b1d23d 100644 | |
| --- a/node_modules/postgraphile/build/postgraphile/http/createPostGraphileHttpRequestHandler.js | |
| +++ b/node_modules/postgraphile/build/postgraphile/http/createPostGraphileHttpRequestHandler.js | |
| @@ -717,7 +717,14 @@ function createPostGraphileHttpRequestHandler(options) { | |
| operationName, | |
| }, (graphqlContext) => { | |
| pgRole = graphqlContext.pgRole; | |
| - const graphqlResult = graphql_1.execute(gqlSchema, queryDocumentAst, null, graphqlContext, variables, operationName); | |
| + const graphqlResult = graphql_1.execute({ |
We stand at the brink of a new political age. In the shadows of Silicon Valley boardrooms and Washington backrooms, an unlikely alliance has taken shape. The Dark Enlightenment – an obscure neo-monarchist ideology born on internet forums – has crept from fringe blogs into the corridors of power. When I first heard whispers about tech CEOs and White House aides reading the same forbidden tracts, I knew something extraordinary was unfolding. This chronicle that follows is a firsthand journey into that unfolding drama, written in the heat of events by an intrepid observer who witnessed the transformation up close. It reads like a political thriller because, in many ways, it is one – except every bit of it is based on real people and real ideas shaping our world.
To set the stage, let me sketch the key players and ideas at work, so you can follow the wild narrative that ensues:
- Curtis Yarvin (Mencius Moldbug) – Ex-programmer turn
| CREATE TABLE accounts( | |
| id serial PRIMARY KEY, | |
| name VARCHAR(256) NOT NULL | |
| ); | |
| CREATE TABLE entries( | |
| id serial PRIMARY KEY, | |
| description VARCHAR(1024) NOT NULL, | |
| amount NUMERIC(20, 2) NOT NULL CHECK (amount > 0.0), | |
| -- Every entry is a credit to one account... |
Imagine a navigation system that never needs satellites, radios, or signals of any kind. Instead, it carries a tiny quantum sensor that quietly “listens” to Earth’s own magnetic field. Every location on the planet has a unique magnetic fingerprint—subtle variations in strength and direction that arise from the rocks and minerals below our feet. By comparing what the sensor reads to a pre‑loaded map of those fingerprints, a robot or vehicle can pinpoint its position with GPS‑level accuracy.
Because it emits nothing, this approach is immune to jamming or spoofing. It works everywhere — indoors, underground, underwater, in dense cities or deep forests — where GPS and other systems fail. Drones can continue mapping pipelines under bridges, warehouse robots can navigate tunnels without beacons, and self‑driving cars can stay on course in concrete canyons. For military or search‑and‑rescue missions, the technology offers stealth and reliability when every second counts.
In short, qu
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.

