text stringlengths 3.08k 15.5k |
|---|
<reponame>Dhardesh-crypto/Good-Knight-Coin-TypeScript
import CustomButton from "./CustomButton";
const SPLASHSCREEN_KEY = 'splashscreen';
const BUTTON_NORMAL = 'buttonNormal';
const BUTTON_HOVER = 'buttonHover';
const BUTTON_CLICKED = 'buttonClicked';
const BUTTON_LOCKED = 'buttonLocked';
const MORALIS_POWERED = 'Powe... |
<gh_stars>0
import FeedParser from 'feedparser';
const parsedItem = ({
title: 'Announcing TypeScript 4.2',
description:
'<table> <tr><td> <a href="https://www.reddit.com/r/typescript/comments/lqu8bi/announcing_typescript_42/"> <img src="https://b.thumbs.redditmedia.com/cUl7VNzotTfQ57dfbJQa7rcG6WdtZOzDdzH_NC1kv... |
/**
* @license
* Copyright 2020 Dynatrace LLC
* 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 ag... |
import type { JSONSchemaForCustomApplicationConfigurationFiles } from './schema';
import type { ApplicationRuntimeConfig, CloudIdentifier } from './types';
// Loads the configuration file and parse the environment and header values.
// Most of the resulting values are inferred from the config.
import fs from 'fs';
imp... |
<reponame>Samshal/gidad-front
/** code from https://github.com/angular/material2 */
import {
AfterContentChecked,
AfterViewInit,
Component,
ContentChild,
ElementRef,
EventEmitter,
Input,
OnInit,
Output,
Renderer2,
TemplateRef,
ViewChild,
ViewEncapsulation,
} from '@angular/core';
import { Obs... |
import React from 'react';
import _throttle from 'lodash/throttle';
import BaseWire from './BaseWire';
import Wirer from './Wirer';
import Wire from './Wire';
import { registerEvents } from './eventHandlers'
import { _p } from './utils/points';
import { Offset, Position, TargetElement, TargetWrappers, Zoom } from './t... |
<filename>packages/eva.js/lib/core/GameObject.ts
import Scene from '../game/Scene';
import Transform, { TransformParams } from './Transform';
import Component, { ComponentConstructor, ComponentParams, getComponentName } from './Component';
import { observer, observerAdded, observerRemoved } from './observer';
let _id ... |
import { ActionPanel, List, Action, Icon, useNavigation, Detail, Toast } from "@raycast/api";
import { useState, useRef, useEffect, Fragment } from "react";
import { DateTime } from "luxon";
import { nanoid } from "nanoid";
import { Sourcegraph, instanceName } from "../sourcegraph";
import { findNotebooks, SearchNoteb... |
<filename>Source/Scripts/General.ts
import ioHook from "iohook";
import {extraKeys} from "../Input/ExtraKeys";
import {GetWindowHandles, GetWindowText, GetWindowRect, GetForegroundWindowText, user32, user32_extra, WINDOWPLACEMENT, WindowPlacement, GetWindowPlacement, SetWindowPlacement, SW_SHOWMINIMIZED, SW_RESTORE, SW... |
<gh_stars>0
import { Plugin } from 'prosemirror-state';
import { Decoration, DecorationSet } from 'prosemirror-view';
import { Extension } from '@remirror/core';
import { isNullOrUndefined, isNumber, isString } from '@remirror/core-helpers';
import {
BaseExtensionOptions,
CommandParams,
ExtensionManagerParams,
... |
/*
* Copyright 2019-2020 SURF.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... |
<reponame>LemniscateX/incubator-echarts<filename>src/component/axisPointer/PolarAxisPointer.ts
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF ... |
// Luigi's Mansion 3D
import * as CMB from './cmb';
import * as CMAB from './cmab';
import * as ZAR from './zar';
import * as BCSV from '../luigis_mansion/bcsv';
import * as CTXB from './ctxb';
import * as Viewer from '../viewer';
import Progressable from '../Progressable';
import { CmbRenderer, CmbData } from './r... |
import React, { useContext, useCallback } from 'react';
import { SeriesPoint } from 'd3-shape';
import { PositionScale, StackPathConfig } from '@visx/shape/lib/types';
import { getFirstItem, getSecondItem } from '@visx/shape/lib/util/accessors';
import getBandwidth from '@visx/shape/lib/util/getBandwidth';
import { Ba... |
// Libraries
import cloneDeep from 'lodash/cloneDeep';
import { Subject, Unsubscribable, PartialObserver } from 'rxjs';
// Services & Utils
import { getDatasourceSrv } from 'app/features/plugins/datasource_srv';
import { getBackendSrv } from 'app/core/services/backend_srv';
import kbn from 'app/core/utils/kbn';
import... |
export interface ClusterType {
id: number;
name: string;
server: string;
service_account_id: number;
infra_id?: number;
service?: string;
aws_integration_id?: number;
}
export interface DetailedClusterType extends ClusterType {
ingress_ip?: string;
ingress_error?: DetailedIngressError;
}
export inte... |
import React from 'react';
import readline from 'readline';
import { Box, StdinProps, BoxProps, Text, useStdin } from 'ink';
/**
* Represent props of a <Tab>
*/
export interface TabProps {
name: string;
}
/**
* A <Tab> component
*/
// eslint-disable-next-line react/prop-types
const Tab: React.FunctionComponent<... |
<reponame>gaetancollaud/clockodo<gh_stars>0
import { AbsenceReturnType, AbsencesReturnType, DeleteReturnType, CustomerReturnType, CustomersReturnType, ProjectReturnType, ServiceReturnType, ServicesReturnType, UserReturnType, UsersReturnType, EntryReturnType, EntriesReturnType, TasksReturnType, TaskDurationReturnType, D... |
import {css} from '@emotion/css';
import {theme} from '../../styles/theme';
import {deepDefaults, getLeft, palette} from '../../styles/utils';
import '../../styles/global';
const sizes = ['large', 'small'] as const;
const {menu} = deepDefaults(theme, {
menu: {
width: '200px',
bgColor: '#262626',
... |
import fs from 'fs';
import {
CompiledContract,
Contract,
compileCalldata,
defaultProvider,
ec,
encode,
hash,
json,
number,
stark,
} from '../src';
describe('getStarkAccountFromPrivateKey()', () => {
test('it works with valid privateKey', () => {
const privateKey = '<KEY>';
const starkK... |
import {
Component,
OnDestroy
} from '@angular/core';
import {
Attraction,
CourseAttractionService,
GameMarkerService,
GameState,
GameStateService,
LatLonService,
Path,
PathService
} from 'cr-lib';
import * as L from 'leaflet';
import {
from,
range
} from 'rxjs';
import {
last,
map,
tap
}... |
import * as shape from "d3-shape";
import { scaleLinear } from "d3-scale";
import { ChartData, DataPoint, DataPoints } from "../types/types";
import { getYForX, parse, Path } from "./path";
import { interpolatePath } from "d3-interpolate-path";
import { mapValues, relativePercent } from "./math";
import React from "rea... |
import { CardConfig } from './gift-card.types';
import { sortByDisplayName, fetchAvailableCards, addToSupportedGiftCards } from './gift-card';
import { removeProtocolAndWww } from './utils';
import { DirectIntegration, fetchDirectIntegrations } from './directory';
import { get, set } from './storage';
import { currency... |
<gh_stars>10-100
import { Matrix4 } from '../math/matrix4';
import { Vector2 } from '../math/vector2';
import { Vector3 } from '../math/vector3';
import { renderer } from '../render/webgl';
import { Node } from './node';
export enum CameraProjectionMode { Ortho, Perspective }
export enum CameraPivot { TopLeft... |
<filename>src/utils.ts
import * as vscode from 'vscode';
import * as path from 'path';
import * as glob from 'fast-glob';
import * as child_process from 'child_process';
import * as fs from 'fs';
// get the currently opened file or undefined
export function getCurrentFileDir() {
if (vscode.window.activeTextEditor)... |
import {
Box,
Button,
Collapse,
Flex,
HStack,
Image,
Link,
Text,
useDisclosure,
useMultiStyleConfig,
} from '@chakra-ui/react'
import { useEffect, useState } from 'react'
import { BiLinkExternal } from 'react-icons/bi'
import { useQuery } from 'react-query'
import { Link as RouterLink, matchPath, us... |
import BigNumber from 'bignumber.js';
import Config from '../Config';
import { isExecuted, isTransactionStatusSuccessful } from './Helpers';
import hasPending from './Pending';
import { IWalletReceipt } from '../Wallet';
import { ExecuteStatus, ClaimStatus } from '../Enum';
import { TxSendErrors } from '../Enum/TxSendE... |
<gh_stars>1-10
import * as fs from 'fs';
var path = require('path');
var AdmZip = require("adm-zip");
const { v4: uuidv4 } = require('uuid');
export async function printTestDuration(vusers:string, startTime:Date)
{
let endTime = new Date();
console.log("TestRun completed\n");
console.log("----------------... |
import { ReplaySubject, Subscription } from "rxjs";
import { map, take } from "rxjs/operators";
import { OnDestroy, OnInit } from "@angular/core";
import { FormGroup } from "@angular/forms";
import { AbstractStarkFormComponent } from "./abstract-form-component";
import { StarkGenericSearchService } from "./generic-sear... |
import React, { FC, useState, useRef, useCallback, useEffect } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import { motion } from 'framer-motion';
import { useTranslation } from 'react-i18next';
import {
Button,
Badge,
CircleButton,
Dropdown,
FadeLoader,
MousePositionedTooltip,
} f... |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import Piscina from 'piscina';
import { ScriptTarget } from 'typescript';
import type { Compiler, sources } from 'web... |
<gh_stars>1-10
/*
* Copyright 2020
* SRDC - Software Research & Development Consultancy; Ankara; Turkey
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/license... |
<reponame>superjc2017/celo-web-wallet
import { CeloTransactionRequest } from '@celo-tools/celo-ethers-wrapper'
import WalletConnectClient from '@walletconnect/client'
import { SessionTypes } from '@walletconnect/types'
import { ERROR as WcError, Error as WcErrorType } from '@walletconnect/utils'
import { BigNumber, Big... |
<reponame>KrishnaRPatel/glimmer-vm
import { Reference, valueForRef, isConstRef } from '@glimmer/reference';
import { Revision, Tag, valueForTag, validateTag, consumeTag } from '@glimmer/validator';
import {
check,
CheckString,
CheckElement,
CheckOption,
CheckNode,
CheckMaybe,
} from '@glimmer/debug';
import... |
<filename>Common/LinqLanguageExtensions.ts
interface Grouping<TGroup, T> {
group: TGroup;
data: T[]
}
interface Array<T> {
/** Return the first item in an array or null if no item exits*/
first(): T;
/** Return the first item in an array based upon the search criteria or null if no item... |
import { TestBed } from '@angular/core/testing';
import { Router } from "@angular/router";
import { HttpErrorResponse } from "@angular/common/http";
import { Actions } from '@ngrx/effects';
import { TranslateService, TranslateModule } from "@ngx-translate/core";
import { Observable, empty, of } from 'rxjs';
import { co... |
import { isEqual } from 'lodash';
import { getLogger } from 'log4js';
import { ResourceClient } from '../client';
import { S3Client } from './aws';
import { KubernetesBucket } from './kubernetes-config';
import { translateSpec } from './kubernetes-to-aws';
const logger = getLogger('S3');
/**
* A adapter for modifyi... |
import {
Command, SubOptions, CommandArgsProvider
} from 'func';
import { rejects } from 'assert';
const fs = require('fs');
const path = require('path');
const inquirer = require('inquirer');
const chalk = require('chalk');
var spawn = require('child_process').spawn;
const log = (color, txt) => console.log(chalk[... |
<reponame>softronsts/breeze-client
import * as breeze from 'breeze-client';
let core = breeze.core;
let canIsolateES5Props = core.isES5Supported;
let ko: any;
export class ModelLibraryKnockoutAdapter implements breeze.ModelLibraryAdapter {
name: string;
constructor() {
this.name = "ko";
}
static regist... |
import * as request from 'superagent';
import * as _ from 'lodash';
import { Logger } from './log';
import * as preconditions from 'preconditions';
import * as Meritcore from 'meritcore-lib';
import * as MeritcorePayPro from 'merit-payment-protocol';
const $ = preconditions.singleton();
export namespace PayPro {
con... |
<reponame>Lagily/rome
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const ESC = '\x1b[';
export const pattern = [
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-z... |
import React, { useState, useEffect } from 'react';
import { Placeholder } from '@times-components/image';
import { breakpoints } from '@times-components/styleguide';
import { Card } from './Card';
import {
InfoCardContainer,
BodyCopy,
SubHeading,
CarouselButtonContainer,
CarouselButton,
CarouselIndicatorCo... |
<gh_stars>0
import { EventEmitter } from 'events';
import * as path from 'path';
import app from '../app';
import upath from './upath';
import Ignore from './ignore';
import { FileSystem } from './fs';
import Scheduler from './scheduler';
import { filesIgnoredFromConfig } from '../helper';
import { createRemoteIfNoneEx... |
'use strict';
/**
* Copyright (c) 2020 Copyright bp All Rights Reserved.
* Author: brian.li
* Date: 2020-10-22 14:29
* Desc: 读取 bootstrap.yml文件
*/
import * as febs from 'febs';
import * as fs from 'fs';
import * as YAML from 'yaml';
/**
* @desc: 获取正确的配置信息; 如果是 ${xxx} 形式则读取环境变量.
* @return:
*/
function getConfig(cfg:... |
<reponame>QuigonNetwork/xpjs
import axios from "axios";
import { io, ManagerOptions, SocketOptions } from "socket.io-client";
import { ClaimNftInfo } from "./helpers/algorand";
type ChainAwaiter<T> = {
[action_id: string]:
| {
resolve?: (data: T) => void;
event_res?: T;
}
| undefined;
}... |
/*
* Copyright 2020 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... |
import React, {useEffect, useState} from 'react';
import {useHistory, useParams} from 'react-router-dom';
import {Avatar, Button, Card, Layout, Modal, Skeleton} from 'antd';
import {SettingOutlined, CloseOutlined, RollbackOutlined, ExclamationCircleOutlined} from '@ant-design/icons';
import { getAllAdmins, removeAdmini... |
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not u... |
import React, { useContext, useEffect } from "react"
import { CalendarContext } from "../common/CalendarContext"
import { makeStyles, Theme } from "@material-ui/core/styles"
import clsx from "clsx"
import { format, differenceInMinutes } from "date-fns"
import { useDrag } from "react-dnd"
import { getEmptyImage } from "... |
<reponame>huamingjie0815/vite-plugin-vue-docs
import { Node } from "@babel/traverse";
import * as t from "@babel/types";
import {
ArrayExpression,
ObjectExpression,
ObjectProperty,
} from "@babel/types";
import { toLine } from "./utils";
import { Emit, Prop, Method, Slot } from "./type";
import { parse as comment... |
<reponame>charto/phosphor-float-area
// This file is part of phosphor-float-area, copyright (C) 2017 BusFaster Ltd.
// Released under the MIT license, see LICENSE.
import { Message, MessageLoop, IMessageHandler } from '@phosphor/messaging';
import { IDragEvent } from '@phosphor/dragdrop';
import { ElementExt } from '@... |
interface EnvironmentVariables {
[key: string]: string | undefined;
}
type ForcedPartial<T> = { [K in keyof T]: T[K] | undefined };
type OptionalKeysFrom<T> = { [K in keyof T]-?: undefined extends T[K] ? K : never }[keyof T];
type OptionalDefaults<T> = ForcedPartial<Pick<Required<T>, OptionalKeysFrom<T>>>
type Requ... |
<filename>src/scripts/services/prunella/logger.ts<gh_stars>1-10
/* tslint:disable:no-bitwise */
import * as appInsights from "applicationinsights";
import * as util from "util";
import { Settings } from "./settings";
import { IContext, ILogger, LoggerOptions } from "./typings";
import { Utils } from "./utils";
enum L... |
import helix, {h} from '../../../src/index'
let startTime
let lastMeasure
function startMeasure (name) {
startTime = performance.now()
lastMeasure = name
}
function stopMeasure () {
const last = lastMeasure
if (lastMeasure) {
window.setTimeout(function metaStopMeasure () {
lastMeasure = null
co... |
<gh_stars>10-100
import { Component, OnInit } from '@angular/core';
import {OrgProduceService} from "./org-produce.service";
import { TranslateService, LangChangeEvent, TranslationChangeEvent } from '@ngx-translate/core';
import {isNullOrUndefined} from "util";
declare var $: any;
declare var jQuery: any;
declare va... |
// import type { NextPage } from 'next';
import { Container } from '@/src/components/container';
import { Center } from '@/src/components/center';
import React, { useEffect, useState } from 'react';
import Profile from '@/src/paterns/profile';
import { setCookie } from 'nookies';
import Link from 'next/link';
import { ... |
import {
transformVNodeArgs,
Transition,
TransitionGroup,
Teleport,
h,
ComponentPublicInstance,
defineComponent,
VNodeTypes,
ConcreteComponent,
ComponentPropsOptions
} from 'vue'
import { hyphenate } from './utils/vueShared'
import { matchName } from './utils/matchName'
import { isComponent, isFunct... |
// THIS SCRIPT IS PERSONAL MIGRATION SCRIPT
// IT IS NOT FOR GENERAL PURPOSE.
import _ from 'lodash'
import { DocumentType } from '@typegoose/typegoose'
import { format } from 'date-fns'
import { ko } from 'date-fns/locale'
import crypto from 'crypto'
import debug from 'debug'
import fs from 'fs'
import path from 'path... |
import { override } from '@microsoft/decorators';
import { Log } from '@microsoft/sp-core-library';
import {
BaseListViewCommandSet,
IListViewCommandSetListViewUpdatedParameters,
IListViewCommandSetExecuteEventParameters,
Command
} from '@microsoft/sp-listview-extensibility';
import * as $ from 'jquery';
import... |
<reponame>ezg27/tab-view
import chromep from 'chrome-promise';
import { DraggableLocation, DropResult } from 'react-beautiful-dnd';
import { mutate } from 'swr';
export function getItemIndex(activeElement: Element, listItems: NodeListOf<Element>): number {
let itemIndex = 0;
for (let [i, value] of listItems.entrie... |
import { Route } from 'vue-router'
import { Component, Mixins, Watch } from 'vue-property-decorator'
import { pick } from '../helpers'
import { RelationshipProperty } from '../hasura/schema/properties'
import { saveMutation } from '../hasura/graphql/operations'
import { ObjectMap } from '../types/common'
import { Ele... |
import React from 'react';
import { connect } from 'react-redux';
import { FormattedMessage } from 'react-intl';
import { FieldArray, InjectedFormProps } from 'redux-form';
import { Element } from 'nav-frontend-typografi';
import { Hovedknapp, Knapp } from 'nav-frontend-knapper';
import { calcDaysAndWeeks, guid, hasVal... |
export interface IRouterSlot<D = any, P = any> extends HTMLElement {
readonly route: IRoute<D> | null;
readonly isRoot: boolean;
readonly fragments: IPathFragments | null;
readonly params: Params | null;
readonly match: IRouteMatch<D> | null;
routes: IRoute<D>[];
add: ((routes: IRoute<D>[], navigate?: boolean) =... |
import CodeMirror from "codemirror";
import 'codemirror/mode/javascript/javascript';
import 'codemirror/lib/codemirror.css';
import '@styles/CodeBlock.scss';
import {exitCode} from "prosemirror-commands";
import {undo, redo} from "prosemirror-history";
import { NodeView, EditorView } from "prosemirror-view";
import { N... |
import { ASTNode, EvaluatedNode } from './AST/types'
import { warning } from './error'
import { bonus, mergeMissing } from './evaluation'
import { registerEvaluationFunction } from './evaluationFunctions'
import { capitalise0 } from './format'
import parse, { mecanismKeys } from './parse'
import { Context } from './par... |
import {
Alert,
AlertTitle,
Button,
Dialog,
DialogActions,
DialogContent,
DialogContentText,
DialogTitle,
FormControl,
Grow,
InputLabel,
MenuItem,
Select,
Stack,
TextField,
Toolbar,
Typography,
useMediaQuery,
useTheme,
} from "@mui/material";
import { ForwardedRef, forwardRef, useContext, useState } ... |
<reponame>FunMusicalIdeas/stepwise
// tslint:disable no-magic-numbers max-line-length max-file-line-count
import {
as,
Block,
FIRST,
indexJustBeyondFinalElement,
insteadOf,
Integer,
map,
musicalAs,
ONE,
Ordinal,
product,
range,
repeat,
sequence,
slice,
su... |
import {
Document,
Page,
PDFDownloadLink,
PDFViewer,
StyleSheet,
Text,
View,
} from '@react-pdf/renderer'
import React from 'react'
import Modal from 'react-modal'
import { useAppDispatch, useAppSelector } from '../../redux/hooks'
import styles from './PastelPaperWalletModal.module.css'
import { closePas... |
import React, { useState, useEffect, useContext } from "react";
import { makeStyles, Theme } from "@material-ui/core/styles";
import {
Card,
CardActionArea,
CardActions,
CardContent,
CardMedia,
Button,
Typography,
Switch,
Chip,
Avatar,
} from "@material-ui/core";
import DoneIcon from "@material-ui/i... |
<gh_stars>1-10
import _isTypedArray from "is-typedarray";
import typedArrayToBuffer from "typedarray-to-buffer";
// -- Constants ------------------------------------------ //
const ENC_HEX = "hex";
const ENC_UTF8 = "utf8";
const ENC_BIN = "binary";
const TYPE_BUFFER = "buffer";
const TYPE_ARRAY = "array";
const TYPE... |
import { AConnection, APreparedStatement } from "../adapter-definitions"
import { PreparedStatement, SqlParameters } from "../exported-definitions"
import { formatError, toSingleRow, toSingleValue } from "../helpers"
import { CursorItem } from "./Cursor"
import { toExecResult } from "./ExecResult"
import { Context } fr... |
<filename>js/src/cosmos/slashing/v1beta1/tx.ts
/* eslint-disable */
import Long from "long";
import { grpc } from "@improbable-eng/grpc-web";
import _m0 from "protobufjs/minimal";
import { BrowserHeaders } from "browser-headers";
export const protobufPackage = "cosmos.slashing.v1beta1";
/** MsgUnjail defines the Msg/... |
export const enum ContractType {
// Same as the ones from vdab to make it ourselves easier
FULLTIME = 'contract_type_001',
TEMPORARY = 'contract_type_002',
YOUTH_JOBS = 'contract_type_003',
FREELANCE = 'contract_type_004',
FLEXI_JOB = 'contract_type_005',
SERVICE_CHECK_JOB = 'contract_type_006',
VOLUNTE... |
/**
* MergeFormats.js
*
* Released under LGPL License.
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
import { Fun } from '@ephox/katamari';
import Bookmarks from '../dom/Bookmarks';
import ElementUtil... |
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import * as Platform from '../../core/platform/platform.js';
import * as ARIAUtils from './ARIAUtils.js';
import {Keys} from './KeyboardShortcut.js';
imp... |
// Functions to Calculate Preference Scoring
// Yes the Use of Cats and Dogs is Silly, but its better than groupA and groupB
import * as _ from "lodash";
interface Choices {
[chooser: string]: string[];
}
interface Matches {
name: string;
score: number;
}
interface Scores {
name: string;
scores: Matches[]... |
import {
EventType,
GLOBAL_COMPOSITE_OPERATION_DESTINATION_OUT,
GLOBAL_COMPOSITE_OPERATION_SOURCE_OVER,
} from '@/constants';
import { MouseMovements, PixelPosition } from '@/types/common';
import {
BoardDrawingConfig,
BrushDrawingBaseConfig,
CanDrawAndBindMouseListenerConfig,
ComputePositionAndMovementConfig,
... |
<gh_stars>10-100
import invariant from 'tiny-invariant';
import {
Layer,
Marker,
Map,
PolylineOptions,
Point as LeafletPoint,
LatLng,
LatLngExpression,
GeoJSON,
} from 'leaflet';
import { AnyProps } from 'supercluster';
import { ICluster, PointFeature } from '../types';
import { cloneDeep } from 'lodash... |
/**
* @fileOverview 替换的主函数库
* @author <a href='https://github.com/OrangeX4/'>OrangeX4</a>
* @version 0.1
*/
/**
* @describe 键值对字典
*/
export interface DictMapFile {
[index: string]: DictMap
}
export interface DictMap {
[index: string]: string
}
export interface ObjectByReplace {
content: string,
s... |
<reponame>GonzaloChacon/ng-spotify-playlist<gh_stars>0
/**
* <NAME>
*/
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Subject } from 'rxjs';
import { takeUntil, debounceTime } from 'rxjs/operators';
import { StoreService, Store, Event, AuthService } from '@app/core/services';
import { Spotify... |
<filename>gen/vue-docgen-web-types/src/build.ts
import {WebTypesBuilderConfig} from "../types/config";
import * as path from "path";
import glob from 'globby';
import * as chokidar from 'chokidar';
import {FSWatcher} from 'chokidar';
import {parse} from 'vue-docgen-api'
import {HtmlAttribute, HtmlTag, HtmlVueFilter, JS... |
import pool, { Pool } from 'generic-pool';
import os from 'os';
import path from 'path';
import serializeError from 'serialize-error';
import { parentPort, Worker } from 'worker_threads';
const CPU_COUNT = os.cpus().length;
export interface IScriptWorker extends Worker {
exitCode?: number | null;
error?: Error | nu... |
#!/usr/bin/env node
import * as Associative from "@effect-ts/core/Associative"
import * as Chunk from "@effect-ts/core/Collections/Immutable/Chunk"
import type { NonEmptyArray } from "@effect-ts/core/Collections/Immutable/NonEmptyArray"
import * as Tp from "@effect-ts/core/Collections/Immutable/Tuple"
import * as T fr... |
import React, { useContext } from 'react'; // importing FunctionComponent
import { StyledButton } from './index.style';
import JobListContext from '../../app/context/jobListContext';
import FilterText from './filter';
import Icons from '../../assets/icons';
import filterHelper from "../../hooks/useFilterHelper";
impor... |
import {SubstrateBlock} from "@subql/types";
import {Collator, Day, BlockProduction} from "../types";
import type { AccountId, Digest } from '@polkadot/types/interfaces';
import { encodeAddress } from '@polkadot/util-crypto'
import { hexToString } from '@polkadot/util';
import { handleBlockWeight } from "./blockWeight"... |
import { assert, create, createMktimeButton, notNull } from '../Base.js';
import { ServerStorage, StorageUpdates } from '../ServerStorage.js';
import { Setting, Settings } from '../Settings.js';
import { AppShell } from './AppShell.js';
import { CalendarFiltersView } from './CalendarFiltersView.js';
import { CalendarS... |
<filename>src/processor/blockchain-events/index.ts
import Eth from 'web3-eth'
import { AbiItem } from 'web3-utils'
import { getObject } from 'sequelize-store'
import config from 'config'
import {
Contract,
AutoEventsEmitter,
EventsEmitterCreationOptions, LAST_FETCHED_BLOCK_NUMBER_KEY, NEW_BLOCK_EVENT_NAME, NEW_EV... |
// TODO: figure out 'android:pathData' vs. 'pathData' stuff
// TODO: create plugin that removes useless clip-paths?
// TODO: a 'useless clip-paths' plugin would have to run before the 'empty groups' plugin
// TODO: filter out xml files that don't contain a <vector> or <animated-vector> file?
import * as cli from 'comm... |
<filename>src/common/Requirements.ts<gh_stars>0
/*
* Copyright (c) 2021, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
import { Logger, Messages, SfdxError } from '@salesforce/core'... |
import * as React from 'react';
import { useAutoControlledValue, useEnhancedEffect, useForkRef } from '@appbuckets/react-ui-core';
import { formatNumber as defaultFormatNumber } from '@appbuckets/formatters';
import { ChangeHandler, FocusHandler, UIComponent } from '../generic';
import { useWithDefaultProps } from '... |
// Typescript defs adapted from draco3d emscripten IDL
// https://raw.githubusercontent.com/google/draco/master/src/draco/javascript/emscripten/draco_web_decoder.idl
// Interface exposed to emscripten's WebIDL Binder.
// http://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/WebIDL-Binder.h... |
import {
MonetizationEvent,
MonetizationProgressEvent,
MonetizationStartEvent,
MonetizationState,
MonetizationStopEvent,
TipEvent
} from '@web-monetization/types'
import { injectable } from '@dier-makr/annotations'
import { PaymentDetails } from '@web-monetization/polyfill-utils'
import { ScriptInjection }... |
import React from 'react'
import styled, { css } from 'styled-components'
import { Flex, Box, Desktop, Mobile } from 'components/containers'
import { Text } from 'components/elements'
import device, { size } from 'themes/device'
import AppStore from 'images/svg/dmt5/app-store.svg'
import GooglePlay from 'images/svg/dmt... |
import { addMessage } from "./FirebaseHelper";
// Helper function to make cartesian coordinates out of polar coordinates
const polarToCartesian = (centerX: number, centerY: number, radius: number, angleInDegrees: number) => {
const angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;
return {
x: ... |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
import { Client, Twin } from 'azure-iot-device';
import { Mqtt as Protocol } from 'azure-iot-device-mqtt';
// import { AmqpWs as Protocol } from 'azure-iot-device-amqp'... |
<reponame>huntermaxfield/oppia
// Copyright 2017 The Oppia Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-... |
<reponame>wellcometrust/wellcome-patterns-node<gh_stars>10-100
import { NextLinkType } from '@weco/common/model/next-link-type';
import { parseCsv } from '@weco/common/utils/csv';
import { isNotUndefined } from '../../utils/array';
/* eslint-disable @typescript-eslint/no-explicit-any */
type Params = { [key: string]: ... |
<gh_stars>1-10
// Copyright 2021, Nitric Technologies Pty Ltd.
//
// 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 ... |
<filename>packages/helpers/src/participant-states.ts
import { CHANNEL_CHAT, CHANNEL_COLLAB, CHANNEL_CUSTOM, CHANNEL_MAPPING, CHAT_MESSAGE_TEMPLATE_ID, PARTICIPANT_CUSTOM } from '@serge/config'
import { ChannelCollab, ChannelTypes, ParticipantTemplate, Role, TemplateBody, TemplateBodysByKey } from '@serge/custom-types'
... |
import { ToxicityClassifier } from "@tensorflow-models/toxicity";
import React, { ChangeEvent, Component, FormEvent, MouseEvent } from "react";
import {
Props as GeneratedTextProps,
Speaker,
} from "../components/GeneratedText";
import ZeroSidedConversationWidget from "../components/ZeroSidedConversationWidget";
imp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.