text stringlengths 3.08k 15.5k |
|---|
import { Snackbar } from '@material-ui/core';
import IconButton from '@material-ui/core/IconButton';
import AddIcon from '@material-ui/icons/Add';
import RemoveIcon from '@material-ui/icons/Remove';
import axios from 'axios';
import React, { useState } from 'react';
import { Button, Col, Form, Modal, Row } from 'react-... |
import { config } from "./config.ts";
import { isArray, isObject, isString } from "./deps.ts";
import { Cell } from "./util.ts";
const okuriAriMarker = ";; okuri-ari entries.";
const okuriNasiMarker = ";; okuri-nasi entries.";
const lineRegexp = /^(\S+) \/(.*)\/$/;
export type Jisyo = {
okuriari: Record<string, st... |
<filename>src/backend/html_bundler.ts
import mem from 'mem';
import { makeRequest } from './utils';
/**
* Resolves a relative URL given a base URL.
*/
function resolveUrl(url: string, baseUrl: string): string {
return new URL(url, baseUrl).href;
}
/**
* Converts a Blob to a data URL.
*/
function blobToDataUrl(b... |
<reponame>nprasmussen/ember-cli-deploy-ghostinspector
import { Dict, Option } from '@glimmer/util';
import { Opcodes } from './lib/opcodes';
export { Opcodes as Ops } from './lib/opcodes';
type JsonValue =
string
| number
| boolean
| JsonObject
| JsonArray
;
interface JsonObject extends Dict<JsonValue>... |
<filename>src/promise.ts
export type TCallbackSuccess<T> = (data: T) => any;
export type TCallbackError = (err: Error) => any;
export type TCallback<T> = (resolve: TCallbackSuccess<T>, reject: TCallbackError) => void;
interface IData<Type, T> {
type: Type;
data: T;
}
export class Iterator<T extends ArrayLike<any>> ... |
<reponame>lifaon74/observables<gh_stars>10-100
import { IsSubSet } from '../../classes/types';
import {
TInferNativePromiseLikeOrValueTupleToValueTuple, TInferNativePromiseOrValueTupleToValueUnion,
TNativePromiseLikeOrValue, TPromiseStatus
} from '../types/native';
/** TYPES **/
// promise is resolving => its fin... |
<reponame>vanya829/compiled-css-in-js<filename>src/ts-transformer/utils/create-jsx-element.tsx
import * as ts from 'typescript';
import stylis from 'stylis';
import { nextClassName } from './identifiers';
import { getJsxNodeAttributes } from './ast-node';
import { CssVariableExpressions } from '../types';
interface Js... |
<gh_stars>0
import {SceneManager} from "./scene-manager";
import {MazeBuilder} from "../maze/maze-builder";
import {MazeFile} from "../maze/maze-loader";
import Phaser from "phaser"
export interface GameData {
id: string;
maze: MazeFile;
}
export const GAME_SCENE = 'Game';
const sceneConfig: Phaser.Types.Scenes.S... |
import React from 'react';
import { withStyles } from '@material-ui/core/styles';
import withWidth from "@material-ui/core/withWidth";
import Dialog from '@material-ui/core/Dialog';
import DialogContent from '@material-ui/core/DialogContent';
import DialogActions from '@material-ui/core/DialogActions';
import DialogT... |
<filename>src/spaceWars.ts
import GameEngine from './system/engine/gameEngine';
import Rectagle from './system/drawing/rectangle';
import Circle from './system/drawing/circle';
import Ellipse from './system/drawing/ellipse';
import Line from './system/drawing/line';
import RegularPolygon from './system/drawing/regularP... |
import { v, w } from '@dojo/framework/widget-core/d';
import { DNode } from '@dojo/framework/widget-core/interfaces';
import { ThemedMixin, theme, ThemedProperties } from '@dojo/framework/widget-core/mixins/Themed';
import { WidgetBase } from '@dojo/framework/widget-core/WidgetBase';
import { customElement } from '@doj... |
import { SiteName, Contactable, Character, Maker, ProfileOptions } from "./types";
import { sites } from "./sites";
function get_url_for_desc(someone: Contactable): string | undefined {
const stale = new Set(someone.stale || []);
if (!someone.on){ return; }
const site_list: SiteName[] = [
"web",
... |
import type { MyClient } from "src/classes/Client";
import { stripIndents } from "common-tags";
import {
Message,
MessageActionRow,
MessageButton,
MessageEmbed,
} from "discord.js";
import { RequestError } from "got/dist/source";
import { DateTime } from "luxon";
import { Command } from "../../../typings";
impo... |
import React, { useEffect, useReducer, useState } from 'react';
import Head from 'next/head';
import AuthenticatedPage from '@/layouts/authenticated-page';
import DocumentTemplateMutationProvider, { useDocumentTemplateMutation } from '@/context/document-template-mutation';
import CodeMirror from '@uiw/react-codemirror'... |
/*
* Copyright © 2019 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 applicable law or agreed... |
import { copyFileSync, existsSync, readFileSync, writeFileSync } from 'fs';
import { relative, resolve } from 'path';
import { ImportSyntax, JsTransformDescription, JSTransformer } from './transform.js';
import { getPackageInfo, PackageInfo } from '../esmpack/package-info.js';
import { PluginHandler } from '../plugins/... |
<reponame>forbesmyester/binary-repository
import test from 'ava';
import { Operation, FilePartIndex, Callback, Commit, UploadedS3FilePart } from '../src/Types';
import { MapTransform, ArrayReadable, streamDataCollector } from 'streamdash';
import { reduce, assoc, map, pipe, range } from 'ramda';
import { UploadedS3File... |
import type { Command } from "../../types/command.ts";
import type { ButtonComponent, Embed } from "../../../deps.ts";
import {
avatarURL,
ButtonStyles,
deleteMessage,
InteractionResponseTypes,
sendInteractionResponse,
sendMessage
} from "../../../deps.ts";
import {
Division,
Milliseconds,
needButto... |
<reponame>gkn1234/yihai-game-creator
/*
* @Autor: <NAME>
* @Date: 2021-09-05 15:18:51
* @LastEditors: <NAME>
* @LastEditTime: 2021-09-22 11:27:32
* @Description: 游戏实例
*/
import {
Application,
AbstractRenderer,
Renderer,
Ticker,
Loader
} from 'pixi.js'
import { Script } from './script/Script'
import { ... |
/*
* @Author: @ppeng
* @Date: 2022-03-31 13:54:26
* @LastEditTime: 2022-04-14 14:10:40
* @LastEditors: @ppeng
* @Description: 可拖拽调整列宽度
* @FilePath: \admin-data-new\src\components\Common\ResizableTable.tsx
*/
import type { TableProps } from 'antd';
import { Table } from 'antd';
import { ColumnsType, ColumnType } ... |
import {
makeStyles,
Theme,
createStyles,
Button,
FormHelperText,
ButtonGroup,
} from "@material-ui/core"
import { AsyncStateStatus, useAsync, useAsyncCallback } from "react-async-hook"
import * as t from "io-ts"
import { DateFromISOString } from "io-ts-types"
import StatusCodes from "http-status-codes"
imp... |
<filename>src/index.ts
import { isBase64StringImage, isUrl, isHTMLImageElement, isFullUrl } from "./is"
import {
base64String,
ConvertImage2Base64Options,
ObjectURL,
FetchImageOptions,
ImageSize,
url,
} from "./types.t"
import { parseHeaders } from "./utils"
/**
* whether browser support webp
* 判断浏览器是否支持... |
import classname from 'classnames';
import Color from 'color';
import * as React from 'react';
import styled, {css} from 'styled-components';
import {device} from '../../../../styles/utilities/device';
import PlayPause from '../../../common/components/PlayPause';
import {ifEnter} from '../../../common/utils';
import {... |
import Display from './display';
import Point from './point';
import Polygon from './polygon';
import HeightmapPolygon from './heightmap';
const canvas = document.getElementById('canvas') as HTMLCanvasElement;
const pixelRatio = 1; //window.devicePixelRatio;
const display = new Display(560, 560, canvas, { pixelRatio }... |
export declare enum PapsOrderStatus {
ASSIGNED = 0,
STARTED = 1,
SUCCESSFUL = 2,
FAILED = 3,
IN_PROGRESS = 4,
ACCEPTED = 7,
UNASSIGNED = 6,
DECLINED = 8,
CANCELLED = 9,
DELETED = 1
}
export declare const PAPS_MESSAGES: {
0: string;
1: string;
2: string;
3: string;... |
<reponame>SpasZahariev/iov-core
// tslint:disable:readonly-array
import PseudoRandom from "random-js";
import { PrehashType, SignableBytes } from "@iov/bcp-types";
import { Ed25519, Sha256 } from "@iov/crypto";
import { Encoding } from "@iov/encoding";
import {
DefaultValueProducer,
Keyring,
KeyringEntry,
Keyr... |
import * as React from 'react';
import { FormattedMessage as FormattedMessageNamespace } from 'react-intl';
import DiscoverFilledGlyph from '@findable/icon/glyph/discover-filled';
import SettingsGlyph from '@findable/icon/glyph/settings';
import {
ConfluenceIcon,
JiraIcon,
JiraSoftwareIcon,
JiraServiceDeskIco... |
import React, { useCallback, useContext, useState } from 'react'
import { NetworkStatus, useQuery } from '@apollo/client'
import { RouteComponentProps } from 'react-router'
import { Category } from '../categories/models'
import Loader from '../components/Loader'
import Panel from '../components/Panel'
import { LocalCo... |
/*
* Copyright 2020, <NAME>
*
* Copying and distribution of this file, with or without modification, are
* permitted in any medium without royalty, provided the copyright notice and
* this notice are preserved. This file is offered as-is, without any warranty.
*/
// This should be the only import in index.ts, ot... |
<reponame>DmitryBogomolov/webgl-playground
import path from 'path';
import fs from 'fs';
import { Compiler, Configuration, EntryObject } from 'webpack';
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import MiniCssWebpackPlugin from 'mini-css-extract-plug... |
import * as React from "react";
import { Key, KeyStyle, KeyProps, KeycapText, KeycapBackground } from "./Key";
import { observable, action, runInAction } from "mobx";
import { observer } from "mobx-react";
import {
IKeyboardLayoutNextKey,
IKeyboardLayoutSubsequentKey,
IKeyboardLayoutKeyDefinition,
Keybo... |
// Packages Imports
import { ActivityIndicatorProps, ColorValue, GestureResponderEvent, ImageStyle, ScrollViewProps, StyleProp, TextProps, TextStyle, ViewProps, ViewStyle } from "react-native";
import Animated, { SharedValue } from "react-native-reanimated";
// Other Types
import { ChildrenProps, SeperateMarginProps }... |
import {
GameType,
GameTypes,
Server,
FromResponseFactory,
Player,
AchievementInfo,
createDateFromResponse
} from "./main";
import { AchievementInfoFactory } from "./AchievementInfo";
/**
* the two types of Achievements available: Server wide achievements like the swarm and the achievements specific to ... |
<reponame>aicacia/ts-ecs-game
import { mat2d, mat4, quat, vec2, vec3 } from "gl-matrix";
import { TransformComponent } from "../TransformComponent";
import { mat2dFromMat4 } from "../../math";
import type { IJSONArray, IJSONObject } from "@aicacia/json";
const MAT4_0 = mat4.create(),
QUAT_0 = quat.create(),
VEC3_0... |
import * as path from 'path'
import { promises as fsp } from 'fs'
import parseArgs from 'minimist'
import consola from 'consola'
import MarkdownIt from 'markdown-it'
import markdownItMeta from 'markdown-it-meta'
import yaml from 'yaml'
import rimraf from 'rimraf'
import chokidar, { FSWatcher } from 'chokidar'
const m... |
import Nano, { Component, Fragment, Img } from 'nano-jsx';
import { Store } from 'nano-jsx/lib/store';
import { Data } from '../dataUtils';
import { FileTypeSettingItem } from '../settings';
import { TitleComponent, SavedHintComponent, StringSettingItemComponent } from './common';
interface FileTypeCardProps {
fil... |
import { Room, Tile } from "../../Room";
import { Pet } from "./Pet";
import PathFollower = Phaser.GameObjects.PathFollower;
import Path = Phaser.Curves.Path;
import Scene = Phaser.Scene;
import Point = Phaser.Geom.Point;
import Curves = Phaser.Curves;
import Vector2 = Phaser.Math.Vector2;
import Graphics = Phaser.Gam... |
/*************************************************************************************************
* Copyright (c) Red Hat, Inc. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*********************************************************************... |
import { useMemo, useCallback, ChangeEvent } from 'react';
import classNames from 'classnames';
import { ChoiceSet } from '@neinteractiveliterature/litform';
import CaptionLegend from './CaptionLegend';
import { CommonFormItemInputProps } from './CommonFormItemInputProps';
import { FormItemValueType, MultipleChoiceFor... |
import { AutoChecker } from "./AutoGrader"
import { Future } from "../functional/Future"
import { Runners } from "./Runners"
import { List } from "../functional/List"
import { Tuple } from "../functional/Tuple"
import { IOMap } from "../functional/IOMap"
import { IODebug } from "./miniprojects/IODebug"
import { Stopwa... |
<filename>src/util/util.ts
// @ts-ignore
import { saveAs } from 'file-saver';
import { ActObject } from '../core/types';
import * as _ from 'lodash/fp';
export const objectTypeToColor = (objectColors: { [objectType: string]: string }, objectType: string) =>
objectColors[objectType] || 'inherit';
export const factCo... |
<filename>core/frontend/src/render/FrameStats.ts
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*------------------------... |
import _ from 'lodash';
import * as dataflowHelper from '@/store/dataflow/helper';
import Edge from '@/components/edge/edge';
import store from '@/store';
import { CreateNodeOptions, DataflowState } from '@/store/dataflow/types';
import { FlowsenseDef } from '@/store/flowsense/types';
import { INDEX_COLUMN } from '@/c... |
import cdk = require('@aws-cdk/core');
import ec2 = require('@aws-cdk/aws-ec2');
import iam = require('@aws-cdk/aws-iam');
import * as autoscaling from '@aws-cdk/aws-autoscaling';
import * as ecs from '@aws-cdk/aws-ecs';
require('dotenv').config();
const config = {
env: {
account: process.env.AWS_ACCOUNT_NUMBER... |
<gh_stars>1-10
import { ethers, waffle } from 'hardhat'
import { IIndexPool, IndexedNarwhalRouter, IUniswapV2Pair, IUniswapV2Factory, IERC20, IWETH, WETH9 } from '../../typechain'
import UniswapV2Factory from '../../imports/UniswapV2Factory.json'
import SushiswapV2Factory from '../../imports/SushiswapV2Factory.json'
... |
<gh_stars>10-100
import { OverlayConfig } from "@angular/cdk/overlay";
import { CdkVirtualScrollViewport } from "@angular/cdk/scrolling";
import { AfterViewInit, Component, OnInit, TemplateRef, ViewChild } from "@angular/core";
import { FormBuilder, FormControl, FormGroup, Validators } from "@angular/forms";
import { C... |
<reponame>JereNurminen/dungeon-generation
export enum Direction {
Up,
Right,
Down,
Left,
}
export type Point = { x: number; y: number }
export enum RoomType {
Entrance,
Exit,
}
export enum TileType {
Wall = 'wall',
Floor = 'floor',
Door = 'door',
LadderUp = 'ladderUp',
LadderDown = 'ladderDown'... |
import React, {
forwardRef,
HTMLAttributes,
Ref,
useEffect,
useImperativeHandle,
useRef,
} from 'react';
import {
RcBaseProps,
styled,
useDebounce,
useEventCallback,
useForkRef,
useKeyboardMoveFocus,
UseLongPressEventReason,
useOnlyOneFocusable,
useThemeProps,
} from '../../../foundation'... |
// import * as GWU from 'gw-utils';
import * as TextUtils from '../text';
import * as Buffer from '../buffer';
import * as Text from './text';
import * as Widget from './widget';
import { BorderType } from './datatable';
import { drawBorder } from './border';
import * as Style from '../ui/style';
export type PadInfo ... |
export function easingLinear(t: number): number {
return t;
}
export function easingBackIn(t: number): number {
const s = 1.70158;
return t * t * ((s + 1) * t - s);
}
export function easingBackOut(t: number): number {
const s = 1.70158;
return --t * t * ((s + 1) * t + s) + 1;
}
export function easingBackIn... |
import { Handler } from 'aws-lambda';
import { LambdaEventBody, WebSocketAPIGatewayEvent } from '../../types/event';
import { LambdaResponse } from '../../types/response';
import { response } from '../../utils/responseHelper';
import { Logger } from '../../utils/Logger';
import { InteractionSuccessPayload, LambdaEventB... |
import React, { useState, useEffect } from 'react'
import { DatePicker } from '@island.is/island-ui/core'
import {
Box,
Button,
Input,
Stack,
DialogPrompt,
Text,
toast,
AlertMessage,
} from '@island.is/island-ui/core'
import { useLocation } from 'react-router-dom'
import {
useGetSinglePetition,
Lock... |
<reponame>aleris/ubl-model<filename>ubl-model-library/src/ubl/2.3/meta/cac/PriceMeta.ts
import { FieldCardinality, FieldMeta } from '../FieldMeta'
import { Type, TypeModule } from '../Type'
import { AllowanceChargeType } from './AllowanceChargeMeta'
import { AmountType } from '../cbc/AmountMeta'
import { CodeType } fro... |
<reponame>rc-ontruck/mprove
// COMMON
export const TS_TO_BIGINT_DATATYPE = 'bigint';
export const ENUM_TO_VARCHAR_DATATYPE = 'varchar';
// ID
export const DASHBOARD_ID_DATATYPE = 'varchar'; // name
export const ERROR_ID_DATATYPE = 'varchar';
export const MCONFIG_ID_DATATYPE = 'varchar';
export const MEMBER_ID_DATATY... |
<filename>packages/core/src/store.ts
import env from './env';
import {isPromise} from './sprite';
import {
Action,
ActionHandler,
ActionHandlerList,
coreConfig,
MetaData,
IModuleHandlers,
BStore,
IStore,
IStoreMiddleware,
GetState,
State,
ICoreRouter,
} from './basic';
import {ActionTypes, error... |
import {
AllRules,
stylePropsText,
stylePropsTransform,
validStyles,
validStylesPseudo,
} from '@tamagui/helpers'
import { ViewStyle } from 'react-native'
import { isWeb } from '../constants/platform'
import { mediaQueryConfig, mediaState } from '../hooks/useMedia'
import { StaticConfigParsed, ThemeObject } ... |
import React from 'react'
import CloseIcon from 'part:@sanity/base/close-icon'
import CheckCircleIcon from 'part:@sanity/base/circle-check-icon'
import WarningIcon from 'part:@sanity/base/warning-icon'
import ErrorIcon from 'part:@sanity/base/error-icon'
import InfoIcon from 'part:@sanity/base/info-icon'
import Button ... |
import throttle from 'lodash.throttle';
import { Mixins, Component, Prop, Watch } from 'vue-property-decorator';
import Base from '@/mixins/base';
import { isHtmlElement, isString } from '@/utils/types';
import { on, off, getScrollContainer, isInContainer } from '@/utils/dom';
import cleanStyle from '@/utils/cleanStyle... |
<reponame>intuita-inc/appsmith
// import React, { JSXElementConstructor } from "react";
// import { IconProps, IconWrapper } from "constants/IconConstants";
import { Alignment } from "@blueprintjs/core";
import { IconName } from "@blueprintjs/icons";
import {
CONTAINER_GRID_PADDING,
GridDefaults,
WIDGET_PADDING,... |
<filename>src/services/dateServices.ts
export interface ITheTime {
now: Date;
theTime : string;
milliseconds : number;
}
export function makeTheTimeObject(timeString) {
let now = new Date();
if (timeString ) { now = new Date(timeString);}
let theTime : ITheTime = {
now: now,
theTime: now.toUT... |
<gh_stars>1-10
import { BrowserModule } from '@angular/platform-browser';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { RouterModule, Routes } from '@angular/router';
import { HttpClientModule } from '@angular/common/http';
import { APP_INITIALIZER, NgModule } from '@angular/core';
import ... |
/**
* @file OSS Client
* @author <NAME> <<EMAIL>>
*/
import assert from "assert";
import crypto from "crypto";
import http, { Agent } from "http";
import https, { RequestOptions } from "https";
import { Readable } from "stream";
import { extname } from "path";
import { getType } from "mime";
export interface IOpti... |
<reponame>testfairy/appium-session-generator
import * as child_process from 'child_process';
import fs from 'fs';
import path from 'path';
import JSZip from 'jszip';
import { saveAs } from 'file-saver';
import * as util from 'util';
import { v4 as uuidv4 } from 'uuid';
const exec = util.promisify(child_process.exec);
... |
import * as path from 'path'
import { Stats } from 'fs'
import * as fsx from 'fs-extra'
export type Tree<Other> = Tree.Read<Other>
export namespace Tree {
export type Read<Other> = Read.Node<Other>
export namespace Read {
export type Node<Other> =
FileContent |
Object<Other> |
FileSystemRep... |
// TODO: Enable tests again once relationship info is updated with actions
/* eslint-disable jest/no-disabled-tests */
import { AttributeJSON } from "@nmshd/content";
import { ConsumptionServices, CreateRelationshipInfoRequest } from "../../src";
import { expectError, expectSuccess, RuntimeServiceProvider } from "../li... |
<reponame>mfrancia87/argon-tests
/// <reference types="cesium" />
import { SessionService, SessionPort } from './session';
import { Event } from './utils';
import { SerializedEntityState, SerializedEntityStateMap } from './common';
import { PermissionServiceProvider } from './permission';
import { Cartesian3, Cartograp... |
import cheerio from "cheerio";
import got from "got";
import { YoutubeSearch } from "./types";
type Ithumbnails = { url: string; width: number; height: number };
export default async function youtubeSearch(
query: string
): Promise<YoutubeSearch> {
const body = await got(`https://www.youtube.com/results`, {
... |
<gh_stars>10-100
import { GitHubRepoConnection, GitHubRepoConnectionState } from "../../src/Connections/GithubRepo"
import { GithubInstance } from "../../src/Github/GithubInstance";
import { createMessageQueue } from "../../src/MessageQueue";
import { UserTokenStore } from "../../src/UserTokenStore";
import { DefaultCo... |
<filename>src/tests/common.ts<gh_stars>1-10
/* tslint:disable:max-classes-per-file variable-name */
import {mixin, useMixins} from "../mixin";
import {IMixinAfterInitHandler} from "../types";
import * as chai from 'chai';
import {haveMixin} from "../index";
const expect = chai.expect;
export interface IMixinA {
... |
<filename>src/Run.ts
import {Character} from "./Characters";
export interface IFormatting {
size?: number;
font?: string;
color?: string;
bold?: boolean;
italic?: boolean;
underline?: boolean;
strikeout?: boolean;
align?: string;
script?: string;
}
export interface IRun extends IFormatting {
text ... |
import { GetServerSideProps, GetServerSidePropsContext, NextPage } from 'next';
import { getDatabaseConnection } from '../../lib/getDatabaseConnection';
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import Link from 'next/link';
import {
ArticleList,
Category,
CategoryWrapper, ... |
<reponame>CartONG/opsmap-toolkit<filename>src/domain/survey/TKSurvey.ts
/* eslint-disable @typescript-eslint/no-explicit-any */
import { TKCampTypesValues } from "./TKCamp";
import { TKBoundariesCollection } from "./TKBoundariesCollection";
import { TKCreateSubmission, TKSubmission } from "./TKSubmission";
import { TK... |
import * as React from "react";
import { Button } from "components/Button";
import { FormField } from "components/form/FormField";
import { Loader } from "components/Loader";
import { Modal } from "components/modal/Modal";
import { useModal } from "context/ModalContext";
import { Form, Formik } from "formik";
import us... |
/**
* Holograph Parallax Class - moves layers at different scroll speeds to create a parallax effect.
*
* @class SiriusOsParallax
*/
class SiriusOsParallax {
private _mobileWidth = 650;
private _selectors: ISelectors = {
commonClass: '.parallax-layer',
wrapper: 'parallax-wrapper',
un... |
<reponame>Ashikpaul/vsts-extension-retrospectives
// TODO: Switch back to using telemetryclient-team-services-extension package once
// Daniel's changes are checked in. https://github.com/ALM-Rangers/telemetryclient-vsts-extension/pull/5
import { TelemetryClient, TelemetryClientSettings } from './external/telemetrycl... |
import { Logger, wrapper } from './logger'
import { asKey, _logger, _dynamo, TableKey, DbItem } from './store'
import { _ttlField, _idField, ArcDynamoClient } from './dynamo'
export const defaultCacheTtl = 300000
const delimiter = ':'
const CACHE_TYPE = '_CACHE-KEY_'
const asDynamoKey = (key: string) => [CACHE_TYPE, ... |
<reponame>bahrus/be-switched
import {define, BeDecoratedProps} from 'be-decorated/be-decorated.js';
import {BeSwitchedVirtualProps, BeSwitchedActions, BeSwitchedProps} from './types';
import {hookUp} from 'be-observant/hookUp.js';
import {register} from 'be-hive/register.js';
export class BeSwitchedController implemen... |
import * as React from 'react';
import { Table, TableHeader, TableBody, sortable, ICell, IRow, wrappable, cellWidth } from '@patternfly/react-table';
import { FilterToolbar, FilterType, FilterCategory } from '@app/analytics/common/components/FilterToolbar';
import { Button, Flex, FlexItem, Level, LevelItem, TreeViewDa... |
import { faExclamationCircle } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { safeParse, safeStringify } from '@stoplight/json';
import { Box, Button, Flex, Link, Panel, Text, useThemeIsDark } from '@stoplight/mosaic';
import { CodeViewer } from '@st... |
#!/usr/bin/env node
import { execSync } from 'src/lib/child_process';
import fs from 'fs';
import path from 'path';
import { FileContent, Remove, UndoManager } from 'src/lib/undo';
import { read, readJson, writeJson } from 'src/lib/files';
import { getOptions } from 'src/lib/args';
import cpy from 'cpy';
import yargs f... |
<filename>src/stubs/prob_stub.ts<gh_stars>1-10
import crypto from 'crypto'
const exp = Math.exp;
const ln = Math.log;
const PI = Math.PI;
const pow = Math.pow;
/**
* This is the core function for generating entropy
*
* @param len number of bytes of entropy to create
* @returns {number} A pseduo random number betwe... |
import * as os from 'os';
import { Subject, asapScheduler, zip } from 'rxjs';
import { filter, map, mergeMap, observeOn, takeUntil } from 'rxjs/operators';
import { getLogLevel, getLogger } from './utils/logger';
import { RunLoaderResult } from 'loader-runner';
import { WorkerTaskData } from './adapters/WorkerTaskDat... |
<reponame>PaybackTony/s3-managed-download-js
/**
* The ManagedDownloader uses an s3 client for custom efficient
* downloads from s3.
*/
import * as S3 from 'aws-sdk/clients/s3';
import { getRangeOfPart } from './getRangeOfPart';
import { getInformationFromRange } from './getInformationFromRange';
import { ManagedDow... |
import { buildClipPathTree, buildSvgContentTree } from './utils/svgTools';
class TreeBuilder {
private _tree: any;
private _duration: number;
private _baseRootStyles: object;
public parseTree: object;
private _baseChildStyles: object;
constructor({
source,
ctx,
}) {
... |
import fetch from 'cross-fetch';
import {ActionsType} from "hyperapp";
import {Board, ClientConfig, SprintDetails, Sprint} from "../common/model";
import {State} from "./state";
import {getNumberFromLocalStorage} from "../common/utils";
// TODO: Move it to Actions class after migration to Hyperapp 2
let serverURL: st... |
// global value/type declarations for use in internal modules only
declare var tabris: import('./main').TabrisMain;
declare var console: import('./Console').default;
type Auto = 'auto';
type ImageValue = ImageLikeObject|import('./Image').default|string|null;
type ColorArray = [number, number, number, number]|[number,... |
// Tree.ts
import { nanoid } from 'nanoid';
import Node, { Overrides, NodeType } from './Node';
import { Token } from './Scanner';
export type { Token } from './Scanner';
export type DepthStack = Array<{type: string, depth: number}>;
class Tree {
private internalCurrentOverride?: Overrides;
private internalNodes... |
<reponame>FauxJake/yugioh-deck-tool-copy
import { inject, injectable } from "inversify";
import type { Card } from "./Card";
import { CardTypeCategory } from "./type/CardTypeCategory";
import type { CardDatabase } from "./CardDatabase";
import { TYPES } from "../../types";
import { Format } from "./format/Format";
enu... |
import { isPlatformBrowser } from '@angular/common';
import { Inject, Injectable, PLATFORM_ID } from '@angular/core';
import { LangsCookieConsentConfiguration } from '../shared/configuration';
import { LANGS_COOKIE_CONSENT_CONFIGURATION, cookieStatus, cookieConsentPositions } from '../shared/index.shared';
import { Coo... |
import {mergeMap, filter, takeWhile, map, tap, catchError, withLatestFrom } from "rxjs/operators";
import {Inject, Injectable, InjectionToken} from "@angular/core";
import {LEARNPLACE_API, LearnplaceAPI} from "../providers/rest/learnplace.api";
import {VISIT_JOURNAL_REPOSITORY, VisitJournalRepository} from "../provide... |
<filename>src/chessops/chessops/attacks.ts<gh_stars>1-10
/**
* Compute attacks and rays.
*
* These are low-level functions that can be used to implement chess rules.
*
* Implementation notes: Sliding attacks are computed using
* [hyperbola quintessence](https://www.chessprogramming.org/Hyperbola_Quintessence).
*... |
<reponame>Noah1989/angular2-smd
import {
Component,
Input,
Output,
EventEmitter,
ViewEncapsulation,
AfterContentInit,
ElementRef,
Renderer,
Inject,
forwardRef,
ContentChildren,
QueryList,
ContentChild,
HostBinding,
HostListener
} from '@angular/core';
import ... |
<reponame>renovate-bot/rushstack<filename>apps/rush-lib/src/cli/actions/BaseInstallAction.ts
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
import colors from 'colors/safe';
import * as os from 'os';
import... |
import React, { useState } from 'react'
import Avatar from '@material-ui/core/Avatar'
import Button from '@material-ui/core/Button'
import CssBaseline from '@material-ui/core/CssBaseline'
import Paper from '@material-ui/core/Paper'
import Grid from '@material-ui/core/Grid'
import LockOutlinedIcon from '@material-ui/ico... |
import { Component,Prop,State, h } from '@stencil/core';
import '@stencil/redux';//fixing undefined error
import { Store,Action } from '@stencil/redux';
import axios from 'axios';
import * as action from '../../store/actions';
function SubmitReplyForm(scope){
let storeState = scope.store.getState();
let re... |
/*************************************************************************
* Copyright 2021 Gravwell, Inc. All rights reserved.
* Contact: <<EMAIL>>
*
* This software may be modified and distributed under the terms of the
* MIT license. See the LICENSE file for details.
*******************************************... |
<gh_stars>1-10
import { emitLog } from "util/emitLog";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const isArray = ( v: any ): boolean => {
if ( typeof v !== "object" || v == null ) return false;
// Lua uses 1 as the starter index
return Object.keys( v ).every( ( v, index ) => tonumber( v ) ==... |
/*
* Copyright (c) 2019 - present Nimbella Corp.
*
* This file is licensed to you 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 a... |
/**
* Created by bikramkawan on 24/11/2016.
*/
import * as d3 from 'd3';
import Column from './Column';
import ValueColumn from './ValueColumn';
import any = jasmine.any;
export class CustomSortCalculation {
constructor(private a_val: number[], private b_val: number []) {
this.b_val = b_val;
this.a_val ... |
<reponame>rmpurp/sendou.ink
import { Ability, Mode } from "@prisma/client";
import { useRouter } from "next/router";
import { GetBuildsByWeaponData } from "prisma/queries/getBuildsByWeapon";
import { Dispatch, useReducer } from "react";
import useSWR from "swr";
import { abilities, isMainAbility } from "utils/lists/abi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.