text stringlengths 10 953k |
|---|
export const suiteStartEvent = () => ({uid: "FooBarSuite", cid: "0-0", title: "foo", runner: {"0-0": {}}});
export const suiteEndEvent = () => ({uid: "FooBarSuite", cid: "0-0", title: "foo"});
export const testStartEvent = () => ({uid: "FooBarTest", fullTitle: "fullTitle", type: 'test', cid: "0-0", title: "foo", runner... |
import {Component, OnInit} from "@angular/core";
import {Router, ActivatedRoute} from "@angular/router";
import {Data} from "../data";
import {AppService} from "../app.service";
@Component({
moduleId: module.id,
selector: 'showTask',
templateUrl: './showTask.component.html',
styleUrls: ['./showTask.component.c... |
import { Trans } from '@lingui/macro'
import LangSwitcher from '../components/LangSwitcher'
import { withLang } from '../components/withLang'
export default withLang(() => (
<div>
<Trans>Hello</Trans>
<LangSwitcher />
</div>
)) |
import { Injectable } from '@angular/core';
import { DataService } from '../../dataconnect';
import { Router } from '@angular/router';
@Injectable()
export class LocationService {
constructor(private _dataserver: DataService, private _router: Router) { }
getLocationDetails(req: any) {
return this._dat... |
import React from "react";
import { FormattedMessage } from "react-intl";
import { Button, MainPageWithScroll } from "components";
import { EmptyResourceListView } from "components/EmptyResourceListView";
import HeadTitle from "components/HeadTitle";
import PageTitle from "components/PageTitle";
import { useDestinati... |
import { Observable } from 'rxjs';
import { NetworkType } from '../model/blockchain/NetworkType';
import { NetworkHttp } from './NetworkHttp';
import { QueryParams } from './QueryParams';
/**
* Http extended by all http services
*/
export declare abstract class Http {
private networkHttp;
private networkType;... |
import {
withMappedNavigationProps,
withMappedNavigationAndConfigProps
} from "react-navigation-props-mapper"
import { StackNavigator } from "react-navigation"
import { HomeScreen } from "./home_screen"
import { PugsScreen } from "./pugs_screen"
import { PugCardScreen } from "./pug_card_screen"
export const AppN... |
import React, { useRef, useMemo, useImperativeHandle } from 'react';
import { useTheme } from '@geist-ui/react';
import { ButtonTypes } from '@/utils/prop-types';
import { getButtonChildrenWithIcon } from './utils';
interface Props {
type?: ButtonTypes;
shadow?: boolean;
auto?: boolean;
disabled?: boolean;
i... |
import { PluginObject } from 'vue';
import Component from 'vue-class-component';
import { Emit, Prop } from 'vue-property-decorator';
import { ModulVue } from '../../utils/vue/vue';
import { ADD_NAME, LINK_NAME } from '../component-names';
import { MLink, MLinkIconPosition, MLinkSkin } from '../link/link';
import WithR... |
/**
* Dex
* Pokemon Showdown - http://pokemonshowdown.com/
*
* Handles getting data about pokemon, items, etc. Also contains some useful
* helper functions for using dex data.
*
* By default, nothing is loaded until you call Dex.mod(mod) or
* Dex.forFormat(format).
*
* You may choose to preload some things:
... |
/* This file is generated by createIcons.js any changes will be lost. */
import { IconType } from '../createIcon';
declare const WeightIcon: IconType;
export default WeightIcon; |
export const ChevronsDown = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="feather feather-chevrons-down">
<polyline points="7 13 12 18 17 13"></polyline><polyline points="7 6 12 11 17 6"></polyline>
</svg>`; |
import React from "react";
import Demo from "lib/Demo/demo";
import API from "example/API/api";
import Card from "lib/Card/card";
import ToastExample from "./toast.example";
// tslint:disable-next-line: no-var-requires
const codeDemo = require("!!raw-loader!./toast.example.tsx");
const ToastDemo = () => {
const opt... |
import { Component, OnInit } from "@angular/core";
import { AppComponent } from "../app.component";
@Component({
selector: "app-credits",
templateUrl: "./credits.component.html",
styleUrls: ["./credits.component.scss"]
})
export class CreditsComponent implements OnInit {
constructor(private app: AppComponent) ... |
// TODO
// 1. shadow
// 2. Image: sx, sy, sw, sh
import {createElement, normalizeColor} from './core';
import { PathRebuilder } from '../core/PathProxy';
import * as matrix from '../core/matrix';
import Path, { PathStyleProps } from '../graphic/Path';
import ZRImage, { ImageStyleProps } from '../graphic/Image';
import... |
import { ApiProperty } from "@nestjs/swagger";
import { Type } from "class-transformer";
import { IsDefined, IsString, ValidateNested } from "class-validator";
class DataValidation {
@ApiProperty()
@IsString({message:'debe contener el parámetro ip'})
ip: string;
@ApiProperty()
@IsString({mess... |
import type {
CodeKeywordDefinition,
ErrorObject,
KeywordErrorDefinition,
AnySchema,
} from "../../types"
import type KeywordCxt from "../../compile/context"
import {_, Name} from "../../compile/codegen"
import {alwaysValidSchema} from "../../compile/util"
import {SchemaCxt} from "../../compile"
export type On... |
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. 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
*
... |
import { IsString} from 'class-validator'
export class jobDataDTO {
@IsString()
public id: string
@IsString()
public name: string
public data: any
} |
/*
* Copyright 2020 Spotify AB
*
* 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 to i... |
export const VAnt = [-10, -10, -10, 10, 24, 0]; |
import { Card } from '../../../interfaces'
import Set from '../POP Series 6'
const card: Card = {
name: {
en: "Piplup",
},
illustrator: "Atsuko Nishida",
rarity: "Common",
category: "Pokemon",
set: Set,
dexId: [
393,
],
hp: 60,
types: [
"Water",
],
stage: "Basic",
attacks: [
{
name: {
... |
import { EventEmitter } from './event-emitter';
import { Socket } from './socket';
import { App } from './app';
import { getMappedState, Errors } from './utils';
export type assetsConfigType = {
[moduleName: string]: {
js?: string[],
css?: string[],
isLib?: boolean
} // configure the as... |
import { Component, OnInit } from '@angular/core';
import { first } from 'rxjs/operators';
import { AccountService } from '@app/_services';
@Component({ templateUrl: 'list.component.html', styleUrls: ['./list.component.css'] })
export class ListComponent implements OnInit {
//users = null
// public columnDef... |
import fs from 'fs';
import path from 'path';
import { build_dir, dev, manifest } from '@sapper/internal/manifest-server';
import { Handler, Req, Res } from './types';
import { get_server_route_handler } from './get_server_route_handler';
import { get_page_handler } from './get_page_handler';
import { lookup } from './... |
import { config, Logform, Logger, transport } from 'winston';
import { UserTransformFunction } from './transforms/types';
export interface Levels<Type> {
error: Type;
warn: Type;
info: Type;
verbose: Type;
debug: Type;
silly: Type;
}
/** A key/value pair of strings to associated winston Transport instance... |
import React, { FC, useEffect } from "react";
import { PageEntry, ConfigEntry } from "data/definitions";
import ContentPart from "../../contentPart";
import { Footer } from "@components/footer";
import Head from "next/head";
import { useInitializeClass, useIsMobile } from "src/hooks";
import dynamic from "next/dynamic"... |
import Literal, { LiteralΔ$ } from '@runtime/types/Literal/Literal';
import { isSuccessOf } from '@algebraic/types/Result/Functions';
describe ('Literal Type', () => {
it ('Symbol identifier exists', () => {
const payload = 'some lit value';
expect (Literal (payload)._.type).toBe (LiteralΔ$);
});
it ('W... |
import retargetEvents from 'react-shadow-dom-retarget-events';
export { property } from './decorators';
export interface IAttributeSerializer<T = any> {
/**
* Deserializing function called to convert an attribute value to a property
* value.
*/
fromAttribute?(value: string): T;
/**
* Serializing f... |
import { Strategy } from 'passport-http-bearer';
import { PassportStrategy } from '@nestjs/passport';
import { Injectable } from '@nestjs/common';
import { AccountService } from '../services/account.services';
@Injectable()
export class HttpStrategy extends PassportStrategy(Strategy) {
constructor(
private reado... |
interface IDottracesDataTimePanelBindings {
[key: string]: any;
localStartDate: any;
localEndDate: any;
changeDate: any;
class: any;
changePlay: any;
play: any;
edit: any;
cancel: any;
}
const DottracesDataTimePanelBindings: IDottracesDataTimePanelBindings = {
localStartDate: '... |
export default function address(
referer: string,
user: string,
host: string
): string {
const match = referer.match('.+/ssh/([^/]+)$');
const fallback = user ? `${user}@${host}` : host;
return match ? `${match[1].split('?')[0]}@${host}` : fallback;
} |
import { MonthlyTransactions } from './monthly-transactions';
export class TypedTransactions {
incomes: MonthlyTransactions[] = [];
expenses: MonthlyTransactions[] = [];
savings: MonthlyTransactions[] = [];
} |
import { Injectable, Type } from '@nestjs/common';
import { Reflector } from '@nestjs/core';
import {
EVENT_LISTENER_EVENT_NAME,
EVENT_LISTENER_TYPE,
} from './airgram.constants';
import { EventListenerType } from './enums/event-listener-type.enum';
import { EventName } from './airgram.types';
@Injectable()
export... |
import { AngularDemoPage } from './app.po';
describe('angular-demo App', () => {
let page: AngularDemoPage;
beforeEach(() => {
page = new AngularDemoPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to app!');
});
}); |
import * as http from "http";
import * as debug from "debug";
import App from "./app";
debug("ts-express:server");
const port = normalizePort(process.env.PORT || 3000);
App.set("port", port);
const server = http.createServer(App);
server.listen(port);
server.on("error", onError);
server.on("listening", onListening)... |
import firebase from "firebase";
var firebaseConfig = {
apiKey: "AIzaSyD_P87GdS5zbKbSRYvB1txWG1gM-xYJjUc",
authDomain: "discounter-813bc.firebaseapp.com",
databaseURL: "https://discounter-813bc-default-rtdb.firebaseio.com",
projectId: "discounter-813bc",
storageBucket: "discounter-813bc.appspot.com",
messa... |
import { link, typedObject } from '../cache/builders/build-decorators';
import { AUTHORIZATION } from './authorization.resource-type';
import { autoserialize, deserialize, inheritSerialization } from 'cerialize';
import { HALLink } from './hal-link.model';
import { Observable } from 'rxjs';
import { RemoteData } from '... |
/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* ?Map Test
*/
import configureStore from "redux-mock-store";
import { mount } from "enzyme";
import Maps from "./Maps";
import { Provider } from "react-redux";
import ThemeToggle from "../ThemeToggle";
jest.mock("@react-google-maps/api", () => {
return ... |
<TS language="th" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>คลิกขวาเพื่อแก้ไขที่อยู่หรือชื่อ</translation>
</message>
<message>
<source>Create a new address</source>
<translation>สร้า... |
function trailingZeroes(n: number): number {
let res = 0
let d = 5
while (d <= n ){
res += Math.floor(n / d)
d *= 5
}
return res
} |
import './style.scss'
import * as React from 'react'
import { Element } from 'react-scroll'
import { Component } from 'components/common'
interface Props { }
interface State { }
export class Overview extends Component<Props, State> {
constructor(props: Props) {
super(props)
}
render() {
return <Eleme... |
import type { FC } from 'react';
import { Box, Card, Container, Grid, Link, Typography } from '@material-ui/core';
const HomeClients: FC = (props) => (
<Box
sx={{
backgroundColor: 'background.paper',
py: 15
}}
{...props}
>
<Container maxWidth="lg">
<Typography
align="cente... |
/** @format */
import Context from './context';
export declare namespace Middleware {
type Fn<TContext extends Context> = (ctx: TContext, next: () => Promise<void>) => Promise<unknown> | void;
interface Obj<TContext extends Context> {
middleware: () => Fn<TContext>;
}
type ExtFn<BaseContext exte... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
import { expect } from 'chai';
import cons from '../../src/constants/constants'
import { AutocompleteService } from '../../src/services/autocomplete.service';
import { TripleStore } from '../../src/config/configfile.model';
import { DbConfig } from '../../src/routes/models/dbconfig.model';
import { IAutocompleteService... |
/**
* Start the Express Web-Server
*
* created by Sean Maxwell Apr 14, 2019
*/
import ExampleServer from './ExampleServer';
const exampleServer = new ExampleServer();
exampleServer.start(3000); |
export const PODCAST_PAGE_SIZE = 100;
export interface Podcast {
id: string;
title: string;
} |
import { EventKind } from "../fetchNbaFeeds";
import { api } from "../../api";
import { getTeamFromEspnAbbreviation } from "../nbaAbbreviationMap";
import fs from "fs";
import chalk from "chalk";
import { JsonInput } from "../../../types";
export async function getEspnEvents(date: string): Promise<EventKind[]> {
con... |
import { handler } from '../src';
import { payload, headers } from './fixtures/release.json';
const mockHttp = (method: string, payload: any, headers: any) => {
const req: any = {
method,
body: payload,
headers: Object.keys(headers).reduce((prev, curr) => {
prev[curr] = headers[curr];
prev[cu... |
// (C) 2020 GoodData Corporation
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable header/header */
/* THIS FILE WAS AUTO-GENERATED USING CATALOG EXPORTER; YOU SHOULD NOT EDIT THIS FILE; GENERATE TIME: 2020-04-30T12:04:51.660Z; */
import { newAttribute, newMeasure, IAttribute, IMeasure, IMeasure... |
/**
* Copyright © 2019 Johnson & Johnson
*
* 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 to i... |
import '@/scss/cell-swipe-button.scss'
import Vue from 'vue'
import { VNode } from 'vue/types/vnode'
export default Vue.extend({
name: 'w-cell-swipe-button',
props: {
type: {
type: String,
default: 'default',
},
},
render (h): VNode {
const classes = [
'weui-swiped-btn',
... |
/**
* @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
*/
export declare function parseDurationToMs(duration: string): number; |
import { Component, OnInit, Input } from '@angular/core';
import { ActivatedRoute, Params } from '@angular/router';
import { Location } from '@angular/common';
import { AssociatesService } from '../../services/associatesService/associates.services';
import { Router } from '@angular/router'
import 'rxjs/add/operator/sw... |
import * as vscode from 'vscode';
import { CodeInspector } from '../../codeInspector';
import { IEndpointExtractor, ILanguageExtractor, IMethodExtractor, ISpanExtractor } from '../extractors';
import { GoMethodExtractor } from './methodExtractor';
import { GoSpanExtractor } from './spanExtractor';
export class GoLan... |
// *** 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 { input as inputs, output as outputs, enums } from "../../types";
import * as utilities from "../../utilities";
/*... |
import { BadRequestException, Injectable, NotFoundException } from '@nestjs/common';
import { FiatRepository } from 'src/shared/models/fiat/fiat.repository';
import { isString } from 'util';
import { Fiat } from './fiat.entity';
@Injectable()
export class FiatService {
constructor(private fiatRepo: FiatRepository) {... |
/* eslint-disable @typescript-eslint/indent */
/* eslint-disable max-classes-per-file */
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import { GLclampf4, GLfloat3 } from 'webgl-operate... |
/*
* Copyright 2020 CJWW Development
*
* 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 agree... |
import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NbAuthModule, NbDummyAuthStrategy } from '@nebular/auth';
import { NbSecurityModule, NbRoleProvider } from '@nebular/security';
import { of as observableOf } from 'rxjs';
import {... |
import rootStore from '@vue-storefront/core/store'
import { isServer } from '@vue-storefront/core/helpers'
import { Route } from 'vue-router'
import evInitiateCheckout from '../events/InitiateCheckout'
declare const fbq
export function beforeEach (to: Route, from: Route, next) {
const currency = rootStore.state... |
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { FormsModule, Validators } from '@angular/forms';
import { TdLoadingService } from '@covalent/core/loading';
import { TdDialogService } from '@covalent/core/dialogs';
import { IAlertConfig } from '@covalent/cor... |
import blessed = require("blessed");
import Events = require("events");
type IKeyEventArg = blessed.Widgets.Events.IKeyEventArg;
export class View extends Events {
static keyListeners: Map<string, Array<(key: string) => void>> = new Map();
private static handleKey(__: any, key: IKeyEventArg) {
const listener... |
import { Box, Flex } from "@chakra-ui/react";
import React from "react";
import ToC from "./toc";
export default function Sidebar({ children, fields }) {
return (
<Flex id="home" direction={{ base: "column", md: "row" }}>
<Box as="nav" aria-label="Main Navigation" w="280px" pr={{ base: 0, md: 10 }} flexSh... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*----------------------------------------------------------------... |
import {configurePersistable} from 'mobx-persist-store';
// localStorage configuration
configurePersistable({
debugMode: __DEV__,
storage: {
setItem: async (key, value) => {
await localStorage.setItem(key, value);
return Promise.resolve();
},
getItem: async key => {
const value = awai... |
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="he">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="14"/>
<source>About Bithereum</source>
<translation type="unfinished"><... |
import { ZWaveError, ZWaveErrorCodes } from "../error/ZWaveError";
import {
getBitMaskWidth,
getMinimumShiftForBitMask,
validatePayload,
} from "../util/misc";
type Brand<K, T> = K & { __brand: T };
type BrandedUnknown<T> = Brand<"unknown", T>;
export type Maybe<T> = T | BrandedUnknown<T>;
export const unknownNum... |
import HtmlWebpackPlugin from "html-webpack-plugin";
import * as path from "path";
import { Configuration as WebpackConfiguration } from "webpack";
import { Configuration as WebpackDevServerConfiguration } from "webpack-dev-server";
const rootPath = path.resolve(__dirname, "..");
interface Configuration extends Webpa... |
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
/// <reference types="cypress" />
// ***************************************************************
// Each command should be properly documented using JSDoc.
// See https://jsdoc.app/index.html for refere... |
import { Card } from '../../../interfaces'
import Set from '../POP Series 1'
const card: Card = {
name: {
en: "Masquerain",
},
illustrator: "Kagemaru Himeno",
rarity: "Uncommon",
category: "Pokemon",
set: Set,
dexId: [
284,
],
hp: 70,
types: [
"Grass",
],
evolveFrom: {
en: "Surskit",
},
sta... |
import API from '@/utils/axios';
import store from '@/store';
import log from '@/utils/log';
const login = async (req: {
/** 用户名或邮箱 */
nameOrMail: string;
/** 密码 */
password: string;
}): Promise<{
// eslint-disable-next-line camelcase
access_token: string;
email: string;
name: string;
}> => {
/** 因为后... |
import { injectable, inject } from "tsyringe";
import { IAutomobileRepository } from '../interfaces/interfaceRepository/IAutomobileRepository'
import { IAutomobile } from '../interfaces/interfaceDTO/IAutomobileDTO'
import { AutomobileEntitie } from '../models/AutomobileEntitie'
@injectable()
class CreateAutomobileServ... |
import { Component, HostListener, Injector } from '@angular/core';
import { NzModalService, NzMessageService } from 'ng-zorro-antd';
import { AppComponentBase } from '@shared/component-base';
@Component({
selector: 'header-storage',
template: `
<div (click)="_click()">
<i nz-icon type="tool"></i>
{... |
// defineSchema is a utility that is primarily used for type inference
// when declaring form schemas. Type inference is provided in the component
// options (provided as the argument). The returned value has artificial types
// for TSX / manual render function / IDE support.
import { ElementsSchemas, ReadonlySchema }... |
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { CardService } from '../shared/card';
import { CardEditModalComponent } from '@contacts/shared/card/components';
import { ProfileService } from '@shar... |
export const version = 27; // version to replaced
export const testEnvironment = true; |
export * from './createIcelandicNameBody.dto'
export * from './updateIcelandicNameBody.dto' |
class BaseUrlController {
constructor() {}
// GET: '/expressadminarea/baseurl'
public static getDomainName(_req, res): any {
res.send({ data: res.locals.baseUrl })
}
}
export default BaseUrlController |
import Orphanage from '../models/Orphanage';
import imagesView from './images_view';
export default {
render(orphanage: Orphanage) {
return {
id: orphanage.id,
name: orphanage.name,
latitude: orphanage.latitude,
longitude: orphanage.longitude,
about: orphanage.about,
instructi... |
/** @module PlantCircleIllustration */
import React, {FC, memo, useState} from 'react';
type PlantCircleIllustrationProps = {
/** The width of the illustration with unit sizing (px, rem, etc). */
width?: string;
/** The height of the illustration with unit sizing (px, rem, etc). */
height?: string;
/** Deter... |
import { NgModule } from '@angular/core';
import { NxInputModule } from '@aposin/ng-aquila/input';
import { NxSliderModule } from '@aposin/ng-aquila/slider';
import { ExamplesSharedModule } from '../examples-shared.module';
import { SliderBasicExampleComponent } from './slider-basic/slider-basic-example';
import { Slid... |
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
import * as React from 'react'
import { render, unmountComponentAtNode } from 'react-dom'
import { act } from 'react-dom/test-utils'
import ... |
export interface Node {
x: number;
y: number;
}
export type Tuple<T> = [T, number];
export class PriorityQueue<T extends Node> {
heap: Tuple<T>[] = [];
insert(val: T, priority: number): void {
if (!this.heap.length || this.heap[this.heap.length - 1][1] > priority) {
this.heap.push([val, priority]);... |
export type PlaybackStatus = 'running' | 'stopped' | 'paused'
export interface PlaybackState {
status: PlaybackStatus
duration: number
pausedAt: number
startTime: number
} |
// ChakraUI
import {
Tooltip,
IconButton,
useBoolean,
useClipboard,
} from "@chakra-ui/react";
// Icon
import { FaLink } from "react-icons/fa";
export default function CopyURL() {
const [copied, setCopied] = useBoolean(false);
const { onCopy } = useClipboard(
typeof window !== "undefined" && window.lo... |
import { Component, ComponentInterface, Host, Prop, h } from '@stencil/core';
import { GlobalConfig } from '@app/utils';
/**
* TODO: Arranges tabs within a bar.
* @group tabs
* @slot default - The default slot.
*/
@Component({
tag: 'plus-tabs-bar',
styleUrl: 'tabs-bar.scss',
shadow: true,
})
export class Tab... |
import { ApiProperty } from '@nestjs/swagger';
import { Entity, Column, PrimaryGeneratedColumn, Index } from 'typeorm';
@Entity()
@Index(['chain', 'tokenId', 'accountId', 'actionId'])
export class LoanAction {
@ApiProperty()
@PrimaryGeneratedColumn()
id: number;
@ApiProperty()
@Column({ comment: '... |
import * as React from 'react';
import './App.css';
import logo from './logo.svg';
import * as backend from './backend';
class App extends React.Component<{}, { env: { [key: string]: string } }> {
public async componentWillMount() {
this.setState({
env: await backend.getEnv()
});
console.log(this... |
import Knex from 'knex';
export async function dropColumn(
knex: Knex,
tableName: string,
columnName: string,
): Promise<void> {
await knex.schema.raw(`
ALTER TABLE ${tableName}
DROP COLUMN IF EXISTS "${columnName}"
CASCADE;
`);
} |
import { Column, Entity, PrimaryGeneratedColumn } from "../../../../../src"
import { Index } from "../../../../../src/decorator/Index"
@Index(["name", "text"], { where: `"name" IS NOT NULL AND "text" IS NOT NULL` })
@Entity()
export class Post {
@PrimaryGeneratedColumn()
id: number
@Column()
name: str... |
import { makeAutoObservable } from "mobx";
import type { StoreType, MeetingInfo, MemberInfoType } from "./types";
const state: StoreType = {
isConnectedWS: false,
meetingInfo: {},
memberList: [],
memberOfNotList: [],
};
const store = makeAutoObservable({
...state,
get qaStatus() {
return state.meetin... |
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Subscription } from 'rxjs';
import {AlertService} from '../../services/common/AlerteService';
// tslint:disable-next-line:component-selector
@Component({ selector: 'alert', templateUrl: 'alert.component.html' })
export class AlertComponent impleme... |
type index = {[key: string]: any};
export interface IComponentConfig {
name: string, // 组件名称
props?: index, // 组件props
attrs?: index, // 组件attrs
children?: IComponentConfig[] | string[],
parentName?: string, // 父组件名称
droppable?: boolean, // 组件是否可以放置元素
id?: string,
type?: string,
placeholder?: string,
... |
export function validarEmail(email: string): boolean {
const regexEmail =
/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@(?!gmail\.com\.br)((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return !!email.trim().match(regexEmail);
} |
import crypto from 'crypto';
export namespace CryptoService {
type shaAlgorithm = 'sha256' | 'sha512';
export function sha(value: string, algorithm: shaAlgorithm = 'sha256'): string {
const hashValue = crypto
.createHash(algorithm)
.update(value)
.digest('base64');
return hashValue;
}
... |
import { Component, OnInit } from '@angular/core';
import { routerTransition } from '../../router.animations';
import { DataSource } from '@angular/cdk/collections';
import {BlueprismService} from '../../services/BlueprismService';
import { BlueprismModel } from '../../models/BlueprismModel';
import { Observable } from... |
import * as SDK from "azure-devops-extension-sdk";
import { ICodeEditorContribution, ICodeEditorContributionEndpoints } from "azure-devops-extension-api/Git/CodeEditorTypes";
SDK.register("my-code-editor-contribution", () => {
const contribution: ICodeEditorContribution = {
register: (endpoints: ICodeEdito... |
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import {LoadingComponent} from './loading.component';
describe('LoadingComponent', () => {
let component: LoadingComponent;
let fixture: ComponentFixture<LoadingComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTest... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.