text stringlengths 3.08k 15.5k |
|---|
import { dot, fromTo, toUnitVector, rotateNeg90Degrees } from 'flo-vector2d';
import { memoize } from 'flo-memoize';
import { normal, κ as curvature, evalDeCasteljau } from 'flo-bezier3';
import { Curve, getCornerAtEnd } from './curve'
import { Circle } from './circle';
interface IPointOnShape {
/** The [[ICu... |
// Copyright (C) 2020 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 required by applic... |
import * as cdk from '@aws-cdk/core';
import * as iam from '@aws-cdk/aws-iam';
import * as eks from '@aws-cdk/aws-eks';
import * as ec2 from '@aws-cdk/aws-ec2';
import * as cdk8s from 'cdk8s';
import * as ecrAssets from "@aws-cdk/aws-ecr-assets";
import { AwsLoadBalancerController } from './aws-loadbalancer-controller'... |
<filename>src/index.ts
require("dotenv").config()
const path = require("path")
const grpc = require("grpc")
const protoLoader = require("@grpc/proto-loader")
const ProtoBuf = require("protobufjs")
const { createDfuseClient } = require("@dfuse/client")
const { keccak256 } = require("@ethersproject/keccak256")
const { t... |
import { deployments } from "hardhat";
import PangolinFactory from "@pangolindex/exchange-contracts/artifacts/contracts/pangolin-core/PangolinFactory.sol/PangolinFactory.json";
import PangolinRouter from "@pangolindex/exchange-contracts/artifacts/contracts/pangolin-periphery/PangolinRouter.sol/PangolinRouter.json";
imp... |
/**
* Created by <NAME> on 9/15/2020.
*/
import { HttpException, HttpStatus, Injectable } from "@nestjs/common"
import { InjectRepository } from "@nestjs/typeorm"
import { Repository } from "typeorm"
import _ from "lodash"
import moment from "moment"
import * as common from "../common"
import * as utils from "../..... |
import React, { useEffect, useState, useCallback } from 'react';
import { View } from 'react-native';
import dayjs from 'dayjs';
import localeData from 'dayjs/plugin/localeData';
import localizedFormat from 'dayjs/plugin/localizedFormat';
import utc from 'dayjs/plugin/utc';
import { getSurroundingTimeUnits } from '..... |
import { format as strformat } from "util";
import * as fs from "fs";
import * as path from "path";
import * as Process from "process";
import loggerFactory from "./utils/logger";
import * as Rx from "rxjs";
import { tap, map, flatMap, catchError, filter } from "rxjs/operators";
import { fileExists, readTextFile } fro... |
import {
GqlModuleOptions,
GraphQLModule,
GraphQLTypesLoader,
} from '@nestjs/graphql';
import {
buildSchema,
GraphQLEnumType,
GraphQLField,
GraphQLInputFieldConfig,
GraphQLInputFieldConfigMap,
GraphQLInputObjectType,
GraphQLInputType,
GraphQLInt,
GraphQLNamedType,
GraphQLObjectType,
GraphQL... |
import * as React from 'react';
import {connect} from "react-redux";
import * as LoginStore from "../store/Login";
import {ApplicationState} from "../store";
import LogoutButton from "./LogoutButton";
import {ChangeEvent} from "react";
type GetUserDetailsProps =
{ login?: LoginStore.LoginState } &
{ setUserPro... |
import { useAppReducer } from '../../reducerContext';
import {
createAddDocument,
createChangeIsProcessing,
createLogUpdate,
createOpenDocument,
createRecognizeDocument,
createRecognizeRegion,
} from '../../reducer/actions';
import { recognize } from '../../ocr';
import { OcrDocument } from '../../reducer/... |
// import React, { useState, useCallback } from "react";
// import Card from "./Card";
// import update from "immutability-helper";
// import { theme } from "@src/styles/color";
// const style = {
// width: 400,
// };
// export interface Item {
// id: number;
// text: string;
// }
// export interface Container... |
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";
import { TimelockEntity } from "../../../entities";
import { mapWorkers } from "../../../entities/worker";
import { FileService, TimelockService } from "../../../services";
import { ethers } from "hardhat";... |
<gh_stars>0
"use strict"
import { window, FileType, QuickPick, QuickPickItem, workspace, WorkspaceFolder, Disposable } from "vscode"
import * as path from "path"
import * as fs from "fs"
import * as mkdirp from "mkdirp"
import * as os from "os"
const pathSeparator = path.sep
const fsRoot = os.platform() === "win32" ?... |
import { observable, action } from "mobx";
import { IResource, CustomSource, ENDPOINT } from './models';
import AppStorageLocal from './localDB';
import moment from 'moment';
import customSource from './customSource';
const localDB = new AppStorageLocal();
export default class AppStorage {
/** --------------------... |
import { bindable } from "aurelia-framework";
// const logger = LogManager.getLogger('tile');
/**
* An enum defining the possible states, this is used for whose turn it is
* as well as who owns a certain tile
*/
export enum States {
PLAYER1,
PLAYER2,
EMPTY,
DISABLED,
}
/**
* A class defining a sin... |
<filename>src/api/ethBancorCalc.ts
import { ContractSendMethod } from "web3-eth-contract";
import _ from "lodash";
import { CallReturn, ContractMethods } from "@/types/bancor.d.ts";
import {
ABIConverter,
ABISmartToken,
ABIConverterRegistry,
ABIConverterV28,
ABINetworkContract
} from "@/api/ethConfig";
import... |
// generated from terraform resource schema
import { Construct } from 'constructs';
import * as cdktf from 'cdktf';
/**
* AWS Signer
*/
export interface DataAwsSignerSigningJobConfig extends cdktf.TerraformMetaArguments {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/d/signe... |
import { Component, Input } from '@angular/core';
import { Logger } from '../core/logger';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { Transaction, Split } from '../shared/transaction';
import { Account, AccountTree } from '../shared/account';
import { Org } from '../shared/org';
import { AppE... |
<filename>src/Lexer/TokenType.ts
export const Unknown = Symbol.for('numenor:tok:unknown');
export const Invalid = Symbol.for('numenor:tok:invalid');
export const EOF = Symbol.for('numenor:tok:eof');
export const NumberLiteral = Symbol.for('numenor:tok:number');
export const StringLiteral = Symbol.for('numenor:tok:strin... |
import { getStyleRules } from '@tamagui/helpers'
import { Variable, createVariable, isVariable } from './createVariable'
import { createTamaguiProvider } from './helpers/createTamaguiProvider'
import { configureMedia } from './hooks/useMedia'
import {
CreateTamaguiConfig,
GenericTamaguiConfig,
MediaQueryKey,
T... |
<reponame>hankei6km/mardock
import cheerio from 'cheerio';
import hljs from 'highlight.js';
import { imageInfo } from './image';
// https://microcms.io/blog/syntax-highlighting-on-server-side
// './html.ts とかなり似たような使われ方をするが、
// こちらは主に見た目に関連する処理を行う.
type rewritePlug = ($: cheerio.Root) => Promise<Error | null>;
export... |
import { GenericObject, KupEventPayload } from '../../types/GenericTypes';
import { KupObj } from '../../utils/kup-objects/kup-objects-declarations';
import { SourceEvent } from '../kup-date-picker/kup-date-picker-declarations';
/**
* Props of the kup-card component.
* Used to export every prop in an object.
*/
expo... |
/* eslint-disable */
import { getFeeds } from "@/api/cg/service/feed";
import { store } from "@/main";
import { GETTER_MASTER_USER_ID } from "@/store/constants/index_types";
import {
GETTER_CLIENT_SETTINGS,
GETTER_TAB_EARN_COINS_SETTINGS,
GETTER_TAB_COIN_STORE_SETTINGS
} from "@/store/constants/setting_types";
im... |
<reponame>AnonymerNiklasistanonym/BackupHub
import { BackupHubError, PluginError } from "./error";
import type { Config } from "./config";
export type { Config } from "./config";
import { createLogEntryGenerator } from "./helper";
import { debuglog } from "util";
export type { Instruction } from "./instruction";
import... |
<gh_stars>0
import { Incident } from "incident";
import { Uint16, UintSize } from "semantic-types";
import { Movie, NamedId, Tag, TagType } from "swf-types";
import { ExportAssets } from "swf-types/tags";
import { isDefinitionTag } from "./definition-tag";
import { getDependencies } from "./dependencies";
import { mapI... |
<reponame>OvisTek/gfx.ts<filename>src/input/devices/keyboard.ts
import { Event, InputDevice, InputState } from "../input-device";
/**
* See key mappings in http://gcctech.org/csc/javascript/javascript_keycodes.htm
*/
export enum Key {
ARROW_LEFT = 37,
ARROW_UP = 38,
ARROW_RIGHT = 39,
ARROW_DOWN = 40,... |
<reponame>rocky-finance/rocky-contract
import { Allowlist } from "../../build/typechain/Allowlist"
import AllowlistArtifact from "../../build/artifacts/contracts/Allowlist.sol/Allowlist.json"
import { BigNumber } from "@ethersproject/bignumber"
import { MathUtils } from "../../build/typechain/MathUtils"
import MathUtil... |
<filename>web/src/components/Graph/config.tsx<gh_stars>1-10
import PropTypes from 'prop-types';
import moment from 'moment';
const now = moment();
export const comparisonOptions = [
{
label: '1小时',
labelEn: '1 hour',
value: '3600000',
}, {
label: '2小时',
labelEn: '2 hours',
value: '7200000',... |
import * as React from "react";
import { Cursor } from "../logic/cursor/interfaces";
import { Mode } from "../logic/doc-manager";
import { textRangeFromFocus } from "../logic/focus";
import { Doc, EvenPathRange, ListNode } from "../logic/interfaces";
import { getPathToTip } from "../logic/path-utils";
import { nodeGetB... |
<filename>server/manager/player.manager.ts
// Models/Types
import { PlayerDTO, PlayerRole } from '@common/dto';
import { Player } from '../database/models';
// Logger utils
import { logProcess } from '@core/logger';
import { WhereOptions } from 'sequelize';
import { getWhereFromMap } from '@core/utils';
// Const
const... |
import { TokenSymbol, DexShare, TradingPair } from '@setheum.js/types/interfaces';
import { assert } from '@polkadot/util';
import { AnyApi, CombinedCurrencyId, TokenType } from './types';
import { forceToCurrencyName } from './converter';
import {
createDexShareName,
CurrencyObject,
FixedPointNumber,
getCurre... |
import inquirer = require('inquirer');
import cli from 'cli-ux';
import { BehaviorSubject } from 'rxjs';
import { first } from 'rxjs/operators';
import { applyManifest } from './api';
import { writeManifestResult } from './fs';
import { ManifestFile } from './manifest-file';
import { K8sObject } from './parser';
import... |
<filename>src/app/functions/paths.ts
import {isWindows, isDev} from "./constants";
import {getLoggingFilePathKey} from "./keys";
import {createDirIfNotExist} from "./files";
import { createReducer } from "@reduxjs/toolkit";
//@ts-ignore
export const path = require('path');
//@ts-ignore
export const remote = require('e... |
<filename>src/extension/extension.ts
import * as vscode from 'vscode'
import { ResultsWebviewProvider } from './ResultsWebviewProvider'
import { SettingsPanel } from './SettingsPanel'
import { ScriptRunner } from './ScriptRunner'
import { ConfFile } from './types'
export function activate(context: vscode.ExtensionCont... |
import { ITouchEvent, View } from "@tarojs/components"
import { ViewProps } from "@tarojs/components/types/View"
import { nextTick } from "@tarojs/taro"
import classNames from "classnames"
import * as _ from "lodash"
import * as React from "react"
import {
Children,
cloneElement,
CSSProperties,
isValidElement,
... |
<reponame>yacinbenhamida/pharmavens
import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';
import { HttpClient, HttpParams, HttpHeaders } from '@angular/common/http';
import { map } from 'rxjs/operators';
import { CalendarEvent, CalendarView } from 'angular-calendar';
import { DatePipe,formatDate }... |
<gh_stars>1-10
import got, { Got } from 'got';
import { DdLib } from '../helpers/dd.lib';
import { LibStatus } from '../statuses';
import { Log } from '../helpers/logger';
import { BaseLib, Track } from './base.lib';
class SpotifyLib extends BaseLib {
public static readonly SPOTIFY_ADD_MAX_TRACKS = 100;
publi... |
<gh_stars>1-10
import { gql } from '@apollo/client';
import * as Apollo from '@apollo/client';
export type Maybe<T> = T | null;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export t... |
import { JSDOM } from "jsdom";
import marked from "marked";
import axios from "axios";
import pkg from "../package.json";
import {
readFile,
ROOT_DIR,
today,
readDir,
join,
parse,
writeFile,
gitAdd,
getStagedFiles,
} from "./helpers";
const changelogDest = join(ROOT_DIR, "CHANGELOG.md");
const read... |
import React, { SyntheticEvent, useCallback, useEffect, useMemo, useRef, useState } from 'react'
import MuiAlert, { AlertProps } from '@mui/material/Alert'
import Snackbar from '@mui/material/Snackbar'
import { Button, Input, PasswordInput } from '@ya.praktikum/react-developer-burger-ui-components'
import classNames f... |
import Avatar from "@component/avatar/Avatar";
import Box from "@component/Box";
import Button from "@component/buttons/Button";
import IconButton from "@component/buttons/IconButton";
import Card from "@component/Card";
import Divider from "@component/Divider";
import FlexBox from "@component/FlexBox";
import Grid fro... |
import {
ActivityType,
Client as DiscordClient,
ClientOptions,
Guild,
PresenceData,
PresenceStatusData,
} from "discord.js";
import * as fs from "fs/promises";
import * as config from "../config.json";
import { CommandLoadError } from "../Exceptions/CommandLoadError";
import { DatabaseError } from "../Exceptions... |
import { clearCurrentField, convertSqonToEs, addFilterToQuery, createTermFilter } from '../query';
import { ApiResponse } from '@elastic/elasticsearch';
const getObjectValue = (obj, path, defaultValue = undefined) => {
const travel = (regexp) =>
String.prototype.split
.call(path, regexp)
.filter(Bool... |
import { FileSystemLocation, Path } from '@serenity-js/core/lib/io';
import { Description, Name, ScenarioParameters, Tag, Tags } from '@serenity-js/core/lib/model';
import { Background, Feature, Scenario, ScenarioOutline, Step } from '../model';
import * as nodes from '../nodes';
import { FeatureFileMap } from './Feat... |
import ComponentList from '../tray_library/Component';
import React, { useEffect, useState } from 'react';
import styled from '@emotion/styled';
import { JupyterFrontEnd } from '@jupyterlab/application';
import {
Accordion,
AccordionItem,
AccordionItemHeading,
AccordionItemButton,
AccordionItemP... |
<reponame>JonathanWilbur/wildboar-imap-server
import { CommandPlugin } from "../../CommandPlugin";
import { Connection } from "../../Connection";
import { Lexeme } from "../../Lexeme";
import { LexemeType } from "../../LexemeType";
import { Scanner } from "../../Scanner";
import { ConnectionState } from "../../Connecti... |
<reponame>eniallator/Property-Tycoon
// importer.ts
/**
* Data importer. Imports game data from the csv files provided by Watson Games
*
* authors: <NAME>.
* @packageDocumentation
*/
import { Tile, TileM, CornerType, ChanceType, EstateGroup } from './tile'
import * as fs from 'fs';
// Global variables
const fi... |
/*
* Copyright 2022 The Backstage 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 ... |
import React, { useEffect, useState } from 'react';
import { FaUserAlt, FaLock, FaSchool } from 'react-icons/fa';
import { RouteChildrenProps } from 'react-router';
import { useDispatch, useSelector } from 'react-redux';
import { Input, Form, Button, Steps, Space, Avatar, Popover } from 'antd';
import {
AppstoreOutli... |
import { execFile, spawn } from "child_process";
import * as Net from "net";
import { DEFAULT_PORT } from "./index";
import * as util from "./util";
export type KeyCodeMap = {
[key: string]: string;
};
export type Keymap = {
[key: string]: Handler;
};
export type Handler = Partial<{
delay: number;
key: stri... |
// 引入编辑器样式
import 'braft-editor/dist/index.css';
import 'braft-editor/dist/output.css';
import 'braft-extensions/dist/table.css';
import './less/index.less';
import React, { Component } from 'react';
import {
Breadcrumb,
Divider,
message,
Button,
Layout,
Form,
Upload,
} from 'antd';
import { ContentUtils... |
<filename>src/shared/jwt.ts
import {
JWT_KEY_FILE_PATH,
COOKIE_SECRET,
JWT_ALGORITHM,
JWT_EXPIRES_IN,
JWT_KEY,
JWT_CLAIMS_NAMESPACE,
JWT_REFRESH_EXPIRES_IN,
DEFAULT_USER_ROLE,
DEFAULT_ANONYMOUS_ROLE,
JWT_CUSTOM_FIELDS
} from './config'
import { JWK, JWKS, JWT } from 'jose'
import Boom from '@hapi/b... |
import { Octokit } from '@octokit/rest'
import {
IssuesAddAssigneesResponseData,
IssuesAddLabelsResponseData,
IssuesSetLabelsResponseData,
PullsCreateResponseData,
PullsCreateReviewResponseData,
PullsGetResponseData,
PullsRequestReviewersResponseData,
PullsUpdateResponseData,
ReposCompareCommitsRespon... |
<gh_stars>1-10
import { crc32 } from "crc";
import { BodySpec, LicenseSpec, Localization, Options } from ".";
import Context from "./Context";
import Labels from "./Labels";
import Language, { indexByLanguage } from "./Language";
import { ErrorBuffer } from "./util/errors";
import PromiseEach from "./util/PromiseEach";... |
import { Articles } from './../../articles/models/articles.entity';
import { Injectable, Logger } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import axios from 'axios';
import { promises as fs } from 'fs';
import { EveryMatrixService } from '../every-matrix.service';
export interface EveryMa... |
<filename>src/utils/fibonacci_heap.ts
export class Fibonacci_heap {
m_min: Entry | null = null;
m_size = 0;
isValid() {
return this.m_min !== null;
}
enqueue(value, priority: number) {
Fibonacci_heap._check_priority(priority);
const result = new Entry(value, priority);
this.m_min = merge_lis... |
import {useFormState} from 'react-use-form-state';
import React, {useState} from 'react';
import tw, {css} from 'twin.macro';
import {useExtensionSettings} from '../contexts/extension-settings-context';
import Icon from '../components/Icon';
type Props = {
handleFormSubmit: (props: {
domain: string;
custom... |
<reponame>jacekk/instructure-ui
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 - present Instructure, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, inc... |
<reponame>Bhanditz/ShapeShifter
/* tslint:disable */
export const convertShapeToPath = {
active: true,
type: 'perItem',
fn: convertShapeToPathFn,
params: undefined,
};
const NONE = { value: 0 };
const REG_NUMBER = /[-+]?(?:\d*\.\d+|\d+\.?)(?:[eE][-+]?\d+)?/g;
/**
* Converts basic shape to more compact path.... |
import { FunctionComponent, useState, useEffect, useRef } from "react";
import React from 'react';
import Draggable, { DraggableData } from 'react-draggable';
import { getImageData, getClipPath, getBoundingPolygonPath } from "../ImageProcessing";
import { ImageState, ImageInitData, BoundingRect } from "../CommonTypes";... |
/// <reference types="react" />
export declare type callbackFunc = (...args: any[]) => any;
export interface jsonxChildren {
/** Standard Prop: children argument for React.createElement */
children?: jsonx[] | string | Date | null;
}
export declare type createFunctionComponentArgs = {
reactComponent?: jsonx... |
import * as React from "react";
import ".././main.css";
import * as rs from 'react-bootstrap';
import { Image } from 'cloudinary-react';
import { XCircle, Plus, ChevronLeft, ChevronRight, InfoCircle } from 'react-bootstrap-icons';
import dataholding from './Dataholding';
import Login from './Login';
import { Session }... |
// Copyright (c) 2021-2022 <NAME>
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
import { $, $type, Kind, PrimitiveType, TyK, TyVar } from '@fp4ts/core';
import {
Alternative,
Eq,
Functor,
FunctorFilter,
IdentityF,
Monad,
M... |
<gh_stars>0
import chroma from "chroma-js"
import * as lsp from "vscode-languageserver"
import { TextDocument } from "vscode-languageserver-textdocument"
import { findAllMatch, PatternKind } from "~/common/ast"
import { Node, NodeKind, Semantic } from "~/common/parseSemanticTokens"
import parseThemeValue, { TwThemeElem... |
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import * as Types from './Types';
export function getTabsterOnElement(
tabster: Types.TabsterCore,
element: HTMLElement
): Types.TabsterOnElement | undefined {
return (tabster as Types.TabsterInternal).... |
import i18next from "i18next";
import {isEqual} from "lodash";
import {extendObservable, observable, observe} from "mobx";
import {useLocalObservable} from "mobx-react";
import {useContext, useEffect, useState} from "react";
import {CollectionStore} from "@focus4/stores";
import {CSSProp, getIcon, ScrollableCon... |
import { basename, join, PathLike, readdir } from '../util/fs';
import { AsciiFont } from './asciiFont';
const ONSET_REGEX = /onset-(\d+)-(\d+)/;
const CODA_REGEX = /coda-(\d+)/;
export class Consonant {
private static Cache: Record<string, Consonant> = {};
private constructor(
public readonly onset: Onset,
... |
/**
* @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... |
<gh_stars>1-10
import { createTheme } from '@material-ui/core/styles';
declare module '@material-ui/core/styles/createPalette' {
interface ColorRange {
50: string;
100: string;
200: string;
300: string;
400: string;
500: string;
600: string;
700: string;
800: string;
900: stri... |
<filename>src/ensalament/services/get-details.service.ts
import { InjectRepository } from '@nestjs/typeorm';
import { CourseEntity } from 'src/course/course.entity';
import { RoomEntity } from 'src/room/room.entity';
import { TeamEntity } from 'src/team/team.entity';
import { In, Repository } from 'typeorm';
impor... |
<filename>src/app/pages/components/app/system/organization/organization.treeview.component.ts
import {
AfterViewInit,
ChangeDetectorRef,
Component,
ComponentFactoryResolver,
ElementRef,
Inject,
Renderer2,
ViewContainerRef,
} from '@angular/core';
import {BaseNgxTreeviewComponent} from '.... |
import * as React from 'react';
export interface IManagedForm {
isDirty: () => boolean;
getErrors: (touchedOnly?: boolean) => { [name: string]: string };
getValues: () => { [name: string]: string };
revalidate: () => void;
}
export interface IField {
attrs?: { [key: string]: string };
rules?: ... |
<filename>src/examples/todoApp/libs/localStorage.ts
/**
* Backbone localStorage Adapter
* Version 1.1.16
*
* https://github.com/jeromegn/Backbone.localStorage
*/
import * as BB from 'backbone';
// A simple module to replace `Backbone.sync` with *localStorage*-based
// persistence. Models are given GUIDS, and saved... |
/**
* 组件 MDX 文件路由及 Title 配置
* */
import React from 'react';
import camelCase from 'lodash/camelCase';
import ButtonCode from './Button/Code.mdx';
import ButtonDesign from './Button/Design.mdx';
import PaginationCode from './Pagination/Code.mdx';
import PaginationDesign from './Pagination/Design.mdx';
import SwitchCod... |
#!/usr/bin/env node
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
//
// Copyright 2017-2020 The Board of Trustees of the Leland Stanford Junior University
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except ... |
import { forwardVector3, multiplyQuaternion, normalize, subVector } from '@xrengine/common/src/utils/mathUtils'
import { World } from '@xrengine/engine/src/ecs/classes/World'
import { defineQuery, getComponent } from '@xrengine/engine/src/ecs/functions/ComponentFunctions'
import { NetworkObjectComponent } from '@xrengi... |
<reponame>jonaskello/tslint-immutable
/**
* This file has code that is shared for all the ignore options.
*/
import * as ts from "typescript";
import * as Lint from "tslint";
import { escapeRegExp } from "tslint/lib/utils";
import * as utils from "tsutils/typeguard/2.8";
import * as CheckNode from "./check-node";
im... |
import { useRouter } from 'next/router';
import React from 'react';
import Dropdown from 'components/_shared/dropdown';
const Pagination: React.FC<{ total: number; newPage: any }> = ({
total,
newPage,
}) => {
const router = useRouter();
const [current, setCurrent] = React.useState(1);
const [page, setPage] =... |
/*
* @Author : <NAME>
* @Date : 2022-01-15 02:19:07
* @LastEditTime : 2022-01-22 14:26:15
* @lastEditors : <NAME>
* @FilePath : \horen\packages\horen\renderer\pages\library\index.tsx
* @Description :
*/
import { FileDC } from '../../data-center';
import React from 'react';
import styled from ... |
<gh_stars>1-10
import uuid from "uuid";
import { NConsumer, NProducer } from "sinek";
import debugFactory from "debug";
const debug = debugFactory("kafka-streams:nativeclient");
import { KafkaClient } from "./KafkaClient";
const NOOP = () => { };
export class NativeKafkaClient extends KafkaClient {
public topic: any... |
// # JsDosUi
// Optional ui module for js-dos.
// This ui will be applied if client did not set `onprogress` in
// [DosOptions](https://js-dos.com/6.22/docs/api/generate.html?page=js-dos-options)
import * as DosDom from "./js-dos-dom";
import { DosModule } from "./js-dos-module";
const maxStageLength = 32;
export clas... |
<gh_stars>0
/* eslint-disable no-restricted-syntax */
/* eslint-disable no-throw-literal */
import {
appData, TyPer, TyState, TyTime,
} from '../store';
import { Utils } from '../utils/index';
const ONE_DAY_INMS = 24 * 3600000;
const HOURS2_INMS = 7200000;
function calcType() {
const now = new Date();
const hs ... |
<filename>src/core/math/PathUtil.ts<gh_stars>1-10
import { Line } from "./Line";
import { Matrix } from "./Matrix";
import { PolyBool } from "./polyBool";
import type { Point } from "./Point";
import type { Vector } from "./Vector";
export type Path = Point[];
export type ReadonlyPath = readonly Point[];
interface Pa... |
<gh_stars>1-10
import { IExecuteFunctions, IHookFunctions } from 'n8n-core';
import {
ICredentialDataDecryptedObject,
ICredentialTestFunctions,
IDataObject,
IExecuteSingleFunctions,
ILoadOptionsFunctions,
IPollFunctions,
JsonObject,
NodeApiError,
} from 'n8n-workflow';
import { OptionsWithUri } from 'request'... |
<gh_stars>10-100
/**
* Copyright 2021 Cloudflare 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 applic... |
import React, { Fragment } from "react";
import {
View,
StyleSheet,
Image,
KeyboardAvoidingView,
ScrollView,
Dimensions
} from "react-native";
import { colors, Icons } from "../../constants";
import { strings } from "../../locales/strings";
import Text from "../../components/common/CustomText";
import idea from "... |
import { useState } from 'react';
import behaelter_4rad_multi from '@assets/img/behaelter_4rad_multi.png';
import behaelter_2rad_multi from '@assets/img/behaelter_2rad_multi.png';
import getFormattedFigure from "@hooks/getFormattedFigure";
import { containers, emptyings } from "@assets/data/containerDB";
import { getW... |
<reponame>EntEthAlliance/EEA-Trusted-Reward-Token<filename>ui/client/src/app/scenes/admin/token-issuance-tab/token-issuance-tab.component.ts
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, FormArray, Validators } from '@angular/forms';
import { Observable } from 'rxjs';
import { tap ... |
import moment, { Moment } from 'moment';
import React, { Dispatch, FC, SetStateAction, useCallback, useState } from 'react';
import useAsyncEffect from 'use-async-effect';
import MomentUtils from '@date-io/moment';
import {
Box,
Button,
createStyles,
Dialog,
Grid,
makeStyles,
Slider,
Te... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { StringMap } from '../declarations/string-map';
import removeUndefinedProperties from '../utils/object/remove-undefined-properties';
import { CH... |
/** @format */
const path = require('path');
const os = require('os');
const inquirer = require('inquirer');
const fs = require('fs');
const yaml = require('js-yaml');
import * as program from 'commander';
import i18n from '../../utils/i18n';
import logger from '../../utils/logger';
import {ConfigError} from '../../er... |
<filename>src/client/render/matchEnd.ts<gh_stars>100-1000
import {
WIDTH,
HEIGHT,
MATCH_OVER_MS,
} from '../../universal/constants';
import toOrdinal from '../util/toOrdinal';
import {
State,
MatchEndPlayer,
} from '../records';
const podiumHeights = new Map<number, number>().set(1, 100).set(2, 75).set(3, ... |
<reponame>ArbaVojaganto/ensorbi
import type { NodeEdge as Edge, EdgeDict, NodeDictionary, NodeType } from "./../models/Node.ts"
import { Node } from "./../models/Node.ts"
import {
CanvasManager,
} from "./../client/CanvasManager.ts"
import {
GetRequest,
} from "./../client/util.ts"
import { StoredNode... |
import { Message, User } from "discord.js";
/*
* A very simple argument parsing library
* to make it easier to write commands
*/
// Definition of the arguments, usually provided by command
type ArgumentType = 'user' | 'string' | 'any';
interface ArgumentSpec {
name?: string;
type: ArgumentType;
is_array?: bo... |
import { CommandSet, findMatchedCommand, _decl, _aliases, _subCommandSet, defaultCommand } from './command';
import { CliDeclaration } from './type-logic';
import yargsParser from 'yargs-parser';
import { objMap } from './utils';
import { getOptData, OptData } from './option';
import {parseArgsStringToArgv} from 'strin... |
import { geocoder } from "./lib";
import { Activity, Record } from "./getActivity";
import Option from "./Option";
export function getActivityRecords(activity: any): any[] {
return activity.sessions
.map((session: any) => getSessionRecords(session))
.flat();
}
export function getSessionRecords(session: any)... |
import * as React from 'react';
import { DjeetaUIState } from '../../../states/DjeetaUIState';
import { DjeetaState } from '../../../states/djeetaState';
import { JobListActions } from '../../../containers/Djeeta/jobListContainer';
import { createStyles, Theme, WithStyles } from '@material-ui/core/styles';
imp... |
<gh_stars>0
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import {
I18nTestingModule,
OCC_USER_ID_CURRENT,
RoutingService,
TranslationService,
UserIdServi... |
import * as React from 'react';
import { motion } from 'framer-motion';
import BookCard from '../BookCard';
import BookSpines from '../BookSpines';
import * as configs from '../../configs';
import { useDimensions, usePrevious, useMediaQuery } from '../../lib/hooks';
import { createScrollToItem } from '../../lib/scrol... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.