text stringlengths 10 953k |
|---|
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not u... |
/// <reference types="node" />
import { TxOptions, TypedTransaction, TxData, AccessListEIP2930TxData, FeeMarketEIP1559TxData } from '@ethereumjs/tx/dist/types';
import { Transaction, AccessListEIP2930Transaction, FeeMarketEIP1559Transaction } from '@ethereumjs/tx';
import Common from '@ethereumjs/common';
export defaul... |
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { UsersRoutingModule } from './users-routing.module';
import { UsersComponent } from './users.component';
import { MaterialModule } from '@app/material.module';
import {MatDialogModule} from '@angular/material/dialog';
@N... |
import { getRepository, Repository } from 'typeorm';
import { Timesheet } from './../../models/entities/timesheet.entity';
import { ITimesheet } from '../../models/interfaces/i-timesheet';
import { User, Contact } from '../../models/entities';
const timesheetRepo = (): Repository<Timesheet> => {
return getRepository... |
import * as child_process from 'child_process';
import { CompileResult } from './core/create_compilers/interfaces';
export type Route = {
id: string;
handlers: {
type: 'page' | 'route';
file: string;
}[];
pattern: RegExp;
test: (url: string) => boolean;
exec: (url: string) => Record<string, string>;
parts: ... |
import * as React from "react";
import styled from "@alethio/explorer-ui/lib/styled-components";
import PrivacyPolicySvg from "./PrivacyPolicyCookie.svg";
const LogoWrapper = styled.div`
flex: 0 0 auto;
width: 112px;
height: 112px;
padding-top: 18px;
padding-left: 9px;
`;
const LogoInner = styled.... |
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { JwtService } from '@nestjs/jwt';
import axios from 'axios';
import * as jsonwebtoken from 'jsonwebtoken';
@Injectable()
export class ZoomApiService {
constructor(
private configService: ConfigService, // private... |
import { ICategory } from '../';
import { findById } from '../';
describe('findById', () => {
it('should be a function', () => {
expect(typeof findById === 'function').toBe(true);
});
it('should return the correct object', () => {
const id = 8016;
const catObj = findById(id) as ICategory;
expect... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
import React, { useState } from 'react'
import { useWeb3React } from '@web3-react/core'
import styled from 'styled-components'
import { useTranslation } from 'contexts/Localization'
import { Box, Flex, Text, ChevronRightIcon, useModal } from '@pancakeswap/uikit'
import Loading from 'components/Loading'
import CollectRo... |
/*
* 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 may no... |
// (C) 2019-2022 GoodData Corporation
import identity from "lodash/identity";
import { ObjRef, IMeasureMetadataObject } from "@gooddata/sdk-model";
import { MetadataObjectBuilder } from "./factory";
import { builderFactory, BuilderModifications } from "../builder";
/**
* Measure metadata object builder
* See {@link ... |
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ViewPlacesComponent } from './view-places.component';
describe('ViewPlacesComponent', () => {
let component: ViewPlacesComponent;
let fixture: ComponentFixture<ViewPlacesComponent>;
beforeEach(async(() => {
TestBed.configure... |
import { Clickable, Popover, useDebounce } from '@xeo-editor/ui';
import { GetPageQuery } from 'generated';
import { useBlock } from 'hooks/useBlock/useBlock';
import { useEffect, useState } from 'react';
import { FiFileText } from 'react-icons/fi';
import { useIntl } from 'react-intl';
interface Props {
page: GetPa... |
/*!
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Licensed under the Amazon Software License (the "License"). You may not use this file except in compliance with the License. A copy of
* the License is located at
* http://aws.amazon.com/asl/
* or in the "license" file accompa... |
import { Component } from '@angular/core';
@Component({
selector: 'dashboard',
templateUrl: `./dashboard.component.html`
})
export class DashboardComponent {
} |
import * as React from 'react';
import './icon.less';
import IconBase, {
Props,
} from './IconBase';
export {
Props,
} from './IconBase';
export default class Icon extends React.PureComponent<Props> {
render(): React.ReactNode {
return (
<IconBase
{...this.props}
name={`icon eos_ic_${... |
export default {
server_node_offline: 'The current server node is offline',
all_dispatcher_offline: 'There is no online dispatcher node in the current server node'
} |
<TS language="eo" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Dekstre klaku por korekti au etikedo</translation>
</message>
<message>
<source>Create a new address</source>
<translation>... |
export interface VmLogToken {
token: string;
} |
import * as React from 'react';
import Footer from '@/components/atoms/footer';
import Header from './header';
import { useEffect } from 'react';
import Aos from 'aos';
import 'aos/dist/aos.css';
interface ILayoutProps {
title: string;
subtitle?: string;
children: any;
}
const Layout: React.FC<ILayoutProps> = (... |
import { isAddress } from '@ethersproject/address'
import { Contract } from '@ethersproject/contracts'
import { NetworkContext } from 'contexts/networkContext'
import erc20Abi from 'erc-20-abi'
import * as constants from '@ethersproject/constants'
import { useContext, useEffect, useState } from 'react'
import { readP... |
import {ExtensionData, TabInfo, UserSettings} from '../../definitions';
export function getMockData(override = {}): ExtensionData {
return Object.assign({
isEnabled: true,
isReady: true,
settings: {
enabled: true,
theme: {
mode: 1,
bri... |
import axios from "axios";
import React, { useEffect, useState } from "react";
import { Scanitizer } from "./scanitizer";
export const Labelling:React.FC<{}> = () => {
const url = `${process.env.REACT_APP_API_URL}/image`
const [ img, setImg ] = useState("")
useEffect(() => {
axios.get(url, {
headers: {... |
import { QueryStatement } from 'aurora-ts-core';
import { CQMetadata } from 'aurora-ts-core';
export class FindPermissionByIdQuery
{
constructor(
public readonly id: string,
public readonly constraint?: QueryStatement,
public readonly cQMetadata?: CQMetadata,
) {}
} |
import { Middleware, TurnContext, ActivityTypes } from 'botbuilder';
import { Engine } from '@botbuildercommunity/middleware-engine-core';
import { AWSComprehendEngine } from './engine';
/**
* @module botbuildercommunity/middleware-aws-comprehend
*/
export class SentimentAnalysis implements Middleware {
public ... |
import { CommonModule } from '@angular/common';
import {NotaAsistenciaEstudianteRoutingModule} from './nota-asistencia-estudiante-routing.module';
import {NotaAsistenciaEstudianteComponent} from './nota-asistencia-estudiante.component';
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
import {NgModule} from '@angu... |
import crypto from "crypto";
import fs from "fs";
import { Request } from "express";
import base64url from "base64url";
import config from "config";
export let fido2MiddlewareConfig: Fido2MiddleWareConfig = isConfigFile(
process.cwd() + "/config/default.json"
)
? config.get("fido2-middlewareConfig")
: {
db:... |
import { AddressZero, One, Zero } from '@ethersproject/constants';
import type { RaidenAction } from '../actions';
import { ConfirmableAction } from '../actions';
import type { RaidenState } from '../state';
import { initialState } from '../state';
import { transferSecretRegister } from '../transfers/actions';
import ... |
import { Injectable } from '@angular/core'
import { HttpClient } from '@angular/common/http'
//const SERVER_URL = 'http://localhost:9000/subscription'
const SERVER_URL = 'http://resastyle:9000/subscription'
@Injectable()
export class PushNotificationService {
constructor(private http: HttpClient) {}
public sendS... |
import { Profile } from '@/user/profile.model';
export class ProfileAndToken {
profile: Profile;
token: string;
} |
import { expect, fs, wait } from '../test';
import { watch } from '.';
const dir = fs.resolve('tmp/test');
describe('watch', () => {
beforeEach(async () => {
await fs.remove(dir);
await fs.ensureDir(dir);
});
it('adds pattern', async () => {
const pattern = fs.join(dir, '*');
const watcher = wa... |
import {
Component,
OnDestroy,
OnChanges,
AfterViewInit,
forwardRef,
ChangeDetectorRef,
Input,
Output,
EventEmitter,
ContentChild,
TemplateRef,
ViewEncapsulation,
HostListener,
HostBinding,
ViewChild,
ElementRef,
ChangeDetectionStrategy,
Inject,
... |
import * as _ from 'lodash';
import TextField from 'material-ui/TextField';
import * as React from 'react';
import { Blockchain } from 'ts/blockchain';
import { AddressInput } from 'ts/components/inputs/address_input';
import { Alert } from 'ts/components/ui/alert';
import { LifeCycleRaisedButton } from 'ts/components/... |
import { Component } from "react";
interface Contato {
nome: string;
numero: string;
}
class Contatos extends Component<Contato> {
render() {
return (
<div>
<p>
{" "}
{this.props?.nome} ----- {this.props?.numero}
</p>
</div>
);
}
}
export default Contat... |
import { createTransport, SendMailOptions, Transporter } from 'nodemailer'
import { Options as TransportOptions, SentMessageInfo } from 'nodemailer/lib/smtp-transport'
import { ReactElement } from 'react'
import { renderToStaticMarkup } from 'react-dom/server'
import * as Mail from 'nodemailer/lib/mailer'
import reactT... |
export const IS_PUBLIC_DECORATOR = "IS_PUBLIC" |
import {
IFilterToolbarLabels, IFilterTypeOperators, EFilterOperator,
} from '@/types';
const labels: IFilterToolbarLabels = {
save: 'Save',
cancel: 'Cancel',
apply: 'Apply',
download: 'Download',
filterCopySuffix: 'copy',
yourFilters: 'Your filters',
tooltipNew: 'New filter',
tooltipAdd: 'Add filter... |
import { ParsedOperationSchema, Schema } from 'src/types';
import dtsGenerator, { Options } from 'dtsgenerator';
export const generate = async (
parsedSchema: ParsedOperationSchema | Schema[],
config: Options['config'] = {}
) => {
const contents = Array.isArray(parsedSchema)
? parsedSchema
: ([
parsedSchema... |
import { TAdapter } from '@jorel/orm';
export default function testRemove(adapter: TAdapter<any>): void {
const users = adapter('users', 'id');
const reset = async (): Promise<void> => {
const data = [
{ name: 'foo', email: 'foo@foo' },
{ name: 'bar', email: 'bar@bar' },
{ name: 'baz', email:... |
export interface IPutTransactionDto {
amount: number;
commerce: string;
status: string;
product: string;
taxes:number;
transactionDate:Date;
} |
import { Document } from './init';
test('no ref fail', async () => {
expect.assertions(1);
const doc = new Document();
try {
await doc.fetch();
} catch (e) {
expect(e).toEqual(new Error('No ref or path set on Document'));
}
});
test('fetch', async () => {
expect.assertions(7);
const doc = new Do... |
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Routes, RouterModule } from '@angular/router';
import { BaseDataLocalComponent } from './base-data-local.component';
import { LayoutModule } from '../../../../../../layouts/layout.module';
import { DefaultComponent } from... |
import { IsString } from "class-validator";
import { ApiProperty } from "@nestjs/swagger";
export class UserDTO {
@ApiProperty({ description: 'Identificador do usuário' })
@IsString()
readonly id: number;
@ApiProperty({ description: 'Usuário do sistema' })
@IsString()
readonly username: strin... |
// Copyright 2017-2020 @polkadot/react-components 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';
import { SubmittableExtrinsic } from '@polkadot/api/promise/types';
... |
import { DataModel } from './data-model.domain';
export enum StakingType {
Start = 'Start',
Reward = 'Reward',
Warning = 'Warning',
Slash = 'Slash',
}
export class Staking extends DataModel {
public address: string;
public blockNumber: number;
public event: StakingType;
public value: s... |
import React from "react";
import withBulmaProps from "../bulma";
import { foldClassNames } from "../utilities/listUtils";
import { InnerNavbarMenuProps } from "./Navbar.types";
const NavbarMenu: React.FC<InnerNavbarMenuProps> = ({
children,
className,
isActive = false,
...props
}) => {
const classNames = f... |
import {
Hover,
Definition,
createConnection,
TextDocuments,
ProposedFeatures,
InitializeParams,
CompletionItem,
SymbolInformation,
DocumentSymbolParams,
WorkspaceSymbolParams,
TextDocumentPositionParams,
SymbolKind,
Position,
DidChangeWatchedFilesParams,
Text... |
/**
*
*
* OpenAPI spec version: 20160918
*
*
* NOTE: This class is auto generated by OracleSDKGenerator.
* Do not edit the class manually.
*
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 ... |
import React, { useEffect, useState } from 'react';
import { Link, useParams } from 'react-router-dom';
import { FiChevronsLeft, FiChevronRight } from 'react-icons/fi';
import Logo from '../../assets/logo.svg';
import api from '../../services/api';
import { Header, Details, Issues } from './styles';
interface Reposit... |
/**
* References:
* - https://www.researchgate.net/publication/327567188_An_Algorithm_for_Spelling_the_Pitches_of_Any_Musical_Scale
* @module scale
*/
import { all as chordTypes } from "@tonaljs/chord-type";
import { rotate, range as nums } from "@tonaljs/collection";
import { deprecate, note, NoteName, transpose }... |
<?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 XaruCoin</source>
<translation>关于黑币</translation>
</message>
<message>
<location lin... |
import {ethers} from "ethers";
import {bigNumberify} from "ethers/utils";
import {Deployer} from "../src.ts/deploy";
const provider = new ethers.providers.JsonRpcProvider(process.env.WEB3_URL);
const governorWallet = ethers.Wallet.fromMnemonic(process.env.MNEMONIC, "m/44'/60'/0'/0/1").connect(provider);
async functio... |
import { createRef, RefObject } from "react";
import { BehaviorSubject, combineLatest, map } from "rxjs";
import { uniq } from "lodash-es";
import { PIN_TO_TASKBAR } from "@/applications";
import { Constructor } from "@/utils/interface";
import ApplicationService from "../ApplicationService";
import WindowService from... |
import {DIDRecord} from '../models/types';
import {IonKey, IonPublicKeyPurpose, IonRequest, LocalSigner} from '@decentralized-identity/ion-sdk';
import {operationApi} from '../api';
import {AxiosResponse} from 'axios';
import {v4 as uuidv4} from 'uuid';
export async function recoverDid(did: string, originDidRecord: DI... |
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import... |
<TS language="fr" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Cliquer à droite pour modifier l'adresse ou l'étiquette</translation>
</message>
<message>
<source>Create a new address</source>
... |
import { parsePathExpression } from 'chobot/utils/parsePathExpression'
describe('parsePathExpression', () => {
it("parses 'a'", () => {
const actual = parsePathExpression('a')
expect(actual).toEqual([{ s: 'a' }])
})
it("parses 'abc'", () => {
const actual = parsePathExpression('abc')
expect(actu... |
import React from 'react'
import {Navigation} from './Navigation'
type NavigationContainerProps = {
transparentNavigation: boolean
}
export const NavigationContainer: React.FC<NavigationContainerProps> = ({
transparentNavigation = false
}) => {
return <Navigation transparent={transparentNavigation} />
} |
<TS language="sr@latin" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Klikni desnim tasterom za uređivanje adrese ili oznake</translation>
</message>
<message>
<source>Create a new address</sourc... |
export enum KeyCode {
Enter = 13,
Left = 37,
Up = 38,
Right = 39,
Down = 40,
Esc = 27,
Tab = 9,
Dot = 46,
Char0 = 48,
Char9 = 57,
Backspace = 8,
Delete = 46
} |
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { BrowseGridDetailFormComponent } from './browse-grid-detail-form.component';
describe('BrowseGridDetailFormComponent', () => {
let component: BrowseGridDetailFormComponent;
let fixture: ComponentFixture<BrowseGridDetailFormComponent... |
import Ref from "./ref";
import Section from "./section";
export default class ConfigInfo {
remoteUrl: string;
ref: Ref;
relativePath?: string;
section?: Section;
constructor(remoteUrl: string, ref: Ref, relativePath?: string, section?: Section) {
this.remoteUrl = remoteUrl;
this.r... |
import { resolve as resolveED25519 } from '@transmute/did-key-ed25519'
import { resolve as resolveX25519 } from '@transmute/did-key-x25519'
import { resolve as resolveSecp256k1 } from '@transmute/did-key-secp256k1'
import { DIDResolutionOptions, DIDResolutionResult, DIDResolver, ParsedDID, Resolvable } from 'did-resolv... |
import {ComponentPortal, PortalModule} from '@angular/cdk/portal';
import {CdkScrollable, ScrollDispatchModule} from '@angular/cdk/scrolling';
import {MockNgZone} from '@angular/cdk/testing';
import {Component, ElementRef, NgModule, NgZone} from '@angular/core';
import {inject, TestBed} from '@angular/core/testing';
im... |
import { assert, isArray } from '../../util'
import { Iterator } from '../../lazy'
import { Options } from '../../core'
/**
* Takes the documents returned by the aggregation pipeline and writes them to a specified collection.
*
* Unlike the $out operator in MongoDB, this operator can appear in any position in the ... |
export interface AppConfig {
firebase: {
apiKey: string;
authDomain: string;
databaseURL: string;
storageBucket: string;
}
api: {
baseUrl: string;
}
messages: {
maxMessageLengthInBytes: number;
}
donations: {
minDonationAmount: number;
minDonationCurrency: string;
... |
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { QuoteComponent } from './quote/quote.component';
import { ... |
import { Component, OnInit } from '@angular/core';
import { FormGroup, FormBuilder, Validators, FormArray } from '@angular/forms';
import { NbDialogRef } from '@nebular/theme';
import { ContractService } from '../../../shared/services/contract.service';
import * as moment from 'moment';
import { R3DelegatedFnOrClassMet... |
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*----------------------------------------------------------------------... |
// Copyright (C) 2016 Sergey Akopkokhyants
// This project is licensed under the terms of the MIT license.
// https://github.com/akserg/ng2-dnd
import {Injectable} from 'angular2/core';
@Injectable()
export class DataTransferEffect {
static COPY = new DataTransferEffect('copy');
static LINK = new DataTransfe... |
import { DemoConfig } from "../types";
export const demoLovelaceTeachingbirds: DemoConfig["lovelace"] = () => ({
title: "Home",
views: [
{
cards: [
{ type: "custom:ha-demo-card" },
{
cards: [
{
cards: [
{
image: "/asset... |
import { Observable } from 'rxjs';
import { GrpcMethod, GrpcStreamMethod } from '@nestjs/microservices';
export interface BatchQueryRequest {
ids: string[];
}
export interface BatchQueryResponse {
entities: Entity[];
}
export interface BatchMapQueryRequest {
ids: string[];
}
export interface BatchMapQueryRes... |
import {useState, useEffect} from './react';
import {on, off} from './util';
export interface NetworkState {
online?: boolean;
since?: Date;
downlink?: number;
downlinkMax?: number;
effectiveType?: string;
rtt?: number;
type?: string;
}
const getConnection = () => {
if (typeof navigator !== 'object') ... |
"use strict";
var swcHelpers = require("@swc/helpers");
// single line comment
const x = (_param)=>/*todo: refactor any type*/ {
var { y } = _param, rest = swcHelpers.objectWithoutProperties(_param, [
"y"
]);
return {
y,
// another comment
z: rest.z
};
}; // final commen... |
import { clickTarget, startTimeline } from "@jspsych/test-utils";
import htmlButtonResponse from ".";
jest.useFakeTimers();
describe("html-button-response", () => {
test("displays html stimulus", async () => {
const { getHTML } = await startTimeline([
{
type: htmlButtonResponse,
stimulus:... |
import { _JobSummaryList } from "./_JobSummaryList";
import { Structure as _Structure_ } from "@aws-sdk/types";
export const ListJobsOutput: _Structure_ = {
type: "structure",
required: ["jobSummaryList"],
members: {
jobSummaryList: {
shape: _JobSummaryList
},
nextToken: {
shape: {
... |
declare class AVSettings {
constructor();
protected _set<T>(key: string, value: T): void;
protected _change(): void;
client: AVSettings.ClientSettings;
world: AVSettings.WorldSettings;
protected _original: AVSettings.Settings;
initialize(): void;
changed(): void;
get<S extends 'client' | 'worl... |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { InjectionToken, Optional, OnDestroy } from '@angular/core';
import { Platform } from '@angular/cdk/platform';... |
import {
applyFieldOverrides,
applyRawFieldOverrides,
FieldOverrideEnv,
findNumericFieldMinMax,
getLinksSupplier,
setDynamicConfigValue,
setFieldConfigDefaults,
} from './fieldOverrides';
import { MutableDataFrame, toDataFrame } from '../dataframe';
import {
DataFrame,
Field,
FieldColorMode,
Field... |
import { Component } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
import { PhotoPickerComponentCore } from '../../../components/storage/photo-picker-compone... |
import { Fragment, FunctionalComponent, h } from "preact";
import { useCallback } from "preact/hooks";
import ActionButton from "../../../action-button";
import InputText from "../../input-text";
import * as style from "./style.css";
type Props = {
value: string;
onInput?: (value: string) => void;
};
const QueryE... |
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { MySQL... |
import { useCallback, useEffect, useMemo, useState } from 'react';
import { PublicKey } from '@solana/web3.js';
import BN from 'bn.js';
export function isValidPublicKey(key) {
if (!key) {
return false;
}
try {
new PublicKey(key);
return true;
} catch {
return false;
}
}
export async function... |
/*-
* *****
* Concord
* -----
* Copyright (C) 2017 - 2018 Walmart 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
*
... |
import {Component, Inject} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {TuiMobileDialogService} from '@taiga-ui/addon-mobile';
import {TUI_IS_IOS} from '@taiga-ui/cdk';
import {TuiNotificationsService} from '@tai... |
/**
* Enumerates special file type icons that do not map to any file extensions.
* For example, the 'pptx' icon maps to the extensions 'ppt', 'pptm', 'pptx',
* but the 'folder' icon does not map to any extensions and should be obtained
* via this enum.
*/
export enum FileIconType {
docset = 1, // Start at 1 so ... |
// Copyright 2017-2021 @polkadot/app-parachains authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Option, Vec } from '@polkadot/types';
import type { AccountId, BalanceOf, BlockNumber, CandidatePendingAvailability, HeadData, ParaId } from '@polkadot/types/interfaces';
import type { PolkadotRu... |
import {
LitElement,
TemplateResult,
css,
CSSResult,
html,
property,
customElement,
} from "lit-element";
import { User } from "../../data/user";
import { CurrentUser } from "../../types";
import { toggleAttribute } from "../../common/dom/toggle_attribute";
const computeInitials = (name: string) => {
i... |
import { EventEmitter, Uri } from 'vscode';
import { GravatarDefaultStyle } from './config';
import { Container } from './container';
import { GitRevisionReference } from './git/models';
import { GlobalState } from './storage';
import { debounce } from './system/function';
import { filterMap } from './system/iterable';... |
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { Search } from './search';
@NgModule({
declarations: [
Search,
],
imports: [
IonicPageModule.forChild(Search),
],
exports: [
Search
]
})
export class SearchModule {} |
//////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2014-present, Egret Technology.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
/... |
// Client WS-RPC
import './e2e/ws-rpc-client-tests'
// Loom Provider
import './e2e/loom-provider-tests'
import './e2e/loom-provider-eth-get-logs'
import './e2e/loom-provider-eth-filters'
import './e2e/loom-provider-eth-filters-2'
import './e2e/loom-provider-subscribe'
import './e2e/loom-provider-web3-tests'
// EVM
im... |
import { Resolver } from '@parcel/plugin';
import { Dependency, FilePath, PluginLogger, PluginOptions, ResolveResult } from '@parcel/types';
import { match } from 'minimatch';
import { readJsonSync } from 'fs-extra';
import { join } from 'path';
type ResolverParams = {
dependency: Dependency;
options: PluginOp... |
import { Client } from 'discord.js';
import { Tasks, Activity } from '../constants';
import { ActivityTaskOptions } from '../types/minions';
import { GroupMonsterActivityTaskOptions } from '../minions/types';
export default function addSubTaskToActivityTask(
client: Client,
taskName: Tasks,
subTaskToAdd: ActivityT... |
import * as archiver from 'archiver';
import { EventEmitter } from 'events';
import * as fs from 'fs';
import { GaxiosResponse } from 'gaxios';
import globby = require('globby');
import { GoogleAuth, GoogleAuthOptions } from 'google-auth-library';
import { cloudfunctions_v1, google } from 'googleapis';
import fetch fro... |
import { watchEffect } from 'vue'
import useInitialize from '@/composables/useInitialize'
import useMessage from '@/composables/useMessage'
import useTime from '@/composables/useTime'
import useFlags from '@/composables/useFlags'
import { Research } from '@/entities/Research'
import { NarrativeKey, PersonKey, ResearchK... |
import React from 'react';
import { isDeschedulerOn, useDeschedulerInstalled } from 'src/views/templates/utils';
import { DESCHEDULER_URL } from 'src/views/templates/utils/constants';
import MutedTextSpan from '@kubevirt-utils/components/MutedTextSpan/MutedTextSpan';
import { useIsAdmin } from '@kubevirt-utils/hooks/u... |
import {Component} from 'angular2/angular2';
@Component({
selector: 'Home',
template: `
<h2>Home</h2>
`,
directives: []
})
export class Home { } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.