text stringlengths 10 953k |
|---|
import "reflect-metadata";
import {closeTestingConnections, createTestingConnections, reloadTestingDatabases} from "../../utils/test-utils";
import {Connection} from "../../../src/connection/Connection";
import {ActivityEntity} from "./entity/ActivityEntity";
describe("github issues > #320 Bug in getManyAndCount", () ... |
import React, { createRef } from 'react'
import { Input, Row, Col} from 'antd'
import config, { env } from 'app/globalConfig'
// FIXME
const apiHost = `${location.origin}${config[env].host}`
const shareHost = `${location.origin}${config[env].shareHost}`
const styles = require('./SharePanel.less')
interface IShareFor... |
import { SsprService } from '../services/sspr.service';
import {Component, Inject} from 'ng-metadata/core';
@Component( {
selector: 'app-page3',
styles: [require( './page3.component.scss' )],
template: require( './page3.component.html' )
} )
export class PageThreeComponent {
private password: string;
... |
import { useThemeContext } from "~/hoc/theme/ThemeContext";
export const RippleReactions = ({
reactions,
}: {
reactions: {
emoji: any;
count: string;
selected: boolean;
}[];
}) => {
const { theme } = useThemeContext();
return (
<div className="flex items-center gap-1"... |
import {FieldOfViewMap} from '../src';
describe('field-of-view-map', () => {
it('body manipulation works', () => {
const map = new FieldOfViewMap(7, 7);
expect(map.getBody(0, 0)).toBe(false);
expect(map.getBody(1, 0)).toBe(false);
expect(map.getBody(0, 1)).toBe(false);
expec... |
import {
AbstractView, Component, ComponentClass,
ReactElement, ReactInstance, ClassType,
DOMElement, SFCElement, CElement,
ReactHTMLElement, DOMAttributes, SFC
} from 'react';
import * as ReactTestUtils from ".";
export interface OptionalEventProperties {
bubbles?: boolean;
cancelable?: boole... |
import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@aws-sdk/util-waiter";
import { ACMPCAClient } from "../ACMPCAClient";
import { GetCertificateCommand, GetCertificateCommandInput } from "../commands/GetCertificateCommand";
const checkState = async (client: ACMPCAClient, i... |
import { Account } from "./Account";
import { Session } from "../Session";
import {
loginResSuccess,
teacherAccount,
isTeacherAccount,
} from "ecoledirecte-api-types/v3";
import { getMainAccount, fetchPhoto } from "../functions";
export class Teacher extends Account {
public type: "teacher" = "teacher";
private ... |
/**
* Data Catalog API
* Use the Data Catalog APIs to collect, organize, find, access, understand, enrich, and activate technical, business, and operational metadata.
For more information, see [Data Catalog](https://docs.oracle.com/iaas/data-catalog/home.htm).
* OpenAPI spec version: 20190325
*
*
* NOTE: This c... |
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { LayoutModule } from '../shared/layout/layout.module';
import { SearchComponent } from './search.component';
import { FriendsModule } from '../../fri... |
import EError from 'eerror';
const TokenAlreadyUsedError = EError.prepare({
name: 'TokenAlreadyUsedError',
message: 'This token has already being used in this context',
});
export { TokenAlreadyUsedError }; |
/*
Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd.
http://www.cocos.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limited,
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
... |
import { useState } from "react";
import {
DotsHorizontalIcon,
EyeIcon,
PencilIcon,
TrashIcon,
BookmarkIcon,
} from "@heroicons/react/outline";
import { Menu, Transition } from "@headlessui/react";
import PostDeleteModal from "../../Modal/PostDeleteModal";
import PostEditModal from "../../Modal/PostEditModal"... |
import { tx as webTx, types } from "@algo-builder/web";
import { getApplicationAddress, makeAssetTransferTxnWithSuggestedParams, modelsv2 } from "algosdk";
import { AccountStore, getProgram, parseASADef, Runtime } from ".";
import { RUNTIME_ERRORS } from "./errors/errors-list";
import { RuntimeError } from "./errors/r... |
import fetcher from "config/swr";
import Movie from "shared/interfaces/general.interfaces";
import useSWR from "swr";
const YTS_API_URL = "https://yts.mx/api/v2/";
const DEFAULT_ENDPOINT = "list_movies";
interface Data {
data: {
movies?: Movie[];
movie?: Movie;
};
}
const serializeParams = (options: { [... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {WithStatement} from '@romejs/js-ast';
import Builder from '../../Builder';
import {Token, concat, space} from '../../token... |
import {
Component,
Input,
Output,
EventEmitter,
ChangeDetectionStrategy,
TemplateRef
} from '@angular/core';
import { formatLabel, escapeLabel } from '../common/label.helper';
import { ColorHelper } from '../common/color.helper';
@Component({
selector: 'g[ngx-charts-gauge-arc]',
template: `
<svg:g... |
import React from 'react';
import { mount } from 'enzyme';
import Textarea from '../textarea';
import { nativeEvent } from '../../../tests/utils';
describe('Textarea', () => {
it('should render correctly', () => {
const wrapper = mount(<Textarea placeholder="placeholder" />);
expect(wrapper.html()).toMatchSn... |
import { useState } from 'react'
import '../styles/tasklist.scss'
import { FiTrash, FiCheckSquare } from 'react-icons/fi'
interface Task {
id: number;
title: string;
isComplete: boolean;
}
export function TaskList() {
const [tasks, setTasks] = useState<Task[]>([]);
const [newTaskTitle, setNewTaskTitle] = ... |
import { Collection, Entity, ManyToOne, MikroORM, OneToMany, PrimaryKey, Property, wrap } from '@mikro-orm/core';
import { mockLogger } from '../helpers';
@Entity()
export class Ingredient {
@PrimaryKey()
id!: number;
@Property()
name!: string;
@OneToMany('RecipeIngredient', 'ingredient')
recipeIngredie... |
export interface IVehicleEvent {
date?: Date;
mileage?: number;
}
export const defaultValue: Readonly<IVehicleEvent> = {
date: new Date(),
mileage: 0
}; |
import {
StoryCommunity,
StoryCommunityCreation,
} from '@interfaces/story/storyCommunity';
import { Sequelize, DataTypes, Model } from 'sequelize';
export class StoryCommunityModel extends Model<
StoryCommunity,
StoryCommunityCreation
> {
public id!: number;
public contentId!: number;
publ... |
import { Injectable, UnauthorizedException } from "@nestjs/common";
import { PassportStrategy } from "@nestjs/passport";
import { InjectRepository } from "@nestjs/typeorm";
import { ExtractJwt, Strategy } from "passport-jwt";
import { User } from "./user.entity";
import { UserRepository } from "./user.repository";
impo... |
/**
* 3D Foundation Project
* Copyright 2019 Smithsonian Institution
*
* 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 requir... |
import { SERVICE_CONFIG } from '../symbols';
export type SerializableArguments = unknown[];
export type SerializableMethod = (...args: SerializableArguments) => void;
export type EnvironmentTypes = 'window' | 'iframe' | 'worker' | 'node' | 'context';
export interface Target {
name?: string;
addEventListener(... |
import { IMinimalOfflineAudioContext, IOfflineAudioContextOptions } from '../interfaces';
export declare type TMinimalOfflineAudioContextConstructor = new (options: IOfflineAudioContextOptions) => IMinimalOfflineAudioContext;
//# sourceMappingURL=minimal-offline-audio-context-constructor.d.ts.map |
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { RouterModule } from '@angular/router';
import { HomeCompone... |
export const IOC_TYPES = {
OrmInterfaceSymbol: Symbol.for('OrmInterface'),
TasksRepositorySymbol: Symbol.for('RepositoryInterface'),
DbConnection: Symbol.for('DbConnection'),
Model: Symbol.for('Model'),
}; |
import React from 'react';
import './styles/global.css';
import Rotas from './routes';
function App() {
return (
<Rotas />
);
}
export default App; |
import React from 'react'
const Glass5: React.FC = () => {
return (
<g
id="Glasses/-5"
stroke="none"
strokeWidth="1"
fill="none"
fillRule="evenodd"
strokeLinecap="round"
strokeLinejoin="round"
>
<g
id="Group"
transform="translate(289.000000, 500... |
/* eslint-disable */
// prettier-ignore
import path from 'path'
// prettier-ignore
import express, { Express, RequestHandler, Request } from 'express'
// prettier-ignore
import multer, { Options } from 'multer'
// prettier-ignore
import { validateOrReject, ValidatorOptions } from 'class-validator'
// prettier-ignore
im... |
// @generated
/* tslint:disable */
/* eslint-disable */
// @generated
// This file was automatically generated and should not be edited.
import { RepositorySelector } from "./../../types/globalTypes";
// ====================================================
// GraphQL query operation: SolidsRootQuery
// ==============... |
import * as React from 'react';
import { StyleSheet, View, Text, useWindowDimensions } from 'react-native';
import { Target, ScrollView, Anchor } from '@nandorojo/anchor';
export default function App() {
const { height } = useWindowDimensions();
return (
<View style={[styles.container, { height }]}>
<S... |
// *** WARNING: this file was generated by crd2pulumi. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import {ObjectMeta} from "../meta/v1";
export na... |
/** @jsxRuntime classic */
/** @jsx jsx */
import { jsx } from '@emotion/react';
import { Gradients, IconProps } from './util';
export function Code({ grad, ...props }: IconProps) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
aria-label="Code"
role="img"
fi... |
import "@/components/button/Button";
import "@/components/icon/Icon.ts";
import "@/components/tooltip/Tooltip.ts";
import { Tooltip } from "@/components/tooltip/Tooltip.ts";
import { css, customElement, html, LitElement, property, query } from "lit-element";
@customElement("tooltip-message-template-sandbox")
export cl... |
import React from 'react';
import { NewsArticleJsonLd } from '../../..';
function NewsArticle() {
return (
<>
<h1>Dataset</h1>
<NewsArticleJsonLd
url="https://example.com/newsarticle"
title="News Article headline"
images={[
'https://example.com/photos/1x1/photo.jpg',... |
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-docs-ngx-loaders',
templateUrl: './docs-ngx-loaders.component.html',
styleUrls: ['./docs-ngx-loaders.component.scss'],
preserveWhitespaces: true
})
export class DocsNgxLoadersComponent implements OnInit {
constructor() {}
ngOnI... |
<TS language="en_GB" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Right-click to edit address or label</translation>
</message>
<message>
<source>Create a new address</source>
<translati... |
import { Injectable } from '@angular/core';
import { CollectionConfig, CollectionService } from 'akita-ng-fire';
import { UserState, UserStore } from './user.store';
import { OrganizationQuery } from '@blockframes/organization/+state/organization.query';
import { map } from 'rxjs/operators';
import { User, AuthQuery, A... |
import React, { useState, ReactElement, useEffect, useRef } from 'react'
import statusCode from 'http-status-codes'
import { Image as Placeholder } from 'react-feather'
import { Loading } from './Loading'
import { lightgray } from '../../../Theme.scss'
import { useEndpoint, Accept } from '../../hooks'
const State = {
... |
import { getTestSuite } from '../get-test-suite'
describe('invalid', () => {
const suite = getTestSuite('invalid', ['build.yaml'])
afterAll(() => suite.close())
it('should throw on invalid yaml', async () => {
try {
await suite.setup()
expect.fail('should not be called')
} catch (e) {
... |
import {
IControl,
ControlType,
ComponentControl,
Util,
StyleType,
FieldSelectType,
DataMergeMethod
} from '@datahu/core'
import {
BaseComponent,
BaseComponentOption,
TooltipComponentOption,
LegendComponentOption,
GridComponentOption,
XAxisComponentOption,
YAxisComponentOption,
SeriesCompo... |
import execa from 'execa';
import terminalLink from 'terminal-link';
import chalk from 'chalk';
try {
execa.sync('code', ['-v']);
} catch (e) {
console.log(
terminalLink(
chalk.red(
'为了统一IDE开发,请统一使用vscode,并安装code命令,请点击参考文档进行配置',
),
'https://code.visualstudio.com/docs/setup/mac#_launch... |
import { from, Observable } from 'rxjs';
import { Action, DocumentData, DocumentReference, DocumentSnapshot, QueryFn, SetOptions } from '../interfaces';
import { fromDocRef } from '../observable/fromRef';
import { map, observeOn } from 'rxjs/operators';
import { AngularFirestore, associateQuery } from '../firestore';
i... |
import { Card } from '../../../interfaces'
import Set from '../Sword & Shield'
const card: Card = {
name: {
en: "Stonjourner",
fr: "Dolman",
es: "Stonjourner",
it: "Stonjourner",
pt: "Stonjourner",
de: "Humanolith"
},
illustrator: "Shin Nagasawa",
rarity: "Rare",
category: "Pokemon",
set: Set,
hp: ... |
export declare const RESOURCE_REQUESTED = "RESOURCE_REQUESTED";
export declare type RESOURCE_REQUESTED = typeof RESOURCE_REQUESTED;
export declare const RESOURCE_SUCCEEDED = "RESOURCE_SUCCEEDED";
export declare type RESOURCE_SUCCEEDED = typeof RESOURCE_SUCCEEDED;
export declare const RESOURCE_FAILED = "RESOURCE_FAILED"... |
import produce, {Draft} from 'immer'
import * as React from 'react'
import {
Props as RootProps,
} from './components/Root'
import {
CardProps,
CreatureOnElementProps,
Props as BattlePageProps,
} from './components/pages/BattlePage'
import {
ApplicationState,
BattleFieldElement,
BattlePage,
CreatureWit... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import * as React from 'react';
import uuid from 'uuid';
import { shallow } fr... |
import deepClone from "deep-clone-simple";
import { fireEvent } from "../../../common/dom/fire_event";
import {
createErrorCardElement,
createErrorCardConfig,
HuiErrorCard,
} from "../cards/hui-error-card";
import "../entity-rows/hui-climate-entity-row";
import "../entity-rows/hui-cover-entity-row";
import "../... |
import { StateSynced, NewRegistration, RegistrationUpdated } from '../../generated/StateSender/StateSender'
import { StateRegistration, StateSync } from '../../generated/schema'
export function handleStateSynced(event: StateSynced): void {
let entity = new StateSync('statesync:' + event.params.id.toString())
entit... |
module Westeros.Army
{
export class Soldier{
public Health:number = 10;
public FightingAbility: number = 5;
public Hunger: number = 0;
}
} |
import { expect } from "chai";
import * as Enzyme from "enzyme";
import { LibraryData } from "../../interfaces";
export const testLibrary1: LibraryData = {
uuid: "UUID1",
basic_info: {
"name": "Test Library 1",
"short_name": "lib1",
"description": undefined,
"number_of_patrons": "3",
"timestam... |
import { DebugElement } from '@angular/core';
import { ComponentFixture } from '@angular/core/testing';
import { Event, Router, UrlSegment } from '@angular/router';
import { Spectator } from '../spectator/spectator';
import { ActivatedRouteStub } from './activated-route-stub';
import { RouteOptions } from './route-op... |
import { V1AddonConstructor } from './v1-addon';
import { Tree } from 'broccoli-plugin';
import { Options as CoreOptions, optionsWithDefaults as coreWithDefaults } from '@embroider/core';
import { PackageRules } from './dependency-rules';
// These options control how hard we will try to achieve compatibility with v1
/... |
import {CamelElement, FromStep, Integration, ProcessorStep} from "../model/CamelModel";
import {CamelMetadataApi, PropertyMeta} from "./CamelMetadata";
import {CamelApi} from "./CamelApi";
export class CamelApiExt {
static addStepToIntegration = (integration: Integration, step: CamelElement, parentId: string): In... |
import { TestBed, inject } from '@angular/core/testing';
import { ModulService } from './modul.service';
describe('ModulService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [ModulService],
});
});
it('should be created', inject([ModulService], (service: ModulService) =... |
// An export for example data to test d3 viz with
// This output should be the json outputted by the python code analysis script
export const exampleData = {
path: "/mnt/g/Projects/apple-surp-2019/code-analysis/examples-to-analyze/",
duplicateInfo: {
duplicates: [
[
{
filename:
... |
// Type definitions for route-parser 0.1
// Project: https://github.com/rcs/route-parser
// Definitions by: Ian Ker-Seymer <https://github.com/ianks>, Bob Buehler <https://github.com/bobbuehler>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare class Route {
/**
* Represents a route
... |
import { defineComponent, h } from 'vue'
const CCardGroup = defineComponent({
name: 'CCardGroup',
setup(_, { slots }) {
return () => h('div', { class: 'card-group' }, slots.default && slots.default())
},
})
export { CCardGroup } |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
import { useState, useEffect } from 'react';
import { v4 as uuidv4 } from 'uuid';
export function useIdHook(initialId?: string): string | undefined {
const [id, setId] = useState<string | undefined>(initialId);
useEffect(() => {
if (!id) {
setId(uuidv4());
}
}, [id]);
return id;
} |
import { Component } from '@angular/core';
import { NgControl } from '@angular/forms';
import { DynamicFormElementComponent } from './dynamic-form-element.component';
@Component({
template: '',
})
export abstract class DynamicInputNumberElementComponent extends DynamicFormElementComponent<number> {
public con... |
export declare const getUniqueScopes: (...scopes: string[]) => any;
export declare const parseQueryResult: (
queryString: string
) => AuthenticationResult;
export declare const runIframe: (
authorizeUrl: string,
eventOrigin: string
) => Promise<AuthenticationResult>;
export declare const openPopup: () => Window;
... |
import range from 'lodash/range'
import { getLabwareHasQuirk, sortWells } from '.'
import type { LabwareDefinition2 } from '../types'
// TODO Ian 2018-03-13 pull pipette offsets/positions from some pipette definitions data
const OFFSET_8_CHANNEL = 9 // offset in mm between tips
const MULTICHANNEL_TIP_SPAN = OFFSET_8_... |
/*
* Copyright 2019 Red Hat, Inc. and/or its affiliates.
*
* 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 app... |
// @ts-ignore
import { PolygonLayer, Scene } from '@antv/l7';
import * as dat from 'dat.gui';
import * as React from 'react';
export default class Highlight extends React.Component {
private gui: dat.GUI;
private $stats: Node;
private scene: Scene;
public componentWillUnmount() {
if (this.gui) {
thi... |
import { Theme } from '@material-ui/core'
export const sharedStyles = (theme: Theme) => ({
content: {
maxWidth: '1440px',
margin: 'auto',
},
pt100: {
fontSize: '5rem',
},
pt90: {
fontSize: '4rem',
},
pt85: {
fontSize: '3.5rem',
},
pt80: {
fontSize: '3rem',... |
// Type definitions for Angular v2.0.0-local_sha.aaf41fc
// Project: http://angular.io/
// Definitions by: angular team <https://github.com/angular/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
// ***********************************************************
// This file is generated by the Angular bu... |
import { IsNotEmpty, IsUUID } from 'class-validator';
export class DeleteUserDto {
@IsNotEmpty()
@IsUUID()
id: string;
} |
import {DeleteItemInput} from 'aws-sdk/clients/dynamodb';
export interface IDeleteItemOptions {
expected?: any;
deleteItemRequest?: DeleteItemInput;
} |
export type Key = string | Array<string>;
export type Object = { [key: string]: any };
export type Nullable<T> = T | null; |
import { isNilOrEmpty } from '../../value/isNilOrEmpty';
import { isObject } from '../../type/isObject';
import { RangeBoundary } from '../../types';
/**
* Determines whether or not the value is within the numeric range
*
* @since v0.0.1
* @category Number
* @param {number | RangeBoundary} lower - The lower boun... |
import { Component, Input} from '@angular/core';
import { Router } from "@angular/router";
@Component({
selector: 'app-heroe-tarjeta',
templateUrl: './heroe-tarjeta.component.html',
styleUrls: ['./heroe-tarjeta.component.css']
})
export class HeroeTarjetaComponent {
@Input() heroe: any = {};
@Input() index: ... |
import create from 'zustand';
import {EntriesSettings} from '../types/EntriesSettings';
import {fetchEntriesSettings, saveEntriesSettings} from '../lib/api';
import {EntriesSortBy} from '../enums/EntriesSortBy';
import {SortDirection} from '../enums/SortDirection';
interface EntriesSettingsState {
settings: Entrie... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/** @jsx jsx */
import { jsx, css } from '@emotion/core';
import formatMessage from 'format-message';
import { DialogFooter } from 'office-ui-fabric-react/lib/Dialog';
import { useState, useMemo, useCallback, Fragment } from 'react';
import { P... |
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.2" tiledversion="1.3.3" name="VisuStella_Interior_C" tilewidth="48" tileheight="48" tilecount="256" columns="16">
<image source="VisuStella_Interior_C.png" width="768" height="768"/>
</tileset> |
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HomePage } from './home.page';
const routes: Routes = [
{
path: '',
component: HomePage,
children: [
{
path: 'noticia',
loadChildren: () => import('./noticia/noticia.module').t... |
import * as React from 'react';
import * as style from './Project.css';
import { Button } from '../Button/Button';
import axios from 'axios';
interface Props {
onSelectPath: Function;
projectPath: string;
}
interface State {
isOpen: boolean;
loading: boolean;
error: any;
explorer: {
ls: Explorer.FileO... |
export declare const cidScreenLockHorizontal: string[]; |
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { FormControl } from '@angular/forms';
@Component({
selector: 'cc-add-ids-input',
templateUrl: 'add-ids-input.component.html',
})
export class AddIdsInputComponent {
@Input()
disabled: boolean;
@Output()
add = new Ev... |
import { Record } from 'immutable';
import { DefaultValues } from '~types/index';
interface Shared {
record: any;
error?: string | void;
isFetching?: boolean;
lastFetchedAt?: Date;
}
export type FetchableDataType<R> = Readonly<Shared> & { record: R };
const defaultValues: DefaultValues<Shared> = {
record:... |
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. 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.... |
export function parseEvent(receipt: any, name: string) {
const events = receipt?.events
let args: any[] = []
events.forEach(event => {
if (event.event) {
if ((event.event as string).toLowerCase() === name.toLowerCase()) args = event.args
}
})
return args
} |
// Copyright (C) 2020 Intel Corporation
//
// SPDX-License-Identifier: MIT
import consts from 'consts';
import { AnnotationActionTypes } from 'actions/annotation-actions';
import { ReviewActionTypes } from 'actions/review-actions';
import { ReviewState } from './interfaces';
const defaultState: ReviewState = {
re... |
import { CollectionViewer, DataSource } from '@angular/cdk/collections';
import { BehaviorSubject, Observable, of } from 'rxjs';
import { catchError, finalize, first } from 'rxjs/operators';
import { Project } from '../../../core/models/project.model';
import { ProjectService } from './../../../core/services/project.s... |
import { ICommand } from '../listeners/commandListener';
import { help } from './help';
import { lock } from './lock';
import { unlock } from './unlock';
import { setup } from './setup';
import { bitrate } from './bitrate';
// Add commands here
export const commands: { [key: string]: ICommand } = {
help,
lock,
u... |
import test from 'ava'
import { mockClient, mockRequest } from './_mocks'
import { cockpitCollections } from '../cockpitCollections'
test('collections list', async (t) => {
const mockData = ['item1', 'item2']
mockRequest(`collections/listCollections`, mockData)
const collectionsList = await cockpitCollec... |
import { Injectable } from "@nestjs/common";
import * as moment from 'moment';
import { getManager } from "typeorm";
@Injectable()
export class RankService{
async getRanksByCollege(collegeId , query){
rank = [];
var date = new Date();
if(query.time_span == 'D'){
date.setDate(da... |
import GoTrue from 'gotrue-js';
import jwtDecode from 'jwt-decode';
import { get, pick, intersection } from 'lodash';
import ini from 'ini';
import {
APIError,
unsentRequest,
basename,
ApiRequest,
AssetProxy,
PersistOptions,
Entry,
Cursor,
Implementation,
DisplayURL,
User,
Credentials,
entries... |
import { AutoScaling } from "../AutoScaling";
import { AutoScalingClient } from "../AutoScalingClient";
import {
DescribeLaunchConfigurationsCommand,
DescribeLaunchConfigurationsCommandInput,
DescribeLaunchConfigurationsCommandOutput,
} from "../commands/DescribeLaunchConfigurationsCommand";
import { AutoScalingP... |
// @require core/cash.ts
// @require core/variables.ts
interface Cash {
ready ( callback: Function ): this;
}
Cash.prototype.ready = function ( this: Cash, callback: Function ) {
const finalCallback = () => callback ( cash );
if ( doc.readyState !== 'loading' ) {
setTimeout ( finalCallback );
} else {... |
import * as chai from 'chai';
const { assert } = chai;
import * as sinon from 'sinon';
import gql from 'graphql-tag';
import {
ExecutionResult,
} from 'graphql';
import {
QueryManager,
} from '../src/core/QueryManager';
import {
createApolloStore,
ApolloStore,
} from '../src/store';
import ApolloClient, {
A... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import Color from 'color';
import { BudgetStringBuilder } from '../utils/budgetStringBuilder';
export interface FormatToken {
type: string;
value?: string;
specifier?: string;
precision?: number;
substitutionIndex?: number;
}
const ... |
import React, { useMemo, useState } from 'react';
import { useSelector } from 'react-redux';
import { indexToAN, possibleMoves } from '../functions/board';
import { StateType } from '../reducers';
import { pieceToLetter, PieceType } from '../types/PieceType';
import { Square } from './Square';
export const Board: Rea... |
import {StoryEngine} from '../../StoryEngine';
import {Room} from '../Room';
describe('Crate', () => {
let engine;
beforeEach(() => {
engine = new StoryEngine();
engine.state.isCrateOpen = false;
engine.state.currentRoom = Room.InCrate;
});
describe('navigation', () => {
it('Should block navi... |
export interface Module {
name: string;
category: string;
description: string;
inputFile: string;
outputFile_required: boolean;
outputFile?: string;
params: string;
command: string;
file?: File;
} |
import {Request, Response} from "express";
function remove() {
return function (_: Request, res: Response, next: () => void) {
res.removeHeader('X-Powered-By');
res.removeHeader('x-powered-by');
next();
};
}
function manage(value: string) {
return function (_: Request, res: Respons... |
import { RuleTester } from "eslint"
import rule from "../../../lib/rules/no-regexp-literals"
const tester = new RuleTester({
parser: require.resolve("jsonc-eslint-parser"),
})
tester.run("no-regexp-literals", rule as any, {
valid: ['{"key": "value"}', '"string"', '["element"]'],
invalid: [
{
... |
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class RepoService {
_URL = 'https://api.github.com/users/';
token = '?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';
constructor(public http... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.