ng-apimock is a tool that provides scenario based API mocking. It can be used to test and develop applications without the need of a backend. Alternatively you can also chose to let certain calls through to the actual backend and apply mocking selectively.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
ignorePatterns: ['.eslintrc.js'], | |
env: { | |
browser: true, | |
es6: true, | |
}, | |
parser: '@typescript-eslint/parser', | |
parserOptions: { | |
project: 'tsconfig.json', | |
sourceType: 'module', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sources: | |
* https://www.rollingstone.com/movies/movie-lists/best-sports-movies-rocky-rudy-71467/ | |
* https://www.vulture.com/article/best-sports-movies-ranked.html | |
* | |
* Combined and de-duplicated list from both sources, resulted in 62 movies | |
* Both documentary and feature films are included in this list... | |
* | |
* Is 'The Big Lebowski' really a bowling film? | |
* Are coaches movies their own genre? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Tic Tac Toe Player | |
""" | |
import math | |
import random | |
import copy | |
X = "X" | |
O = "O" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <getopt.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include "helpers.h" | |
int main(int argc, char *argv[]) | |
{ | |
// Define allowable filters | |
char *filters = "bgrs"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { HarnessLoader, parallel } from '@angular/cdk/testing'; | |
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; | |
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; | |
import { MatStepperModule } from '@angular/material/stepper'; | |
import { | |
MatStepHarness, | |
MatStepperHarness, | |
MatStepperNextHarness, | |
MatStepperPreviousHarness, | |
} from '@angular/material/stepper/testing'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// define a type for the path of the nested key | |
type Path = (string | number)[]; | |
// define a generic function that can access a nested property of an object | |
function getNestedValue<T> (obj: T, path: Path): any { | |
// if path is empty, return the whole object | |
if (!path.length) return obj; | |
// loop through the path and access each nested property | |
let value = obj; | |
for (let key of path) { |
OlderNewer