text stringlengths 3.08k 15.5k |
|---|
import React, { useState, useEffect } from "react";
import { Modal,Spinner } from "react-bootstrap";
import { API } from "aws-amplify";
import { toast } from "react-toastify";
import cancelIcon from "../Assets/Images/icons/cancel.png";
import plusIcon from "../Assets/Images/icons/plus.png";
import validator from "valid... |
<gh_stars>10-100
import * as _ from 'lodash';
import {Cell, Row, ValueType, Workbook, Worksheet} from "exceljs";
import {CellRange} from "./cell-range";
/**
* Callback for iterate cells
* @return false - whether to break iteration
*/
export type iterateCells = (cell: Cell) => void | false;
export class WorkSheetHe... |
<filename>src/commands/edit.ts<gh_stars>1-10
import { Command, flags } from "@oclif/command";
import {
CCS_ENCRYPTED_FIELDS,
EMAILS_ENCRYPTED_FIELDS,
LOGINS_ENCRYPTED_FIELDS,
NOTES_ENCRYPTED_FIELDS,
SERVERS_ENCRYPTED_FIELDS,
} from "../../constants";
import { API } from "../../contract";
import { Cry... |
export type MonomerEntry = {
mol: string,
type: string,
analogueCode: string,
linkages: { [link: string]: { atomNumber: number, type: string } }
};
export type MonomerEntries = {[name: string]: MonomerEntry};
export type LinkData = { [link: string]: { atomNumber: number, type: string } };
/** HELM associated s... |
import React from 'react';
import {
List,
ListItem,
ListItemText,
Switch,
Collapse,
// Typography,
Button,
} from '@material-ui/core';
import type { ClientSafeUser } from 'prytaneum-typings';
// import { makeStyles } from '@material-ui/core/styles';
import ConfirmationDialog from 'component... |
<reponame>doesntreallymatter1/h
/**
* @license
* Copyright (C) 2018 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/... |
<gh_stars>0
export const enum ErrorMessageType {
Win32 = 1 << 0,
HResult = 1 << 1,
NtStatus = 1 << 2
}
/** Whether this type represents more than one error message type (i.e., it is wrapped). */
export function errorMessageTypeIsMixed(type: ErrorMessageType): boolean {
return type !== ErrorMessageType... |
<reponame>Dolov/umi
import { transform } from '@umijs/deps/reexported/esbuild';
import { init, parse } from 'es-module-lexer';
import { extname } from 'path';
import { matchAll } from './utils';
export async function getDepReExportContent(opts: {
content: string;
filePath?: string;
importFrom: string;
}) {
// ... |
import { CdkDragDrop } from '@angular/cdk/drag-drop';
import { last } from '@app/utils/array';
import { deepEquals, isNumber } from '@app/utils/assert';
import { nanoid } from 'nanoid';
import { combineLatest, Observable, of, timer } from 'rxjs';
import { map, startWith } from 'rxjs/operators';
import { Milliseconds } ... |
import { Locale } from '../types'
import { Message } from 'discord.js'
import Query from '../structures/Query'
import Client from '../structures/BotClient'
import PlayerClient from '../structures/PlayerClient'
import DatabaseClient from '../structures/DatabaseClient'
import { DefaultEmbed, getYtInfo, hasPermissions } f... |
import React from 'react';
import getValueLabel from './getDisplayValueLabel';
import {
IDiscriminant,
InflationAdjustment as Inflation,
Layout,
PopulationAdjustment as Population,
GraphSubject,
} from './Utils';
import AdjustmentOption from './AdjustmentOption';
import {
CloseButtonContent,
OptionsCloseB... |
<reponame>resin-io-modules/resin-sync
import * as path from 'path';
import * as _ from 'lodash';
import * as rsync from 'rsync';
import * as utils from './utils';
const buildRshOption = function (
options: {
host?: string;
verbose?: boolean;
port?: number;
extraSshOptions?: string;
} = {},
) {
utils.validat... |
<reponame>rlaaudrlf/StormJs
import { StormComponent } from "../../Core/StormComponent";
import { EventManager } from "../../Core/EventManager";
import { StormObject } from "../../Core/Widgets/StormObject";
import { Vector2 } from "../../Core/Math/Vector2";
import { UIEventListhenner } from "./UIEventListhenner";
import... |
<reponame>digitalinteraction/deconf-api-toolkit
import {
SessionSlot,
Speaker,
LocalisedLink,
Theme,
} from '@openlab/deconf-shared'
import createDebug from 'debug'
import got, { PaginationOptions, Got } from 'got'
import { DeconfBaseContext } from '../lib/context'
import {
Localised,
PretalxEvent,
Preta... |
/*
Dynamic day/night cycle theme for myhud.
Imported from a previous project of mine called "clockbook"
*/
import { Theme } from "../base_theme";
import { Color } from "./color";
function timeMark(hour: number, min: number) {
// 24 hour time converted to a number between 0 and 1, 1 being 11:59 pm
retu... |
import {Component, Event, EventEmitter, Host, h, Listen, Prop} from '@stencil/core';
import {leave, toggle} from 'el-transition'
export interface PublishClickedArgs {
begin: () => void;
complete: () => void;
}
@Component({
tag: 'elsa-workflow-publish-button',
shadow: false,
})
export class WorkflowPublishButt... |
<reponame>shreeramk/node-opcua-1
/**
* @module node-opca-aggregates
*/
// excerpt from OPC Unified Architecture, Part 13 21 Release 1.04
//
// 5.4.3.4 Interpolative
// The Interpolative Aggregate defined in Table 15 returns the Interpolated Bounding Value for the startTime
// of each interval.
// When searching for ... |
<filename>packages/antdsite/src/default-theme/components/utils.ts
import { IAllMdxData, Edges, IGraphqlFrontmatterData, Toc, PageEdge } from '../../templates';
export function getCurrentLoacle(webConfig: any, slug: string) {
const locales = webConfig.themeConfig.locales;
if (!locales) return false;
let targetLo... |
<gh_stars>100-1000
/**
* Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author <NAME> <<EMAIL>>
* @author <NAME> <<EMAIL>>
*/
import { Vec3 } from '../../../../mol-math/linear-algebra';
import { ChunkedArray } from '../../../../mol-data/util';
import { MeshBuil... |
<gh_stars>100-1000
import fs from 'fs-extra';
import fg from 'fast-glob';
import path from 'path';
import {
ComponentDoc,
ParamTag,
parse as parseComponent,
} from 'vue-docgen-api';
import { toKebabCase } from '../../utils/convert-case';
import { slotTagHandler } from '../docgen/slot-tag-handler';
import { getPac... |
import { inlineParser } from './inlineParser'
export interface Tag {
tag: string
body: string | Tag[]
length?: number
character?: string
}
export class Parser {
lines: string[]
tags: Tag[] = []
currentWrapper: Tag | null = null
remainingBody: string = ''
constructor(input: string) {
this.lines... |
<reponame>skykain/GridManager
/*
* exportFile: 数据导出
*/
import jTool from '@jTool';
import { isFunction, each, isArray, rootDocument } from '@jTool/utils';
import { showLoading, hideLoading, getFakeVisibleTh, getTbody } from '@common/base';
import { outError } from '@common/utils';
import { getSettings, getCheckedData... |
<filename>workspaces/ui/src/engine/interactive-endpoint.ts
import { assign, spawn, Machine } from 'xstate';
import { ParsedDiff } from './parse-diff';
import { DiffSet } from './diff-set';
import {
createNewRegionMachine,
createShapeDiffMachine,
} from './interactive-diff-machine';
import {
ILearnedBodies,
IVal... |
import { AllOfObjectSpec, AnyOfObjectSpec, ContentSpec, FieldSpecArrayType, FieldSpecBooleanType, FieldSpecDoubleType, FieldSpecEnumType, FieldSpecPrimitiveType, FieldSpecRecordType, FieldSpecRefType, FieldSpecStringType, GenericApiSpec, ObjectSpec, ObjectSpecOptionNullable, ObjectSpecs, ObjectSpecType, OneOfObjectSpec... |
<reponame>DimonDAF/vk-io
import {
Context,
ContextFactoryOptions,
Attachmentable,
transformAttachments,
kSerializeData,
applyMixins,
ContextDefaultState
} from 'vk-io';
import { copyParams } from '../helpers';
export interface IStreamingContextPayload {
event_type: 'post' | 'comment' | 'share' | 'topic_pos... |
/* eslint-disable no-console */
/**
* @author <NAME>
* Inspired from from https://gist.github.com/sqren/780ae8ca1e2cf59050b0695c901b5aa3
*/
import * as React from 'react';
import { omit } from 'lodash-es';
import { wlog } from './wegaslog';
const defaultPropsCheckerProps = {
children: (_props: {}) => {},
compTy... |
import React, { useState, useEffect } from 'react';
import { Link } from 'gatsby';
import PropTypes from 'prop-types';
import { CSSTransition, TransitionGroup } from 'react-transition-group';
import styled, { css } from 'styled-components';
import { navLinks } from '@config';
import { loaderDelay } from '@utils';
impor... |
/**
* @license
*
* Copyright IBM Corp. 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import { classMap } from 'lit-html/directives/class-map';
import { html, customElement, property, TemplateResult, SVGTemplateResult ... |
/*
MIT License
Copyright (c) 2021 <NAME>
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, including without limitation the rights
to use, copy, modify, merge, publish, distrib... |
import { Meteor } from 'meteor/meteor'
import { check } from 'meteor/check'
import { Random } from 'meteor/random'
import * as _ from 'underscore'
import { literal, getCurrentTime, Time, getRandomId, makePromise, isPromise, waitForPromise } from '../../lib/lib'
import { logger } from '../logging'
import { ClientAPI, ... |
<gh_stars>0
import * as Promise from 'bluebird';
import { EventEmitter } from 'events';
import * as Properties from '../../properties.json';
import axios from 'axios';
import { AxiosResponse, AxiosRequestConfig } from 'axios';
const apiEmitter = new EventEmitter();
export { apiEmitter };
const {
msApp: {
clientI... |
<gh_stars>1-10
/**
* Copyright (c) 2021, Diabeloop
* Yourloops utils functions
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the abov... |
import React, { useEffect } from "react"
import { autorun, action } from "mobx"
import { startAnimation, stopAnimation } from "../../../../Common/animation"
import { Music } from "../../../states"
import { MappingState } from "../sharedState"
import ActionPreview from "./ActionPreview"
import GridLayer from "./GridLaye... |
<reponame>gobengo/distbin
import * as assert from "assert"
import * as http from "http"
import fetch from "node-fetch"
import { v4 as uuid } from "node-uuid"
import * as url from "url"
import distbin from "../"
import { jsonld } from "../src/util"
import { testCli } from "./"
import { listen } from "./util"
const test... |
/**
* @license
* Copyright 2016 Google 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... |
import { Component, OnInit, OnDestroy } from '@angular/core';
import * as Chart from 'chart.js';
import { ChartDataSets, ChartPoint } from 'chart.js';
import { BetonClassService } from '../../services/beton-class.service';
import { ArmaturaTypeService } from '../../services/armatura-type.service';
import { InteractivS... |
export type LocationKey = string;
export type LocationState = any;
export type Path = string;
export type Href = string;
export type Pathname = string;
export type Search = string;
export type Hash = string;
export interface LocationDescriptorObject {
pathname?: Pathname;
search?: Search;
state?: LocationState;
... |
export type ComparatorFunction<T> = (a: T) => boolean;
/**
* Represents a comparator (boolean-valued function).
*
* @param <T> the type of the input to the comparator
* @see Based on the Predicate interface of java language.
* @example
* const hasLeftBracket: Comparator<string> = new Comparator<string>((str: stri... |
import React, { PureComponent } from 'react';
import { bindActionCreators, Dispatch } from 'redux';
import { connect } from 'react-redux';
import Alert from '@material-ui/lab/Alert';
import ReactJson from 'react-json-view';
import Protobuf, { Root } from 'protobufjs';
import { Button } from '@material-ui/core';
import... |
import { AxiosError } from 'axios';
import { VuexStore } from '../../utils/vuex';
import { Analytics } from '../analytics/analytics.service';
import { RequestOptions } from '../api/api.service';
import { Environment } from '../environment/environment.service';
import { Seo } from '../seo/seo.service';
export class Pay... |
import { randomBytes } from "crypto";
import execa = require("execa");
import * as path from "path";
import {
CodeAction,
CodeActionKind,
CodeActionParams,
Diagnostic,
IConnection,
TextEdit,
} from "vscode-languageserver";
import { URI } from "vscode-uri";
import * as utils from "../../util/elmUtils";
impor... |
<reponame>sibvrv/libcsg
import {polygonFromPoints} from '../../helpers/polygonFromPoints';
import {rightMultiply1x3VectorToArray} from '../../helpers/rightMultiply1x3VectorToArray';
import {cagToPointsArray} from '../../helpers/cagToPointsArray';
import {clamp} from '../../math/clamp';
const Matrix4 = require('../../c... |
import {
ICollection,
IFragment,
IProject,
IServerCollection,
IServerFragment,
} from '../../types';
import api from '../utils/api';
import {
FRAGMENT_IMPORT_STATUS,
INVALID_FILE_ENTRY_ID,
} from '../utils/constants';
const FRAGMENT_TYPES = { component: 1, react: 2, section: 0 };
const DEFAULT_FRAGMENT_T... |
import React, { useContext, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import {
Avatar,
Box,
CircularProgress,
Grid,
IconButton,
ListItemIcon,
ListItemText,
MenuItem,
PopoverOrigin,
Typography,
} from '@mui/material';
import {
AccountCircle,
Close,
Email... |
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors ma... |
import {NgModule, Component, OnInit, OnDestroy, OnChanges, AfterContentInit, Output, Input, EventEmitter, ViewChild, ElementRef, ChangeDetectionStrategy, ChangeDetectorRef, SimpleChange, ContentChildren, QueryList, Directive} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from ... |
import * as React from "react";
import { Meteor } from "meteor/meteor";
import { Link } from "react-router-dom";
import styled from "styled-components";
import Loader from "react-loader-spinner";
import RefreshIndicator from "material-ui/RefreshIndicator";
import ActionVerifiedUser from "material-ui/svg-icons/action/ve... |
<filename>packages/neotracker-server-scrape/src/utils/getAssetsAndContractsForClient.ts
import {
addressToScriptHash,
ConfirmedTransaction,
Contract,
nep5,
ReadSmartContractAny,
RegisterTransaction,
} from '@neo-one/client';
import { Monitor } from '@neo-one/monitor';
import {
Asset as AssetModel,
Contr... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) RStudio, PBC. All rights reserved.
* Copyright (C) 2020 by mel-mouk@achiev (ISC license):
* https://github.com/achiev-open/png-decoder-intro
* Copyright (C) 2017 by <NAME> (ISC license):
* https... |
import {
$$,
Assert,
Component,
ComponentOptions,
IComponentBindings,
IDoneBuildingQueryEventArgs,
IFieldOption,
IGroupByRequest,
IIndexFieldValue,
IInitializationEventArgs,
Initialization,
InitializationEvents,
IQuerySuccessEventArgs,
QueryEvents,
Logger,
IBuildingQueryEventArgs,
Quer... |
import { merge } from "lodash";
import { createStore, applyMiddleware } from "redux";
import { default as thunk } from "redux-thunk";
import { AppStorage, LOGGED_KEY, USERNAME_KEY } from "./appStorage";
import { Subject } from "./types";
import {
AppState,
AppActions,
Communication,
COMMUNICATION_REQU... |
/**
* This is for the vgip protocol for sending and recieving
* geolocated video data
*
* @packageDocumentation
*/
import { VGIPLogger } from "./logger";
/**
* The video geolocation data that the program can store
*/
export interface VideoGeoData{
latitude?: number | null,
longitude?: number | null,
... |
<reponame>boxcc/vantui
/* eslint-disable @typescript-eslint/ban-ts-comment */
import { unstable_batchedUpdates } from 'react-dom'
import { IFormInstanceAPI } from '../../../types/form'
type IAPI = keyof IFormInstanceAPI
/* 对外接口 */
const formInstanceApi = [
'setCallback',
'dispatch',
'registerValidateFields',
... |
<reponame>fediazgon/flyteconsole<filename>src/components/Launch/LaunchForm/utils.ts
import { timestampToDate } from 'common/utils';
import { Core } from 'flyteidl';
import { isObject } from 'lodash';
import { Identifier, LiteralType, Variable } from 'models/Common/types';
import { LaunchPlan } from 'models/Launch/types... |
import React from "react";
import { graphql, createFragmentContainer, RelayProp } from "react-relay";
import {
Table,
Dropdown,
Button,
FormControl,
Alert,
Card,
} from "react-bootstrap";
import getConfig from "next/config";
import { Organisations_query } from "Organisations_query.graphql";
import RelayMode... |
import { FieldArray, Formik } from 'formik';
import * as Yup from 'yup';
import React from 'react';
import {
Keyboard,
KeyboardAvoidingView,
Platform,
ScrollView,
Text,
TouchableWithoutFeedback,
View,
} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import { Ac... |
import React from 'react';
import { callAll, mergeRefs, usePrevious } from './utils';
const actionTypes = {
increment: 'increment',
decrement: 'decrement',
coerce: 'coerce',
setValue: 'setValue',
};
export interface State {
value: string;
}
export interface Action {
type: string;
payload?: string;
}
e... |
import { BigNumber } from '@ethersproject/bignumber'
import { hexZeroPad } from '@ethersproject/bytes'
import { namehash } from '@ethersproject/hash'
import useActiveWeb3React from 'hooks/useActiveWeb3React'
import { useSingleCallResult } from 'lib/hooks/multicall'
import uriToHttp from 'lib/utils/uriToHttp'
import { u... |
<filename>src/annotations/actions.ts
import { createAction } from 'redux-act'
import { Thunk } from 'src/sidebar-overlay/types'
import * as selectors from 'src/sidebar-overlay/sidebar/selectors'
import { RES_PAGE_SIZE } from 'src/sidebar-overlay/sidebar/constants'
import { Anchor, Highlight } from 'src/highlighting/typ... |
import * as jspb from 'google-protobuf'
import * as gogoproto_gogo_pb from '../../../gogoproto/gogo_pb';
import * as cosmos_proto_cosmos_pb from '../../../cosmos_proto/cosmos_pb';
import * as sgn_common_v1_common_pb from '../../../sgn/common/v1/common_pb';
export class Params extends jspb.Message {
getEnableSlash(... |
<reponame>nsitarz/clickhouse-datasource
import { isString } from 'lodash';
export type Clause = string | AST | null;
export type AST = Map<string, Clause[]>;
export default function sqlToAST(sql: string): AST {
const ast = createStatement();
const re =
/\b(WITH|SELECT|DISTINCT|FROM|SAMPLE|JOIN|PREWHERE|WHERE|... |
import * as fs from 'fs'
import * as glob from 'glob'
import * as path from 'path'
import {
IncludeDefinition,
parse,
SyntaxType,
ThriftDocument,
ThriftErrors,
ThriftStatement,
} from '@creditkarma/thrift-parser'
import {
IIncludeCache,
IIncludeData,
IMakeOptions,
INamespaceFil... |
<filename>packages/intercept-axios/src/index.ts<gh_stars>1-10
/*
拦截Axios请求(axios),实现接口pending后统一处理接口。
1. 调用接口时,传递一组接口的唯一值 (如果想要在跳转回页面时得到之前接口pending的数据,推荐传递页面的 name 值)
传递接口路由,传递接口参数,默认为空
*/
import { AxiosRequestConfig, CancelTokenSource } from 'axios'
import { interceptAxiosObserve, interceptAxiosPro... |
import { StimulusUse, StimulusUseOptions } from '../stimulus-use'
import { method } from '../support/index'
import { TargetMutationComposableController } from './target-mutation-controller'
export interface TargetMutationOptions extends StimulusUseOptions {
targets?: string[]
}
export class UseTargetMutation extend... |
interface IAddress {
name: string
company: string
street1: string
street2: string
city: string
state: string
zip: string
}
const parse = (address: string) => {
if (!address.length) {
throw new Error('Invalid address string!')
}
let addr: IAddress = {
city: '',
company: '',
name: '',
state: '',
st... |
<filename>packages/augur-ui/src/helpers/helpers.ts
import { useUnlockedAccount } from "modules/auth/actions/use-unlocked-account";
import { loadMarketsInfo } from "modules/markets/actions/load-markets-info";
import logError from "utils/log-error";
import { selectMarkets } from "modules/markets/selectors/markets-all";
i... |
import {
AddProjectMemberCommand,
AddProjectMemberCommandError,
MembershipUpdateInput,
RemoveProjectMemberCommand,
RemoveProjectMemberResponse,
UpdateProjectMemberCommand,
UpdateProjectMemberResponse,
} from '../commands'
import { ProjectMembershipByIdentityQuery, ProjectMembersQuery, ProjectRolesByIdentityQuery... |
import * as React from 'react';
import { useSelector } from 'react-redux';
import { Link } from 'react-router-dom';
import { Button, Spinner, FormText, Row, Col, Tooltip, CardSubtitle } from 'reactstrap';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faExternalLinkAlt, faFileWord, faFileVide... |
import React, { useEffect, createRef } from 'react'
import { css } from '@emotion/core'
import * as THREE from 'three'
import { TrackballControls } from 'three/examples/jsm/controls/TrackballControls.js'
const clock = new THREE.Clock()
const newCamera = () => {
const camera = new THREE.PerspectiveCamera(50, window.... |
<gh_stars>0
import { MethodRegistry } from "./src/method-registry";
import DefaultSerializer, { SerializedFormat } from './src/serializers/default';
import Remote from './src/remote';
import streamFromRemote from './src/streamFromRemote';
import capWrap from './src/cap-wrap';
import {
ICapnodeMessage,
ICapnodeSer... |
import React, { useState } from 'react';
import _ from 'lodash';
import dayjs from 'dayjs';
import { Layout, Col, Row, Tabs, Tag, Timeline } from 'antd';
import { ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons';
import { RouteComponentProps } from 'react-router';
import utils from '../../utils';
import B... |
<reponame>IgniteUI/igniteui-live-editing-samples
/* eslint-disable max-len */
import { Component, OnInit, ViewChild, ViewChildren, QueryList, AfterViewInit } from '@angular/core';
import { NavigationStart, Router } from '@angular/router';
import { FilteringExpressionsTree, FilteringLogic, GridFeatures,
IGridState, ... |
<reponame>b6pzeusbc54tvhw5jgpyw8pwz2x6gs/sammy<filename>lib/generateProxyModel.ts
import * as path from 'path';
import * as fs from 'fs';
import { dirSync as tmpDir } from 'tmp';
import { stringify as yaml } from 'yaml';
import { Lambda as AWSLambda } from 'aws-sdk';
import {
CloudFrontRequest,
CloudFrontRequestEve... |
import { Component, OnInit } from '@angular/core';
import { FormObject } from 'src/app/models/Form';
import Swal from 'sweetalert2';
import { CalcService } from '../../services/calc.service';
import { AuthService } from '../../services/auth.service';
interface InputEvent {
originalEvent: PointerEvent;
value: numbe... |
// Copyright (c) 2020 <NAME> (<EMAIL>).
// All rights reserved.
//
// This code is licensed under the MIT License.
//
// 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, in... |
import { DeepPartial, Omit } from "ts-essentials";
import { EthereumProvider } from "web3x/providers";
import * as types from "./internal/core/params/argumentTypes";
export interface GanacheOptions {
gasLimit?: number;
network_id?: number;
mnemonic?: string;
accounts?: Array<{ balance: string; secretKey: stri... |
<reponame>plugblockchain/plug-sdk-types
// Copyright 2017-2019 @polkadot/types authors & contributors & 2019-2020 Plug New Zealand Ltd.
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import Compact from '@polkadot/types/codec/Compact';
i... |
<filename>packages/cats/core/src/data/either/operators.ts
// 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 { id, throwError } from '@fp4ts/core';
import { Eq } from '@fp4ts/cats-kernel';
import { N... |
import { TestBed, async, inject, fakeAsync, tick } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
import { Http, BaseRequestOptions, ResponseOptions } from '@angular/http';
import { MockBackend } from '@angular/http/testing';
import { ActivatedRoute, Router } from '@angular/router';
import ... |
<filename>libraries/editorNew/src/core/enableEditor.ts
import { ActionType, Change, makeChange, AssetConfig } from "coya-core";
import { effectScope, onScopeDispose, provide, reactive, ref, watch, computed, markRaw } from "vue";
import { EnabledEditor, EnableEditorParameters } from "./types";
import { wrapEditorNode } ... |
<gh_stars>1-10
import { KafkaConsumer } from 'node-rdkafka';
import { EventEmitter } from 'events';
import { AnyObject, KafkaExecutorOptions, JobItem, ErrorResponse, LogType, KafkaMessage, JobOptions, Logger } from './types';
import Job from './Job';
class KafkaExecutor {
private static readonly events: AnyObject ... |
import * as Ajaxify from './Ajaxify';
import {FlashMessageInterface} from './FlashMessage';
import {HtmlFragment} from './Html';
/**
* Data types
*/
export enum DataType
{
TEXT,
HTML,
JSON
}
/**
* Exception info
*/
interface ExceptionInfoInterface
{
className: string;
message: string;
file... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
<gh_stars>0
import firebase from 'firebase/app';
import { getFollowings } from './user';
let db = firebase.firestore();
let storage = firebase.storage();
interface PostObject extends firebase.firestore.DocumentData {
ownerId: string;
postId: string;
img: string;
text: string;
timestamp: firebase.firestore.... |
<filename>packages/reducers/src/combineReducerEntries.test.ts<gh_stars>1-10
import { inc, o, defaultTo, map, multiply } from 'ramda';
import { combineReducerEntries } from './combineReducerEntries';
const globalAction = { type: 'ACTION' };
const actionA = { type: 'ACTION', meta: { namespace: 'a' } };
const actionB = ... |
<reponame>datoux/vscode-pytest-intellisence<filename>src/extension.ts
"use strict";
import * as vscode from "vscode";
import cp = require("child_process");
import {readFileSync} from 'fs';
import { parsePytestOutput, shouldSuggest, parseCommand, Fixture, Command } from "./parse";
export const PYTHON: vscode.DocumentFi... |
<reponame>agangdi/bscindex
import * as batcherRequests from "./batcher/requests";
import * as indexPoolsRequests from "./indexPools/requests";
import * as newStakingRequests from "./newStaking/requests";
import * as stakingRequests from "./staking/requests";
import * as tokensRequests from "./tokens/requests";
import {... |
import React, { useEffect, useState } from 'react';
import styles from './index.scss';
import Header from '~components/Header';
import { RouteComponentProps, withRouter } from 'react-router';
import clsx from 'clsx';
//import ICON_EARTH from '~assets/images/icon-512.png';
import { useSelector } from 'react-redux';
i... |
import React, {useEffect, useState} from 'react';
import { Form, DatePicker, Select, Input, Upload, Button, AutoComplete } from 'antd';
import { InboxOutlined } from '@ant-design/icons';
import decisionsApi, {
DecisionOnCreateData,
decisionStatusType,
DecisionWrapper,
decisionTarget,
FileWrapper,
Organizat... |
import {
addProjectConfiguration,
convertNxGenerator,
formatFiles,
generateFiles,
GeneratorCallback,
getWorkspaceLayout,
joinPathFragments,
names,
NxJsonProjectConfiguration,
offsetFromRoot,
ProjectConfiguration,
readWorkspaceConfiguration,
TargetConfiguration,
Tree,
updateJson,
updateWo... |
import { Component, Input, OnInit, OnDestroy, HostBinding } from '@angular/core'
import { NsWidgetResolver, WidgetBaseComponent } from '@sunbird-cb/resolver'
import { ConfigurationsService, LogoutComponent, NsAppsConfig, NsPage } from '@sunbird-cb/utils'
import { IBtnAppsConfig } from '../btn-apps/btn-apps.model'
impor... |
import {
hasIntegerProperty,
hasProperty,
hasStringProperty,
Unwrap,
} from '../typeUtils'
/**
* DB schema of "Users" container.
* @example
* {
* "id": "user1",
* "loginId": "<Auto generated>",
* "name": "User 1",
* "area": 13,
* "code": 10000000,
* "isPublic": true
* }
*/
export type Us... |
import { useMemo, useRef, useState, useEffect } from 'react';
import { Link } from 'react-router-dom';
import URLS from 'URLS';
import classNames from 'classnames';
// Material UI Components
import { makeStyles } from '@mui/styles';
import { useTheme, AppBar, Toolbar, Button, Grow, Paper, Popper, MenuItem, MenuList, u... |
import type CliServerApi from "@react-native-community/cli-server-api";
import type { Config as CLIConfig } from "@react-native-community/cli-types";
import {
createTerminal,
loadMetroConfig,
startServer,
} from "@rnx-kit/metro-service";
import chalk from "chalk";
import type { Reporter, ReportableEvent } from "m... |
import React, { useEffect, useMemo, useState } from 'react';
import { Button, TextField, Typography, Switch, FormControlLabel } from '@material-ui/core';
import Autocomplete from '@material-ui/lab/Autocomplete';
import translate from 'counterpart';
import { useWordListFormFields } from './DeckFormhooks';
import { DeckT... |
<filename>ngnx/libs/rzl/tween/tween-base.ts
import { Subject } from 'rxjs';
import { EaseFunction, Sine } from './ease';
const getNow = (): number => Date.now();
const _ease = (t: number, d: TweenData) => d.ease(t, d.start, d.end - d.start, d.duration);
const _tweens: TweenBase[] = [];
let _now: number = getNow();
l... |
<filename>src/setup/useDragAndDrop.ts<gh_stars>1-10
import { INodeProps } from "../structure/INodeProps";
import { computed, ref } from 'vue';
import isNil from "lodash-es/isNil";
import { INode } from '../structure/INode';
import { dragEvents } from '../misc/nodeEvents';
import IUseCommon from '../structure/IUseCommon... |
<filename>assets/Behavior/movement/BhvBullet.ts
const {ccclass, property,menu,disallowMultiple} = cc._decorator;
/**判断两点之间的距离 */
let distanceTo = function(x1, y1, x2, y2)
{
let dx = x1 - x2;
let dy = y1 - y2;
return Math.sqrt(dx * dx + dy * dy);
};
/**判断两点之间的角度 */
let angleTo = function(x1,y1,x2,y2){
return cc... |
import * as ui from './ui';
export {ui};
export {Event} from './event';
export interface WiredElement extends ui.Element {
appliedEvents?: any[];
}
export type Component = ui.Component<any, any>;
export type DomTypes = Element | Element[] | Text;
export type Domish = DomTypes | DomTypes[];
let styles: any = {};
le... |
import { Component, ComponentInterface, h, Prop, Build } from '@stencil/core';
import * as Showdown from 'showdown';
import { MatchResults } from '@stencil/router';
import { Blog } from '../../models/blog';
import { env } from '../../environment';
import hash from 'object-hash';
function debounce(func, wait, runOnFirs... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.