text stringlengths 10 953k |
|---|
import BN from 'bn.js';
export interface EthereumProvider {
send(method: 'eth_chainId', params: []): Promise<string>;
send(method: 'net_version', params: []): Promise<string>;
send(method: 'eth_getCode', params: [string, string]): Promise<string>;
send(method: 'eth_getStorageAt', params: [string, string, strin... |
export const version = "pbkdf2/5.0.5"; |
import SdkUpdaterApiConsumer from '../sdk-updater-api-consumer/sdk-updater-api-consumer'
const itemInstance = { name: 'jest' }
const sdkMethod = jest.fn(() => itemInstance)
const fieldsToSend = ['name']
const updater = new SdkUpdaterApiConsumer(sdkMethod, { fieldsToSend })
const parentId = 321
const itemId = 123
des... |
/*
* Copyright (C) 2017 TypeFox and others.
*
* 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
*
* Modifications: Copyright (C) 2018 Tobias Ortmayr<... |
/**
* Copyright (c) Microsoft Corporation.
*
* 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... |
import { toHex } from 'web3-utils';
import { MetamaskAddEthereumChain } from 'wallets/connectors/metamask';
import { DEFAULT_RPC_POOLING_INTERVAL, NetworkConfig, Web3Network } from 'networks/types';
const RPC_KEY = 'f35c2a4f3d0941a38a3edb62ed10c847';
const RPC_HTTPS_URL = `https://ropsten.infura.io/v3/${RPC_KEY}`;
c... |
export const enum ProviderType {
/**
* Deploy instances locally with docker.
*/
DOCKER = "DOCKER",
/**
* Deploy instances in Kubernetes cluster.
*/
KUBERNETES = "KUBERNETES",
/**
* Deploy instances in AWS
*/
AWSBATCH = "AWSBATCH",
/**
* Deploy instances in... |
/*
* Copyright 2019 Google LLC. 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 applica... |
import { bytes } from "@thi.ng/strings";
import { execSync } from "child_process";
import { readdirSync } from "fs";
import { META_FIELD, Package, RE_PKG } from "../api";
import { CONFIG } from "../config";
import { readJSON, readText } from "../io";
import { link } from "./link";
import { list } from "./list";
export... |
export enum ErrorAction {
Ignore = 'ignore',
Stop = 'stop',
Restart = 'restart',
} |
import { NgModule, Component, enableProdMode } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { DxChartModule } from 'devextreme-angular';
import { Service, GrossProduct } from './app.service';
if(!/lo... |
import { NetworkManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../NetworkManagerClient";
import { ListTagsForResourceRequest, ListTagsForResourceResponse } from "../models/models_0";
import {
deserializeAws_restJson1ListTagsForResourceCommand,
serializeAws_restJson1ListTagsForResourceCom... |
/*
* @author Dino <dinoabsoluto+dev@gmail.com>
* @license
* Copyright 2019 Dino <dinoabsoluto+dev@gmail.com>
*
* 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... |
import { AnalyzeDocumentCommandInput, AnalyzeDocumentCommandOutput } from "../commands/AnalyzeDocumentCommand";
import { DetectDocumentTextCommandInput, DetectDocumentTextCommandOutput } from "../commands/DetectDocumentTextCommand";
import {
GetDocumentAnalysisCommandInput,
GetDocumentAnalysisCommandOutput,
} from ... |
import * as React from 'react';
import {
LoadQueryWrapper,
ErrorDisplay,
useConfirm,
parseIntOrNull,
} from '@neinteractiveliterature/litform';
import InPlaceEditor from '../BuiltInFormControls/InPlaceEditor';
import formatMoney from '../formatMoney';
import describeCoupon from './describeCoupon';
import Apply... |
import { Repository } from '../core/repository';
import { FriendshipRepositoryShowResponseRootObject } from '../responses';
export declare class FriendshipRepository extends Repository {
show(id: string | number): Promise<FriendshipRepositoryShowResponseRootObject>;
create(id: string | number, mediaIdAttributio... |
import styled, { css } from 'styled-components';
import {
HiOutlineLocationMarker,
HiOutlineChatAlt2,
HiOutlineClock,
} from 'react-icons/hi';
export const Container = styled.div`
padding: 48px 32px;
display: flex;
flex-direction: column;
border-top: 1px solid var(--color-border);
`;
export const Title ... |
import { Component, OnInit, ViewChild, OnDestroy } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { AuthService } from 'src/providers/auth.service';
import { User } from 'firebase';
import {IonContent, ModalController} from '@ionic/angular';
import { Profile } from 'src/models/profile/pr... |
const SoknaderTekster = {
'soknader.sidetittel': 'Søknader',
'soknader.brodsmuler.sidetittel': 'Søknader',
'soknader.nye.tittel': 'Nye søknader',
'soknader.nye.ingen-soknader': 'Du har ingen nye søknader.',
'soknader.planlagt.tittel': 'Planlagte søknader',
'soknader.sendt.tittel': 'Tidligere sø... |
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** 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";
/**
* The bandwidth schedule details.
*/
export class BandwidthSchedule e... |
import * as React from 'react';
import { confirmModal } from '@console/internal/components/modals/confirm-modal';
import ModalContent from './ModalContent';
import { ExclamationTriangleIcon } from '@patternfly/react-icons';
import { global_warning_color_100 as warningColor } from '@patternfly/react-tokens';
type Modal... |
import { strict as assert } from "assert"
import { BigNumber } from "ethers"
import { account1, account2, disconnect } from "./accounts"
import { ERC4671 } from "./ERC4671"
function assertBigNumberEqual(actual: any, expected: BigNumber, message: string = null) {
if (message != null) {
console.log("check " ... |
import { Bot } from 'mineflayer';
import { IndexedData } from 'minecraft-data';
import { Item } from 'prismarine-item';
import { Vec3 } from 'vec3';
import { Block } from 'prismarine-block';
import { Entity } from 'prismarine-entity';
import { World } from 'prismarine-world'
declare module 'mineflayer-pathfinder' {
e... |
import { Request, Response, NextFunction } from "express";
export const notFoundHandler = (
request: Request,
response: Response,
next: NextFunction
) => {
const status = 404;
const message = "Resource not found";
response.status(status).json({
error: {
status,
message,
},
});
}; |
import { useCallback } from "react";
import type { MutationHook } from "@commerce/utils/types";
import { CommerceError } from "@commerce/utils/errors";
import useLogin, { UseLogin } from "@commerce/auth/use-login";
import type { LoginBody } from "../api/customers/login";
import useCustomer from "../customer/use-custome... |
import { StyleSheet } from 'react-native';
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
padding: 40,
backgroundColor: '#322f3d'
},
banner: {
width: '100%',
resizeMode: 'contain'
},
title: {
marginTop: 80,
fontFamily: 'Poppins_400Regular'... |
import {Component} from '@angular/core';
@Component({
selector: 'app',
templateUrl: 'app.component.html'
})
export class AppComponent { } |
// ? find a better way to log/debug?
enum LOG_LEVEL {
MUTE = 0,
ERROR = 1,
WARN = 2,
INFO = 3,
DEBUG = 4
}
const VERBOSE_LEVEL = process.env.DEBUG
? LOG_LEVEL.DEBUG
: process.env.NODE_ENV === 'development'
? LOG_LEVEL.INFO
: LOG_LEVEL.WARN
export const debug = (...args: unknown[]): unknown =>
VERB... |
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
import { SharedService } from '../../service/shared.service';
@Component({
selector: 'home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class Ho... |
import { BaseAPI } from '../base'
export const localeAPI = new BaseAPI<AppLocale>({
model: 'system',
section: 'locale',
}) |
import '../server';
import config from '../config';
import User from '../models/User';
import { assert } from 'chai';
import axios, { AxiosInstance } from 'axios';
const BASE_URL = `http://localhost:${config.PORT}/`;
describe('User - Integration', () => {
let client: AxiosInstance;
let token: string;
beforeEac... |
/**
* Copyright 2020 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 ... |
/*
* @license Apache-2.0
*
* Copyright (c) 2021 The Stdlib 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 ap... |
import React from 'react';
import Header from './Header';
import './App.css';
const App = () => {
return (
<div className="app" >
<Header/>
</div>
);
};
export default App; |
import * as React from 'react';
export interface ErrorBoundaryProps {
children: Node;
}
export interface ErrorBoundaryInstance extends React.Component<any, any> {}
export default class ErrorBoundary extends React.Component<
ErrorBoundaryProps,
ErrorBoundaryInstance
> {} |
import {VersionedDataObject} from '../../shared/data-provider/models/versioned-data-object.interface';
export class FeedbackDO implements VersionedDataObject {
id: number;
version: number;
feedback: string;
} |
import * as React from 'react'
export default () => {
return (
<footer className="footer">
<div className="container-fluid">
<p className="text-muted">
Site by{' '}
<a href="https://davidbrownman.com" target="_blank">
David Brownman
</a>. Code available at{... |
import { jumbosizeEmojis } from "../emoji/jumbosizeEmojis"
import { autolink } from "../rules/autolink"
import { blockQuote } from "../rules/blockQuote"
import { codeBlock } from "../rules/codeBlock"
import { customEmoji } from "../rules/customEmoji"
import { emoji } from "../rules/emoji"
import { emote } from "../rule... |
/**
* Represents AWS Cognito token payload
* Useful when using AWS Amplify for authentication
* @export
* @interface ICognitoIdTokenPayload
*/
export interface ICognitoIdTokenPayload {
"at_hash": string,
sub: string,
"cognito:groups": string[],
iss: string,
"cognito:username": string,
nonce... |
import { Test, TestingModule } from '@nestjs/testing';
import { FacturasService } from './facturas.service';
describe('FacturasService', () => {
let service: FacturasService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [FacturasService],
}).comp... |
export class LoginUserDto {
readonly password: string;
readonly username: string;
} |
import React, { FC, ReactNode } from 'react';
import { Route, Routes } from 'react-router';
import { PageNotFound } from '@energyweb/origin-ui-core';
import {
LoginPage,
RequestResetPasswordPage,
ResetPasswordPage,
} from './pages';
import { UserModalsProvider } from './context';
import { UserModalsCenter } from... |
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
/*
* Angular Modules
*/
import { enableProdMode, NgModule, Component } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { L... |
interface Locales {
[key: string]:
| {
name: string
strings: any
dateFns: Locale
}
| undefined
}
const locales: Locales = {
'en-US': {
name: 'English',
get strings() {
return {
translation: require('./base/translation.json'),
}
},
get dateFn... |
import { IState } from "store/state";
const getJobState = (state: IState) => state.job;
export const getJobStatus = (state: IState) => getJobState(state).status;
export const getJobError = (state: IState) => getJobState(state).errorMessage; |
/**
* @license
* Copyright 2018 Google LLC
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
* =============================================================================
*/
/* Original Source: losses.py */
imp... |
// Python Tutor: https://github.com/pgbovine/OnlinePythonTutor/
// Copyright (C) Philip Guo (philip@pgbovine.net)
// LICENSE: https://github.com/pgbovine/OnlinePythonTutor/blob/master/LICENSE.txt
/* TODO
- we're always referring to top-level CSS selectors on the page; maybe
use a this.domRoot pattern like in pytuto... |
import { Injectable, NotFoundException } from '@nestjs/common';
import { CreateTodoDto } from './dto/create-todo.dto';
import { UpdateTodoDto } from './dto/update-todo.dto';
import { Todo } from './models/todo.model';
@Injectable()
export class TodoService {
private todos : Todo[] = [];
constructor() {
... |
export default {
fileName: `/lib.es2019.array.d.ts`,
// File text is copyright Microsoft Corporation and is distributed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
}; |
/// <reference path="pixi.d.ts" />
/// <reference path="p2.d.ts" />
// Type definitions for Phaser CE
// Project: https://github.com/photonstorm/phaser-ce
declare module "phaser-ce" {
export = Phaser;
}
declare class Phaser {
static VERSION: string;
static DEV_VERSION: string;
static GAMES: Phaser.G... |
import axios from "axios";
const testAPI = "https://localhost:44351/api/";
const official = "https://bst-clinic:2020/api/";
export default axios.create({
baseURL: testAPI,
// headers: { "Access-Control-Allow-Origin": "*" },
}); |
import { Rectangle } from "./Rectangle";
import { Circle } from "./Circle";
import { PrototypeRegistry } from "./PrototypeRegistry";
import { Shape } from "./Shape";
describe("prototype", () => {
it("should return green rectangle and green circle", () => {
const greenRectangle = new Rectangle(0, 0, 30, 30, "gree... |
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
],
... |
export * from './defs/channel';
export * from './defs/chat';
export * from './defs/interactive';
export * from './defs/oauth';
export * from './defs/user';
export * from './providers/OAuth';
export * from './providers/Provider';
export * from './services/Channel';
export * from './services/Chat';
export * from './servi... |
import * as React from 'react'
import 'antd/es/button/style'
import 'antd/es/form/style'
import Form, { FormItemProps, FormCreateOption, FormProps } from 'antd/es/form'
import { GetFieldDecoratorOptions } from 'antd/es/form/Form'
import Button from 'antd/es/button'
const FormItem = Form.Item
const { PureComponent, Sus... |
import * as ts from 'typescript';
import { NodeWrap } from './convert-ast';
export declare function getChildOfKind<T extends ts.SyntaxKind>(node: ts.Node, kind: T, sourceFile?: ts.SourceFile): ts.Token<T> | undefined;
export declare function isTokenKind(kind: ts.SyntaxKind): boolean;
export declare function isNodeKind(... |
class PropsStore {
static _instance: PropsStore
private propsByModuleName: Record<string, any> = {}
private pendingPropsByModuleName: Record<string, any> = {}
constructor() {
if (PropsStore._instance) {
return PropsStore._instance
}
PropsStore._instance = this
}
updateProps(moduleName: ... |
export class ExitError extends Error {
code: number;
constructor(message: string, code: number) {
super(message);
this.code = code;
this.name = 'ExitError';
}
} |
import {Injectable, Inject} from "@angular/core";
import {AppConfig} from "../../app.module";
import {Http, Headers, Response} from "@angular/http";
import {Observable} from "rxjs";
interface auth {
username:string,
password:string
}
@Injectable()
export class SupplierService {
constructor(@Inject ('APP_CONFIG_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
*/
import {PRIMARY_OUTLET} from '../src/shared';
import {DefaultUrlSerializer, UrlSegmentGroup, encodeUriQuery, encodeU... |
import sharp from 'sharp'
import fs from 'fs-extra'
import { thumbnails } from './storage'
import path from 'path'
export type Size = 'medium' | 'small' | 'square'
const getDimensions = (size: Size) =>
({
small: { width: 100, height: 100 },
medium: { width: Math.floor((400 * 35) / 45), height: 400 },
sq... |
/**
* SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
* SPDX-License-Identifier: BSD-3-Clause
*/
import '@testing-library/jest-dom/extend-expect';
import ClayMultiStepNav, {ClayMultiStepNavWithBasicItems} from '..';
import {cleanup, fireEvent, render} from '@testing-library/react';
import React f... |
import * as store from './token-store';
export function init(): void {
store.init();
}
export async function getAuthHeader(apikey: string): Promise<string> {
const token = await store.getToken(apikey);
return 'Bearer ' + token;
} |
import { readFileSync } from 'fs'
import { compile } from 'handlebars'
import ERC20ContractData from '@/interfaces/erc20'
import ERC721ContractData from '@/interfaces/erc721'
export default function buildTemplate(
data: ERC20ContractData | ERC721ContractData,
templatePath: string
): string {
const contractTempla... |
import { ref, Ref } from 'vue-demi';
import { QueryVariables } from './types';
import { CombinedError, injectWithSelf } from './utils';
import { VILLUS_CLIENT } from './symbols';
import { Operation } from '../../shared/src';
export function useMutation<TData = any, TVars = QueryVariables>(query: Operation<TData, TVars... |
interface Todo {
id: string;
label: string;
completed: boolean;
createdAt: string;
updatedAt?: string;
};
export default Todo; |
import { NotFoundError } from '../../../../shared/errors/httpErrors/NotFoundError';
import etablissementsService from '../../etablissements.service'
import { EtablissementController } from './EtablissementController';
const controller = new EtablissementController();
describe("EtablissementController", () => {
co... |
import { test } from "zora";
import {
unshift,
getUint24,
getUint48,
queryLeafdir,
queryTile,
parseEntry,
Entry,
createDirectory,
} from "./pmtiles";
test("stub data", (assertion) => {
let data = createDirectory([
{ z: 5, x: 1000, y: 2000, offset: 1000, length: 2000, is_dir: false },
{
z: 14,
x: 163... |
import Mongoose from 'mongoose';
import Logger from '../utils/Logger';
import Wallet from '../models/Wallet';
import Db from '../interfaces/Db';
// @ts-ignore
Mongoose.Promise = Promise;
export default class MongoDb implements Db {
public database: Mongoose.Connection;
private logger: Logger;
public Wallet =... |
import { applyDecorators, UseGuards } from '@nestjs/common';
import { AdminGuard } from '../guards/admin.guard';
export function Admin(isOnlyAdmin: boolean) {
const decorators: (MethodDecorator | ClassDecorator | PropertyDecorator)[] = [
UseGuards(new AdminGuard(isOnlyAdmin))
];
return applyDecorat... |
/*
* 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 {fakeAsync, TestBed, tick} from '@angular/core/testing';
import {APP_BASE_HREF} from '@angular/common';
import {TranslateModule} from '@ngx-translate/core';
import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
import {TestsModule} from '../../modules/tests.module';
import {HeroService} from '../../../modules/he... |
import * as React from 'react';
import { IOppsummering } from '../types';
import { Bekreftelse } from './Bekreftelse';
import { Bolk } from './Bolk';
import { Header } from './Header';
import { SoknadsInfo } from './SoknadsInfo';
interface ISoknadPdfProps {
oppsummering: IOppsummering;
}
const SoknadPdf: React.Fu... |
import cdk = require('@aws-cdk/cdk');
import { CfnReceiptFilter } from './ses.generated';
/**
* The policy for the receipt filter.
*/
export enum ReceiptFilterPolicy {
/**
* Allow the ip address or range.
*/
Allow = 'Allow',
/**
* Block the ip address or range.
*/
Block = 'Block'
}
/**
* Const... |
import { useTranslation } from "next-i18next";
import Head from "next/head";
import { useRouter } from "next/router";
type Props = {
title?: string;
isRecipe?: boolean;
img?: string;
};
const HOST = "https://nononsense.cooking";
const SEO = ({ title, isRecipe, img }: Props) => {
const { t } = useTranslation(... |
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ObjectiveList } from './objectives/objective-list/objective-list.component'
const routes: Routes = [
{ path: '', redirectTo: '/objectives', pathMatch: 'full' },
{ path: 'objectives', component: ObjectiveLis... |
/**
* @file EndpointRound 圆头端点
* @author Auto Generated by IconPark
*/
/* tslint:disable: max-line-length */
/* eslint-disable max-len */
import React from 'react';
import {ISvgIconProps, IconWrapper} from '../runtime';
export default IconWrapper(
'endpoint-round',
true,
(props: ISvgIconProps) => (
... |
/**
* Helper functions for working with angles.
*/
export class Angle {
/**
* Converts an angle from degree to radians.
*
* @param degree The angle in degree.
* @returns The angle in radians.
*/
static DegreeToRadian(degree: number): number {
return degree * Math.PI / 180.0... |
import React, { useEffect, useRef } from 'react';
import { NextPage } from 'next';
import Head from 'next/head'
import Link from 'next/link';
import globalNavActive from '../../../store/global-navactive/slice';
import { globalEndSagaTaskToPromise, wrapper } from '../../../store';
import { getArticleDetailApi, getArticl... |
import {Pitch} from "../../../Common/DataObjects/Pitch";
import {AbstractNotationInstruction} from "./AbstractNotationInstruction";
import {NoteEnum} from "../../../Common/DataObjects/Pitch";
import {AccidentalEnum} from "../../../Common/DataObjects/Pitch";
import {ArgumentOutOfRangeException} from "../../Exceptions";
... |
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import React from 'react'
import { renderToString } from 'react-dom/server'
import { ServerStyleSheet, ThemeProvider, StyleSheetManager } from 'styled-components'
import { Store } from 'redux'
import { I18nextProvider } from 'react-i18next'
import i1... |
const grades = [
{ gradeID: '8', label: '8. klasse' },
{ gradeID: '9', label: '9. klasse' },
{ gradeID: '10', label: '10. klasse' },
{ gradeID: '11', label: 'Vg 1' },
{ gradeID: '12', label: 'Vg 2' },
{ gradeID: '13', label: 'Vg 3' },
];
export default grades; |
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { of as observableOf } from 'rxjs';
import { StoreModule } from '@ngrx/store';
import { ReportFormComponent } from './report-... |
import {isValidElement} from "react";
import {LFC} from "../../_types/LFC";
import {IViewStackItemProps} from "./IViewStackItemProps";
import {IViewTransitions} from "./IViewTransitions";
/**
* An item that can be added to view stacks
*/
export type IViewStackItem =
| {close: true; closeTransitionDuration?: numb... |
import {
GraphQLObjectType,
GraphQLNonNull,
GraphQLBoolean,
GraphQLString,
} from "graphql"
import config from "config"
import { ResolverContext } from "types/graphql"
// The config variables found inside here should never contain
// details that we consider to be private, as they are publicly
// accessible.
... |
import eip55 from "eip55";
import BigNumber from "bignumber.js";
import { NFT, Operation } from "../types";
import { encodeNftId } from ".";
type Collection = NFT["collection"];
type CollectionMap<C> = Record<string, C>;
export type CollectionWithNFT = Collection & {
nfts: Array<Omit<NFT, "collection">>;
};
expor... |
import { Injectable } from '@nestjs/common';
import { UserService } from '../user/user.service';
import { JwtService } from '@nestjs/jwt';
import * as bcrypt from 'bcrypt';
import { CustomerService } from 'src/customer/customer.service';
import { MerchantService } from 'src/merchant/merchant.service';
@Injectable()
e... |
import React from 'react';
import Layout from '../components/layout';
const ContactPage = () => {
return (
<Layout>
<h1>Contact</h1>
<p>The best way to reach me is via @elle0510 on Twitter</p>
</Layout>
);
};
export default ContactPage; |
import { TableListData } from './data.d';
import { AnyAction, Reducer } from 'redux';
import { EffectsCommandMap } from 'dva';
import { addSynonyms, querySynonyms, removeSynonyms, updateSynonyms } from './service';
export interface StateType {
data: TableListData;
}
export type Effect = (
action: AnyAction,
eff... |
import ModuleFormatDatesNombres from "../modules/FormatDatesNombres/ModuleFormatDatesNombres";
export default class Humanizer {
public static humanize_number(value: number, fractionalDigits: number, currency: string): string {
/**
* On décide de toujours chercher une précision sur minimum 3 chif... |
import {
optimize,
HotModuleReplacementPlugin,
NamedModulesPlugin,
NoEmitOnErrorsPlugin,
DefinePlugin,
} from 'webpack';
import { resolve } from 'path';
import * as ExtractTextPlugin from 'extract-text-webpack-plugin';
// import * as UglifyJSPlugin from 'uglifyjs-webpack-plugin';
export default {
entry: ['... |
export * from './title'; |
import _ from 'lodash';
import { MongooseFilterQuery } from 'mongoose';
import { injectable } from 'inversify';
import UserModel, { UserDocument } from '../models/user.model';
import User from '../interfaces/user.interface';
import { QueryOptions } from '../utils/query-builder';
@injectable()
class UserRepository {
... |
import path from 'path';
import {
dialog,
BrowserWindow,
BrowserWindowConstructorOptions,
Event,
MessageBoxReturnValue,
WebPreferences,
OnResponseStartedListenerDetails,
} from 'electron';
import { getCSSToInject, isOSX, nativeTabsSupported } from './helpers';
import * as log from './loggingHelper';
imp... |
import { TaskStatusRepository } from '@/domain/models/celery/taskStatusRepository'
import { StatusDTO } from './statusData'
export class TaskStatusApplicationService {
constructor(
private readonly repository: TaskStatusRepository
) {}
public async get(taskId: string): Promise<StatusDTO> {
const item = ... |
const { registerSuite } = intern.getInterface('object');
const { assert } = intern.getPlugin('chai');
import harness from '@dojo/test-extras/harness';
import { stub } from 'sinon';
import DijitWrapper from '../../../src/dijit/DijitWrapper';
import { v, w } from '@dojo/widget-core/d';
class MockDijit {
public id: str... |
import { ThemeContext } from '@theme/context/ThemeContext';
import { fireEvent, render } from '@testing-library/react';
import preloadAll from 'jest-next-dynamic';
import React from 'react';
import MainHeader from '../';
beforeAll(async () => {
await preloadAll();
});
describe('Header', () => {
it('renders the he... |
/**
* @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
*/
Zone.__load_patch('electron', (global: any, Zone: ZoneType, api: _ZonePrivate) => {
function patchArguments(target: ... |
import { TestBed, async, inject, ComponentFixture } from "@angular/core/testing";
import { DebugElement } from "@angular/core";
import { ReactiveFormsModule, FormGroup, FormControl } from "@angular/forms";
import { NoopAnimationsModule } from "@angular/platform-browser/animations";
import { By } from "@angular/platform... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.