text stringlengths 10 953k |
|---|
import { BehaviorSubject, Observable, EMPTY } from 'rxjs';
import { filter } from 'rxjs/operators';
export class BehaviorCache {
cacheMap = new Map<string, BehaviorSubject<any>>();
set(key: string, value: any) {
if(!this.cacheMap.has(key)) {
this.cacheMap.set(key, new BehaviorSubject(value));
} else... |
import { Head, Html, Main, NextScript } from 'next/document';
import { ReactNode } from 'react';
const Document = (): ReactNode => (
<Html lang="en">
<Head>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
<l... |
/// <reference path="../../../typings/index.d.ts" />
import resolvePeers from '@pnpm/resolve-dependencies/lib/resolvePeers'
test('resolve peer dependencies of cyclic dependencies', () => {
const fooPkg = {
name: 'foo',
depPath: 'foo/1.0.0',
version: '1.0.0',
peerDependencies: {
qar: '1.0.0',
... |
import { Location } from '../Model/InternalModel';
export declare function areLocationsEqual(location1: Location, location2?: Location): boolean; |
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EmptyEventsSecondPage } from './empty-events-second.page';
describe('EmptyEventsSecondPage', () => {
let component: EmptyEventsSecondPage;
let fixture: ComponentFixture<EmptyE... |
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { MainContentComponent } from './main-content/main-content.component';
import { MainContentVideoComponent } from './main-content-video/main-content-video.component';
const appRoutes: Routes = [
{
... |
import { DMMF as PrismaDMMF } from '@prisma/client/runtime/dmmf-types';
import { generateCode } from '../generator/generate-code';
export const generate = async (
dmmfJSONPath: string,
outputTSFilePath: string
) => {
console.log('Loading datamodel...');
const dmmf = require(dmmfJSONPath) as PrismaDMMF.Documen... |
import events from 'events';
import Logger from 'color-logger';
import sqlite3 from 'sqlite3';
import Config from '../Config';
const EVENT_NAMES = {
EXEC_DONE: 'exec_done'
};
export class DB {
private _sqlite: sqlite3.Database;
private _eventEmitter: events.EventEmitter;
private readonly _callbacks: {[k: numb... |
// Copyright 2017-2019 @polkadot/app-explorer authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { withTranslation } from 'react-i18next';
export default withTranslation(['app-treasury']); |
export type GrantType = "authorization_code" | "client_credentials" | "implicit" | "refresh_token" | "password";
export type Client = { id: string };
export type UserObject = { id: string };
export type GetClient = {
id: string;
redirectUris: string[];
grants: GrantType[];
};
export type GetAccessToken = {
accessT... |
import React from 'react';
import { Variant } from '@newrade/core-design-system';
import { Tag } from '../tag/tag';
import { TagCompProps } from '../tag/tag.props';
type Props = {
tagText?: string;
tagProps?: TagCompProps;
};
export const NavbarLogoTagItem: React.FC<Props> = ({ tagText, tagProps }) => {
retur... |
import fs from 'fs'
import { remove } from 'fs-extra'
import logSymbols from 'log-symbols'
import path from 'path'
import { promisify } from 'util'
import { ResourceVersion } from '../types'
import { DefinitionBuilder } from './buildDocJson'
import { antdComponentMap, antdComponentMapV4 } from './componentMap'
import ... |
import { Request } from 'express-serve-static-core'
declare module 'express-serve-static-core' {
export interface Request {
rawBody: Buffer
}
} |
import { DFUSE_API_KEY, runMain, prettifyJson, DFUSE_API_NETWORK } from "../../config"
import { createDfuseClient } from "@dfuse/client"
async function main(): Promise<void> {
const client = createDfuseClient({ apiKey: DFUSE_API_KEY, network: DFUSE_API_NETWORK })
try {
const response = await client.stateTable... |
export const SERVICE_IGNORES = "__AJANUW_RXSERVICE_IGNORES__";
export const SERVICE_LATE = "__AJANUW_RXSERVICE_LATE__";
export const SERVICE_WATCH = "__AJANUW_RXSERVICE_WATCH__";
export const SERVICE_AUTO_WATCH = "__AJANUW_RXSERVICE_AUTO_WATCH__";
export const SERVICE_CONFIG = "__AJANUW_RXSERVICE_CONFIG__";
export cons... |
export { CommandTransform } from './command'
export { ITransform } from './definition'
export { MessageTransform } from './message'
export { OriginTransform, OriginPermission } from './origin'
export { PrefixTransform } from './prefix'
export { PlainTransform } from './plain'
export { allOf, someOf } from './util' |
import React, { FC, useCallback } from 'react';
import gql from 'graphql-tag';
import { useQuery } from 'urql';
import { Error, Loading, Todo } from './components';
interface QueryResponse {
todos: Array<{
id: number;
text: string;
}>;
}
export const Home: FC = () => {
const [res, executeQuery] = useQue... |
import { StringUtil } from "@gelight/reliabletxt";
import WsvDocument from "./WsvDocument";
import WsvLine from "./WsvLine";
import WsvParserCharIterator from "./WsvParserCharIterator";
import WsvParserException from "./WsvParserException";
export default class WsvParser {
public static parseLine(content: string)... |
/*
* @Description: The target plate of a transfe request in test version mainly for testing the drag and drop plate model. It is not used for now.
* @Author: Guozhi Tang
* @Date: 2019-04-22 14:00:28
* @Github: https://github.com/GuozhiTang/Bio-WebApp
* @LastEditors: Guozhi Tang
* @LastEditTime: 2019-08-30 15:22:1... |
/**
* @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
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
import type { ValidatorFn, ValidatorOptions } from '@idux/cdk/forms'
import type { ... |
import { createServer } from "https";
import { readFileSync } from "fs";
import { join } from "path";
const options = {
key: readFileSync(join(__dirname, "support/server-key.pem")),
cert: readFileSync(join(__dirname, "support/server-crt.pem")),
ca: readFileSync(join(__dirname, "support/ca-crt.pem")),
};
export ... |
<TS language="da" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Højreklik for at redigere adresse eller mærkat</translation>
</message>
<message>
<source>Create a new address</source>
<tr... |
import IParseMailTemplateDTO from '@shared/container/providers/MailTemplateProvider/dtos/IParseMailTemplateDTO';
interface IMailContact {
name: string;
email: string;
}
export default interface ISendMailDTO {
to: IMailContact;
from?: IMailContact;
subject: string;
templateData: IParseMailTempl... |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="he" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About T-Coin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+... |
/*
* Copyright 2018 Hitachi America, Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*/
import { HashValueType, ResultCode, ResultPredicate } from "../common";
import { correctBlocks, MockBlock, MockSource } from "../mock/mock-block";
import { BlockProvider } from "../provider";
import { ResultSet } from "../result-s... |
import { GetResolverRuleAssociationInput } from "../shapes/GetResolverRuleAssociationInput";
import { GetResolverRuleAssociationOutput } from "../shapes/GetResolverRuleAssociationOutput";
import { ResourceNotFoundException } from "../shapes/ResourceNotFoundException";
import { InvalidParameterException } from "../shape... |
import { flush, render } from '@stencil/core/testing';
import { MdcButtonComponent } from './o-mdc-button';
describe('o-mdc-button', () => {
it('should build', () => {
expect(new MdcButtonComponent()).toBeTruthy();
});
}); |
import sendRequest from "./send";
import acceptRequest from "./accept";
export { sendRequest, acceptRequest }; |
import * as CanvasJS from './canvasjs.min';
import { ProjectsService } from 'src/app/services/projects.service';
import { max } from 'rxjs/operators';
import { Component, ViewChild, ElementRef, OnInit } from '@angular/core';
@Component({
selector: 'app-stategraph',
templateUrl: './stategraph.component.html',
sty... |
/* tslint:disable */
/* eslint-disable */
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: unversioned
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.te... |
import * as fs from 'fs';
import { Storage, ADAPTERS } from '../../src';
const dbFile = './tests_results/tmp.txt';
let storage: Storage;
describe('Test FileAdapter', () => {
beforeEach(() => {
storage = new Storage('', new ADAPTERS.FileAdapter(dbFile));
});
afterEach(() => {
fs.unlinkSync... |
import { Mesh } from 'three'
import { createMappedComponent } from '../../ecs/functions/ComponentFunctions'
export type AvatarPendingComponentType = {
light: Mesh
plate: Mesh
}
export const AvatarPendingComponent = createMappedComponent<AvatarPendingComponentType>('AvatarPendingComponent') |
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/en/configuration.html
*/
export default {
// All imported modules in your tests should be mocked automatically
// automock: false,
// Stop running tests after `n` failures
bail: true,
//... |
import { assert } from "chai";
import { Utility } from "tests/utility";
import { PositionOffset } from "./position-offset";
describe("PositionOffset", () => {
describe("#constructor()", () => {
it("should create a element with correct root key", () => {
const newJson = Utility.jsonify(new Pos... |
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
import { FoodListComponent } from './food-list.component';
import { NewFoodComponent } from './new-food.component';
import { ... |
import { Extension, MathUtils, ReaderContext, WriterContext, vec3 } from '@gltf-transform/core';
import { KHR_LIGHTS_PUNCTUAL } from '../constants';
import { Light } from './light';
const NAME = KHR_LIGHTS_PUNCTUAL;
interface LightsPunctualRootDef {
lights?: LightDef[];
}
interface LightsPunctualNodeDef {
light: n... |
import constants from "../utils/constants";
import { RequestStatus } from "../utils/enums/RequestStatus";
import { Action } from "../utils/types/Action";
import { Attachment } from "../utils/types/Attachment";
export type AttachmentsReducerState = {
list: Attachment[];
fetchRequestStatus: RequestStatus;
};
const ... |
import express, { Request, Response } from 'express';
import path from 'path';
class App {
public express: any;
constructor() {
// Create a new express application instance
this.express = express();
this.config();
this.mountRoutes();
}
private config(): void {
// Configure Express to use... |
/*
* Copyright The OpenTelemetry 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... |
import { Injectable } from '@angular/core';
import { IMovie } from './movie';
@Injectable()
export class MovieService {
getMovies(): IMovie[] {
return [
{
hero: 'Celeritas',
imageurl: 'assets/images/hero.png',
movieId: 1,
mpaa: 'pg-13',
releaseDate: '2015-12-19T00:0... |
import { UpperCasePipe } from './uppercase.pipe';
describe('UppercasePipe', () => {
it('create an instance', () => {
const pipe = new UpperCasePipe();
expect(pipe).toBeTruthy();
});
}); |
import express from "express";
import bodyParser from "body-parser";
import {FilteredError, Sponsorship} from "./sponsorship";
import {Config, FullSponsor} from "./config";
import expressWinston from "express-winston";
import winston from "winston";
const ecc = require('eosjs-ecc');
const createApp = async (config: C... |
const c_badge_BackgroundColor: {"name": "--pf-c-badge--BackgroundColor"; "value": "#06c"; "var": "var(--pf-c-badge--BackgroundColor)";}
export default c_badge_BackgroundColor |
import { Component } from "@angular/core";
import { ActivatedRoute, Router } from "@angular/router";
import { RemoteService } from "../../_services/remote.service";
import { Task, Field, TaskStatus } from "../../_models/Task";
import { AuthenticationService } from "../../_services/authentication.service";
import { Aler... |
import { Component, OnInit } from '@angular/core';
import { IListOperateData, ListOperateData } from './listoperatedata';
import { ListOperateDatabase, ListOperateDataSource } from './listdatasource';
import { SequenceList, LinkList } from 'actslib';
@Component({
selector: 'demoapp-list-demo',
templateUrl: './list... |
import {
checkOnMountAndUnmountEvents,
checkOnStartEvents,
checkOnStopEvents
} from '@src/helpers/test'
import { useIdle, idleEventsList } from '@src/vue-use-kit'
afterEach(() => {
jest.clearAllMocks()
})
const testComponent = () => ({
template: `
<div>
<div id="isIdle" v-if="isIdle"></div>
... |
import React from 'react'
import { connect, ConnectedProps } from 'react-redux'
import styled from 'styled-components'
import { disableAnalyticsCookies } from './../../reducers/visitorReducer'
import T from '../../utils/translator/Translator'
const SmallText = styled.div`
font-size: 12px;
`
const DisableGaWrapper = ... |
export interface Faction {
Category: string;
Name: string;
Tier: number;
Hold: string;
Description: string;
Allies: string[];
Enemies: string[];
} |
export function filter <In, Out extends In> (iterable: Iterable<In>, match: (input: In) => input is Out): Out[] {
const iterator = iterable[Symbol.iterator]()
const result: Out[] = []
while (true) {
const next = iterator.next()
if (next.done === true) {
break
}
if (match(next.value)) {
... |
import { assert } from 'chai';
import nock from 'nock';
import { BacktraceClient } from '../source';
import { BacktraceClientOptions } from '../source/model/backtraceClientOptions';
import { IBacktraceData } from '../source/model/backtraceData';
import { BacktraceReport } from '../source/model/backtraceReport';
import ... |
/* eslint-disable */
/**
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* updated at 2021-12-12 15:52:27
* */
import { TdCheckboxProps } from './type';
import { PropType } from 'vue';
export default {
/** 用于标识是否为「全选选项」。单独使用无效,需在 CheckboxGroup 中使用 */
checkAll: Boolean,
/** 是否选中 */
checked: Boolean,
/** 是否选中,非受控属性 */
... |
describe('Transition events', () => {
it('basic transitionrun', (done) => {
const container1 = document.createElement('div');
document.body.appendChild(container1);
container1.addEventListener('transitionrun', async () => {
done();
});
setElementStyle(container1, {
position: 'absolute'... |
import { globalPresenceMessage } from '../globalPresenceMessage'
import { userHeartbeatReceived } from '../heartbeat'
import { roomData } from '../rooms'
import setUpRoomsForUser from '../setUpRoomsForUser'
import { RoomResponse } from '../types'
import { User, isMod, minimizeUser } from '../user'
import { Authenticate... |
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonicModule } from '@ionic/angular';
import { AppInfoPageRoutingModule } from './app-info-routing.module';
import { AppInfoPage } from './app-info.page';
@NgModule({
imp... |
import {Component} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import 'rxjs/add/operator/do';
@Component({
selector: 'product',
template: `<h3 class="product">Details for product id {{productID}}</h3>`,
styles: ['.product {background: cyan; width: 200px;} ']
})
export class ProductDetai... |
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
import { EuiButton, EuiContextMenuItem, EuiPopover } from '@elastic/eui';
import React, { useContext, useState } from 'react';
import { SERVER_DELAY } from '../../../../common';
import { ChannelItemType } from '../../../../models/interf... |
import { ITrackerOptions } from "./monitor";
import { TrackerEvents, BaseError, ErrorType } from "../types/index";
import { myEmitter } from "./event";
import ErrorStackParser from "error-stack-parser";
import stringify from "json-stringify-safe";
import {
BaseObserver,
IError,
IUnHandleRejectionError
} from "./b... |
/*! Copyright (c) 2020, XAPPmedia */
/**
* Regex to detect ISO-8601 duration strings
*
* {@link https://stackoverflow.com/a/32045167}
*/
export const ISO_8601_DURATION = /^P(?!$)(\d+(?:\.\d+)?Y)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?W)?(\d+(?:\.\d+)?D)?(T(?=\d)(\d+(?:\.\d+)?H)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?S)?)?$/;
/*... |
declare module 'logojs-react'; |
export const version = "web/5.0.10"; |
import { Component, ViewChild } from '@angular/core';
import { Events, MenuController, Nav, Platform } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { Storage } from '@ionic/storage';
import { AboutPage } from '../pages/about/about';
import { AccountPage } from '../pages/a... |
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ReactiveFormsModule, FormBuilder } from '@angular/forms';
import { Router, ActivatedRoute } from '@angular/router';
import { InjectionToken } from '@angular/core';
import { of } from 'rxjs';
import { HttpClientModule } from '@angular/com... |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... |
// Game codes were taken from this file
// https://github.com/AuthenticGaming/AG.GameBase/blob/master/AG.GameBase.Core/Model/Game/GameType.cs
import { ValueOf } from '../typings';
export enum EGameTypeCode {
roulette,
blackjack,
swipeRouletteMobile,
swipeBlackjackMobile,
swipeGalaxyRushMobile,
bonusgameBla... |
/**
@license
Copyright 2019 Google Inc. All Rights Reserved.
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 agr... |
//
// DYNAMIC env variables
//
const DEFAULTS = {
AUTH_HOST: 'id.prx.org',
AUTH_CLIENT_ID: 'ea0e04f7c85a8d4826dcf2747126a53a95014f51',
CASTLE_HOST: 'castle.prx.org',
CASTLE_TTL: 1, // 1 second
GA_KEY: '',
GOOGLE_API_KEY: '',
GOOGLE_CLIENT_ID: ''
};
const addScheme = (name: string, value: any): any => {
... |
/// <reference path="jqwidgets.d.ts" />
import {Component, Input, Output, EventEmitter, ElementRef, forwardRef} from '@angular/core';
declare let $: any;
@Component({
selector: 'angularWindow',
template: '<div><ng-content></ng-content></div>'
})
export class jqxWindowComponent {
@Input('width') containerWi... |
import AppError from '@shared/errors/AppError';
import FakeHashProvider from '../providers/HashProvider/fakes/FakeHashProvider';
import FakeUsersRepository from '../repositories/fakes/FakeUsersRepository';
import UpdateProfileService from './UpdateProfileService';
let fakeUsersRepository: FakeUsersRepository;
let fak... |
import { Fragment } from 'react'
import Avatar from '@material-ui/core/Avatar'
import Typography from '@material-ui/core/Typography'
import './style.scss'
export default function LetterAvatars() {
return (
<Fragment>
<Typography variant="body1" color="inherit">
Shaw
</Typography>
<div c... |
export * from '@styled-icons/fa-solid/GrinWink' |
import { Component, OnInit, OnDestroy} from '@angular/core';
import {NgForm} from '@angular/forms';
import { DataService } from '../services/data.service';
import { Subscription } from 'rxjs';
@Component({
selector: 'app-host-multi-select',
templateUrl: './host-multi-select.component.html',
styleUrls: ['./host-m... |
interface CurrentTime {
timestamp: number
}; |
import { Injectable, InternalServerErrorException } from '@nestjs/common'
import {PassportStrategy} from '@nestjs/passport'
import {Strategy} from 'passport-local'
import { AuthService } from './auth.service'
@Injectable()
export class LocalStrategy extends PassportStrategy(Strategy){
constructor(private authService: A... |
import { Module } from '@nestjs/common';
import { HttpModule } from '@nestjs/axios';
import { StoresModule } from 'src/stores/stores.module';
import { ParserService } from './parser.service';
import { ParserController } from './parser.controller';
import { ParserConsumer } from './parser.consumer';
@Module({
imports... |
import { useCallback, useReducer, useEffect } from 'react';
import { stringify } from 'qs';
import { useFlexgetStream } from 'core/api';
import { camelize } from 'utils/fetch';
import { LogMessage, Options } from './types';
export const useLogStream = (options: Options) => {
const queryString = stringify(options);
... |
import React from 'react'
import ReactPDF from '@react-pdf/renderer'
import Resume from '../Resume'
import createPDF from '../createPDF'
jest.mock('react', () => ({ createElement: jest.fn() }))
jest.mock('@react-pdf/renderer', () => ({ render: jest.fn() }))
jest.mock('../Resume', () => 'Resume')
const renderMock = R... |
import { JsonLdContextNormalized } from "jsonld-context-parser";
/**
* A tree structure that holds all contexts,
* based on their position in the JSON object.
*
* Positions are identified by a path of keys.
*/
export declare class ContextTree {
private readonly subTrees;
private context;
getContext(key... |
import { TestBed, async } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
... |
import {
apply,
applyTemplates,
chain,
mergeWith,
move,
Rule,
url,
} from '@angular-devkit/schematics';
import {
addProjectToNxJsonInTree,
names,
offsetFromRoot,
projectRootDir,
ProjectType,
toFileName,
updateWorkspace,
} from '@nrwl/workspace';
import { snakeCase } from 'change-case';
im... |
import { lifecycleLogger } from '@pnpm/core-loggers'
import { DependencyManifest, ProjectManifest } from '@pnpm/types'
import lifecycle = require('@zkochan/npm-lifecycle')
function noop () {} // eslint-disable-line:no-empty
export interface RunLifecycleHookOptions {
args?: string[]
depPath: string
extraBinPaths... |
// fontawesome/svgs/brands/vnv.svg
import { createSvgIcon } from './createSvgIcon';
export const SvgVnv = createSvgIcon(
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512">
<!--! Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: C... |
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ----------------------------------------------------------------... |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ca" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About TSC</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+39"... |
import React, { useState } from 'react';
import { Alert } from '@material-ui/lab';
import { Button, Grid, Paper, Snackbar, TextField, Typography, Grow } from '@material-ui/core';
import { emailInterviewee } from '../../actions/interview';
import { useAppDispatch } from '../../Hooks/reduxHooks';
import { useStyles } fr... |
import React from 'react'
function ThumbsUp({ solid, formattedClassName }: { solid: boolean; formattedClassName: string }) {
if (solid) {
return (
<svg className={`${formattedClassName}`} fill="currentColor" viewBox="0 0 20 20" xmlns="https://www.w3.org/2000/svg">
<path d="M2 10.5a1.5 1.5 0 113 0v6... |
import {OptionsWithUri} from "request";
import Config from "../config/model/config";
import rp from "request-promise-native";
import getConfig from "../config/config-getter";
let config: Config | null = null;
let enableRequest: boolean = true;
export default async function asanaRequest<ResponseType>(options: OptionsW... |
import { Easing } from "../easing/types";
export interface Animation<V> {
next: (t: number) => {
value: V;
done: boolean;
};
flipTarget: () => void;
}
export interface AnimationState<V> {
value: V;
done: boolean;
}
export interface PlaybackControls {
stop: () => void;
}
declare t... |
import { CheckStatus, Code, User } from '../../share/model';
import { ManageComponent } from '../manage.component';
import { Component, OnInit } from '@angular/core';
import * as addDays from 'date-fns/add_days';
import * as getISOWeek from 'date-fns/get_iso_week';
@Component({
selector: 'app-manage-check',
templa... |
import { ContractKit, newKitFromWeb3 } from '@celo/contractkit'
import { CeloProvider } from '@celo/contractkit/lib/providers/celo-provider'
import { Command, flags } from '@oclif/command'
import { ParserOutput } from '@oclif/parser/lib/parse'
import Web3 from 'web3'
import { getNodeUrl } from './utils/config'
import {... |
import { Parser } from '~/api';
import RequestService from './request';
interface UpdateAllocation {
id: number;
primary: boolean;
}
class AllocationsService {
getAll(req: PaginatableRequest): Promise<ListResponse> {
return RequestService.get('/servers/:server/allocations', req).then(Parser.parse... |
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { routing } from './chaincode-sample.routing';
import { SharedModule } from '../../shared/shared.module';
import { ChaincodeSampleComponent } from './chaincode-sample.component';
import { NgxPaginationModule } from 'ngx-pag... |
/**
* title: 顶部公告
* desc: 设置 `banner = true`,可以当作顶部公告使用。
*/
import { Alert } from '@sensoro-design/react';
export default () => {
return (
<>
<Alert
banner
type="info"
showIcon
content="General text"
style={{ marginTop: 4, marginBottom: 20 }}
/>
<Alert... |
import { PermissionString } from 'discord.js';
import { VenomClient } from '../../structures/Client';
import fetch from 'node-fetch';
import { GuildMessage, HelpObj } from 'VenomBot';
export async function run (client: VenomClient, message: GuildMessage, args: string[]) {
const json = await fetch('https://icanhazdad... |
import { HttpStatus } from '@nestjs/common';
export interface HttpResponse<T> {
statusCode?: HttpStatus;
message?: string;
data: T;
} |
import { Document, Schema, Model, model } from 'mongoose';
import { IToken } from '../interfaces/iToken';
export interface ITokenModel extends IToken, Document {
toString(): string;
}
export let TokenModelSchema: Schema = new Schema(
{
token: { type: String, required: true },
},
{ timestamps: true }
);
T... |
import { createTheme, style } from '@vanilla-extract/css';
export const [themeClass, vars] = createTheme({
color: {
brand: 'hotpink',
accent: 'whitesmoke',
},
font: {
body: 'Roboto, sans-serif',
},
button: {
depth: '5px',
depress: '3px',
},
});
const base = style({ padding: 5 });
expo... |
export default async function loadScript(script_url: string, script_id: string): Promise<void> {
return new Promise((resolve, reject) => {
try {
const script = document.createElement('script');
script.id = script_id;
script.src = script_url;
script.onload = () => resolve();
document.... |
import NeDB from "nedb";
import nopt from "nopt";
import path from "path";
import { promises as fs } from "fs";
import { simpleLogger } from "../logging";
import { promisify } from "util";
import { PgDataStore } from "../datastore/postgres/PgDataStore";
import { IrcRoom } from "../models/IrcRoom";
import { MatrixRoom, ... |
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable, Observer } from 'rxjs';
import { map } from 'rxjs/operators';
@Injectable({
providedIn: 'root'
})
export class EmpService {
constructor(private httpClient: HttpClient) { }
private apiUrl = 'http:... |
export interface Partition {
description: string;
start: number;
end: number;
size:number;
hasFs: boolean;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.