text stringlengths 3.08k 15.5k |
|---|
import * as FileSaver from "file-saver";
import React, { ComponentProps, Fragment, MouseEvent, useContext } from "react";
import { useAlert } from "react-alert";
import { useCookies } from "react-cookie";
import { useTranslation } from "react-i18next";
import { RouteComponentProps, withRouter } from "react-router-dom";... |
// cssTool Flex
import React, { useState } from "react";
import styles from "./index.module.scss";
import {
InputNumber,
Radio,
RadioChangeEvent,
Switch,
message,
Col,
Row,
} from "antd";
// flex container interface
interface containerMap_row {
"flex-direction": string[];
"flex-wrap": string[];
"ju... |
import * as T from "@effect-ts/core/Effect"
import * as Ex from "@effect-ts/core/Effect/Exit"
import * as O from "@effect-ts/core/Option"
import * as fc from "fast-check"
import * as S from "../src"
import { number, string } from "../src"
import * as Arbitrary from "../src/Arbitrary"
import * as Encoder from "../src/E... |
import {AfterViewChecked, AfterViewInit, Component, Input, OnDestroy, ViewChild} from '@angular/core';
import {MetricRecord} from '../../services/api-client.service';
import {Chart} from 'chart.js';
import * as prettyBytes from 'pretty-bytes';
Chart.defaults.global.responsive = true;
Chart.defaults.global.maintainAspe... |
// 与坐标相关的
// 坐标点
import CalcChain from "./CalcChain";
export type Point = [number, number]
// 判断是否在范围内
function inRange(a: number, [x1, x2]: Point): boolean {
return (x1 <= a && a <= x2) || (x2 <= a && a <= x1);
}
// 判断某个点是否在某个线上
export function isPointInPath(point: Point, path: Point[]): boolean {
const [x... |
<reponame>Biological-Computation/crn-engine
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// (FP) This file implements the table view (specifically for simulation results). Note that this does not implement the actual table: it makes use of the table component that's implemented in Knockou... |
<reponame>Meuko/baseline-commit-mgr
import { fileReader } from "../../utils/utils";
import {
FileStructure,
FileContentStructure,
SupplierType,
Contents,
} from "../types";
// Current test values, these are supposed to be sourced from
// a single source of truth.
const fileImporter = async (folders: string[])... |
// Copyright 2018 <NAME> <<EMAIL>>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... |
import { Context } from "@azure/functions";
import {
ManagedApi as BaseManagedApi,
IApiHandlerInstance,
ApiMethod,
ApiHeadersDict,
IApiInvocationParams,
IApiInvocationResult,
ManagedApiInternal,
HttpError
} from 'ts-api-decorators';
import { AzureFunctionHandlerFunc, IAzureFunctionsTimer } from "./AzureFunction... |
<reponame>OCM-Jerez/OCMpre2020liq20210814
import { Injectable } from '@angular/core';
// https://stackoverflow.com/questions/54476526/how-to-reload-the-header-component-when-the-variable-value-changes-via-service/54476754
import { BehaviorSubject, Subject } from 'rxjs';
import { AVALAIBLE_YEARS } from '../../assets/da... |
import { AuthConfig } from '@sasjs/utils/types'
import { Job, PollOptions } from '../..'
import { getTokens } from '../../auth/getTokens'
import { RequestClient } from '../../request/RequestClient'
import { JobStatePollError } from '../../types/errors'
import { Link, WriteStream } from '../../types'
import { delay, isN... |
<reponame>ThisALV/rpt-webapp-client
import { Injectable } from '@angular/core';
import { RptlProtocolService, RptlState } from './rptl-protocol.service';
import { Observable, Subject } from 'rxjs';
import { CommandParser } from './command-parser';
import { ServiceSubject } from './service-subject';
import { ServiceCont... |
// ets_tracing: off
import * as T from "@effect-ts/core/Effect"
import type { Cause } from "@effect-ts/core/Effect/Cause"
import type { HasClock } from "@effect-ts/core/Effect/Clock"
import * as Clock from "@effect-ts/core/Effect/Clock"
import * as FiberRef from "@effect-ts/core/Effect/FiberRef"
import * as L from "@e... |
import { LogicGrid } from './LogicGrid';
import { Happener } from './Happener';
import { HappenerCallbacksInterface } from './HappenerCallbacksInterface';
import { GetThreeStringsFromInput } from './GetThreeStringsFromInput';
import promptSync from 'prompt-sync';//const prompt = require('prompt-sync')({ sigint: true })... |
<filename>src/fmgc/src/flightphase/FlightPhaseManager.ts<gh_stars>0
import { Phase, PreFlightPhase, TakeOffPhase, ClimbPhase, CruisePhase, DescentPhase, ApproachPhase, GoAroundPhase, DonePhase } from '@fmgc/flightphase/Phase';
import { VerticalMode } from '@shared/autopilot';
import { FmgcFlightPhase } from '@shared/fl... |
import { Property } from "csstype";
import { css, cssProperties, cssPropertyValue, fontFaceCss, keyframesCss, splitProperties } from "./css";
import { AnimationDefinition, CSSProperties, ElementStyle, FontFaceDefinition, KeyFrames, PropertyType, Registerable, RegisteredStyles, Rules, StyleCollection, Styles, Variable... |
<reponame>Jackzmc/voice-exploit-destroyer
/**
@namespace Managers
@module CommandManager
*/
import path from 'path'
import Logger from '../Logger.js'
import { Client, Collection } from 'discord.js';
import Command, { CommandConfigOptions, CommandHelpOptions } from '../types/Command.js';
let instance;
//TODO: Add dis... |
import * as U from "./utils"
import { Packet } from "./packet"
import {
REPORT_RECEIVE,
SRV_MODEL_RUNNER
} from "./constants"
import { JDService } from "./service"
import { pack, unpack } from "./struct"
import { ModelRunnerCmd, ModelRunnerReg } from "./constants"
import { bufferToArray, NumberFormat } from "./... |
<reponame>benny123tw/WHMS-App
import { ipcRenderer } from "electron/renderer";
import { UploadConfigSchema, Employee, Project } from "whms";
import { checkLocalHost } from "./utils/online";
window.addEventListener("DOMContentLoaded", async () => {
let firstConnectStatus = await checkLocalHost();
onlineToast(fi... |
<reponame>tearsofphoenix/Q-js
/*
* Copyright (c) 2018 <NAME> (<EMAIL>).
*
* 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 requ... |
import React, { useEffect, useMemo, useCallback, useState, useRef } from 'react';
import {
toNumber,
isString,
isNumber,
isBoolean,
isFunction,
isObject,
isUndefined,
isNull,
debounce,
} from 'lodash-es';
import { Type, Static } from '@sinclair/typebox';
import { WidgetProps } from '../../types/widget... |
import * as React from 'react';
import Helmet from 'react-helmet';
import { Box, Flex } from '@rebass/grid';
import { toast } from 'react-toastify';
import { Hacker } from '../../api';
import { HackerStatus, IAccount, IHacker, UserType } from '../../config';
import { Button, H1, H2, MaxWidthBox } from '../../shared/E... |
import 'dotenv/config';
import pMap from 'p-map';
import {
Command,
CommandType,
ExecCommandOption,
logOutput,
Package,
runTopologically,
spawn,
spawnStreaming,
ValidationError,
} from '@lerna-lite/core';
import { FilterOptions, getFilteredPackages, Profiler } from '@lerna-lite/optional-cmd-common';
... |
import { GenericAttribute } from './attributes/index';
import { Attribute, AttributesValues, AttributeDescriptorMap, CloneAttributesCtor } from './transaction'
import { tools, eventsApi } from '../object-plus/index'
import { toAttributeDescriptor } from './typespec'
import { CompiledReference } from '../traversable'
c... |
<reponame>joelimgu/Le_jeu_de_Nim<gh_stars>1-10
// @ts-ignore
const prompt = require('prompt-sync')();
type StartingEntity = "player" | "computer"
let fin_du_jeu = false // represents if the game has ended
/*
returns the sum of the elements of the list using xor condition
*/
function sumXor(list: number[]): num... |
// Copyright 2018 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, ... |
<reponame>nkholski/billionaire-space-golf
import { state } from "./state";
import { height, width } from "./constants";
// const fontCanvas = document.createElement("canvas");
// const fontCtx = fontCanvas.getContext("2d");
export const txtCanvas = document.createElement("canvas");
export const txtCtx = txtCanvas.getC... |
import * as React from "react";
import { useState, useEffect, useRef } from "react";
import styles from "./react-slider.module.sass";
const ReactSlider = (props) => {
const [activePage, setActivePageIndex] = useState(0);
const [pagesArray, setPagesArray] = useState([]);
const [automatic, setAutomatic] = useState... |
import { Component, Prop, h, State, Event, EventEmitter } from "@stencil/core";
import moment from "moment";
import extendMoment from "moment-range";
@Component({
tag: "adl-calendar",
styleUrl: "calendar.scss",
shadow: true
})
export class Calendar {
@Prop() colorInput: string ="red";
@Prop() first: string;
... |
<reponame>gguoss/client<filename>packages/client-p2p/src/sync/index.ts<gh_stars>0
// Copyright 2017-2018 @polkadot/client-p2p authors & contributors
// This software may be modified and distributed under the terms
// of the ISC license. See the LICENSE file for details.
import { Config } from '@polkadot/client/types';... |
<filename>public/app/client/cli/src/commands/completion.ts
import { addCommand } from "../cmd";
import { exit } from "../lib/process";
import { Argv, showCompletionScript } from "yargs";
import { BaseArgs } from "../types";
import { homedir } from "os";
import * as fs from "fs";
import * as path from "path";
const YAR... |
import * as vscode from "vscode";
import { NodeBase } from "./models/nodeBase";
import { AtelierAPI } from "../api";
import { config, projectsExplorerProvider } from "../extension";
import { WorkspaceNode } from "./models/workspaceNode";
import { outputChannel } from "../utils";
import { DocumentContentProvider } from... |
import {Component, OnDestroy, OnInit} from '@angular/core';
import {Pagina} from '../../../../models/pagina';
import {ActivatedRoute, Params, Router} from '@angular/router';
import {TarifaService} from '../../../../services/tarifa.service';
import {ITarifa} from '../../../../contracts/ITarifa';
import {IModeloTarifar... |
<reponame>EOS-Nation/bosvote-snapshots
import { EosioVoter, EosioDelband, ForumAccounts, ForumVote, ForumProxies, ForumProposal, ForumTallies, ForumTally } from "./interfaces";
import { defaultAccount, countStaked, defaultStats } from "./tallies";
export function generateForumProxies(votes: ForumVote[], delband: Eosio... |
<reponame>JonathanWilbur/pkcs-ts<filename>source/modules/PKCS-15/OidDO.ta.ts
/* eslint-disable */
import {
ASN1ConstructionError as _ConstructionError,
ASN1Element as _Element,
ASN1TagClass as _TagClass,
OBJECT_IDENTIFIER,
} from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
impo... |
import React from "react";
import styled from "@emotion/styled";
import {
WireframeContainer, withWireframeAnnotation,
} from "src/Wireframes";
import { useLocalStorage } from "src/useLocalStorage";
export const Main = styled.div`
padding: 2em 4em;
min-height: 30em;
`;
const SectionBase = styled.div`
border... |
import {input, RunStatus} from '@covid-policy-modelling/api'
import {PoolConnection} from 'mysql2/promise'
import 'source-map-support/register'
import SQL from 'sql-template-strings'
import {assertEnv} from '../../../lib/assertions'
import {toYYYYMMDD} from '../../../lib/dateFunctions'
import {
createSimulation,
ge... |
<reponame>xmaxinex4/redux-data-service<filename>src/TestUtils/Service.ts
import { forEach, isEmpty, defaults, upperFirst } from "lodash";
import { Store } from "redux";
import { spy, stub, useFakeXMLHttpRequest } from "sinon";
import { IModel, IModelData } from "../Model";
import { getDataService, IAction, IModuleMap,... |
/**
* ## Generate schema.org metadata
*
* Creating the schema.org metadata, in JSON-LD format, for the minutes. The json-ld portion is added to the kramdown header; the jekyll setup must take care of generating a `script` element in the header of the generated HTML file.
*
* @packageDocumentation
*/
import { Glob... |
<reponame>karanbothra12/PLAdmin
import { Component, OnInit, Optional, ViewChild } from '@angular/core';
import { FormControl,FormBuilder,FormGroup,Validators} from '@angular/forms';
import { Router } from '@angular/router';
import { HttpClient, HttpHeaders } from "@angular/common/http";
import { UsercrudService } from ... |
<reponame>sumeetgrewal/gameseven
import { beginAge, sendPlayerData } from "../middleware/gameplay";
import { pushUpdateToPlayers, shuffle, prepareGameAssets, gameAssetsReady } from "../middleware/util";
import { game, serverData } from '../models/game.model'
import { Player } from '../models/player.model'
const route... |
import { BigNumber } from '@0x/utils'
import React, { useEffect, useState } from 'react'
import { ReactComponent as IconCopy } from '../assets/images/ic__copy.svg'
import Asset from 'bzx-common/src/assets/Asset'
import AssetDetails from 'bzx-common/src/assets/AssetDetails'
import AssetsDictionary from 'bzx-common/src/a... |
<gh_stars>1-10
/**
* the snaps are saved as DAG (Direct Acyclic Graph).
* each snap has `parents` prop.
* when this is the first snap, the `parents` is empty.
* the followed snap has the first snap as a parent.
* in case of a merge between lanes, the `parents` have two snaps from the two lanes.
*
* traverse all ... |
<filename>packages/types/src/metadata/decorate/storage/createFunction.ts
// Copyright 2017-2022 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ICompact, INumber } from '@polkadot/types-codec/types';
import type { StorageEntryMetadataLatest, StorageHasher } from '../../../in... |
import * as React from 'react'
import { useState, useEffect, useRef, useCallback } from 'react'
import ReactMapboxGl, { Layer, Feature } from 'react-mapbox-gl'
import * as _ from 'lodash'
import { polyfill } from 'seamless-scroll-polyfill/dist/esm/Element.scrollTo'
//enable smoothscroll with ease out function for all ... |
'use strict';
// ------------------------------------------------------------------------------------------ Dependencies
import { ObjectDefinition, InheritableObjectDefinition } from '../types/';
import { RefObj, ContactObj, ContactGroupObj, HostObj, HostGroupObj, ServiceGroupObj, TimeperiodObj } from '../objects';
... |
import { PartnerType } from "./partner"
import Artist from "./artist/index"
import numeral from "./fields/numeral"
import { IDFields } from "./object_identification"
import {
GraphQLString,
GraphQLObjectType,
GraphQLNonNull,
GraphQLBoolean,
Thunk,
GraphQLFieldConfigMap,
GraphQLFieldConfig,
GraphQLEnumTy... |
/**
* @license
* Copyright (C) 2017 The Android Open Source Project
*
* 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 require... |
import React from "react";
import { FormControl } from "baseui/form-control";
import { Input } from "baseui/input";
import { Cell, Grid } from "baseui/layout-grid";
import { Caption2, Display4, Label1 } from "baseui/typography";
import { Textarea } from "baseui/textarea";
import { Block } from "baseui/block";
import B... |
import { EpubCFI } from 'epubjs'
// types
import { BookStyle, BookFlow } from 'types/book'
/**
* DateTime to `yyyy-mm-dd`
* @param {Date} time
*/
export const timeFormatter = (time: Date): string => {
const yyyy = time.getFullYear();
const mm = time.getMonth() + 1;
const dd = time.getDate();
const msg = `${y... |
<reponame>laurence-myers/tcat<filename>src/generator/walker.ts<gh_stars>1-10
import {
ArrayIterationNode,
AssignmentNode,
GeneratorAstNode,
ObjectIterationNode,
TemplateRootNode,
ScopedBlockNode, ParameterNode, IfStatementNode
} from "./ast";
import { assertNever, last } from "../core";
import {... |
import React, { useCallback, useState } from 'react';
import {
Form,
Col,
Row,
Button,
InputGroup,
Table as RBTable,
} from 'react-bootstrap';
import {
BillAmountInfo,
OriginalBillInfo,
AggregateItemInfo,
} from '../../shared';
import AlertView from '../utils/AlertView';
import './BillHistory.global... |
<reponame>joepaquette/sushi<filename>src/utils/PathUtils.ts
import { PathPart } from '../fhirtypes';
import { splitOnPathPeriods } from '../fhirtypes/common';
import { CaretValueRule, Rule } from '../fshtypes/rules';
import { logger } from './FSHLogger';
/**
* Parses a FSH Path into a more easily usable form
* @para... |
import Log from '../util/Log';
import VideoWindow from './VideoWindow';
import JingleMediaSession from '../JingleMediaSession';
import Translation from '@util/Translation';
import JingleCallSession from '@src/JingleCallSession';
import * as screenfull from 'screenfull';
import Client from '@src/Client';
const screen =... |
import jwt from 'jsonwebtoken';
import phin from 'phin';
import uid from 'uid';
import User from './types/user';
import APIError from './errors/api';
import Guild from './types/guild';
import Connection from './types/connection';
import Collection from '@discordjs/collection';
export type Scope = 'bot' | 'connections'... |
//
// layouts.tsx - shared layout components for app and website pages
//
import Head from "next/head"
import { useRouter } from "next/router"
import { useState, useEffect, useRef } from "react"
import Container from "@mui/material/Container"
import { Theme } from "@mui/material/styles"
import useMediaQuery from "@mu... |
import { encode } from "https://deno.land/std@0.89.0/encoding/base64.ts";
import { Sha1 } from "https://deno.land/std@0.89.0/hash/sha1.ts";
import type {
Nullable,
OBJECT,
} from "../../packages/helpers/shared/types.d.ts";
import type { ConfigFileInterface } from "../../config/config_file.d.ts";
import type {
R... |
import './ActionFilter.scss'
import React, { useEffect } from 'react'
import { BindLogic, useActions, useValues } from 'kea'
import { entityFilterLogic, toFilters, LocalFilter } from './entityFilterLogic'
import { ActionFilterRow } from './ActionFilterRow/ActionFilterRow'
import { Button } from 'antd'
import { PlusCirc... |
import { CompletionItemKind, Range, Uri } from 'vscode';
import { AssemblySymbol, constantPseudoOps, Token, TokenKind, TokenModifier, TokenType } from '../common';
import { LineParser } from './line-parser';
export interface SymbolReference {
name: string;
range: Range;
definition: AssemblySymbol;
uri: Uri;
}
... |
<reponame>gfontorbe/langium
/******************************************************************************
* Copyright 2021 TypeFox GmbH
* This program and the accompanying materials are made available under the
* terms of the MIT License, which is available in the project root.
***********************************... |
import { useCallback, useContext, useEffect, useState } from "react";
import { Trade } from "@luaswap/sdk";
import useAsyncEffect from "use-async-effect";
import Fraction from "../constants/Fraction";
import { ALCHEMY_PROVIDER, TOMOCHAIN_MAINET_PROVIDER, EthersContext } from "../context/EthersContext";
import { format... |
<gh_stars>0
import { EditorNodeDef, EditorNodeProperties, EditorRED } from 'node-red';
import * as haOutputs from '../../../editor/components/output-properties';
import {
createCustomIdListByProperty,
createSelect2Options,
Select2Data,
} from '../../../editor/components/select2';
import ha from '../../../e... |
/*
* Copyright 2018 IBM 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 agreed to ... |
import * as React from 'react'
import { MetadataUtils } from '../../../core/model/element-metadata-utils'
import { ElementInstanceMetadataMap } from '../../../core/shared/element-template'
import { Imports, ElementPath } from '../../../core/shared/project-file-types'
import { KeysPressed } from '../../../utils/keyboard... |
<filename>src/sentry/static/sentry/app/views/organizationEventsV2/transactionView/utils.tsx<gh_stars>0
import {isString} from 'lodash';
type Rect = {
// x and y are left/top coords respectively
x: number;
y: number;
width: number;
height: number;
};
// get position of element relative to top/left of documen... |
import React, { FC } from 'react';
import { Group } from '@visx/group';
import { BarGroup } from '@visx/shape';
import { AxisBottom, AxisLeft } from '@visx/axis';
import { scaleBand, scaleLinear, scaleOrdinal } from '@visx/scale';
import { GridRows } from '@visx/grid';
import { defaultStyles, useTooltip, useTooltipInPo... |
<reponame>thefliik/rxjs
import { Observable } from '../Observable';
import { Operator } from '../Operator';
import { Subscriber } from '../Subscriber';
import { Subscription } from '../Subscription';
import { OuterSubscriber } from '../OuterSubscriber';
import { InnerSubscriber } from '../InnerSubscriber';
import { sub... |
import {useState, useMemo, useCallback, useRef} from 'react';
import {Localized} from '@fluent/react';
import {Button} from '@condict/ui';
import {
descriptionFromGraphQLResponse,
descriptionToGraphQLInput,
tableCaptionFromGraphQLResponse,
tableCaptionToGraphQLInput,
emptyTableCaption,
} from '@condict/rich-... |
<reponame>atomist/sdm
/*
* Copyright © 2020 Atomist, 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 ap... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
import {
selectOrbitDBInstance,
selectLoadedDirectoryId,
selectDirectoryDb,
selectCategoriesDb,
selectCategories,
selectBusinessEntriesDb,
selectBusinessEntries,
selectRequestsDb,
selectRequests,
Category,
BusinessEntry,
BusinessEntryId,
businessEntryIdEquals,
BusinessEntryRequest
} from '..... |
<reponame>nvthuong1996/bit-dev
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
import os from 'os';
import tar from 'tar-stream';
import fs from 'fs-extra';
// @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
import Stream from 'stream';
import registerCoreAndExtensionsDiagnoses from '../../../doctor/doctor-regis... |
/**
* this is the default config that will be used if you don't set the options in your own angular-robot.yml file
*/
export const appConfig: AppConfig = {
size: {
disabled: false,
maxSizeIncrease: 1000,
circleCiStatusName: 'ci/circleci: build',
status: {
disabled: false,
context: "ci/an... |
/**
* Copyright 2017 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 applic... |
<gh_stars>1-10
import { Session } from './Session';
import { Backend } from '../Backend';
class GenericData implements Session.Data {
private _users: Backend.UserResource[];
private _projects: Backend.ProjectResource[];
private _groups: Backend.GroupResource[];
constructor(projects?: Backend.ProjectResou... |
<reponame>Shreshtha13/refined-github
/*
These will throw `RefinedGitHubAPIError` if something goes wrong or if it's a 404.
Probably don't catch them so they will appear in the console
next to the name of the feature that caused them.
Usage:
import * as api from '../github-helpers/api';
const user = await api.v3(`/use... |
import http from 'http'
import matchRoute from 'my-way'
import urlParse from 'url-parse'
import { measure } from 'measurement-protocol'
import fetchIcon from './fetch-icon'
import serveBadge from './serve-badge'
import serveDoc from './serve-doc'
import sentry from './sentry'
import { BadgenParams } from './types'
e... |
<filename>src/util/network.ts<gh_stars>0
import dgram from "dgram";
import internalIp from "internal-ip";
import getMac from "getmac";
import HomebridgeWizLan from "../wiz";
import { Device } from "../types";
import { makeLogger } from "./logger";
function strMac() {
return getMac().toUpperCase().replace(/:/g, "");... |
<filename>src/components/storage/storage.ts<gh_stars>0
import type {
IStorageRoot,
IStorageCollection,
IStorageEntityRecord,
IStorageProxy,
IStorageProxyPicker
} from '@components/contracts/storageprovider';
import { encodeBytes as encode, decodeBytes as decode } from '@lib/base32k/base32k';
... |
import { connect } from "http2";
var net = require("net");
var parseString = require("xml2js").parseString;
var Events = require("events");
export class CameraEventHandler extends Events {
activeEvents: any = {};
triggerActive = false;
debug = true;
ipAddress: string = "192.168.3.11";
port: number = 80;
u... |
import React, { useState } from "react";
import { connect, PromiseState } from "react-refetch";
import { List, Map, Set } from "immutable";
import {
constructStatusLabelMap,
ContestId,
ProblemId,
} from "../../interfaces/Status";
import Problem from "../../interfaces/Problem";
import Contest from "../../interface... |
<reponame>haleyga/fixinator<gh_stars>1-10
import { IAveragePriceField } from '../fields/average-price/average-price';
import { Tag } from '../fields/base/tag';
import { ICanceledQuantityField } from '../fields/canceled-quantity/canceled-quantity';
import { IClientOrderIdField } from '../fields/client-order-id/client-or... |
<reponame>twhitex/adventOfCode2021
import { stringBuilder, stringToArray } from "../../helper/helper"
import { input } from "./input"
const sampleInput =
`be cfbegad cbdgef fgaecd cgeb fdcge agebfd fecdb fabcd edb | fdgacbe cefdb cefbgd gcbe
edbfga begcd cbg gc gcadebf fbgde acbgfd abcde gfcbed gfec | fcgedb cgb dg... |
import {
CurrencyFormatOptions,
CurrencyFormatStyleType,
CurrencyType,
CLDRFramework,
Decimal,
DecimalConstants,
DecimalFormatOptions,
DecimalFormatStyleType,
UnitFormatOptions,
UnitFormatStyleType,
UnitLength,
UnitType,
} from '../src';
import { getCLDR } from '../__tests__/_helpers';
import { ... |
import React from 'react';
import {StyleSheet, View} from 'react-native';
import {Color, G, Path, Rect, Svg, Text} from 'react-native-svg';
import ChartComponent, {
BaseChartConfig,
BaseChartProps,
} from '../abstracts/abstract-chart';
import {numericOrDefault} from '../../utils';
//@ts-ignore: missing type defin... |
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { Routes, ... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import {
createMockFlipperWithPlugin,
MockFlipperResult,
} from '../../../test-utils/createMockFlipperWithPlugin... |
import * as markdown2confluence from "markdown2confluence-cws";
import { CommandModule } from "yargs";
import { assertEpic, Issue, Jira } from "../lib/jira";
import { filterTests, loadTestCases, TestCase } from "../lib/test-case";
import { loadTestFiles } from "../lib/test-file";
import { loadTestRuns, TestRun } from "... |
<filename>gui/src/js/lib/project-manager/src/build.ts
/// Build script that downloads and extracts the project manager from CI.
/// The project manager will be available at `paths.dist.bin` after running this script.
// @ts-ignore
import { http } from 'follow-redirects'
import * as os from 'os'
import * as fss from 'f... |
<filename>tests/pac-man-runaway.ts
let levelTime: number
let person: Entity
let monsters: Entity[]
let totalMonsters: number
let playing: boolean
let gameSuspended: boolean
let busyPos: Point[]
class Entity {
public x: number
public y: number
public dirX: number
public dirY: number
public hitHorizo... |
<reponame>joeyHarig/calcite-components
import { boolean, text } from "@storybook/addon-knobs";
import { filterComponentAttributes, Attributes, createComponentHTML as create } from "../../../.storybook/utils";
import readme from "./readme.md";
import itemReadme from "../panel/readme.md";
import { SLOTS, TEXT } from "../... |
import {
CallDirection,
CallEvent,
Channel,
Config,
Contact,
ContactTemplate,
ContactUpdate,
ServerError,
} from "@clinq/bridge";
import axios, { AxiosInstance } from "axios";
import * as moment from "moment";
import { COMMENTABLE_TYPE, IComment, ICommentTemplate } from "./models";
import { IMocoContact... |
<gh_stars>0
import { Dog, DogSize, SafetyLevel, WeightClass } from "@prisma/client";
import { isValueOfType } from "@theonlydevsever/utilities";
import { NotFoundError, ValidationError } from "errors";
import { prismaClient } from "lib";
import {
ISafetyLevelSetBreedData,
SafetyLevelDog,
SafetyLevelDogSize... |
import React, { useMemo, useCallback, useEffect, useRef } from 'react';
import type { LayoutChangeEvent } from 'react-native';
import { useSafeArea } from 'react-native-safe-area-context';
import { AnimatedTabBarView } from './AnimatedTabBarView';
import { interpolate } from './utilities';
import { useTabBarVisibility,... |
<gh_stars>1-10
import {Automata} from "./Automata";
import {AutomataAPI, AutomataData, GraphData} from "../Interfaces";
import {Colors} from "../Colors";
/**
* Transition function: T(currentState, input) = (nextState, output, direction)
* The object can be accessed as: T["currentState"]["input"] = { nextState, outpu... |
<gh_stars>10-100
import { IComponentService } from '../component/service';
import { IDOMService } from '../dom/service';
import { EventEmitter } from '../event/emitter';
import { IEventListener, IOnEvent } from '../event/listener';
import { ILayoutNode } from '../layout/node';
import { ILayoutService } from '../layout/... |
import { MongoDBClient } from "../../deps.ts";
import type { MongoDBClientOptions, MongoDBDatabase } from "../../deps.ts";
import type { Connector, ConnectorOptions } from "./connector.ts";
import type { QueryDescription } from "../query-builder.ts";
import { BasicTranslator } from "../translators/basic-translator.ts";... |
import React, { FC, useState } from "react";
import { css } from "@emotion/css";
import { JimoButton } from "@worktools/jimo-basics";
import { attachRoughTableThemeVariables } from "../../src/theme";
import { DocBlock, DocDemo, DocSnippet } from "@worktools/doc-frame";
import RoughDivTable, { IRoughTableColumn } from ... |
<reponame>472542625/maptalks.three
import * as maptalks from 'maptalks';
import * as THREE from 'three';
import BaseObject from './BaseObject';
import { initVertexColors, getExtrudeGeometryParams } from './util/ExtrudeUtil';
import ExtrudePolygon from './ExtrudePolygon';
import MergedMixin from './MergedMixin';
import ... |
<filename>src/worker.ts<gh_stars>100-1000
// internal (this is the "main script" of each window)
//
// note workers make things MORE COMPLICATED but:
// - we need separate require-chains becase some JS libraries depend on globals (and keep them)
// - Deno doesn't have runInContext and it might not be enough anyway)
/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.