This file contains hidden or 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
export function createRatingSystem(kFactor: KFactorOption = 32, exponentDenominator: number = 400, exponentBase: number = 10): RatingSystem |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 4 columns, instead of 5 in line 1.
This file contains hidden or 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
A skill, B skill, outcome, effect | |
lower, higher, A wins, Player A should be rewarded a lot because they were expected to lose, but won | |
lower, higher, A loses, Player A should not be penalized much because they were expected to lose |
This file contains hidden or 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
const testStateMachine = Machine({ | |
id: 'testState', | |
initial: 'preload', | |
states: { | |
preload: { | |
on: { | |
LOAD: { | |
target: 'ready', | |
}, | |
}, |
This file contains hidden or 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 express from 'express' | |
import * as ui from 'cra-package' | |
const app = express() | |
app.use(express.static(ui.directoryPath)) | |
app.get('/', function (req, res) { | |
res.sendFile(ui.defaultFilePath) | |
}) |
This file contains hidden or 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
"builduipackage": "tsc -p ./packageScripts/tsconfig.json --outDir ./package && tsc -p ./scripts/tsconfig.json && node ./scripts/createPackage.js", |
This file contains hidden or 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
const express = require('express'); | |
const path = require('path'); | |
const app = express(); | |
app.use(express.static(path.join(__dirname, 'build'))); | |
app.get('/', function(req, res) { | |
res.sendFile(path.join(__dirname, 'build', 'index.html')); | |
}); | |
app.listen(9000); |
This file contains hidden or 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 * as path from 'path' | |
const directoryPath = __dirname | |
const defaultFilePath = path.join(directoryPath, 'index.html') | |
export { | |
directoryPath, | |
defaultFilePath, | |
} |
This file contains hidden or 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 * as fs from 'fs-extra' | |
import * as path from 'path' | |
const packageJsonPath = path.join(__dirname, '..', 'package.json') | |
const buildPath = path.join(__dirname, '..', 'build') | |
const uiPackagePath = path.join(__dirname, '..', 'package') | |
const indexJsPath = path.join(uiPackagePath, 'index.js') | |
const indexDtsPath = path.join(uiPackagePath, 'index.d.ts') | |
async function main() { |
This file contains hidden or 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
// tslint:disable-next-line:no-any | |
const userIsAuthenticated = connectedRouterRedirect<any, State>({ | |
// The url to redirect user to if they fail | |
redirectPath: '/login', | |
// Determine if the user is authenticated or not | |
authenticatedSelector: state => state.user.isLoggedIn, | |
// A nice display name for this check | |
wrapperDisplayName: 'UserIsAuthenticated' | |
}) |
This file contains hidden or 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
export interface IAuthenticationService { | |
acquireTokenAsync<T>(provider: IProvider<T>): Promise<T> | |
restoreSession<T>(provider: IProvider<T>): T | undefined | |
invalidateSession(): void | |
getAccessToken<T>(provider: IProvider<T>, resourceId: string): string | |
} |