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({ |
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
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... |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
This was created years ago; at the time I'd been a Shibboleth admin for nearly a decade but we needed something that could handle OIDC/OAuth and that explicitly supported OpenJDK. After a lot of investigation, I really liked Keycloak/Red Hat Single Sign-On. More details here: Gluu vs keycloack vs wso2 identity management
(Items in bold indicate possible concerns)
import java.io.FileDescriptor; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.PrintStream; | |
public class HelloWorld{ | |
private static HelloWorld instance; | |
public static void main(String[] args){ | |
instantiateHelloWorldMainClassAndRun(); |