text stringlengths 10 953k |
|---|
import React from 'react';
import './App.css';
import TypingPage from "./TypingPage/TypingPage";
import {JoinPage} from "./JoinPage/JoinPage";
import {LandingPage} from "./LandingPage/LandingPage";
import {LeaderboardPage} from "./LeaderboardPage/LeaderboardPage";
import {CreateRoomPage} from "./CreateRoomPage/CreateRo... |
import * as React from 'react';
import cx from 'classnames';
import Icon from '@src/components/icon';
import { Link } from 'react-router-dom';
import * as styles from './styles.css';
const bs = require('@src/main.css');
const Post: React.SFC = () => (
<div className={cx(bs.bgLight, styles.container)}>
<article ... |
import {Component, Prop} from '@stencil/core';
@Component({
tag: 'image-rounded',
styleUrl: 'image-rounded.scss'
})
export class ImageRounded {
@Prop() image: any;
/* @Prop() config: {
width?: number,
height?: number,
border?: {
color?: string,
padding?: number
}
... |
import { MigrationInterface, QueryRunner } from 'typeorm';
export class DeviceFilesType1589357904074 implements MigrationInterface {
name = 'DeviceFilesType1589357904074';
public async up(queryRunner: QueryRunner): Promise<any> {
await queryRunner.query(`ALTER TABLE "device" DROP COLUMN "files"`, unde... |
import { DB } from "../db";
import { Model } from "./model";
export const PickupStatus = {
UNPICK_UP: 'U',
PICKED_UP: 'P',
DELETED: 'D',
PICKED_UP_BUT_CHANGED: 'PC',
};
export interface IPickup {
_id?: string;
driverId: string;
driverName: string;
productId: string;
productName: string;
quantity: ... |
import { Main } from "./main";
import { CanvasUtils, ColorUtils, Constants, Utils } from "./Utils";
import type { IOptions as ISlimOptions } from "./Options/Interfaces/IOptions";
import type { IAbsorberOptions } from "./Plugins/Absorbers/Options/Interfaces/IAbsorberOptions";
import type { IEmitterOptions } from "./Plug... |
/**
* @module node-opcua-address-space
*/
import { assert } from "node-opcua-assert";
import { NodeId, sameNodeId } from "node-opcua-nodeid";
import { AddReferenceOpts, BaseNode, UAReference } from "..";
/**
* asserts that the provided reference exists in the node references
*
* @method assertHasMatchingReference... |
import { Component, OnInit, ViewChild } from '@angular/core';
import { MatSidenav } from '@angular/material';
@Component({
selector: 'app-side-nav-bar',
templateUrl: './side-nav-bar.component.html',
styleUrls: ['./side-nav-bar.component.scss']
})
export class SideNavBarComponent implements OnInit {
@ViewChild... |
import path from "path";
import fs from "fs";
import _ from "lodash";
import { listDir } from "./fetchFileTypes";
import { Model, Configuration, GetModels, ReqWithDB } from "../types";
import { getSource } from "./dataSource";
import { QStore } from "../../rest/utils/QStore";
import { anyModel } from "./modelTypes/any... |
/*!
* Copyright (c) 2018-present, Okta, Inc. and/or its affiliates. All rights reserved.
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
*
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
* Unless required ... |
export { default } from './lib/icons/SafetyCertificateFilled'; |
/**
* Copyright 2017 CANAL+ Group
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed t... |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* To create a Pipe, you must implement this interface.
*
* 要创建一个管道,你必须实现该接口。
*
* Angular invokes the `trans... |
export default () => console.log('Hello world'); |
import { declareIndices, IVector } from "@thi.ng/vectors";
import { ColorMode } from "./constants";
import { AColor } from "./internal/acolor";
import { ensureArgs } from "./internal/ensure-args";
import type { Color } from "./api";
export function xyza(col: Color, offset?: number, stride?: number): XYZA;
export funct... |
import { Action } from "@sfajs/router";
import Collections from "../../lib/Collections";
/**
* @openapi
* /todo/total:
* get:
* tags:
* - todo
* description: Get the count of all todos
* parameters:
* - $ref: '#/components/parameters/headerAccount'
* responses:
* 200:
* ... |
/**
* Perun RPC API
* Perun Remote Procedure Calls Application Programming Interface
*
* The version of the OpenAPI document: 3.14.0
* Contact: perun@cesnet.cz
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class ... |
import { GraphData, DegreeType } from "./types";
declare const degree: (graphData: GraphData) => DegreeType;
export default degree;
/**
* 获取指定节点的入度
* @param graphData 图数据
* @param nodeId 节点ID
*/
export declare const getInDegree: (graphData: GraphData, nodeId: string) => number;
/**
* 获取指定节点的出度
* @param graphData ... |
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
import fs from 'fs';
import os from 'os';
import path from 'path';
import v8 from 'v8';
import... |
import { AppError, ErrorToJSON } from './AppError';
import { ErrorType } from './errorCodeMap';
import { ValidationErrorItem } from '../middlewares/ValidationErrorItem';
export interface FieldValidationErrorToJSON extends ErrorToJSON {
fields: ValidationErrorItem[];
}
/**
* Error thrown when the HTTP request body ... |
// const { createLogger, transports, format } = require('winston');
import { createLogger, transports, format } from 'winston';
const transportError = [
new transports.File({
level: 'info',
filename: 'logs/winston/errors.log',
maxsize: 30000000, // 30MB
tailable: true,
maxF... |
import React, { ReactNode } from 'react'
import { useDrag } from 'react-dnd'
const Draggable = ({ children }: { children: ReactNode }) => {
const [{ isDragging }, drag] = useDrag(() => ({
type: 'Draggable',
collect: (monitor) => ({
isDragging: !!monitor.isDragging()
}),
item: { id: children }
... |
import { PassportStrategy } from '@nestjs/passport';
import { Strategy, ExtractJwt } from 'passport-jwt';
export class JwtStrategy extends PassportStrategy(Strategy) {
constructor() {
super({
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
ignoreExpiration: false,
secretOrKey: process.... |
import { newE2EPage } from '@stencil/core/testing';
describe('star-rating', () => {
it('renders', async () => {
const page = await newE2EPage();
await page.setContent('<star-rating></star-rating>');
const element = await page.find('star-rating');
expect(element).toHaveClass('hydrated');
});
}); |
import * as functions from "firebase-functions";
import * as admin from "firebase-admin";
import { HttpsError } from "firebase-functions/lib/providers/https";
const axios = require("axios").default;
// const coconut = require("coconutjs");
admin.initializeApp();
const auth = admin.auth();
// exports.processEmailVer... |
/**
* Fields in a request to update a single TODO item.
*/
export interface UpdateTodoRequest {
name: string;
dueDate: string;
done: boolean;
} |
import {PgDbLogger} from './pgDbLogger';
/**
* @property connectionString e.g.: "postgres://user@localhost/database"
* @property user can be specified through PGHOST env variable
* @property user can be specified through PGUSER env variable (defaults USER env var)
* @property database can be specified through PGDA... |
import { MethodCall } from "method-call-logger"
import { LogPhase, LogData } from "request-debug"
export enum Methods {
objectDetails = "vscabap.objDetails",
readConfiguration = "vscabap.readConfig",
readEditorObjectSource = "vscabap.editObjSource",
readObjectSourceOrMain = "vscabap.mainObjSource",
setSearchP... |
// Copyright IBM Corp. 2019. All Rights Reserved.
// Node module: @loopback/rest
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
import {OperationObject, SchemasObject} from '@loopback/openapi-v3';
import {ResolvedRoute, RouteEntry} from '.';
import {Req... |
/// <reference path="node/node.d.ts" />
/// <reference path="source-map/source-map.d.ts" />
/// <reference path="gruntjs/gruntjs.d.ts" /> |
import { MyLogger } from "./@entry";
export function warning(done) {
let logger = new MyLogger();
logger.events.on("warning", (level, message) => {
expect(level).toBe("warning");
expect(message).toBe("warning-message");
done();
});
logger.warning("warning-message");
} |
import type { Character } from './types'
import { BusinessWoman } from './businessWoman/BusinessWoman'
import { Millennial } from './millennial/Millennial'
import { Student } from './student/Student'
const characters: Character[] = [Student, BusinessWoman, Millennial]
export default characters |
export class NotFoundError extends Error {}
export class InvalidUrlError extends Error {}
export class ValidationError extends Error {} |
import Item from './Item';
class GildedRoseItem extends Item {
minQuality = 0;
maxQuality = 50;
dailyQualityChange = -1;
expiredDailyQualityChange = -2;
updateQuality() {
if (this.quality <= this.minQuality || this.quality >= this.maxQuality) {
return;
}
if (this.sellIn >= 0) {
this.... |
import {
AfterContentInit,
ChangeDetectorRef,
EventEmitter,
HostBinding,
Output,
QueryList
} from '@angular/core';
import { ProcessflowStep, ProcessflowStepBase } from './processflow-step-base';
export abstract class ProcessflowBase<TProcessflowStepComponent extends ProcessflowStepBase>
implements After... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import { EndOfLine, Position, Range, TextDocument, TextDocumentContentChangeEvent, TextLine, Uri } from 'vscode';
import {
DefaultWordPattern,
ensureValidWordDefinition,
getWordAtText,
regExpLe... |
export function injectStyles(
shadowRootElement: HTMLElement,
insertBeforeSelector: string,
styles: string
) {
const root = shadowRootElement.shadowRoot;
let styleAlreadyAdded = false;
const currentStyleTags = Array.from(root.querySelectorAll('style'));
currentStyleTags.forEach((element: HTMLStyleElement,... |
// THIS FILE IS AUTO GENERATED
import { IconTree, IconType } from '../lib'
export declare const SiAmazonfiretv: IconType; |
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class NgsgClassService {
private SELECTED_DEFAULT_CLASS = 'ng-sg-selected';
private PLACEHOLDER_DEFAULT_CLASS = 'ng-sg-placeholder';
private DROPPED_DEFAULT_CLASS = 'ng-sg-dropped';
private ACTIVE_DEFAULT_CLASS = 'ng-sg-ac... |
/**
* Database Service API
* The API for the Database Service. Use this API to manage resources such as databases and DB Systems. For more information, see [Overview of the Database Service](/iaas/Content/Database/Concepts/databaseoverview.htm).
* OpenAPI spec version: 20160918
* Contact: sic_dbaas_cp_us_grp@oracl... |
/**
* @param array - The array to flatten.
* Recursively flattens array.
*/
export const flattenDeep = (array: any[]) => {
if (!Array.isArray(array)) {
return null;
}
const deepFlattenedArr = [];
(function _flattenDeep(arr) {
for (let i = 0, arrLeng = arr.length; i < arrLeng; i++) {
const va... |
import JSBI from 'jsbi';
export declare type BigintIsh = JSBI | bigint | string;
export declare enum ChainId {
MAINNET = 1,
ROPSTEN = 3,
RINKEBY = 4,
GÖRLI = 5,
KOVAN = 42,
MATIC = 137,
MATIC_TESTNET = 80001,
FANTOM = 250,
FANTOM_TESTNET = 4002,
XDAI = 100,
XCHAIN = 35,
B... |
import { Controller, Get, Req } from '@nestjs/common';
import { Request } from 'express';
import { CrawlerService } from './crawler.service';
import shop from './shop.interface';
@Controller('utilization')
export class UtilizationController {
constructor(private readonly crawlerService: CrawlerService) {}
@Get()
... |
import { compose } from '@ngrx/store';
import {
PermissionStrings,
PermissionValues,
ScopeStrings,
} from '../../../../core/src/core/current-user-permissions.config';
import {
selectCurrentUserCFGlobalHasScopes,
selectCurrentUserRequestState,
selectCurrentUserRolesState,
} from '../../../../store/src/selec... |
import { Injectable } from '@nestjs/common';
import { LogEntity, LogRepository } from '@notifire/dal';
import { CreateLogCommand } from './create-log.command';
@Injectable()
export class CreateLog {
constructor(private logRepository: LogRepository) {}
async execute(command: CreateLogCommand): Promise<LogEntity> {... |
import { GeneralSteps, Logger, Pipeline, Step } from '@ephox/agar';
import { TinyApis, TinyLoader } from '@ephox/mcagar';
import { Hierarchy, Element } from '@ephox/sugar';
import Theme from 'tinymce/themes/silver/Theme';
import { UnitTest } from '@ephox/bedrock';
UnitTest.asynctest('browser.tinymce.core.dom.ControlSe... |
import { Injectable } from '@angular/core';
import {ServerResponse} from '../interfaces/serverResponse'
import {HttpOptions} from '../interfaces/httpOptions'
import {HttpClient} from '@angular/common/http'
import { mergeMap } from 'rxjs/operators';
import { of as observableOf, throwError as observableThrowError, Observ... |
import { state, animate, style, transition, keyframes } from '@angular/animations';
export const zoomIn = [
// Idle states
state('idle-zoomIn', style({ opacity: 0 }) ),
state('idle-zoomInDown', style({ opacity: 0 }) ),
state('idle-zoomInLeft', style({ opacity: 0 }) ),
state('idle-zoomInUp', style({ opacity:... |
import { Component, OnInit } from '@angular/core';
@Component({
selector: '<%= selector %>',
<% if(inlineTemplate) { %>template: `
<div class="icon-wrapper test-class">
<i nz-icon type="frown" [class.icon-highlight]="preHighLight"></i>
<nz-slider [nzMin]="0" [nzMax]="20" [(ngModel)]="sliderValue"><... |
import JSBI from 'jsbi'
// exports for external consumption
export type BigintIsh = JSBI | bigint | string
export enum ChainId {
MAINNET = 1,
ROPSTEN = 3,
RINKEBY = 4,
GÖRLI = 5,
KOVAN = 42,
HECOMAIN = 128,
HECOTEST = 256,
BIANMAIN = 56,
BIANTEST = 97,
OKTEST = 65,
KTOTEST = 8285,
}
export enum... |
import { Container, Option, Radio } from './styles'
type Props<T extends string> = {
options: { label?: string; value: T }[]
selected: T
onSelected: (selected: T) => void
}
export function RowFilters<T extends string>(props: Props<T>) {
return (
<Container>
{props.options.map((option, index) => (
... |
/**
* @license
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/IDuxFE/idux/blob/main/LICENSE
*/
import { type VNodeTypes, computed, defineComponent, inject } from 'vue'
import { ɵEmpty } from '@idux/components/_private/empty'
import {... |
import { hasPropertyAsType, isNumber, isString } from "../utils/TypeUtils";
export interface RankingEntry {
readonly count: number;
readonly user_id: string;
}
export const isRankingEntry = (obj: unknown): obj is RankingEntry =>
hasPropertyAsType(obj, "count", isNumber) &&
hasPropertyAsType(obj, "user_id", is... |
export { default as SelectionKeyHandler } from './SelectionKeyHandler';
export { default as TreeKeyHandler } from './TreeKeyHandler';
export { default as EditKeyHandler } from './EditKeyHandler';
export { default as PasteKeyHandler } from './PasteKeyHandler'; |
import { useMemo, useState, useRef, useCallback } from 'react';
export interface DropAreaState {
isHovering: boolean;
}
export interface DropProps {
onDragOver: React.DragEventHandler;
onDragEnter: React.DragEventHandler;
onDragLeave: React.DragEventHandler;
onDrop: React.DragEventHandler;
onPaste: React.... |
import {Component} from '@angular/core';
import {NgbDropdownConfig} from '@ag-bootstrap/ag-bootstrap';
@Component({
selector: 'ngbd-dropdown-config',
templateUrl: './dropdown-config.html',
providers: [NgbDropdownConfig] // add NgbDropdownConfig to the component providers
})
export class NgbdDropdownConfig {
co... |
import { INavData } from '@coreui/angular';
export const navItems: INavData[] = [
{
name: 'Dashboard',
url: '/dashboard',
icon: 'icon-speedometer',
badge: {
variant: 'info',
text: 'NEW'
}
},
{
title: true,
name: 'Main',
},
{
title: true,
name: 'Extras',
},
... |
// eslint-disable-next-line no-use-before-define
import styled from 'styled-components'
import { typeShared } from './Typography'
const Select = styled.select`
${typeShared}
padding: 10px 25px 10px 10px;
border-radius: 5px;
background: ${props => props.theme.modalBackground};
color: ${props => props.theme.p}... |
// https://github.com/serverless/examples/tree/master/aws-node-auth0-cognito-custom-authorizers-api
// https://github.com/awslabs/aws-apigateway-lambda-authorizer-blueprints/blob/master/blueprints/nodejs/index.js
import jwk from "jsonwebtoken";
import request from "request";
import jwkToPem from "jwk-to-pem";
const re... |
import React, { useEffect } from 'react';
import { Router } from 'react-router-dom';
import { history } from '@helpers/history.helper';
import RolePopUp from '@components/RolePopUp';
import ConfirmEmailMessage from '@components/EmailConfirmation';
import Routing from '../Routing';
import { IAppState } from '@models/App... |
// ------------------------------------------------------------------------------
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//
// NOTICE: You are permitted to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
// --------------------... |
import { shallowMount } from '@vue/test-utils'
import LImage from '../../src/components/LImage'
import { componentsDefaultProps } from '../../src/defaultProps'
describe('LImage.vue', () => {
it('default LImage render', () => {
const srcPath = 'test.jpg'
const props = {
...componentsDefaultProps['l-image... |
import { Dropdown, Icons, Menu, useTranslate, useUpdate } from "@pankod/refine";
import { IOrder } from "interfaces";
type OrderActionProps = {
record: IOrder;
};
export const OrderActions: React.FC<OrderActionProps> = ({ record }) => {
const t = useTranslate();
const { mutate } = useUpdate();
const ... |
import * as React from 'react';
import Dropdown, {
DropdownProps,
DropdownToggle,
DropdownToggleProps,
DropdownMenuProps,
DropdownMenu
} from '@trendmicro/react-dropdown';
export const StyledDropdown: React.SFC<DropdownProps> = (props) => {
return (
<Dropdown
style={{ border... |
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Any modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/
/*
* Licensed to Ela... |
import * as React from 'react';
import { useDialog_unstable } from './useDialog';
import { renderDialog_unstable } from './renderDialog';
import { useDialogStyles_unstable } from './useDialogStyles';
import type { DialogProps } from './Dialog.types';
import type { ForwardRefComponent } from '@fluentui/react-utilities';... |
import { StarApi } from "../api-wrappers";
import { IStarredPackageResponse } from "../interfaces/api-reponses/istarred-packages.response";
export class Star {
constructor(
private _starApi: StarApi
) { }
/**
* Stars a package
* @param packageName The package name
*/
public asyn... |
import del from 'del';
import makeDir = require('make-dir');
import { ValidConfigOptions } from '../options/options';
import { maybeSetupRepo } from './maybeSetupRepo';
describe('maybeSetupRepo', () => {
it('should delete repo if an error occurs', async () => {
expect.assertions(2);
((makeDir as any) as jest... |
import { ChirpsDispatchTypes, CHIRPS_FAIL, CHIRPS_LOADING, CHIRPS_SUCCESS, UserChirpsType } from "../../actions/UserChirpsActionTypes";
interface DefaultStateI{
loading: boolean,
chirps?: UserChirpsType
}
const defaultState: DefaultStateI = {
loading: false
};
const UserChirpsReducer = (state: DefaultSta... |
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="id">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="14"/>
<source>About HealthyWorm</source>
<translation>Tentang HealthyWo... |
import { Client } from '../models/client.ts'
import { Channel } from '../structures/channel.ts'
import { ChannelPayload, GuildChannelPayload } from '../types/channel.ts'
import { CHANNEL } from '../types/endpoint.ts'
import getChannelByType from '../utils/getChannelByType.ts'
import { BaseManager } from './base.ts'
ex... |
import React, { CSSProperties, forwardRef } from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import { CPopoverProps } from './CPopover'
import { PopperChildrenProps } from 'react-popper'
interface CPopoverContentProps
extends Omit<CPopoverProps, 'placement' | 'children' | 'trigger'... |
import * as fs from 'fs';
import * as readline from 'readline';
import { EnvUtil, FileCache } from '@travetto/boot';
import { ScanFs, Env, Shutdown } from '@travetto/base';
const DEFAULT_TIMEOUT = EnvUtil.getInt('DEFAULT_TIMEOUT', 5000);
export class TestUtil {
static TIMEOUT = Symbol('timeout');
static registe... |
import * as React from 'react';
import { PostProps } from '../contentStream/ContentStreamItem';
import { TextSize, TextSizes } from '../Text';
import styled, { css } from '../../styled';
import { FlexContainer, FlexContainerProps } from '../../styled/shared/containers';
import { MemberAvatar } from '../user/MemberAvata... |
import type * as d from '../declarations';
import type { ServerResponse } from 'http';
import { responseHeaders } from './dev-server-utils';
export async function serveDevNodeModule(serverCtx: d.DevServerContext, req: d.HttpRequest, res: ServerResponse) {
try {
const results = await serverCtx.getCompilerRequest(... |
/**
* Copyright 2019 OpenCensus Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ... |
export { Strawberry24 as default } from "../"; |
/* eslint-disable react-hooks/rules-of-hooks */
import * as React from 'react';
import {
createStyles,
withStyles,
createMuiTheme,
Theme,
withTheme,
StyleRulesCallback,
WithStyles,
WithTheme,
makeStyles,
styled,
} from '@material-ui/core/styles';
import { ThemeProvider } from '@material-ui/styles';
... |
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
import {
crypto as wasmCrypto,
DigestAlgorithm as WasmDigestAlgorithm,
digestAlgorithms as wasmDigestAlgorithms,
} from "../_wasm_crypto/mod.ts";
/**
* A copy of the global WebCrypto interface, with methods bound so they're
* safe to re... |
// tslint:disable:max-classes-per-file
import Pipe from 'buffer-pipe';
import { Buffer } from 'buffer/';
import { Principal as PrincipalId } from '@dfinity/principal';
import { BinaryBlob, blobFromBuffer, JsonValue } from './types';
import { idlLabelToId } from './utils/hash';
import { lebDecode, lebEncode, safeRead, s... |
import { Mark, Node } from "prosemirror-model";
export declare class MarkdownSerializerState {
marks: any;
out: any;
nodes: any;
delim: string;
closed: false | Node;
inTightList: boolean;
options: any;
constructor(nodes: any, marks: any, options: any);
flushClose(size?: number): void... |
import { TransactionReceipt, TransactionResponse } from "@ethersproject/abstract-provider";
import { WithdrawCommitmentJson } from "./transferDefinitions/withdraw";
import { FullChannelState, ChannelCommitmentData, FullTransferState } from "./channel";
import { Address } from "./basic";
import { ChannelDispute, Transf... |
import { Directive, Input, TemplateRef, ViewContainerRef } from "@angular/core";
@Directive({
selector: "[appUnless]"
})
export class UnlessDirective {
// This Directive will work opposite to "if"
// the property name here or the function name should be same as selector
@Input()
set appUnless(condition: bool... |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {InjectionToken, ɵɵInjectorDef, ɵɵngDeclareInjector} from '@angular/core';
describe('Injector declaration jit... |
import jwt_decode from 'jwt-decode';
export class JwtHelper {
static getDecodedAccessToken(token: string): any {
try{
return jwt_decode(token);
}
catch(Error){
return null;
}
}
} |
const mockDevice = {
readPin: jest.fn(() => { return Promise.resolve(); })
};
jest.mock("../../../device", () => ({
getDevice: () => (mockDevice)
}));
import * as React from "react";
import { mount } from "enzyme";
import { SensorList } from "../sensor_list";
import { Pins } from "farmbot/dist";
import { fakeSenso... |
import { Request, Response, NextFunction } from 'express';
import lang from '../config/lang';
import logger from '../utils/logger';
import LoggedInUser from '../domain/misc/LoggedInUser';
import ForbiddenError from '../exceptions/ForbiddenError';
import routeToScopeMap from '../resources/maps/routeToScopeMap';
const ... |
export default function Sun() {
return (
<svg width="24" height="24" fill="none" viewBox="0 0 24 24">
<title>Sun</title>
<circle
cx="12"
cy="12"
r="3.25"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="1.5"
/>
<path
stroke="currentColor"
... |
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
import { Directive } from '@angular/core';
@Directive({
selector: 'a[nz-dropdown]',
host: {
'[class.ant-dropdown-link]': 'true'
}
}... |
import * as vscode from "vscode";
export class Config
{
static get section(): vscode.WorkspaceConfiguration & TypedConfig
{
return vscode.workspace.getConfiguration("altervista-thesaurus");
}
}
interface TypedConfig
{
get(item: "key"): string | null;
get(item: "lang"): Language;
update(section: "key", value... |
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { Config } from '@jest/types';
import * as jestMatcherUtils from 'jest-matcher-utils';
import { INTE... |
import { CryptoKey } from "../crypto_key";
import { ProviderCrypto } from "../provider";
import { KeyUsages } from "../types";
export declare abstract class Pbkdf2Provider extends ProviderCrypto {
name: string;
hashAlgorithms: string[];
usages: KeyUsages;
checkAlgorithmParams(algorithm: Pbkdf2Params): v... |
import { Component, OnInit } from '@angular/core';
import { BsModalService } from 'ngx-bootstrap/modal';
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
import { CreateQueryTypeModalComponent } from '../create-query-type-modal/create-query-type-modal.component';
import { UserService } from '../se... |
export interface uac_redirect {
get_redirects(max_c:number, max_b:number):number;
get_redirects_acc(max_c:number, max_b:number, reason:string):number;
get_redirects_all():number;
} |
import {createStyles, Theme} from '@material-ui/core';
const SomethingWentWrongStyles = ({spacing, palette} : Theme) => createStyles({
background: {
height: '100vh',
width: '100%',
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
background: `#f9f... |
import express from 'express';
import cors from 'cors';
import { errors } from 'celebrate';
import routes from './routes';
class App {
server: express.Application;
constructor() {
this.server = express();
this.middleware();
this.routes();
this.handleErros();
}
private middleware() {
thi... |
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import * as Common from '../../core/common/common.js';
import * as i18n from '../../core/i18n/i18n.js';
import * as Root from '../../core/root/root.js';
i... |
import { Content } from 'ionic-angular';
import { Directive, ElementRef, Input, Renderer2, SimpleChanges } from '@angular/core';
@Directive({
selector: '[scrollHide]'
})
export class ScrollHideDirective {
@Input('scrollHide') config: ScrollHideConfig;
@Input('scrollContent') scrollContent: Content;
... |
import React, { useState } from 'react'
import styled from 'styled-components'
import {
BlockIcon,
Box,
CheckmarkCircleIcon,
Flex,
MedalBronzeIcon,
MedalGoldIcon,
MedalPurpleIcon,
MedalSilverIcon,
MedalTealIcon,
CrownIcon,
Tab,
TabMenu,
Text,
TeamPlayerIcon,
TrophyGoldIcon,
} from '@pancak... |
/**
* @license
* Copyright 2017 JBoss Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.