text stringlengths 10 953k |
|---|
import {mergeCss} from '../theme.config';
export default mergeCss({
theme: {
borderWidths: {
well: '$thin',
},
colors: {
'well-bg': 'rgba(75,75,75,0.02)',
'well-border': 'rgba(44,44,44,0.05)',
},
sizes: {
'well-min-w': '160px',
},
space: {
'well-p': '$250',
... |
import { User } from './User'
export const getUserFullName = (user: User): string =>
`${user.firstName} ${user.lastName}` |
import { FC } from "react";
import FilmWrapper from "./FilmWrapper";
const filmIds = [
"tt1707386",
"tt1375666",
"tt0816692",
"tt5311514",
"tt0434409",
"tt1485796",
"tt3783958",
"tt2380307",
"tt9426210"
];
const Top: FC = () => (
<div className="filmList">
{filmIds.map(... |
import { Component, Input, Output, OnChanges, SimpleChanges, EventEmitter } from '@angular/core';
import * as _ from 'lodash';
import EditorConfig from 'src/app/@models/editorconfig.model';
import WorkflowHelper from '../../@services/workflowhelper.service';
import { ModalYamlPreviewComponent } from '../../@modals/mod... |
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
Input,
OnDestroy,
OnInit,
} from '@angular/core';
import { EventSystem } from '@udonarium/core/system';
import { StringUtil } from '@udonarium/core/system/util/string-util';
import { DataElement } from '@udonarium/data-element'... |
/*
* Copyright © 2019 Cask Data, 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 or agreed t... |
// @webtoon/psd
// Copyright 2021-present NAVER WEBTOON
// MIT License
export * from "./ColorModeData";
export * from "./FileHeader";
export * from "./ImageData";
export * from "./ImageResource";
export * from "./LayerAndMaskInformation";
import {getFileVersionSpec} from "../interfaces";
import {getUint64FromDataView... |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="el_GR" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Parrotcoin</source>
<translation>Σχετικά με το Parrotcoin</transl... |
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const mainSchema = new Schema({
amount: {
type: Number,
required: true,
index: true,
},
type: {
type: String,
enum: ['food', 'general'],
required: true,
},
note: {
type: String,
default: '',
},
tags: [{
type: Schema.Types.Ob... |
import * as path from 'path';
import * as Mocha from 'mocha';
import * as glob from 'glob';
import * as vscode from 'vscode';
import { activateExtension } from './helper';
export async function run(): Promise<void> {
// Create the mocha test
const mocha = new Mocha({
ui: 'tdd',
timeout: 7000,
slow: 2000,
colo... |
export class Blog {
public title: string = "";
public subtitle: string = "";
public author: string = "";
public area: string = "";
public description: string = "";
public heroImage: string = "";
public gallery: Array<any> = [];
} |
import { inputToArray } from '#utils/input/mappings'
import { parseAndSolve } from '#utils/solve'
import { getLifeSupportRating, getPowerConsumption } from '.'
const solve = parseAndSolve(2021, 3, inputToArray)
// Part One
solve(getPowerConsumption, 'Part One:')
// Part Two
solve(getLifeSupportRating, 'Part Two:') |
import {
ArtworkBuyNow,
ArtworkBuyNowMakeOffer,
ArtworkMakeOffer,
ArtworkOfferableAndInquireable,
ArtworkSingleEditionHiddenAvailability,
ArtworkSold,
} from "Apps/__tests__/Fixtures/Artwork/ArtworkSidebar/ArtworkSidebarCommercial"
import {
OfferOrderWithFailure,
OfferOrderWithSuccess,
OrderWithFailu... |
export default {
test: '0x00中文',
langen: '英文',
langcn: '中文',
'langen-US': '英文',
'langzh-CN': '中文',
//
id: 'ID',
category: '分类',
user: '用户',
role: '角色',
email: 'Email',
name: '名字',
title: '标题',
parent: '父',
slug: '标识',
password: '密码',
login: '登录',
register: '注册',
status: '状态',
cre... |
import { FraudDetectorClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../FraudDetectorClient";
import { UpdateModelVersionRequest, UpdateModelVersionResult } from "../models/models_0";
import {
deserializeAws_json1_1UpdateModelVersionCommand,
serializeAws_json1_1UpdateModelVersionCommand,
} from... |
/**
* Copyright 2018, 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 ... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { HttpClient, HttpClientModu... |
import assertNever from "assert-never";
import {
areBooleanLiteralTypes,
areFloatLiteralTypes,
areIntLiteralTypes,
areStringLiteralTypes,
ArrayType,
dereferenceType,
isNotNullType,
isNullType,
isObjectType,
isReferenceType,
isStringLiteralType,
ObjectType,
ReferenceType,
Type,
TypeKind,
... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*-------------------------------------------------------------------------... |
import React, { ComponentType, FC, PropsWithChildren, useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { UserManagerSettings } from 'oidc-client';
import { NotAuthenticated, NotAuthorized, SessionLost } from '../default-component';
import { getPath } from './route-utils';
import { SilentCa... |
import { use, expect } from 'chai';
import { waffle } from 'hardhat';
import { keccak256 } from '@ethersproject/keccak256';
import { BigNumber } from '@ethersproject/bignumber';
import BasicERC165JSON from '../../_artifacts/contracts/erc/ERC165/BasicERC165.sol/BasicERC165.json';
import ERC165StorageJSON from '../../_a... |
import { ConvectorController, getInvokables } from '@worldsibu/convector-core-controller';
import { ControllerAdapter } from './controller-adapter';
export interface IConvectorControllerClient<T extends ConvectorController> {
config: any;
query: boolean;
user: string|true;
ctrl: new (content?: any) => T;
ad... |
import { Executor } from '../../types'
export function executor(options: Executor.Options): Executor {
const { dontFakeInteractive, spawn } = options
if (dontFakeInteractive) return spawn
const shQtMdl = import('shell-quote')
return async (cmd, args) => {
const { quote } = await shQtMdl
const shCmd ... |
/**
* Youtube room chat-plugin.
* Supports adding channels and selecting a random channel.
* Also supports showing video data on request.
* Written by mia-pi, with some code / design concepts from Asheviere.
*/
import {Net} from '../../lib/net';
import {FS} from '../../lib/fs';
import {Utils} from '../../lib/util... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import { inject, injectable, named } from 'inversify';
import { Disposable, Event, EventEmitter, Uri } from 'vscode';
import { ICommandManager, IDocumentManager } from '../../common/application/types';
impor... |
import { Schema } from 'mongoose';
export const localidadSchema = new Schema({
descripcion: {
type: String,
uppercase: true,
required: true,
trim: true
},
provincia: {
type: Schema.Types.ObjectId,
required: true,
ref: 'provincia'
},
activo:... |
export interface SdpMessage {
signalingId: string;
description: RTCSessionDescriptionInit;
displayName: string;
} |
import { SyntaxNode } from "web-tree-sitter";
import { TextEditor } from "vscode";
import { getPojoMatchers } from "./getPojoMatchers";
import {
cascadingMatcher,
delimitedMatcher,
hasType,
possiblyWrappedNode,
simpleSelectionExtractor,
getNodeWithLeadingDelimiter,
childNodeMatcher,
} from "../nodeMatcher... |
import React from 'react'
import { StatBadge } from '../StatBadge'
import AbilityList from './AbilityList'
import WeaponList from './WeaponList'
import { Row, Col } from 'react-bootstrap'
import { ModelTitle } from '../ModelTitle'
import { Model } from '../../types/KillTeam2018'
interface Props {
model: Model
}
ex... |
// Copyright 2018 The Oppia Authors. 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 ap... |
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ToastrModule } from 'ngx-to... |
import React, { useCallback, useMemo } from "react";
import clsx from "clsx";
import StayledButton from "./Buttons/StayledButton";
import { useModalContext } from "./Modal/Modal";
type variants =
| "error"
| "primarygray"
| "primaryblue"
| "secondaryblue"
| "secondarygray"
| "secondarylightgray"
| "terna... |
/*@internal*/
namespace ts {
export interface ReusableDiagnostic extends ReusableDiagnosticRelatedInformation {
/** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
reportsUnnecessary?: {};
source?: string;
... |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "../utilities";
/**
* Manages a Subscription Template Deployment.
*
* ## Ex... |
import { execCmd, execCmdWithExitOnFailure } from './cmd-utils'
import { envVar, fetchEnv } from './env-utils'
export async function scaleResource(
namespace: string,
type: string,
resourceName: string,
replicaCount: number,
allowFail: boolean = false
) {
const execFn = allowFail ? execCmd : execCmdWithExi... |
import inquirer from 'inquirer';
import path from 'path';
const TransformPackage = require('graphql-transformer-core');
const { ResourceDoesNotExistError } = require('amplify-cli-core');
export async function askDynamoDBQuestions(context: any, currentProjectOnly = false): Promise<{ resourceName: string }> {
const dyn... |
// @require core/cash.ts
// @require core/each.ts
// @require core/type_checking.ts
// @require collection/each.ts
// @require ./helpers/get_event_name_bubbling.ts
// @require ./helpers/parse_event_name.ts
// @require ./helpers/remove_event.ts
interface Cash {
off (): this;
off ( events: string ): this;
off ( ev... |
import Vue from 'vue'
import { Wrapper } from '@vue/test-utils'
import AsyncComputed from 'vue-async-computed'
import { configHandler } from '@/utils/ConfigHandler'
const waitFunc = (times: number) => {
return async (wrapper: Wrapper<Vue>) => {
for (let i = 0; i < times; i++) {
await wrapper.vm.$nextTick()... |
import { decamelizeKeys } from 'xcase';
import FormData from 'form-data';
import { stringify } from 'query-string';
// Types
export interface Constructable<T = any> {
new (...args: any[]): T;
}
export interface RequesterType {
get(endpoint: string, options?: Record<string, unknown>): Promise<any>;
post(endpoint... |
import React from "react";
import { Car } from "../entities";
import fetchSearchResults from "../use-cases/fetchSearchResults";
/**
* Selects list of cars that corresponds to the users search input, and then stores the specific car that the user
* selected fro the list of cars
*/
interface calls {
onCarChange(op:... |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ka" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Espers</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+... |
/**
* 変換オプション
*/
export interface ConverterOption {
description: string;
defaultValue: boolean;
}
/* eslint-disable @typescript-eslint/naming-convention */
/**
* 変換オプションの定義
*/
export const OPTION_DESCRIPTIONS: {[optionName: string]: ConverterOption} = {
with_bra: {
description: 'ブラの出力',
defaultValue:... |
export declare enum Comparation {
'==' = 0,
'===' = 1,
'!=' = 2,
'!==' = 3,
'<' = 4,
'>' = 5,
'<=' = 6,
'>=' = 7
}
export declare type Assertion = boolean | [any, keyof typeof Comparation, any];
export declare function assert(assertion: Assertion): boolean;
export declare function and(..... |
import { Injectable } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { Events } from 'ionic-angular';
import * as _ from 'lodash';
import { Observable } from 'rxjs';
// providers
import { DerivationPathHelperProvider } from '../../providers/derivation-path-helper/derivation-path-h... |
import { Component, OnInit, Input, Output, EventEmitter, OnDestroy } from '@angular/core';
import { SelectItem } from 'primeng/api';
import { MessageResponse } from '../model/message-response.model';
import { Usuario } from '../model/usuario.model';
import { FormGroup, FormControl, Validators } from '@angular/forms';
i... |
import { Injectable } from "@nestjs/common";
import { InjectRepository } from "@nestjs/typeorm";
import { Repository, FindManyOptions, FindOneOptions } from "typeorm";
import { EventDto } from "./dto/event.dto";
import { EventEntity } from "./entity/event.entity";
@Injectable()
export class EventsService {
construc... |
export = FsDatastore;
/**
* A datastore backed by the file system.
*
* Keys need to be sanitized before use, as they are written
* to the file system as is.
*
* @implements {Datastore}
*/
declare class FsDatastore extends Adapter implements Datastore {
/**
* @param {string} location
* @param {{ cre... |
import { promises as fs } from 'fs';
import { resolve } from 'path';
import filter from 'lodash/filter';
import matchesProperty from 'lodash/matchesProperty';
import partition from 'lodash/partition';
import {
ETHEREUM_LISTS_OUTPUT_PATH,
ETHEREUM_LISTS_REPO,
RawEthereumListsToken,
Token,
} from './constants';
i... |
export { default, default as AppQuery } from "./AppQuery"; |
import React, { Component } from 'react';
import { Table, Icon, Pagination, Dropdown } from 'semantic-ui-react';
import { Link } from 'gatsby';
import { mergeItems } from '../utils/itemutils';
import CONFIG from '../components/CONFIG';
type ProfileItemsProps = {
playerData: any;
};
type ProfileItemsState = {
colu... |
import { NumberRange } from './NumberRange';
export class AnchoredSelection {
static init(initialValue: number) {
return new AnchoredSelection(initialValue, initialValue);
}
readonly id = Symbol();
readonly anchorValue: number;
readonly movingValue: number;
constructor(anchorValue: number, movingVal... |
/// <reference path="sinon/sinon.d.ts" />
/*
NOTE
Sinon lives here instead of @types because the two typings seem to encourage different usages,
and this one better fits ours.
With this typings file, a global `sinon` variable is declared so tests can easily reference `sinon.spy()`
without an import. The `karma-sinon... |
import { Component, ViewChild, Injector, ElementRef, Output, EventEmitter, OnInit } from '@angular/core';
import { ModalDirective } from 'ngx-bootstrap';
import { AppComponentBase } from '@shared/common/app-component-base';
import { PackingServiceProxy,CreatePackingInput } from 'shared/service-proxies/service-proxies';... |
import React, { useEffect, useState } from "react";
import {
Image,
View,
ScrollView,
Text,
StyleSheet,
Dimensions,
TouchableOpacity,
Linking,
} from "react-native";
import MapView, { Marker } from "react-native-maps";
import { Feather, FontAwesome } from "@expo/vector-icons";
import { RectButton } from "react-... |
import { ZERO } from "../../src/constants/GeneralConstants";
export class AddressModel {
name: string;
latitude: number;
longitude: number;
constructor (model: Partial<AddressModel>) {
this.name = model.name || "";
this.latitude = model.latitude || ZERO;
this.longitude = model.... |
import { Rhum } from "./deps_test.ts";
import {
deleteFile,
writeFile,
} from "./test.utils.ts";
import Cfg from "./mod.ts";
Rhum.testPlan("config.ts", () => {
Rhum.testSuite("Config.prototype.get()", () => {
Rhum.testCase("Returns the value of a 4th level property", () => {
const obj = { level1: { lev... |
import { checkErrors, testName } from '../../support';
import { projectDropdown } from '../../views/common';
import { detailsPage } from '../../views/details-page';
import { listPage } from '../../views/list-page';
import { modal } from '../../views/modal';
import { nav } from '../../views/nav';
describe('Namespace', ... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
import { Component } from '@angular/core';
import { SHARED_PROVIDERS, SHARED_DIRECTIVES, AuthenticationService } from './shared/shared';
import { HTTP_PROVIDERS } from '@angular/http';
import { ROUTER_PROVIDERS, ROUTER_DIRECTIVES, Router, RouteConfig } from '@angular/router-deprecated';
import { TimerComponent } from '... |
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { UserManagerComponent } from './user-manager.component';
import { BatchImportComponent } from './batch-import/batch-import.component';
import { FindUserComponent } from './find-user/find-user.component';
import { U... |
class Foo implements {
} |
/**
* Copyright (c) 2020-present, Goldman Sachs
*
* 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 l... |
import { Injectable } from '@angular/core';
import {
ActivatedRouteSnapshot,
CanActivate,
Router,
RouterStateSnapshot
} from '@angular/router';
import { Observable } from 'rxjs';
import { LoginComponent } from '../../login/login.component';
import { AuthData } from '../auth-data/auth-data.interface';
im... |
import tester from '../tester';
import rule from './no-const-in-for-in-loop';
tester.run("no-const-in-for-in-loop", rule, {
valid: [
{ code: "for (var _ in {}) {}" },
],
invalid: [
{ code: "for (const _ in {}) {}", errors: [{messageId: "disallow-const-in-for-in-loop"}] },
],
}); |
import todosQuery from "./todoQuery"
import basicQuery from "./basicQuery"
import authQuery from "./authQuery"
export default [
...basicQuery,
...authQuery,
...todosQuery
] |
import {Injectable} from "@angular/core";
import {Http} from "@angular/http";
import "rxjs/add/operator/map";
import {Data, VersionStored} from "./start-up-data/load-data";
import {Storage} from "@ionic/storage";
@Injectable()
export class GameCreationService {
constructor(
private http: Http,
private stor... |
import {TestBed, waitForAsync} from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent
],
}).compileComponents();
}));
it('should create the app', () =>... |
import React from 'react';
import { Image, ScrollView } from 'react-native';
export default class ProfileScreen extends React.PureComponent<any> {
render() {
return (
<ScrollView contentContainerStyle={{width: '100%'}}>
<Image source={require('../../assets/profile-wasted.png')} ... |
/*
* 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 path from 'path';
import { FtrProviderContext } from '../../../ftr_pr... |
import { Component, Input } from '@angular/core';
import { GroupMeter, GroupParticipant } from '@gpx/models/group-meter.model';
import { AnimationSpeed } from './energy-path/energy-path.component';
@Component({
selector: 'app-group-meter-participant',
templateUrl: './group-meter-participant.component.html',
sty... |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_CN" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About SmtCoin</source>
<translation>关于黑币</translation>
</message>
<message>
<location line... |
import { Injectable } from "@nestjs/common";
import { InjectRepository } from "@nestjs/typeorm";
import { Repository } from "typeorm";
import { Clinic } from "./clinic.entity";
@Injectable()
export class ClinicService {
constructor(
@InjectRepository(Clinic)
private clinicRepository: Repository<Cli... |
/**
* Copyright 2018 Twitter, Inc.
* Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*/
import { bufferToHexEncodedAscii, mapObject } from "sqrl-common";
function friendlyBuffer(buf) {
try {
const text = buf.toString("utf-8");
return bufferToHexEncodedAscii(tex... |
import { Module, ValidationPipe } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { TypeOrmConfigService } from './core/config/typerom.config';
import { UserModule } from './user/user.module';
import { ConfigModule } from '@nestjs/config';
import { jwtConfig } from './core/config/jwt.conf... |
import { test, expect } from "@jest/globals";
import canUseDOM from "../source";
test("window exists", () => {
expect(canUseDOM).toBe(true);
}); |
import { Component, OnInit } from '@angular/core';
import { Hero } from './hero';
import { HeroService } from './hero.service';
// #docregion metadata, providers
@Component({
moduleId: module.id,
selector: 'hero-list',
templateUrl: './hero-list.component.html',
providers: [ HeroSe... |
import { BaseFileSchema } from '..';
import { ImageMeta } from '../common/image-meta';
import { FileTypeEnum } from '../enums/file-type.enum';
export type ImageThumbnailFileSchema = BaseFileSchema<
FileTypeEnum.ImageThumbnail,
ImageMeta
>; |
import List from '@/modules/list';
export interface Keybind {
id: string;
description?: string;
name: string;
hidden?: boolean;
validator(this: List, key: Key): boolean;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
execute(this: List): any;
}
export interface Key {
sequence: string;
... |
export * from './actions';
export * from './reducers';
export * from './store'; |
//#region Imports
import React from "react";
import Popup from "../components/Popup.module";
import styles from "../styles/index.module.css";
//#endregion
interface Props {
onRestart: React.MouseEventHandler<HTMLButtonElement>,
onView: React.MouseEventHandler<HTMLButtonElement>,
gameEndStatus: string
s... |
import axios from 'axios';
import { expect } from 'chai';
import configureStore from 'redux-mock-store';
import promiseMiddleware from 'redux-promise-middleware';
import thunk from 'redux-thunk';
import * as sinon from 'sinon';
import reducer, {
ACTION_TYPES,
createEntity,
deleteEntity,
getEntities,
getEntit... |
export class MedicalInstitution{
Id:number;
Name:string;
fromJSON(json:Object) {
for (var propName in json)
this[propName] = json[propName];
return this;
}
} |
jest.mock('@atlaskit/media-store');
import { MediaStore } from '@atlaskit/media-store';
import {
ContextFactory,
fileStreamsCache,
FileState,
} from '@atlaskit/media-core';
import { mockStore, mockFetcher } from '@atlaskit/media-test-helpers';
import { sendUploadEvent } from '../../../actions/sendUploadEvent';
im... |
import User from 'model/User'
import * as React from 'react'
import * as renderer from 'react-test-renderer'
import { UserComponent } from '../User'
test('`User` widget renders correctly', () => {
const user = {
'@id': '1',
'@type': 'TestUser',
'id': 1,
'email': 'test@example.com',... |
export * from './DAppProvider'
export * from './blockNumber'
export * from './chainState'
export * from './config'
export { useTransactionsContext } from './transactions/context'
export { useNotificationsContext } from './notifications/context'
export * from './transactions/model'
export * from './notifications/model' |
import { Rokkit } from '../../starter/Rokkit'
import { RokkitServerOptions } from '@rokkit.ts/web'
import { RokkitRunner } from '../../starter/Rokkit'
import { starter } from '../../starter/Starter'
export interface Module<T> {
configuration: T
baseClass: string
moduleName: string
}
export enum RokkitModules {
... |
// Reference: https://snack.expo.io/@xcarpentier/animation-example
import React, { useState, useEffect } from 'react';
import {
Animated,
AppState,
Easing,
Platform,
View,
ViewProps,
} from 'react-native';
// https://github.com/watadarkstar/react-native-typing-animation/issues/18
const UpAndDown = ({
e... |
import {
AsyncOptionsProvider,
createAsyncOptionsProviderWithDependents,
LOADER_SOURCE_TOKEN,
SERVICE_INIT_TOKEN,
} from '@aimelo/common';
import { ClassProvider, DynamicModule, FactoryProvider, Global, Module } from '@nestjs/common';
import { combineLatest, EMPTY, fromEventPattern, Observable } from 'r... |
import styled, { css } from 'styled-components'
import { IConfig } from '../../'
export interface IToolbarDefaultProps {
config: IConfig
}
const ToolbarContainer = styled.div`
border-bottom: 5px solid black;
`
export const ToolbarDefault = (props) => {
return (
<ToolbarContainer>
{props.children}
... |
import { Directive, Input } from "@angular/core";
import { AbstractControl, NG_VALIDATORS, Validator } from
"@angular/forms";
@Directive({
selector: "[minlen]",
providers: [{provide: NG_VALIDATORS, useExisting: MinLenDirective,
multi: true}]
})
export class MinLenDirective implements Validator {
@Input() minlen: st... |
import React from 'react';
import { Image, View } from 'react-native';
export default class GifScreen extends React.Component {
static navigationOptions = {
title: 'Cat',
};
render() {
return (
<View
style={{
flex: 1,
padding: 10,
alignItems: 'center',
... |
import { Test, TestingModule } from '@nestjs/testing'
import { getLoggerToken } from 'nestjs-pino'
import { LCD_MODULE_TOKEN } from 'src/lcd/lcd.constant'
import { MintService } from './mint.service'
describe('MintService', () => {
let service: MintService
beforeEach(async () => {
const module: TestingModule ... |
import { Redshift } from "../Redshift";
import { RedshiftClient } from "../RedshiftClient";
import {
DescribeUsageLimitsCommand,
DescribeUsageLimitsCommandInput,
DescribeUsageLimitsCommandOutput,
} from "../commands/DescribeUsageLimitsCommand";
import { RedshiftPaginationConfiguration } from "./Interfaces";
impor... |
export const stopRandomEC2Instance = {
service: 'ec2',
action: 'stopRandomEC2Instance',
result: {
StoppingInstances: [
{
CurrentState: {
Code: 64,
Name: 'stopping',
},
InstanceId: 'i-1234567890abcdef0... |
import { shuffle } from 'd3-array';
import { arrange, desc } from './arrange';
import { SingleOrArray } from './helpers/singleOrArray';
import { Comparator, Key, TidyFn } from './types';
/**
* Truncates the array to the specified range
*/
export function slice<T extends object>(
start: number,
end?: number
): Ti... |
import { Component, OnInit, ViewChild } from '@angular/core';
import { GlobalService, NftState, NeonService } from '@/app/core';
import { ActivatedRoute } from '@angular/router';
import { PopupNftTxPageComponent } from './nft-tx-page/nft-tx-page.component';
@Component({
templateUrl: 'nft-detail.component.html',
... |
'use strict';
import fetch from 'node-fetch';
import config from '../../../../config/ApplicationConfig';
interface GitHubOptions {
token?: string;
repo?: string;
number?: string;
title?: string;
body?: string;
comment?: string;
}
class CoreGithubController {
public static getInstance() {
return this.instanc... |
const currencyNumber = (money: any) => {
if (!isNaN(money)) {
return money.toLocaleString('de').replace(/,/g, '.')
}
return money
}
export { currencyNumber } |
import ContentTransform from '../interfaces/content-transform'
import * as Intents from '../intent/index'
import EntryDerive from '../interfaces/entry-derive'
const actionCreators = {
contentType: {
create: (id, instanceId, callsite): Intents.ContentTypeCreate => {
return new Intents.ContentTypeCreate({
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.