text stringlengths 3.08k 15.5k |
|---|
import React, { useState, useMemo, useCallback, useRef } from 'react';
import { Table, Button, Input, Switch, Modal } from 'antd';
import { VTComponents, VTScroll, } from '../../virtualized-table-for-antd';
function rndstr(str: string) {
const n = 0 | (Math.random() * 10) + 1;
let s = '';
for (let i = 0; i < n... |
import * as React from 'react';
import { GetStaticProps } from 'next';
import Link from 'next/link';
import PageMeta from '../components/meta/PageMeta';
import { PageContentContainer } from '../components/layouts/Containers';
import PageHero from '../components/hero/hero';
import BlogPostTileList from '../components/b... |
import { IToolTipOptForDraw, IPos } from './interfaces';
interface IRect {
x: number;
y: number;
w: number;
h: number;
}
interface IEdge {
top: boolean;
right: boolean;
bottom: boolean;
left: boolean;
}
export const drawRoundRectPath = (ctx: CanvasRenderingContext2D, width: number, height: number, ra... |
import type { SagaIterator } from "redux-saga";
import { call, delay, put, select } from "redux-saga/effects";
import { incrementEntityGroupTransferCompletedCount } from "~/allEntities/allEntitiesActions";
import { TOGGL_API_DELAY } from "~/constants";
import { includedSourceProjectIdsSelector } from "~/projects/proje... |
/**
* React renderer.
*/
// Import the styles here to process them with webpack
import '_public/style.css';
import '_public/images/file.png'
import '_public/images/folder.png'
import * as chokidar from 'chokidar';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import * as fs from 'fs'
import... |
import { Dispatch, useEffect, useRef, useState } from "react";
import { Data, DataAction, DataState, Position3D, Positions3D } from "../../modules/storage/models/data";
import { UndirectedGraph } from "graphology";
import * as d3 from 'd3';
import { ForceGraphViewportConfiguration } from "../../modules/storage/models/v... |
import Ajv from 'ajv';
import moment from 'moment';
const momentFns = Object.keys(moment.fn);
/* eslint-disable */
export interface AJVMomentOptions {
readonly ajv: Ajv.Ajv;
readonly moment: typeof moment;
}
export interface AjvMoment extends Ajv.Ajv {
moment: typeof moment;
}
export interface AJVMomentValue {... |
import { useState, useEffect, useRef } from 'react';
import { Link, useParams } from 'react-router-dom';
import {
UserIcon, CheckIcon, TrashIcon, LockClosedIcon,
} from '@heroicons/react/solid';
import ChatImage from '../../assets/notification.svg';
import Button from '../../components/Button';
import Rocket from '... |
/**
* @license
* Copyright 2019 <NAME>
* SPDX-License-Identifier: Apache-2.0
*/
import { ValueManager } from './ValueManager';
import { SynManager, SynoMode } from './SynManager';
import { ChoosebestManager } from './ChoosebestManager';
import { VerbsManager } from './VerbsManager';
import { RefsManager ... |
import { homedir, tmpdir } from 'os';
import { join, dirname } from 'path';
import * as eslint from 'eslint';
import { CLIEngine } from 'eslint';
import pkgConf from 'pkg-conf';
import { lodash } from '@walrus/shared-utils';
export type IParseOpts = (opts: string, packageOpts: any, rootDir: string) => {};
interface I... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
//
// Handler for assignment related box routes
import { BoxRouteMiddleware, BoxRouteState } from '../routes/BoxRoutes';
import * as HttpResponse from '@karya/http-response';
import { BasicModel, getBlobSASURL } from '@karya/common';
import { M... |
import { communicationService, eventsRepository, UapLoadStatus } from '@ad-engine/communication';
import { AdSlot } from '../../models';
import { Context, slotService } from '../../services';
import { scriptLoader, logger } from '../../utils';
const logGroup = 'nativo';
const NATIVO_LIBRARY_URL = '//s.ntv.io/serve/lo... |
import { mat3, mat4, vec3 } from 'gl-matrix';
import { range } from 'lodash';
// tslint:disable-next-line:import-name
import REGL = require('regl');
import { blankLight, BakedLight, Light } from '../Light';
// tslint:disable:no-unsafe-any
// Uniforms are the same for all vertices.
interface Uniforms {
projection:... |
<reponame>charkour/course-schedulizer
import { forEach } from "lodash";
import moment, { Moment } from "moment";
import { Day, Schedule, Section, Term } from "utilities/interfaces";
import { getLocationString } from "utilities/services";
export const scheduleToFullCSVString = (schedule: Schedule): string => {
const ... |
import { Component, Inject, Input, Pipe, PipeTransform } from '@angular/core';
import { FormControl, UntypedFormGroup, Validators } from '@angular/forms';
import { ModalController, ToastController } from '@ionic/angular';
import { getMemberTitle } from '@sneat/components';
import { ErrorLogger, IErrorLogger } from '@sn... |
<gh_stars>1-10
import {createArrayAndFillWith} from '../../utils';
import {SinglyLinkedList} from '../singly-linked-list';
import {SinglyLinkedListNode} from '../singly-linked-list/node';
import {AdjacencyMatrix} from './matrix';
import {Vertex} from './vertex';
/**
* The Adjacency List Representation.
* Example:
*... |
import {floorToNearest, ceilToNearest} from "graphy/util";
export interface GridData {
c: CanvasRenderingContext2D;
center: number[];
width: number;
height: number;
pxPerUnit: number;
gridRes: number;
d: number;
}
let gridData: GridData;
export function setGridData(data: GridData) {
gridData = data;
}
... |
import isEqual from 'lodash/isEqual'
import { ChordV1, GridVoicing, IntervalNumber, Voicing } from '../../types'
export const getAbsoluteNotes = (chord: ChordV1): number[] => {
const { root, voicing, octave } = chord
return voicing.map((v) => root + v + 12 * octave)
}
export const voicingToGridVoicing = (voicing:... |
import { useForm } from "react-hook-form";
import Layout from "../components/layout";
import React from "react";
import dayjs from "dayjs";
import utc from "dayjs/plugin/utc";
import useSWR from "swr";
import Custom500 from "./500";
import Head from "next/head";
dayjs.extend(utc);
interface FormInputs {
Title: stri... |
<filename>packages/wasm-terminal/lib/process/wasi-command.ts
// The class for WASI Commands
import WASI from "@wasmer/wasi";
import WasmFs from "@wasmer/wasmfs";
import { Command, CommandOptions } from "../command-runner/command";
import { Duplex, PassThrough } from "stream";
const merge = (...streams: Duplex[]) =>... |
/* eslint-disable react/jsx-no-bind */
import { ChangeEvent, Dispatch, FormEvent, SetStateAction, useEffect, useState } from "react";
import { useDispatch } from "react-redux";
import FormOption from "../form-options/formOption";
import { removeGame, updateGame } from "../../redux/actions/gamesActions";
import ConfirmD... |
<filename>packages/server/index.ts
/*
Dedicated node service for handling custom backend routes that also has access to the Hardhat instance.
Hardhat: In ../server/package.json and ../autotasks/package.json we using the "--network localhost" arguments to start a Hardhat Network, and expose it as a JSON-RPC and WebSoc... |
import {
readFileSync
} from 'fs';
import {
argv,
end,
options as readOptions
} from 'argue-cli';
import Table from 'easy-table';
import vfs from 'vinyl-fs';
import getRc from 'rcfile';
import omit from 'omit-empty';
import stream from './stream';
import {
IIconConfig
} from './';
const {
help,
verbose,
path,
... |
import './_slim';
import Peer, { MediaConnection } from 'peerjs';
import type { DataConnection } from 'peerjs';
import { App, Messages } from '@openreplay/tracker';
import type Message from '@openreplay/tracker';
import Mouse from './Mouse';
import CallWindow from './CallWindow';
import ConfirmWindow from './ConfirmWi... |
<reponame>vivaxy/examples<filename>compilers/sql/src/index.ts<gh_stars>10-100
/**
* @since 2019-06-07 14:04:05
* @author vivaxy
*
* @see https://github.com/dt-fe/weekly/blob/v2/064.%E7%B2%BE%E8%AF%BB%E3%80%8A%E6%89%8B%E5%86%99%20SQL%20%E7%BC%96%E8%AF%91%E5%99%A8%20-%20%E8%AF%8D%E6%B3%95%E5%88%86%E6%9E%90%E3%80%8B.m... |
<filename>src/app/services/tasks.ts<gh_stars>0
import {Injectable, bind} from '@angular/core';
import {Subject, Observable, BehaviorSubject} from 'rxjs';
import {tasks} from './mock-task';
import {Task, Period} from '../models/task';
import {Project} from '../models/project';
import {Tag} from '../models/tag';
import... |
<gh_stars>1-10
import { BallerinaEndpoint } from "@ballerina/lang-service";
import { ASTNode, Block, Function as BalFunction, If, Service, UserDefinedType, Variable } from "../ast-interfaces";
import { Visitor } from "../base-visitor";
import { ASTKindChecker } from "../check-kind-util";
import * as defaults from "../d... |
import log from 'loglevel';
import {
MASK_BLUR_RADIUS
} from '../../constants';
import {Dimensions} from '../../types';
/**
* @private
*/
export interface BackgroundEffectOptions {
/**
* The blur radius to use when smoothing out the edges of the person's mask.
* @default
* ```html
* 5
... |
<filename>src/publish.ts
/** 88 88 88 88
* 88 "" 88 ""
* 88 88 ... |
<reponame>alejandrosazo/frontend-techmaster
import { Component, OnInit } from '@angular/core';
import { MatTableDataSource } from '@angular/material';
import { Router } from '@angular/router';
import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
import { MetodosService } from '../../shared/... |
<gh_stars>1-10
/*
* @Description: Copyright (c) ydfk. All rights reserved
* @Author: ydfk
* @Date: 2021-08-26 21:51:41
* @LastEditors: ydfk
* @LastEditTime: 2021-09-18 16:44:07
*/
import { Result, RequestOptions } from "#/axios";
import { RequestEnum, ContentTypeEnum } from "@/enums/httpEnum";
import { useUserSt... |
<gh_stars>0
import { Component, OnInit } from '@angular/core';
import {MatGridListModule} from '@angular/material/grid-list';
import * as shape from 'd3-shape';
import { NgxGraphModule } from '@swimlane/ngx-graph';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/interval';
import 'rxjs/add/ope... |
<reponame>CyanoAlert/xcube-viewer
import { Dispatch } from "redux";
import {
selectedDatasetIdSelector,
selectedDatasetVariableSelector,
} from "../selectors/controlSelectors";
import { Dataset } from "../model/dataset";
import { Time, TimeRange, TimeSeries } from "../model/timeSeries";
import { AppState } fro... |
<filename>src/data/ui-datasource.ts
//
// @description :
// @author : <NAME>
// @copyright : 2017
// @license : MIT
import { autoinject, transient, computedFrom } from 'aurelia-framework';
import { getLogger, Logger } from 'aurelia-logging';
import { metadata as Metadata } from 'aurelia-metadata';
import { ... |
import React from 'react';
import { Avatar, Badge, Card, List, Space, Spin, Tabs } from "antd";
import { ClowdrState } from "../../ClowdrTypes";
import { timeStamp } from 'console';
import { UserDescriptor } from 'twilio-chat/lib/userdescriptor';
/*
const { TabPane } = Tabs;
interface IconText { icon: any, text: strin... |
<gh_stars>10-100
/**
* PathElement
*/
var splitSpacesRegExp = new RegExp('[ \\n]+', 'g');
class PathElement {
node;
builder;
isTarget:boolean;
parentNode;
upperKeyNode;
classes;
options:string[];
constructor (node, index:number, builder) {
this.node = node;
this.builder = builder;
this.isTarget = false;... |
import {
observable,
action,
computed,
runInAction,
toJS,
reaction,
} from "mobx";
import { SyntheticEvent } from "react";
import { IGame } from "../models/game";
import agent from "../api/agent";
import { RootStore } from "./rootStore";
import { history } from "../..";
import { toast } from "react-toastify... |
import { motion } from 'framer-motion';
import React, { useState } from 'react';
import styled from 'styled-components';
import { useIsMobile, useThemeKey } from '../helpers/hooks';
import { layers, sizes, theme } from '../helpers/theme';
import A from './AnchorTag';
import FocusEventElement from './FocusEventElement';... |
import React, { useRef, useState } from "react";
import "react-base-table/styles.css";
import { EntitySchema, Property, WhereFilterOp } from "../../models";
import ErrorBoundary from "../../core/internal/ErrorBoundary";
import { CMSColumn, Sort } from "../common";
import {
Badge,
Box,
Button,
createSty... |
// import type { DynamoAttrValueType } from '../src/index'
import { DynamoDB } from 'aws-sdk'
import {
// toDynamo,
fromDynamo,
parseNumberOrThrow,
_giveDynamoTypesToValues
// __inferDynamoValueTypes,
// ___inferJsValues
} from '../src/index'
import { testMaker, isErrorThrown } from './index.test'
// eslint... |
import { Injectable } from '@angular/core';
// Position = [x, y]
export type Position = Array<number>;
export type Ship = Array<Position>;
export type ShipsPosition = Array<Array<boolean>>;
export type BoardStatus = Array<Array<string>>;
@Injectable({
providedIn: 'root'
})
export class GameService {
private ships... |
import { Test, TestingModule } from '@nestjs/testing';
import { Repository } from "typeorm";
import { DisplayController } from "./display.controller";
import { TeamInDiscipline } from '../../graph/schedule/team-in-discipline.model';
const displayConfig = {
name: 'display', value: JSON.stringify({
display1: `{{~#... |
import { Device } from '../../common/device';
import {
Interaction,
ValidationResult,
VerificationState
} from '../../common/types';
import { summarize } from '../../common/util';
/**
* Display given message on the verification page
*/
function displayVerificationMessage(message: string): void {
cons... |
<reponame>newmann/front-ta-admin
import {Injectable, Injector, Inject} from '@angular/core';
import {Router} from '@angular/router';
import {HttpClient} from '@angular/common/http';
import {zip} from 'rxjs';
import {catchError} from 'rxjs/operators';
import {MenuService, SettingsService, TitleService, ALAIN_I18N_TOKEN,... |
import AWS = require('aws-sdk');
import lambda = require('@aws-cdk/aws-lambda');
import cdk = require('@aws-cdk/core');
import { Assembly } from '../core/assembly';
import { Build } from '../core/build';
import { Cache } from '../core/cache';
import { Client } from '../core/client';
import { Code } from '../core/code... |
import React, { useEffect, useState, useCallback } from 'react';
import styles from './index.scss';
import { Link } from 'react-router-dom';
import Header from '~components/Header';
import Skeleton, { SkeletonTheme } from 'react-loading-skeleton';
import CopyToClipboard from 'react-copy-to-clipboard';
//import bg_walle... |
export enum PageType {
HOME = 'home',
NEWS = 'news',
ARTICLE = 'article',
ABOUT = 'about',
SUPPORT = 'support',
FRIENDS = 'friends',
PARTNERS = 'partners',
BUSINESS = 'business',
TEAM = 'team',
CONTACT = 'contact',
PRODUCTS = 'products',
ERROR_404 = '404',
PRIVACY_POLICY = 'privacyPolicy',
}
... |
import { useCallback, useMemo, useState } from 'react';
import { FC, useEffect, useRef } from 'react';
import styled from 'styled-components';
import { keyOutColorToAlpha } from '../utils/chromaKey';
import { getImage, getMostUsedColors, getImageData } from '../utils/image';
import { Flex, FlexCenterColumn, FlexEnds } ... |
import {CE} from 'trans-render/lib/CE.js';
import { upgrade as upgr, getAttrInfo} from './upgrade.js';
import {XtalDecorProps, XtalDecorActions, ProxyEventDetail} from './types';
import { getDestructArgs } from 'trans-render/lib/getDestructArgs.js';
import { EventSettings } from 'trans-render/lib/types.d.js';
import {o... |
import { Ethereum, IPFS, Subgraph } from "./portals";
import { getHostImports } from "./host";
import { isPromise } from "./lib/async";
import { Query, QueryResult } from "./lib/types";
import { WasmWorker } from "./lib/wasm-worker";
import { AnyManifest, Manifest } from "./manifest/formats";
import { ManifestFormats, ... |
<reponame>ota-meshi/yaml-eslint-parser
import { parseDocument } from "yaml"
import type {
YAMLProgram,
YAMLContent,
YAMLDocument,
YAMLMapping,
YAMLSequence,
YAMLScalar,
YAMLAlias,
YAMLAnchor,
YAMLPair,
YAMLWithMeta,
YAMLTag,
} from "./ast"
import { tagResolvers } from "./tags... |
<reponame>noobiept/dota_items
import { shuffle, Timer } from "@drk4/utilities";
import { IMAGE_CDN_URL } from "./constants";
import { cleanData } from "./data";
import * as HighScore from "./high_score";
import { loadData } from "./loading_status";
import * as Message from "./message";
import * as Sound from "./sound";... |
import { FC, ReactElement } from 'react'
import { useRecoilValue } from 'recoil'
import _ from 'lodash'
import { graphql, navigate } from 'gatsby'
import { useSetState } from 'ahooks'
import {
ChartComponent,
SeriesCollectionDirective,
SeriesDirective,
AnnotationsDirective,
AnnotationDirective,
ChartAnnotat... |
import { useEffect, useRef, useState } from "react";
import { atom, useAtom } from 'jotai'
import { useAtomValue, useUpdateAtom, } from 'jotai/utils'
import { useOOXXNFTContract } from 'hooks/useContract';
import { useBlockNumber } from 'hooks/useBlockContext';
import { MaxFetch } from 'types/constants'
import ReactTex... |
import React, { useState, useEffect } from 'react';
import { defineMessages, FormattedMessage } from 'react-intl';
import ReactModal from 'react-modal';
import { useUIDSeed } from 'react-uid';
import { GenericErrorMessage } from 'components/GenericErrorMessage';
import { Spinner } from 'components/Spinner';
import { u... |
<reponame>stenin-nikita/verificator
import { setData, setRules, startValidate, stopValidate } from './actions'
import { DEPENDENT_RULES, DEFAULT_LOCALE } from './constants'
import DEFAULT_RULES from './rules'
import deepmerge from 'deepmerge'
import reducer from './reducer'
import { createStore, applyMiddleware, Store ... |
import fetch from 'cross-fetch';
import { TestType, Test, PlyTest } from './test';
import { Response, PlyResponse } from './response';
import { Logger, LogLevel } from './logger';
import { Retrieval } from './retrieval';
import { Runtime } from './runtime';
import { Options, RunOptions } from './options';
import { PlyR... |
<filename>src/components/Select.ts
import { mod } from "../misc"
import fromTemplate from "./fromTemplate"
interface SelectDelegate {
query: { (): string }
storeValue: { (value: any): void }
addToFilter: { (id: number): void }
removeFromFilter: { (id: number): void }
nameForId: { (id: number): ... |
/**
* Created by <NAME> on 10/3/2020.
*/
import { useState } from "react"
import { Button, message, Modal, Tabs } from "antd"
import { HotTable } from "@handsontable/react"
import { ProFormCheckbox, StepsForm } from "@ant-design/pro-form"
import { FormattedMessage, useIntl } from "umi"
import _ from "lodash"
import... |
import * as fsp from "fs-promise";
import * as path from "path";
import * as child_process from "child_process";
import * as yargs from "yargs";
import { existsTypesDataFileSync, settings, readAllPackagesArray, readTypings } from "./lib/common";
import { writeFile, writeJson } from "./util/io";
import { LoggerWithErro... |
<reponame>wepublish/karma.run-packages
import {CSSStyle} from '@karma.run/react'
import {
FlexDirectionProperty,
JustifyContentProperty,
JustifySelfProperty,
AlignContentProperty,
AlignSelfProperty,
FlexBasisProperty,
GlobalsNumber,
FlexWrapProperty,
MinWidthProperty,
MaxWidthProperty,
WidthPrope... |
/**
* * Dependencies
*/
import { join } from 'path';
import * as child_process from 'child_process';
import * as tree_kill from 'tree-kill';
import { writeFileSync } from 'fs';
/**
* * Types
*/
import { AllowedPlatforms } from './@types/enum';
import { BackupLink, BackupLinkStatus, Links } from '../backup-links/@t... |
<reponame>roibh/juntas-server
import { AsyncTest, Expect, Test, TestCase, TestFixture, Timeout, TeardownFixture, Teardown, AsyncTeardown, AsyncTeardownFixture, FocusTest } from 'alsatian';
import * as Data from './data';
import { User } from '../server/controllers/user';
var dal = require("@nodulus/data");
const enu... |
<gh_stars>0
import { createStore } from "vuex";
import {
getClientOpts,
initClient,
getClient,
getClientIdentity,
} from "@/lib/DashClient";
const state = {
accountDPNS: null,
balance: null,
wishName: null,
dpns: {},
contactRequests: {
received: {},
sent: {},
lastTimestampReceived: 0,
... |
/**
* @file scenes/Signin/index.tsx
* @author <NAME> <<EMAIL>>
* @description Authenticates the user using the given username and password and stores the user data
* Documented by: <NAME>
* Date of documentation: 2017-07-22
* Reviewed by: robzizo
* ... |
/**
* @fileoverview Main CLI object, it reads the configuration (from file and parameters)
* and passes it to the engine
*/
/*
* The CLI object should *not* call process.exit() directly. It should only return
* exit codes. This allows other programs to use the CLI object and still control
* when the program exit... |
import React from 'react';
import { connect } from 'react-redux';
import { logout, login, setModalVisible } from '../../../store/actions';
import { View, Text, StyleSheet, Image } from 'react-native';
import { Button } from 'native-base';
import { Avatar, Divider } from 'react-native-elements';
import { sendEvent } fro... |
import "ethers/dist/shims.js";
// Note: ethers SHOULD be imported from their main object
// shims aren't injected with package import
import { ethers } from "ethers";
import Utils from "./Utils";
import TasitProviderHelpers from "@tasit/provider-helpers";
import Subscription from "../subscription";
import Action from "... |
import { mustExist } from '@apextoaster/js-utils';
import { JSONSchemaType } from 'ajv';
import { Inject, Logger } from 'noicejs';
import { RenderService } from '..';
import { ShortcutData, StatusItem } from '../../../component/shared';
import { ConfigError } from '../../../error/ConfigError';
import { TemplateMetadat... |
<reponame>bekamais/landing-page-gallery-ts<filename>src/Collection.ts
import { iconChevronRight } from "./utils/data";
import { domUtils } from "./utils/utils";
import { gsap, Expo } from "gsap";
import { CollectionImage } from "./state";
import { isArray } from "lodash";
import { InfiniteSlider } from "./InfiniteSlide... |
import React, { Component, FormEvent, ChangeEvent, useState, useEffect } from 'react'
import './App.css';
import { Container, Nav, Navbar, Collapse, Button, Card, Row, Col, Form, InputGroup, FormControl} from 'react-bootstrap'
import LocalStorage from './localStorage'
import Village from './Village'
// @ts-ignore
impo... |
import React, { FunctionComponent, useState, useContext } from 'react';
import Highlight, { Language } from 'prism-react-renderer';
import { ThemeContext, css } from 'styled-components';
import Prism from 'utils/prism';
import styled from 'styled-components';
import { rem, transparentize } from 'lib/polished';
interf... |
import ItemsList from './ItemsList';
import Item from './classes/Item';
import requireDir from 'require-dir';
import { error, message } from '@dungeonz/utils';
import { ItemDataConfig } from '@dungeonz/types';
import { Items } from '@dungeonz/configs';
import { ensureDirSync, writeFileSync } from 'fs-extra';
/**
* Cr... |
<gh_stars>0
import {exit, fs as utilsFs} from '@hoth/utils';
import {existsSync, readdirSync, writeFileSync, mkdirSync} from 'fs';
import {join} from 'path';
import generify from 'generify';
import chalk from 'chalk';
import inquirer from 'inquirer';
import parseArgs from './parseArgs';
import {execSync} from 'child_p... |
import React, { useCallback, useContext, useState } from "react";
import { setItemsPerPage, setTheme } from "../../shared/app.actions";
import { AppContext } from "../../shared/app.context";
import { DissmissableOverlay } from "../dismissable-overlay/dismissable-overlay";
import Modal from "../modal/modal.component";
... |
import type { Sequelize, Model } from 'sequelize';
import { auditory } from './auditory';
import type { auditoryAttributes, auditoryCreationAttributes } from './auditory';
import { group } from './group';
import type { groupAttributes, groupCreationAttributes } from './group';
import { headman2group } from './headman2g... |
import React, { ChangeEvent, FocusEvent, InputHTMLAttributes, PropsWithoutRef, useEffect, useState } from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import Label from "../basic/Label";
import HelperText from "../basic/HelperText";
import { IconProp } from "@fortawesome/fontawesome-svg-co... |
import { Abort, FileSystem } from './_';
import argparse from 'argparse';
import { Ref } from 'vue';
type Command = () => void;
interface Options {
lines: Ref<string[]>;
homePath: Ref<string>;
user: Ref<string>;
fs: Ref<FileSystem>;
path: Ref<string>;
showWelcome: Ref<boolean>;
allCommands: Ref<{ [k: st... |
/**
* @File : Main.ts
* @Author : dtysky (<EMAIL>)
* @Date : 11/5/2018, 3:41:53 PM
* @Description:
*/
import * as Sein from 'seinjs';
import 'seinjs-dom-hud';
import {createDefaultLights} from '../../utils';
class HeroState extends Sein.PlayerStateActor {
private _hp: number = 100;
get hp() {
return... |
<reponame>bvivek77/twitter-search
import pRetry from 'p-retry'
import pMap from 'p-map'
import { fetchTweetAst } from 'static-tweets'
import * as algolia from './algolia'
const algoliaIndexName = process.env.ALGOLIA_INDEX_NAME || 'tweets'
const MAX_PAGE_SIZE = 200
const MAX_RESULTS = 20000
export async function syncA... |
// SPDX-License-Identifier: Apache-2.0
import Button from 'react-bootstrap/Button';
import Col from "react-bootstrap/Col";
import Modal from "react-bootstrap/Modal";
import Row from "react-bootstrap/Row";
import { FaLink } from 'react-icons/fa';
import Form from 'react-bootstrap/Form';
import { FC, ChangeEvent, useCall... |
import { ethers } from 'ethers';
import { BigNumber } from 'bignumber.js';
import { readFile } from 'async-file';
import { CompilerOutput } from 'solc';
import { SideChainAugur, SideChainShareToken, SideChainAugurTrading, SideChainFillOrder, SideChainProfitLoss, SideChainZeroXTrade, SideChainSimulateTrade } from './Con... |
<reponame>chrisjsewell/aiida-vcode-ext
'use strict'
import * as subprocess from 'child_process'
import * as fs from 'fs'
import * as os from 'os'
import * as path from 'path'
import { promisify } from 'util'
import * as vscode from 'vscode'
const execCommand = promisify(subprocess.exec)
function expanduser(filePath... |
<reponame>cognitedata/reveal<filename>viewer/packages/sector-parser/src/primitiveGeometries.ts<gh_stars>10-100
/*!
* Copyright 2021 Cognite AS
*/
import * as THREE from 'three';
/**
* Generate a three-dimensional plane geometry,
* with an optional applied tranformation function (u, v) => [ x, y, z ]
*/
function ... |
import { Confirm, Dropdown } from "reactjs-components";
import mixin from "reactjs-mixin";
import PropTypes from "prop-types";
import * as React from "react";
import { Badge } from "@dcos/ui-kit";
import StoreMixin from "#SRC/js/mixins/StoreMixin";
import ModalHeading from "./ModalHeading";
import StringUtil from "../... |
<reponame>vamidi/visualne-selection-plugin
import { EventsTypes } from 'visualne/types/events';
import { PluginParams } from 'visualne/types/core/plugin';
import { Context, EPointerButton, NodeEditor, Plugin } from 'visualne';
import { Position, Size, applyTransform, cleanSelectionArea, drawSelectionArea } from './util... |
import Globals = require("../log4ts/Globals");
import Utils = require("../log-util/Utils");
import DateUtil = require("../log-util/DateUtil");
import LogLog = require("../log4ts/LogLog");
import Layout = require("./Layout");
import SimpleDateFormat = require("../log4ts/SimpleDateFormat");
/** PatternLayout
*/
class ... |
<filename>src/store/ws/variant.ts
import { get } from 'lodash'
import { makeAutoObservable, runInAction, toJS } from 'mobx'
import mainTableStore from '@store/ws/main-table.store'
import datasetProvider from '@service-providers/dataset-level/dataset.provider'
import {
HgModes,
IReccntArguments,
ITableAspectDescr... |
<reponame>simardo/adventofcode2018<filename>src/day_20/puzzle.ts<gh_stars>0
import { DAY_20_INPUT } from './input';
console.log('DAY 20');
type Room = {
x: number;
y: number;
north: Room | undefined;
east: Room | undefined;
west: Room | undefined;
south: Room | undefined;
};
type RoomMap = { ... |
import { AutoTranslationTypes, Context, TranslationMappings } from '../types'
const translators = {
headings: (input: string, ctx: Context): string => {
return translator(input, ctx, [
// Minecraft.net titles
[/Block of the Week: /gi, '本周方块:'],
[/Taking Inventory: /gi, '背包盘点:'],
[/Around ... |
import { faFoursquare } from '@fortawesome/free-brands-svg-icons';
import {
faArrowRight,
faArrowsAlt,
faLayerGroup,
faPlus,
faSpinner,
faTimesCircle,
} from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import React, { useState } from 'react';
import... |
<gh_stars>0
import { inject, injectable } from 'inversify';
import { EOL } from 'os';
import * as path from 'path';
import { CancellationToken, TextDocument, Uri, WorkspaceEdit } from 'vscode';
import { IApplicationShell, ICommandManager, IDocumentManager } from '../common/application/types';
import { Commands, PYTHON_... |
import {
Component,
Element,
Event,
EventEmitter,
h,
Host,
Prop,
State
} from '@stencil/core';
export interface FormButton {
text: string;
design: 'primary' | 'error' | 'success' | 'warning' | 'secondary';
event: () => void;
eventName: string;
}
export interface FormField {
type: 'input' | '... |
import webGLManager from "../../../webGLManager.js"
import * as utils from "../../../../utils/exports.js"
import Webgl2Particle from "../../shader/webgl2_particle.js";
import { timeManager } from "../../../../utils/timeManager.js";
import { ParticleBatchModel } from "../../model/particle_batch_model.js";
import { Parti... |
<gh_stars>0
import {
JupyterFrontEnd,
JupyterFrontEndPlugin,
ILabShell,
ILayoutRestorer
} from '@jupyterlab/application';
import {
ICommandPalette, IFrame, ToolbarButton
, WidgetTracker
} from '@jupyterlab/apputils';
import { ILauncher } from '@jupyterlab/launcher';
import {IDocumentManager} from "@jup... |
<reponame>ITOO-UrFU/open-programs-app2
import { Component, OnInit, OnDestroy, Pipe, PipeTransform, Input} from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { Title } from '@angular/platform-browser';
import { Subscription } from 'rxjs/Subscription';
import { GlobalService } from '... |
<gh_stars>1-10
import { rejects } from 'assert';
import { createPool, FieldPacket, OkPacket, Pool, PoolConnection, ResultSetHeader, RowDataPacket } from 'mysql2';
export let conn: Pool;
export const checkAlphaNum = (data: any, key: string): boolean => (typeof data[key] === 'string' || typeof data[key] === 'number');
... |
import { InjectionKey } from 'vue';
import { createStore, Store } from 'vuex';
export interface AppSettingsState {
start_page: string;
steam_install_dir: string;
avd_home: string;
android_sdk_home: string;
theme: string;
}
export interface AlarmState {
selected_hours: string;
selected_minutes: string;
... |
import {Nat, Zero} from '../Nat';
import {If, Or, Not} from '../../Logic';
import {Size, Inc, Dec, IsZero, IsLT, IsGTE, NatToString} from '../unsafe';
import {CastNat} from '../../helpers';
/**
* Construct a Nat representation of a number literal type.
*
* NatNum<0> = Zero
* NatNum<3> = [any, any, any]
* NatNum<n... |
import React, { useEffect, useState } from 'react'
import type { NextPage } from 'next'
import { useRouter } from 'next/router'
import { Button, Popconfirm, message, Table, Tag, Spin, Input } from 'antd'
import { useSession } from 'next-auth/react'
import { PlusOutlined, StopOutlined, CopyOutlined } from '@ant-design/i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.