text stringlengths 3.08k 15.5k |
|---|
<filename>libraries/botbuilder-dialogs-adaptive/src/conditions/onCondition.ts
/**
* @module botbuilder-dialogs-adaptive
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { ActionChangeList } from '../actionChangeList';
import { ActionChangeType } from '.... |
import React, { useMemo } from 'react';
import styled from 'styled-components';
import Button from '../../../components/Button';
import Card from '../../../components/Card';
import CardContent from '../../../components/CardContent';
import CardIcon from '../../../components/CardIcon';
import { AddIcon, RemoveIcon } fr... |
<reponame>codeheart09/scikit.js<filename>src/preprocessing/ordinalEncoder.ts
/**
* @license
* Copyright 2021, JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* Unless required by applicable law or agreed to in w... |
import React, { useContext } from 'react';
import { ConfigProvider as AntdConfigProvider } from 'antd';
import { noteOnce } from 'rc-util/lib/warning';
import arEG from './locale/ar_EG';
import zhCN from './locale/zh_CN';
import enUS from './locale/en_US';
import viVN from './locale/vi_VN';
import itIT from './locale/... |
/// <reference lib="webworker" />
import * as matrix from "../../neural-network/engine/matrix";
import * as nnUtils from "../../neural-network/utils";
import * as color from "../../utils/color";
import {
COLOR_A_BIN,
COLOR_B_BIN,
DEFAULT_LEARNING_RATE,
DEFAULT_NN_LAYERS,
DESIRED_LOSS,
DESIRED_R... |
import ec2 = require('@aws-cdk/aws-ec2');
import kms = require('@aws-cdk/aws-kms');
import cdk = require('@aws-cdk/cdk');
import { ClusterIdentifier, DatabaseClusterRef, Endpoint, InstanceIdentifier } from './cluster-ref';
import { BackupProps, DatabaseClusterEngine, InstanceProps, Login, Parameters } from './props';
i... |
<filename>packages/api-page-builder/src/graphql/crud/settings.crud.ts
import { ContextPlugin } from "@webiny/handler/types";
import defaults from "./utils/defaults";
import getPKPrefix from "./utils/getPKPrefix";
import {
PbContext,
DefaultSettings,
SettingsHookPlugin,
InstallSettings
} from "@webiny/ap... |
// Copyright 2015-2020 SWIM.AI 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 ... |
<reponame>chori1001/kibana
/*
* 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 { SavedObjectsClientContract, SavedObjectsF... |
<reponame>Xyzrr/virtual-office<gh_stars>1-10
import React from 'react';
import activeWin from 'xyzrr/active-win';
import * as _ from 'lodash';
import os from 'os';
import iconFigma from './app-icons/figma.ico';
import iconNotion from './app-icons/notion.ico';
import iconVSCode from './app-icons/vscode.ico';
import ico... |
<reponame>suddenlyGiovanni/core
// tracing: off
import "./Operator"
export * as Array from "./Collections/Immutable/Array"
export * as Associative from "./Associative"
export * as Async from "./Async"
export * as Boolean from "./Boolean"
export * as Branded from "./Branded"
export * as Chunk from "./Chunk"
export * a... |
/*
Copyright (c) 2013-2016 Chukong Technologies Inc.
Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd.
http://www.cocos.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limited,
worldwide, royalty-free, ... |
import { expect, use } from 'chai';
import { Contract, Wallet} from 'ethers';
import { deployContract, MockProvider, solidity } from 'ethereum-waffle';
import Stake from '../build/ProveOfStake.json'
import ERC2917 from '../build/ERC2917Impl.json'
import { BigNumber } from 'bignumber.js'
import { ProveOfStake } from "..... |
/* eslint-disable */
import {
ASN1ConstructionError as _ConstructionError,
ASN1Element as _Element,
ASN1TagClass as _TagClass,
} from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
import {
UUID,
_decode_UUID,
_encode_UUID,
} from "../SelectedAttributeTypes/UUID.ta";
e... |
import { useState, useEffect } from 'react';
import { constructQuery } from '@root/src/lib/querystring';
import { ArticleDesign, getCookie } from '@guardian/libs';
import {
incrementUserDismissedGateCount,
setUserDismissedGate,
} from '@frontend/web/components/SignInGate/dismissGate';
import { useSignInGateSelector ... |
import * as React from 'react';
import * as cookie from 'js-cookie';
import fetch from 'isomorphic-unfetch';
import debug from 'debug';
import useErrors from '../useErrors';
import {AuthUser} from "./AuthUser";
import AuthError from "./AuthError";
export const ErrorCodes = {
Unauthorized: 401,
NotActivated: 42... |
<filename>src/service/utterance-test.service.ts
import {Injectable} from '@angular/core';
import {HttpClient, HttpParams} from '@angular/common/http';
import {BehaviorSubject, from, Observable, of} from 'rxjs';
import {catchError, delay, delayWhen, first, flatMap, map, skipWhile} from 'rxjs/operators';
import {ConfigSe... |
import { createLocation, History, Location } from "verlauf";
import PropTypes from "prop-types";
import React from "react";
import { useRouterContext } from "../hooks/useRouterContext";
import matchPath, { MatchResult } from "../matchPath";
const isExternalUrl = new RegExp(/^https?:\/\//);
function isModifiedEvent(ev... |
<filename>src/players/services/players.service.ts
import {
Injectable,
Logger,
Inject,
forwardRef,
OnModuleInit,
} from '@nestjs/common';
import { Environment } from '@/environment/environment';
import { Player, PlayerDocument } from '../models/player';
import { SteamProfile } from '../steam-profile';
import ... |
import { ResultCodes, RequestFlow, RequestFlowBuilder, CallParams } from '../../../internal/compilerSupport/v1';
import { Fluence, FluencePeer } from '../../../index';
/*
-- file to generate functions below from
service HelloWorld("default"):
sayHello(s: string)
getNumber() -> i32
func callMeBack(callback: ... |
<gh_stars>0
import {
DirectiveNode,
FieldNode,
IntValueNode,
FloatValueNode,
StringValueNode,
BooleanValueNode,
ObjectValueNode,
ListValueNode,
EnumValueNode,
NullValueNode,
VariableNode,
InlineFragmentNode,
ValueNode,
SelectionNode,
NameNode,
SelectionSetNode,
} from 'graphql';
import ... |
import { DictionaryService } from './../dictionary.service';
import { Component } from '@angular/core';
import { Storage } from '@ionic/storage';
import { NavController, LoadingController, Loading } from 'ionic-angular';
import { FormBuilder, FormControl, Validators } from '../../../node_modules/@angular/forms';
const... |
<gh_stars>1-10
// Base BIF Parser from https://github.com/chemoish/videojs-bif/blob/master/src/parser.js
// LICENSE: https://github.com/chemoish/videojs-bif/blob/master/LICENSE
import JDataView from 'jdataview';
// Offsets
export const BIF_INDEX_OFFSET = 64;
export const NUMBER_OF_BIF_IMAGES_OFFSET = 12;
export cons... |
import * as tsModule from "typescript";
import { Node, Program, SourceFile } from "typescript";
interface IVisitDependenciesContext {
program: Program;
ts: typeof tsModule;
project: ts.server.Project | undefined;
directImportCache: WeakMap<SourceFile, Set<SourceFile>>;
emitIndirectImport(file: SourceFile, importe... |
import React from 'react';
import debounce from 'lodash/debounce';
import { transparentize } from 'polished';
import { HTMLElementProps } from '@leafygreen-ui/lib';
import { cx, css } from '@leafygreen-ui/emotion';
import { fontFamilies } from '@leafygreen-ui/tokens';
import { palette, uiColors } from '@leafygreen-ui/p... |
<reponame>ca-d/deno_std<filename>http/cookie.ts<gh_stars>0
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
// Structured similarly to Go's cookie.go
// https://github.com/golang/go/blob/master/src/net/http/cookie.go
import { assert } from "../_util/assert.ts";
import { toIMF } from "../dateti... |
<reponame>Cuiyansong/datart<filename>frontend/src/app/components/ChartGraph/Scorecard/Scorecard.tsx
/**
* Datart
*
* Copyright 2021
*
* 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
*
... |
'use-strict';
import * as Ajv from 'ajv';
import * as path from 'path';
import * as fs from 'fs';
const ajv = new Ajv({
allErrors: true,
});
enum SchemaType {
INTENTS = 'intents',
TRAITS = 'traits',
}
enum PayloadType {
REQUEST = 'request',
RESPONSE = 'response',
ATTRIBUTES = 'attributes',
STATES = 'st... |
import { DropdownMultiSelectOption, DropdownMultiSelectProps } from '../DropdownMultiSelect';
import { DropdownSelectOption, DropdownSelectProps } from '../DropdownSelect/DropdownSelect';
import { DropdownProps } from '../../molecules/Dropdown';
import { EditableDataComponent } from '../../../types';
import { InputColo... |
<filename>x-pack/plugins/infra/common/alerting/logs/types.ts
/*
* 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 { i18n } f... |
import styled, { css, keyframes } from "styled-components";
import { colors } from "@/utils/style-utils";
export const StatsContainer = styled.div`
display: flex;
margin-top: 236px;
`;
export const Tabs = styled.div.attrs(() => ({
className: "stat-panel-tabs",
}))`
width: 713px;
.tab-button {
background: ${co... |
import './style.css';
import * as THREE from 'three';
import * as PIXI from 'pixi.js';
import Player from './assets/components/Player';
import Loader from './assets/components/Loader';
import Background from './assets/components/Background';
import UI from './assets/components/UI';
import Events, { CollectibleArgs } fr... |
<gh_stars>0
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { environment } from './../environments/environment';
import { Observable, of } from 'rxjs';
import { catchError, map, tap } from 'rxjs/operators';
import { Prestador, PrestadorEspecialidad, P... |
import convert from '../index';
import { RichText as PrismicRichText } from 'prismic-dom';
import { IRichTextBlock, IRichTextSpan, IMarkdownNode } from '../types';
import { inspect } from 'util';
import { parseMarkdown } from '../utils/parse-markdown';
import { runGenerator, spans } from '../generators/generators';
co... |
/*
* 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... |
/**
* Contient l'ensemble des constantes communes a l'application
*/
/*jslint node: true */
var HOFC_NAME = '<NAME>.';
/**
* Tableau permettant de convertir la chaine date récupérée en objet date
*/
var listeMois = {
"JANVIER": "01",
"FÉVRIER": "02",
"MARS": "03",
"AVRIL": "04",
... |
<gh_stars>1-10
import { tplEngineInit } from '@omni-door/utils';
import rules_style_css from './rules_style_css';
import rules_style_less from './rules_style_less';
import rules_style_scss from './rules_style_scss';
import rules_style_all from './rules_style_all';
const tpl =
`\`\${use_strict}
const path = require('... |
import { GameLiftClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GameLiftClient.ts";
import { CreateBuildInput, CreateBuildOutput } from "../models/models_0.ts";
import {
deserializeAws_json1_1CreateBuildCommand,
serializeAws_json1_1CreateBuildCommand,
} from "../protocols/Aws_json1_1.ts";
im... |
<gh_stars>0
import some from 'lodash.some';
import reverse from 'lodash.reverse';
import includes from 'lodash.includes';
import isEqual from 'lodash.isequal';
import pick from 'lodash.pick';
import flatten from 'lodash.flatten';
import { getBuildArtifacts, BuildArtifacts } from '../artifacts/BuildArtifacts';
import C... |
import { DatePicker as BaseDatePicker } from '@arco-design/web-react';
import { implementRuntimeComponent } from '@sunmao-ui/runtime';
import { css } from '@emotion/css';
import { Type, Static } from '@sinclair/typebox';
import { FALLBACK_METADATA, getComponentProps } from '../sunmao-helper';
import {
DatePickerProps... |
import React, { Fragment, useEffect, useState } from 'react';
import Form from "antd/es/form";
import { FormComponentProps } from "antd/lib/form";
import { Badge, Button, Card, Divider, Icon, message, Popconfirm, Table } from 'antd';
import Save from './save';
import SearchForm from "@/components/SearchForm";
import Se... |
import unescape from 'https://esm.sh/lodash/unescape?no-check'
import React, { ComponentType, ReactElement } from 'https://esm.sh/react'
import { renderToString } from 'https://esm.sh/react-dom/server'
import { RendererContext, RouterContext } from './context.ts'
import { AsyncUseDenoError, E400MissingDefaultExportAsCo... |
<filename>uui/data/processing/views/__tests__/LazyListView.tree-no-counts.test.ts<gh_stars>10-100
import { LazyDataSource } from "../../LazyDataSource";
import { LazyListView } from "../LazyListView";
import { DataSourceState, LazyDataSourceApi } from "../../types";
import { runDataQuery } from '../../../querying/runDa... |
<gh_stars>1-10
import { Animation } from '../../interface';
import { TransitionOptions } from '../../utils/transition';
const DURATION = 500;
const EASING = 'cubic-bezier(0.36,0.66,0.04,1)';
const OPACITY = 'opacity';
const TRANSFORM = 'transform';
const TRANSLATEX = 'translateX';
const CENTER = '0%';
const OFF_OPACIT... |
/**
* @desc 由于 regl 使用大量字符串而非 WebGL 常量,因此需要映射
*/
import { gl } from '@antv/l7-core';
import regl from 'regl';
// @see https://github.com/regl-project/regl/blob/gh-pages/lib/constants/primitives.json
export const primitiveMap: {
[key: string]:
| 'points'
| 'lines'
| 'line loop'
| 'line strip'
| ... |
import { Injectable, Injector, ComponentRef, TemplateRef, InjectionToken, Inject, Optional, SkipSelf, OnDestroy } from '@angular/core';
import { Overlay, OverlayRef, OverlayConfig } from '@angular/cdk/overlay';
import { ComponentPortal, PortalInjector, TemplatePortal } from '@angular/cdk/portal';
import { NxMessageToas... |
import {
Badge,
Button, ButtonProps,
ButtonVariant,
ExpandableSection,
ExpandableSectionToggle,
SearchInput, Split,
SplitItem,
Stack,
StackItem,
Title, Tooltip
} from '@patternfly/react-core';
import { global_BackgroundColor_100, global_palette_black_1000, global_spacer_lg } from... |
import { BettererLogger } from '@betterer/logger';
import assert from 'assert';
import { BettererFileΩ } from './file';
import { BettererFileTestResultΩ } from './file-test-result';
import {
BettererFileTestDiff,
BettererFileIssue,
BettererFilesDiff,
BettererFileTestResult,
BettererFileBase
} from './types';... |
import World from "./World.js";
interface DrawCellFn {
(row: number, col: number, currentValue: number, nextValue?: number): void;
}
export default class Game {
public world: World;
public canvas: HTMLCanvasElement;
public ctx: CanvasRenderingContext2D;
public framesPerSecond: number;
public hoverCol: num... |
import * as svg from "../helpers/svg";
import { requestTypeToCssClass } from "../transformers/styling-converters";
import { Context, ContextCore } from "../typing/context";
import { ChartRenderOption } from "../typing/options";
import { RectData } from "../typing/rect-data";
import { HoverEvtListeners } from "../typing... |
import AuthorizationHandler = require("./AuthorizationHandler");
import Logging = require("./Logging");
import Config = require("./Config");
import QuickPulseEnvelopeFactory = require("./QuickPulseEnvelopeFactory");
import QuickPulseSender = require("./QuickPulseSender");
import Constants = require("../Declarations/Con... |
import { ModuleFormat, OutputOptions, RollupOptions } from 'rollup';
import externals from 'rollup-plugin-node-externals';
import nodePolyfills from 'rollup-plugin-polyfill-node';
import visualizer from 'rollup-plugin-visualizer';
import { getBabelInputPlugin, getBabelOutputPlugin } from '@rollup/plugin-babel';
import ... |
import type { DivineVoxelEngineWorld } from "../../../../out/World/DivineVoxelEngineWorld";
function visitAll(
gx0: number,
gy0: number,
gz0: number,
gx1: number,
gy1: number,
gz1: number
// visitor: (x: number, y: number, z: number) => {}
) {
const positons = [];
const gx0idx = Math.floor(gx0);
const gy0idx... |
import Query, {typescript as ts} from '@wfh/plink/wfh/dist/utils/ts-ast-query';
import fs from 'fs';
// import ts, {Extension} from 'typescript';
import Path from 'path';
import {EOL as eol} from 'os';
import { createWriteStream } from 'fs-extra';
const cwd = process.cwd();
const {Extension} = ts;
// import api from '_... |
/*
* Copyright 2021 Chaos Mesh 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 agreed... |
import React, { useState } from 'react'
// import { ChartContext, ChartProvider } from '@echarts-readymade/core'
// import { Bar } from '@echarts-readymade/bar'
import { ChartProvider, Bar } from 'echarts-readymade'
import type { LegendPosition, Field } from 'echarts-readymade'
import styled from 'styled-components'
im... |
import tl = require("azure-pipelines-task-lib/task");
import AnalyzeWithPMDImpl from "./AnalyzeWithPMDImpl";
import { isNullOrUndefined } from "util";
import FileSystemInteractions from "../Common/FileSystemInteractions";
const os = require("os");
const path = require("path");
import xml2js = require("xml2js");
const f... |
import { ElementRef } from '@angular/core';
import { assert } from './util';
export interface PointerEventsConfig {
element?: HTMLElement;
elementRef?: ElementRef;
pointerDown: (ev: any) => boolean;
pointerMove?: (ev: any) => void;
pointerUp?: (ev: any) => void;
zone?: boolean;
capture?: boolean;
pass... |
<reponame>voyleg/tensorboard
/* Copyright 2020 The TensorFlow 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 re... |
import { Box, Button, CircularProgress, DialogContent, DialogProps, InputAdornment, makeStyles, OutlinedInput, Typography } from "@material-ui/core";
import { SearchOutlined } from "@material-ui/icons";
import ArrayOpenedIcon from "@material-ui/icons/ArrowDropDown";
import ArrayClosedIcon from "@material-ui/icons/Arrow... |
/* eslint-disable @typescript-eslint/camelcase */
// Copyright 2017-2019 @polkadot/apps 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 { Route } from '@polkadot/apps-routing/types';
import { ApiProps } from ... |
<filename>src/api/CompilerContext.ts
import { TokenPosition } from './Token';
import { RowType } from './RowType';
import { RowDescriptor } from './RowDescriptor';
import { PyErrorType } from './ErrorType';
import { PyError, PyErrorContext } from './Error';
import { CompilerBlockContext, CompilerBlockType } from './Com... |
const Directions = ['U', 'D', 'L', 'R'];
const oppositeDirs = {
U: 'D',
D: 'U',
L: 'R',
R: 'L',
};
const dirTrans = {
N: 'D',
S: 'U',
W: 'R',
E: 'L',
};
enum legend {
ice = ' ',
obstacle = 'O',
snow = 'S',
goal = 'G',
}
class Point {
constructor(x, y) {
this.x = x;
this.y = y;
}
... |
<reponame>tec27/shieldbattery
import { Immutable } from 'immer'
import swallowNonBuiltins from '../../common/async/swallow-non-builtins'
import { TypedIpcRenderer } from '../../common/ipc'
import {
defaultPreferences,
FindMatchRequest,
GetMatchmakingMapPoolBody,
GetPreferencesResponse,
MatchmakingPreferences,... |
/* eslint-disable react/jsx-one-expression-per-line */
/* eslint-disable react/self-closing-comp */
/* eslint-disable jsx-a11y/label-has-associated-control */
/* eslint-disable jsx-a11y/label-has-for */
/* eslint-disable jsx-a11y/anchor-is-valid */
/* eslint-disable radix */
/* eslint-disable no-param-reassign */
/* es... |
/*!
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
import * as vscode from 'vscode'
import * as path from 'path'
import { Runtime } from 'aws-sdk/clients/lambda'
import { getNormalizedRelativePath } from '../../utilities/pathUtils'
import {
API... |
import { Color, SerializedColor } from "../core/color.js";
import { Hooks } from "../core/hooks.js";
import { Node, NodeState } from "../core/node.js";
import { SerializedTerminal, Terminal } from "../core/terminal.js";
import { SerializedVector, Vector } from "../core/vector.js";
import { LOD, ViewPort } from '../comm... |
<filename>packages/next/build/webpack/config/blocks/css/index.ts<gh_stars>1-10
import curry from 'lodash.curry'
import path from 'path'
import webpack, { Configuration } from 'webpack'
import MiniCssExtractPlugin from '../../../plugins/mini-css-extract-plugin'
import { loader } from '../../helpers'
import { Configurati... |
import { getDefaultFog, setDefaultFog } from "../states/useDefaultFog"
import { getDefaultLight, setDefaultLight } from "../states/useDefaultLight"
import { getPerformance, setPerformance } from "../states/usePerformance"
import { getOrbitControls, setOrbitControls } from "../states/useOrbitControls"
import { getGravit... |
import * as vscode from 'vscode';
import * as fs from 'fs';
import * as path from 'path';
import { promisify } from 'util';
import * as https from 'https';
import { EkatiFS } from './fileSystemProvider';
export class WatDbExplorerProvider implements vscode.TreeDataProvider<WatDbTreeItem> {
localConnection: string... |
<filename>src/numberFormat.ts
import { count, escapeRegExp, substringBefore } from './utils'
import { CurrencyDisplay, NumberFormatStyle, NumberInputOptions, UnitDisplay } from './api'
import NumberFormatOptions = Intl.NumberFormatOptions
export const DECIMAL_SEPARATORS = [',', '.', '٫']
export const INTEGER_PATTERN =... |
import {
Client,
AddressType,
GeocodeResult,
} from '@googlemaps/google-maps-services-js';
import {
BadRequestException,
InternalServerErrorException,
Logger,
NotFoundException,
} from '@nestjs/common';
import { Repository } from 'typeorm';
import { mapValues, some } from 'lodash';
import geoTz from 'geo-... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*----------------------------------------------------------------------... |
<gh_stars>0
import * as db from '../..'
import { AnyProps } from '../../types'
import fieldPath from '../../utils/fieldPath'
import prefixed from '../../utils/prefixed'
import Schema from '../Schema'
export type UnwindStage = {
$unwind: Record<string, any>
}
export type LookupStage = {
$lookup: Record<string, any... |
import { Duplex, PassThrough, Readable, Stream, Writable } from 'stream'
import StreamFactory from './helpers/stream-factory'
import { MessageHandler, GenericMessage } from './message'
export type Component = Source | Tube | Sink
type ErrorEventHandler = (err: Error) => void
abstract class AbstractComponent {
publ... |
<reponame>daDaiMa/tencentcloud-monitor-grafana-app
import * as _ from 'lodash';
import { Datasources, SERVICES } from './tc_monitor';
import { GetServiceFromNamespace, ParseMetricQuery } from './common/constants';
export default interface DatasourceInterface {
instanceSettings: any;
backendSrv: any;
templateSrv:... |
import React, {
isValidElement,
cloneElement,
createElement,
useState,
useEffect,
useCallback,
memo,
FC,
ReactElement,
} from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import {
TableCell,
TableRow,
TableRowProps,
Checkbox,
} fro... |
<reponame>isc-zkrowiak/vscode-objectscript<gh_stars>0
import fs = require("fs");
import glob = require("glob");
import path = require("path");
import vscode = require("vscode");
import { AtelierAPI } from "../api";
import { config, documentContentProvider, FILESYSTEM_SCHEMA, fileSystemProvider } from "../extension";
im... |
import { createServer, Server } from 'http';
// eslint-disable-next-line node/no-unsupported-features/node-builtins
import { createSecureServer } from 'http2';
import { promisify } from 'util';
import Koa from 'koa';
import koaStatic from 'koa-static';
import koaCors from '@koa/cors';
import c2k from 'koa-connect';
imp... |
import { useEffect } from '@storybook/addons'
import { Meta, Story } from '@storybook/react'
import { useState } from 'react'
import { nanoid } from 'nanoid'
import { Select, SelectProps, SelectReturnType } from './Select'
const meta: Meta = {
title: `Data Input/Select`,
component: Select,
parameters: {
con... |
import path from 'path'
import readline, { ReadLine } from 'readline'
import fs from 'fs'
import { spawn } from 'child_process'
import { version as currentVersion } from '../package.json'
const getInputFromUser = async (rl: ReadLine, question: string): Promise<string> => new Promise<string>(
(resolve, reject) =>
... |
/**
* Copyright 2016 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 appli... |
import Cheerio from "cheerio";
import { Parsers } from ".";
const months = ["janvier", "février", "mars", "avril", "mai", "juin",
"juillet", "août", "septembre", "octobre", "novembre", "décembre"];
export const DefaultParsers: Parsers = [];
DefaultParsers.push((rawData: string, current: any): void => {
curr... |
import React, { useState, useEffect, useRef } from 'react';
import { createUseStyles } from 'react-jss';
import { VariableSizeList } from 'react-window';
import AutoSizer from 'react-virtualized-auto-sizer';
import { useStoreState } from 'pullstate';
import { UIStore } from '../stores/UIStore';
import { TextField } fro... |
// LICENSE : MIT
"use strict";
import { EventEmitter } from "events";
import { moduleInterop } from "@textlint/module-interop";
const debug = require("debug")("textlint:module-loader");
const isFile = require("is-file");
import { isPluginRuleKey } from "../config/config-util";
import { loadFromDir } from "./rule-loader... |
import * as fs from 'fs';
import {
deserialize,
GrpcObject,
loadPackageDefinition,
MethodDefinition,
PackageDefinition,
serialize,
ServiceDefinition,
} from 'grpc';
import * as path from 'path';
import { IConversionOptions, IParseOptions, Method, Namespace, NamespaceBase, Root, Service, Type } from 'protobufjs';... |
<filename>__tests__/main.ts
import Endpoint from '../src'
import createTransport from './utils/transport'
import { encode } from '../src/utils/schema'
import fetch from 'node-fetch'
const Person = { name: String, age: Number } as const
const server = new Endpoint(
{
add: { params: [Number, Number], result: Numbe... |
import type { AppRouteRecordRaw } from '/@/router/types';
import type { TabContentProps } from './tab.data';
import type { Ref } from 'vue';
import type { TabItem } from '/@/store/modules/tab';
import type { DropMenu } from '/@/components/Dropdown';
import { computed, unref } from 'vue';
import { TabContentEnum, MenuE... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
import {Hash} from "../utils/hash";
import * as http from "http";
import * as Q from "q";
import * as cordovaServer from "cordova-serve";
import * as path from "path";
impor... |
import {Component, OnInit, ViewEncapsulation} from '@angular/core';
import {ToastrService} from '../../../@core/mock/toastr-service';
import {RestApiService} from '../../../@core/mock/rest-api.service';
import {ShareService} from '../../../@core/mock/share.service';
import {NbDialogService} from '@nebular/theme';
impor... |
import { command } from 'yargs'
import { take, tap } from 'rxjs/operators'
import { logInfo } from '../utilities/log'
import {
FuseBox,
JSONPlugin,
QuantumPlugin,
RawPlugin,
SassPlugin,
EnvPlugin,
WebIndexPlugin,
UglifyJSPlugin
} from 'fuse-box'
import { resolve } from 'path'
import { NgProdPlugin } fro... |
//// react
import React from 'react';
//// react native
import {
StyleSheet,
Dimensions,
ScrollView,
Image,
Platform,
Linking,
} from 'react-native';
//// react navigation
//// language
import {useIntl} from 'react-intl';
//// ui, styles
import {Block, Icon, Button, Input, Text, theme} from 'galio-framework... |
<filename>src/v1/controller/room/create/index.ts
import { DocsType, RoomStatus, RoomType, Week } from "../Constants";
import { Cyclical, Docs } from "../Types";
import { Status } from "../../../../Constants";
import { FastifyReply } from "fastify";
import { FastifySchema, PatchRequest } from "../../../types/Server";
im... |
<reponame>dongs0104/sourcegraph
import { ControllerProps as GenericExtensionsControllerProps } from '@sourcegraph/extensions-client-common/lib/client/controller'
import {
ExtensionsProps as GenericExtensionsProps,
UpdateExtensionSettingsArgs,
} from '@sourcegraph/extensions-client-common/lib/context'
import { C... |
import React from 'react'
import { Field, Form, Formik } from 'formik'
import * as yup from 'yup';
import Modal from '@mui/material/Modal'
import Box from '@mui/material/Box'
import Button from '@mui/material/Button';
import { RadioField } from '../common/RadioField'
import { CheckboxField } from '../common/CheckboxFie... |
<filename>src/engine/data/scripts/common/constants.ts<gh_stars>0
import {
Add,
customEffectClip,
customSkinSprite,
Divide,
GreaterOr,
If,
Lerp,
Multiply,
Power,
Remap,
ScreenAspectRatio,
Subtract,
UnlerpClamped,
} from 'sonolus.js'
import { options } fr... |
<reponame>UniqueStatic/UniqueHackDayDashboard
let language = 0;
export function setLanguage(lang: number) {
language = lang;
}
// prettier-ignore
const messages: Pick<{ [k: string]: string }, API.Message> = {
LoginNeeded: ['你需要登录','Login needed'][language],
PasswordWrong: ['密码错误','Wrong password']... |
import { createRoot, isRoot, TMPFOLDER, LIBFOLDER } from "../root"
import { AbapFsService } from ".."
import { mock, MockProxy } from "jest-mock-extended"
import { isAbapFolder } from "../abapFolder"
import { Folder, isFolder } from "../folder"
import sampleNodeContents from "../testdata/nodeContents1.json"
import samp... |
import { RouteProp } from '@react-navigation/native';
import { StackNavigationProp } from '@react-navigation/stack';
import React, {
useCallback,
useContext,
useEffect,
useLayoutEffect,
useRef,
useState,
} from 'react';
import { InteractionManager, Animated } from 'react-native';
import { ScrollView } from ... |
<filename>src/game/scenery/island/physics/math.ts
import * as THREE from 'three';
/**
* This scans all grid cells that the
* given line segment goes through.
* Stops iterating if the callback
* returns true.
* Using a variant of the DDA line
* algorithm found here:
* https://jsfiddle.net/6x7t4q1o/5
*/
export f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.