text stringlengths 3.08k 15.5k |
|---|
<reponame>BRT-network/brt-binary-codec<filename>src/types/amount.ts
import { Decimal } from "decimal.js";
import { SerializedType } from "./serialized-type";
import { BinaryParser } from "../serdes/binary-parser";
import { Currency } from "./currency";
import { AccountID } from "./account-id";
/**
* Constants for val... |
import echarts from 'echarts';
import { SpecificChartConfig } from '../../types';
import currentYearDates from '../../utils/rocket-holiday/2020.json'
import prevYearDates from '../../utils/rocket-holiday/2019.json'
import beforePrevYearDates from '../../utils/rocket-holiday/2018.json'
import dayjs from 'dayjs';
// 时间t... |
import React, { useEffect } from "react";
import { Size } from "../../types";
import { Icon, IconName } from "../Icon";
import {
StyledInput,
StyledInputLeftIcon,
StyledInputLoadingIcon,
StyledInputRightIcon,
StyledInputWrapper,
StyledInputWrapperAlt
} from "./Input.style";
import { TextArea, TextAreaProps ... |
import merge from "deepmerge";
import { EventEmitter } from "events";
import { interceptRequest } from "./interceptRequest";
import { observePagePerformance, PerformanceData } from "./performance";
import { IProcessDataHandler, processDataFactory } from "./processData";
import { rewriteApp } from "./rewriteApp";
import... |
<reponame>Trequend/weather<gh_stars>0
import { format, startOfDay, endOfDay } from 'date-fns';
import { getIconSrc, getTimezoneTime } from '../../../../../functions';
import { BezierCurveVector2 } from './bezier-curve';
import { Vector2 } from './vector2.class';
const DAY_LENGTH = 86400000;
type DrawContext = {
top... |
import { ISpriteShema } from "../../interface/global";
import IVisualComponent from "../../interface/visual-component";
import { Counter, getDistance } from "../math";
import Resources from "../resources";
import TextureComponent from "./texture";
/**
* @description Class SpriteTextureComponent extends TextureCompone... |
import * as katex from "katex";
import * as md5 from "md5";
type BibJSON = {
[citation: string]: any;
};
type SymbolMap = {
[latexSymbol: string]: {
type: string;
description: string;
};
};
function symbolRender(input: string, symbols: SymbolMap) {
let symbolTable =
Object.keys(symbols)
.ma... |
import hash from 'hash.js';
import {
fromBech32Address,
toBech32Address,
toChecksumAddress,
} from './zns/utils';
import { invert, set, isNullAddress } from './utils';
import { Dictionary, ZnsResolution, nodeHash } from './types';
import {
NamingServiceName,
ResolutionError,
ResolutionErrorCode,
Resolutio... |
<reponame>dna2zodiac/flame
import {SyntaxItem} from '../share/common';
import {
STOPS,
TAG_STRING,
TAG_COMMENT,
TAG_REGEX,
IsSpace,
SearchNext,
SearchPrev,
} from './common';
/* env = { text, cursor, tokens, ... } */
export interface ParseEnv {
text: string;
curI: number;
tokens: Token[]... |
import * as React from 'react';
import {
BaseComponent,
autobind,
css,
divProperties,
getInitials,
getNativeProps,
getRTL,
IRenderFunction
} from '../../Utilities';
import { Icon } from '../../Icon';
import { Image, ImageFit, ImageLoadState } from '../../Image';
import {
IPersonaProps,
PersonaInitia... |
<filename>packages/editor/src/ts/example/preview.ts<gh_stars>1-10
import {
TemplateResult,
classMap,
html,
render,
repeat,
} from '@blinkk/selective-edit';
import {EVENT_RENDER_COMPLETE} from '../editor/events';
import cloneDeep from 'lodash.clonedeep';
const SOURCE_EDITOR = 'editor';
const SOURCE_PREVIEW =... |
import React, { useState, useEffect, useRef } from 'react';
import { connect } from 'react-redux';
import { IRootState } from '../../shared/reducers';
import {
Link as RouterLink,
LinkProps as RouterLinkProps,
RouteComponentProps
} from 'react-router-dom';
import { speak, ITTS } from '../tts/tts';
import { comple... |
<reponame>dzz9143/code-math
import { Circle, Rect } from './types';
import { Particle } from './particle2';
export function normalize(value: number, min: number, max: number): number {
return (value - min) / (max - min);
}
// linear interpolation
export function lerp(norm: number, min: number, max: number): numbe... |
import {core, SfdxCommand, flags} from '@salesforce/command';
const Util = require('util')
const fsExtra = require('fs-extra')
const tempDirectoryName = './tempFilesWithRecordTypes'
const userMessages = [
'The data was deployed successfully',
'No data was deployed there are missing record types in your target org'
... |
<filename>backend/src/service/NodeStatusService.ts
import {Heartbeat} from '../domain/Heartbeat';
import {ITimestampProvider} from './TimestampProvider';
import {IGeolocationDAO} from './dao/GeolocationDAO';
import {Node} from 'filecoin-network-stats-common/lib/domain/Node';
import {IBlocksDAO} from './dao/BlocksDAO';
... |
import * as React from 'react';
import { ToggleModalSubProps } from '@app/Components/ToggleModal';
import { useContext, useEffect, useState } from 'react';
import { fetchWithErrorHandling } from '@app/utils/fetchWithErrorHandling';
import {
AlertVariant,
Button,
EmptyState, EmptyStateBody, EmptyStateIcon, EmptySt... |
import { MutationTree } from 'vuex';
import {
CustomPromptAnswer,
FoodState,
MealState,
MealTime,
Selection,
SurveyState as CurrentSurveyState,
} from '@common/types';
import { copy } from '@common/util';
import { SurveyEntryResponse, SurveyUserInfoResponse } from '@common/types/http';
import { SurveyState ... |
// Copyright 2020 Google 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 agreed to in ... |
// ==UserScript==
// @name Mangadex Common
// @version 0.0.6
// @description Common function library for Mangadex. Should be required by other userscripts.
// ==/UserScript==
/* eslint no-unused-vars: ["off"] */
'use strict'
function dbg(x: string) {
// unsafeWindow used soly for debugging in firefox via Web... |
<gh_stars>1-10
import { useRef, useState, useEffect, useCallback } from "react";
import * as Tone from "tone";
import { Sampler, Sequence } from "tone";
import { Direction, ModeNotation } from "lib/types";
import {
getUrls,
destructNote,
sampleBaseUrl,
convertToToneSubdivision,
} from "lib/tone";
export enum S... |
<filename>SurgeRemoter.lbaction/Contents/Scripts/default.ts
/// <reference path="api.ts" />
const SURGE_BUNDLE_ID = 'com.nssurge.surge-mac';
const SURGE_ICON = SURGE_BUNDLE_ID;
function configured(): boolean {
return Action.preferences.apiEndpoint && Action.preferences.accessKey
}
function run(argument: string):... |
import { useState } from "react";
import { Button, Classes, Drawer, RadioGroup, Radio, Checkbox } from "@blueprintjs/core";
import { useParams } from "react-router-dom";
import { OntologyTerm } from "../../d";
import { Link } from "react-router-dom";
interface OntrologyExplorerControlDrawerProps {
pinnedVertex: Ont... |
<reponame>DenseOriginal/wastemytime<gh_stars>0
import { Component, OnInit, AfterViewInit, Inject, QueryList, ViewChildren } from '@angular/core';
import { ICard } from 'src/app/shared/interfaces';
import { CardComponent } from './card.component';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/materi... |
import powerbi from "powerbi-visuals-api";
import DataViewCategorical = powerbi.DataViewCategorical
import DataViewTable = powerbi.DataViewTable
import DataViewMetadata = powerbi.DataViewMetadata
export function getMeasureIndex(dv: DataViewCategorical, measureName: string): number {
let RetValue: number = -1;
... |
<reponame>kenny-evitt/veonim
import { prefixWith, onFnCall, pascalCase } from '../support/utils'
import MsgpackStreamDecoder from '../messaging/msgpack-decoder'
import MsgpackStreamEncoder from '../messaging/msgpack-encoder'
import { Api, Prefixes } from '../neovim/protocol'
import { on } from '../messaging/worker-clie... |
/*
* Copyright 2021 Google 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
import { useEffect, useState, useCallback } from 'react';
import styled from 'styled-components';
import ProductList from '../../components/home/PruductList';
import { RouteComponentProps } from 'react-router-dom';
import CategoryList from '../../components/search/CategoryList';
import { useDispatch } from 'react-redux... |
import { Directionality } from '@angular/cdk/bidi';
import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';
import { ComponentPortal, ComponentType, TemplatePortal } from '@angular/cdk/portal';
import {
ComponentRef,
Injectable,
Injector,
Optional,
SkipSelf,
TemplateRef,
InjectionToken,... |
import { ids } from "../../config.json"
import type { Command } from "../../lib/imports"
const command: Command = {
name: "tag",
description: "Sends a preset message, allowing you to notify a specific member when sending it.",
options: [{
type: "STRING",
name: "tag",
description: "The tag you want to see",
... |
import { FPECipher } from 'feistel-cipher'
import { Collector } from '../Decrypter/Collector'
import { Crumb, toCrumb } from '../Encrypter/Crumb'
import { decrypt } from '../Decrypter'
import { DEFAULT_HASH_LENGTH, DEFAULT_CRYPTO_HASH_ENGINE } from '../crypto'
import { Obfuscator, DEFAULT_HASH_ENGINE, DEFAULT_KEY_STRI... |
/// <reference types="node" />
import * as fs from 'fs';
import * as path from 'path';
import { expect } from 'chai';
import {
after,
describe,
it,
} from 'mocha';
import { PNG } from 'pngjs';
import { compareScreenshots } from './helpers/compare-screenshots';
import { getTestCases, TestCase } from './helpers/get... |
import crypto from 'crypto';
import { EventEmitter } from 'events';
import WebSocket from 'ws';
import msgpack from 'msgpack-lite';
import { ServerMessages, ClientMessages } from '../src/Messages';
import { parseSchema } from '../src/Validation';
import { registerEvents, on } from '../src/EventDecorators';
const SCHE... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import { WebResourceLike } from "@azure/core-http";
import {
createDefaultHttpClient,
createPipelineRequest,
HttpClient,
PipelinePolicy,
PipelineRequest,
PipelineResponse,
SendRequest
} from "@azure/core-rest-pipeline";
import { e... |
import axios from 'axios';
import VueRouter from 'vue-router';
import {find, get, includes, isEmpty, reduce} from 'lodash-es';
import {ActionTree, GetterTree, MutationTree} from 'vuex';
import State from './userTypes';
function mergePermissions(perm1: any, perm2: any) {
const action1 = perm1.action;
const action2 ... |
<reponame>ghalliday/Visualization<gh_stars>0
import { select as d3Select } from "@hpcc-js/common";
import { geoPath as d3GeoPath, geoTransform as d3GeoTransform } from "d3-geo";
import * as L from "leaflet";
import "../../../src/leaflet/plugins/D3SvgOverlay.css";
/* Ported from https://github.com/teralytics/Leaflet.... |
<reponame>divna-p/fsa-spa-test<filename>projects/fsastorefrontlib/src/cms-components/comparison-table/comparison-table-panel/comparison-table-panel.component.spec.ts
import { Component, DebugElement, Input } from '@angular/core';
import {
async,
ComponentFixture,
TestBed,
fakeAsync,
} from '@angular/core/testin... |
import keyboardJS from 'keyboardjs'
function initActions(canvas: HTMLCanvasElement): void {
// Set the general application keyboard context
// Needed to have seperate context's for input controls (i.e. Textbox)
keyboardJS.setContext('editor')
// Bind the events on the canvas
// @ts-ignore
keyb... |
<filename>server.ts<gh_stars>1-10
import { Tracery } from './src/tracery';
import { AnswerType, Question } from './app/src/app/shared/model/question.model';
import { Survey } from './app/src/app/shared/model/survey.model';
import { APIData } from './app/src/app/shared/model/api-data.model';
import { SendEmail } from '.... |
import { Subject } from 'rxjs/Subject';
import {Component, OnChanges, ViewEncapsulation, Input, ElementRef, Renderer, ViewChild, EventEmitter, Output} from '@angular/core';
import {FormGroupDirective} from '@angular/forms';
import {DealService} from "../_services/deal.service";
import {CompanyService} from "../_serv... |
import { PayloadAction, createSlice, Middleware } from "@reduxjs/toolkit";
import * as ViewField from "./view_field";
import { getSelectedAtomId, getDraftConnection } from "./selectors";
import { addAtom, moveAtom, connectAtoms } from "../store/defaultReducer";
import { createAtom } from "../store/atom";
import { Point... |
<reponame>salviadev/AccessionRV
import * as boc from '@phoenix/boc';
import { PaginatedListView } from '../../../views/tools/PaginatedListView';
import { PreferencesHelper } from '../../preferences/spo-preferences';
export interface IViewList extends PaginatedListView {
getList(data?: any): Promise<boc.FindRelation... |
import { Line } from 'react-chartjs-2';
import { AreaChartDisplayProps } from '@components/organisms/AreaChartDisplay/interfaces';
import 'chartjs-adapter-luxon';
import 'chartjs-plugin-streaming';
import { Grid } from '@material-ui/core';
import Chart from 'chart.js';
// const onRefresh = (chart) => {
// const xhr =... |
<gh_stars>10-100
import * as utils from '@dcl/ecs-scene-utils'
import * as ui from '@dcl/ui-scene-utils'
import { Sound } from './sound'
import { Player } from './player'
import { pickUpSound, putDownSound } from './barItem'
import { PredefinedEmote, triggerEmote } from '@decentraland/RestrictedActions'
import { octoTr... |
/*
* © 2017 Stratio Big Data Inc., Sucursal en España.
*
* This software is licensed under the Apache License, Version 2.0.
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See ... |
'use strict';
import { Router, Request, Response } from 'express';
import { fetchSource } from '../../../../_shared/config/controllers/db-config';
import { post } from 'request';
import { get as unirest_get, post as unirest_post } from 'unirest';
import * as shortid from 'shortid32';
import { waterfall } from 'async... |
<reponame>Otanikotani/appsync-serverless-aurora-cdk-example
import {App, CfnOutput, Stack, StackProps} from "@aws-cdk/core";
import * as ec2 from "@aws-cdk/aws-ec2";
import * as secretsmanager from "@aws-cdk/aws-secretsmanager";
import * as appsync from "@aws-cdk/aws-appsync";
import * as iam from "@aws-cdk/aws-iam";
i... |
import { exitCodes, setExitCode } from '../lib/setExitCode';
import { createTask, transitionTo } from '../lib/tasks';
import listingStories from '../ui/messages/info/listingStories';
import storybookPublished from '../ui/messages/info/storybookPublished';
import buildLimited from '../ui/messages/warnings/buildLimited';... |
import {
ERROR_LEVEL__ERROR,
PackagelintException_Internal,
PackagelintException_RuleDefinition,
PackagelintException_UserConfig,
PackagelintPreparedConfig,
PackagelintPreparedRule,
PackagelintRuleConfig,
PackagelintRuleDefinition,
PackagelintRuleEntry,
PackagelintRuleName,
PackagelintRulePreparer... |
/*Copyright (C) 2015-2016 <NAME>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
W... |
import React, { useCallback, useEffect, useMemo, useState } from 'react'
import { FlatList, RefreshControl } from 'react-native'
import { StatusBar } from 'expo-status-bar'
import { TouchableWithoutFeedback } from 'react-native-gesture-handler'
import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome5'
import... |
<reponame>eretail/pitget
import { Routes, RouterModule } from '@angular/router';
import { NgModule } from '@angular/core';
import { AuthGuard } from './_guards';
import { LoginComponent } from './login';
import { RegisterComponent } from './register';
import { TuitionComponent } from './tuitions/tuition.... |
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
/**
* @brief パラメータIDのデフォルト値を保持する定数<br>
* デフォルト値の仕様は以下のマニュアルに基づく<br>
* ... |
#!/usr/bin/env node
const doc = `
Log into Foundry Virtual Tabletop website, and save cookies to file.
EXIT STATUS
This utility exits with one of the following values:
0 Login completed successfully.
>0 An error occurred.
Usage:
authenticate.js [--log-level=LEVEL] <username> <password> <cookiejar>
... |
import { Injectable } from '@angular/core';
import { emojiList } from './rich-text-editor-emoji/helpers/emoji-list';
import { HttpClient } from '@angular/common/http';
import { ILinkPreview } from './rich-text-editor.interface';
import { Subject, BehaviorSubject } from 'rxjs';
interface ISelection {
index: number;
... |
<reponame>TPessanha/Lanflow
import fs from "fs";
import net from "net";
import path from "path";
import { generateHash } from "./utils/cryptoUtil";
import { getUnusedName } from "./utils/fsUtils";
import * as Logger from "./utils/Logger";
const LOGGER = Logger.getLogger();
/**
* Interface for a helper connection objec... |
import React, { useEffect, useContext } from "react"
import { PartytownContext } from "./partytown-context"
import type { ReactElement, ScriptHTMLAttributes } from "react"
import { requestIdleCallback } from "./request-idle-callback-shim"
export enum ScriptStrategy {
postHydrate = `post-hydrate`,
idle = `idle`,
... |
<reponame>Offirmo/offirmo-monorepo<filename>4-tools/universal-debug-api-companion-webextension/src/content-scripts/start.ts
//import { browser } from 'webextension-polyfill-ts' // NO! Too big, we only need a minimal subset
const browser = (globalThis as any).browser || (globalThis as any).chrome
import assert from 't... |
<reponame>smellyshovel/vuestic-ui
import { ApiDocsBlock } from '../../../../types/configTypes'
import { DocsHelper } from '../../../../helpers/DocsHelper'
const toClass = (className: string): string => `\`class=\"${className}\"\``
const display1 = `
<h1 class="display-1">Display 1 Heading</h1>
`
const display2 = `
<h... |
/*
* @Author: 焦质晔
* @Date: 2021-02-24 13:02:36
* @Last Modified by: 焦质晔
* @Last Modified time: 2021-11-13 08:39:51
*/
import { CSSProperties, PropType, Component } from 'vue';
import PropTypes from '../../_utils/vue-types';
import { isNumber } from '../../_utils/util';
import { isValidWidthUnit, isValidComponentSi... |
import './pagination.sass';
import {
extractPaginationState,
Pagination,
usePagination,
UsePaginationPropsDefinition
} from '../../composables/pagination';
import { DefaultThemePropsDefinition, useTheme } from '../../composables/theme';
import AngleLeftIcon from '../icons/angleLeft/AngleLeftIcon';
import AngleR... |
<reponame>cuttlesoft/pxt
import { rangeToSelection } from "./monaco";
// This file adds a feature to Monaco I (dz) call "Edit Amendments".
// EditAmendments are used by the auto-complete system as a work around for limitations in Monaco.
// Worked example:
// Consider if a user starts typing this (in Minecraft py... |
// Copyright 2016-2019, Pulumi Corporation.
//
// 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... |
/**
* Copyright (c) <NAME>.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { join, toFileUrl } from "../../imports/path.ts";
import { colors } from "../../imports/fmt.ts";
import { exists } from "../../imports/fs.ts";
exp... |
import React, { useMemo, useCallback, useState, useRef } from 'react';
import { useSelector } from 'react-redux';
import styled from 'styled-components';
import { UserSettingsFontSizeToCSSFontSize } from 'const/font';
import { useImmer } from 'hooks/useImmer';
import { IColumnTransformer } from 'lib/query-result/types... |
<reponame>jacksonrr3/devextreme-reactive
import moment from 'moment';
import { PureComputed } from '@devexpress/dx-core';
import {
AppointmentMoment, DayBoundaryPredicateFn,
ReduceAppointmentByDayBoundsFn, NormalizeAppointmentDurationFn, ViewCell, SchedulerDateTime,
} from '../../types';
import { checkCellGroupingI... |
<filename>src/parse.ts
import PO from 'pofile';
import { ASTNodeTypes, TxtParentNode } from '@textlint/ast-node-types';
interface TxtDocumentData {
rawData: string;
startLine: number;
endLine: number;
startRange: number;
endRange: number;
endColumn: number;
}
export default function parse(text:... |
<filename>src/main/statistics.ts<gh_stars>1-10
import { createElement } from '../common';
import { createCard, createTable, formatNumber } from './common';
import { nullMetric } from './metrics';
import { showTeamsModal } from './modal';
type StatisticRow = [string, string, () => void];
function buildStatisticsTable(... |
/// <amd-module name="UI/_focus/Focus" />
/**
* Utility module that provides a cross-browser way to move focus
* to specific elements
*/
// @ts-ignore
import { detection, IoC } from 'Env/Env';
import { collectScrollPositions } from './_ResetScrolling';
/**
* make foreignObject instance. using for hac... |
import React, { useCallback, useEffect, useRef, useState } from 'react';
import {
View,
ScrollView,
KeyboardAvoidingView,
Platform,
Keyboard,
TextInput,
Alert,
StyleSheet,
} from 'react-native';
import { useNavigation } from '@react-navigation/native';
import { Form } from '@unform/mobile';
import { For... |
<gh_stars>0
import cxapi = require('@aws-cdk/cx-api');
import { Test } from 'nodeunit';
import { App, Construct, ConstructNode, Context, ContextProvider, Stack } from '../lib';
export = {
'AvailabilityZoneProvider returns a list with dummy values if the context is not available'(test: Test) {
const stack = new S... |
// tslint:disable-next-line:no-implicit-dependencies
import {AnyDicomElement, VR} from "WebDicom";
import {TransferSyntaxReader} from "./transfer-syntax-reader";
import {InputStream} from "../../../blobs/streams";
import {assertNotNull, assertRange, assertType} from "../../../helpers/assertions";
import {dicomElement... |
import { mark, stop } from 'marky';
import { inspect, InspectOptions } from 'util';
import { errorInfo, fullStack } from './errors';
import { logHandlers } from './loghandler';
import { levels, LogLevel, LogLevelName } from './loglevel';
import { FormattedLogRecord, LogRecord } from './logrecord';
const measureInspect... |
<filename>src/Query.ts
'use strict'
const CORRELATIONS = [
['regexp', 'regex', 0.8],
['regular expression', 'regex', 0.8],
['ip', 'address', 0.1],
['address', 'ip', 0.1],
['join', 'lookup', 0.6],
['join', 'sql', 0.25],
['aggregation', 'sql', 0.1],
['aggregation', 'pipeline', 0.1],
[... |
import { API, Auth, graphqlOperation } from "aws-amplify";
import { GraphQLResult } from "@aws-amplify/api-graphql";
import React, { useEffect, useState } from "react";
import { useParams } from "react-router-dom";
import { ListSurveyFormsQuery } from "./API";
import * as Survey from "survey-react";
import { createSurv... |
import { useTranslation } from "react-i18next"
import { EntitySelection } from "carbure/hooks/use-entity"
import { TransactionSelection } from "../query/use-selection"
import * as api from "transactions/api"
import useAPI from "../../../common/hooks/use-api"
import { confirm, prompt } from "../../../common/components... |
<gh_stars>0
class SmokeNiceBG {
x0: number;
y0: number;
x1: number;
y1: number;
rad0: number;
rad1: number;
colorStops: { ratio: number, r: number, g: number, b: number }[] = [];
constructor(_x0: number, _y0: number, _rad0: number, _x1: number, _y1: number, _rad1: number) {
this.x0 = _x0;
... |
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { getAnalytics, provideAnalytics } from '@angular/fire/analytics';
import { initializeApp, provideFirebaseApp } from '@angular/fire/app';
import { connectAuthEmulator, getAuth, provideAuth } from '@angular/fire/aut... |
<reponame>traverse1984/oxide.ts
import { expect } from "chai";
import { Result, Ok, Err, match, _ } from "../../../src";
export default function result() {
describe("Mapped", mapped);
describe("Chained", chained);
describe("Combined (chained within mapped)", combined);
}
function mapped() {
function test(... |
<reponame>molior-dbs/molior-web2
import {Component, ElementRef, ViewChild, Inject} from '@angular/core';
import {ActivatedRoute, Router, ParamMap} from '@angular/router';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormGroup, FormBuilder, FormControl, Validators} from '@an... |
<reponame>hlbowen/stryker
import { EOL } from 'os';
import { RunStatus, RunResult, TestResult, TestStatus } from 'stryker-api/test_runner';
import { TestFramework } from 'stryker-api/test_framework';
import { Config } from 'stryker-api/config';
import { TranspileResult, TranspilerOptions, Transpiler } from 'stryker-api... |
/*
Copyright 2020 TATA ELXSI
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 writing, software... |
<reponame>hannojg/react-native-skia
import { Value } from "../Value";
import {
addTimeline,
createTimeline as createTimelineInternal,
getStaggeredTimeline,
getTimeline,
getTimelines,
normalizeForTimeline,
} from "../TimelineInfo/functions";
import { getResolvedPosition } from "../TimelineInfo/parameters";
i... |
import { findalllogs } from 'api/nest-admin/Accountlog';
import moment from 'moment';
import React, { FC, useEffect, useRef, useState } from 'react';
import './Workplace.less';
import { bd_encrypt } from 'utils/core';
import ReactDOM from 'react-dom';
import usePrevious from 'hooks/usePrevious';
import { sendToOne } fr... |
import { Client, Message } from 'discord.js';
import { embed } from '../utils/embed';
import { emojis } from '../utils/emojis';
import { utils } from '../utils/utils';
import { aliases, commands } from '../yue';
export const run = async (message: Message, client: Client, args: string[], prefix: string): Promise<Messag... |
<reponame>itajaja/hopy
/* eslint-disable max-classes-per-file */
/* eslint-disable @typescript-eslint/no-use-before-define */
import PythonShell, { PythonShellConfig } from './PythonShell';
export interface PyBase {
x: (strings: readonly string[], ...vars: PyVar[]) => Promise<void>;
e: (strings: readonly string[],... |
<reponame>eibens/shill<gh_stars>0
import * as fmt from "https://deno.land/std@0.111.0/fmt/colors.ts";
import { parse } from "https://deno.land/std@0.111.0/flags/mod.ts";
import { countTokens } from "https://raw.githubusercontent.com/eibens/gpt3_utils/v1.0.0-alpha.3/tokenize.ts";
import {
CompletionParams,
Completio... |
<gh_stars>0
import './extensions'
import { Client, Collection, MessageAttachment, TextChannel } from 'discord.js'
import type { GuildMember } from 'discord.js'
import type { VerificationData } from './extensions'
import dotenv from 'dotenv'
import fs from 'fs'
import { userService } from './services'
import { util } fr... |
<reponame>Takumon/blog
import { CreatePagesArgs } from 'gatsby'
import path from 'path'
import _kebabCase from 'lodash/kebabCase'
import _flow from 'lodash/fp/flow'
import _forEach from 'lodash/fp/forEach'
import _uniq from 'lodash/fp/uniq'
import _flatMap from 'lodash/fp/flatMap'
import _orderBy from 'lodash/orderBy'
... |
<gh_stars>0
/*
* Copyright © 2019 Atomist, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... |
import type { FunctionComponent, ReactElement } from "react";
import { useCallback, useContext, useEffect } from "react";
import {
AppBar,
Button,
CircularProgress,
Container,
Divider,
Icon,
Toolbar,
Typography,
} from "@mui/material";
import { styled } from "@mui/material/styles";
imp... |
import stringify from './stringify.js';
export type Scope = {
[property: string]: JSONValue;
};
/**
* Returns a "compiled" template (a string containing a function body that can
* be evaluated to produce the template output).
*/
export function compile(source: string) {
let output = 'let __buffer__ = "";\n... |
import { Components } from '@inovex.de/elements';
import { useEffect } from '@storybook/client-api';
import { Story } from '@storybook/web-components';
import { html } from 'lit-html';
import { decorateStoryWithClass, showSnackbar } from '../utils';
import './ino-select.scss';
const handleFormSubmission = e => {
e.p... |
<reponame>blackcater/mantine<gh_stars>0
export * from '@mantine/theme';
export * from '@mantine/utils';
export { ActionIcon, ACTION_ICON_SIZES } from './ActionIcon/ActionIcon';
export { Alert } from './Alert/Alert';
export { Avatar, AVATAR_SIZES } from './Avatar/Avatar';
export { Badge, BADGE_SIZES } from './Badge/Bad... |
<reponame>JPOWER4/SPFxAdvanced
import { Version } from '@microsoft/sp-core-library';
import {
IPropertyPaneConfiguration,
PropertyPaneTextField,
PropertyPaneButton,
PropertyPaneCheckbox,
PropertyPaneChoiceGroup,
PropertyPaneDropdown,
PropertyPaneHorizontalRule,
PropertyPaneLabel,
PropertyPaneLink,
P... |
<filename>router.ts
import { listenAndServe, ServerRequest } from "https://deno.land/std@0.83.0/http/server.ts";
import { Status } from "https://deno.land/std@0.83.0/http/http_status.ts";
import Mutex from "https://deno.land/x/await_mutex@v1.0.1/mod.ts"
import startWorker from "./k8s.ts";
const env = Deno.env.toObjec... |
import * as dotenv from 'dotenv'
dotenv.config()
import { v4 as uuidv4 } from 'uuid'
import _ from 'lodash'
import {
WebSocketCallState,
WebSocketResponse,
WebSocketSession,
WebSocketBase,
BuildingId,
AreaId,
DestinationCallPayload,
} from '../common/types'
import {
fetchAccessToken,
fe... |
import * as admin from "firebase-admin";
import * as functions from "firebase-functions";
import {
IGetNetworkResourcesUnionParams, INetworkResourceClassResponse, INetworkResourceOfferingResponse,
INetworkResourceTeacherClassResponse, INetworkResourceTeacherOfferingResponse, isWarmUpParams
} from "./shared";
import... |
import { toRoman } from 'roman-numerals';
import { IAnimeContext, ICountdownInfo, IHandleCountdownData, IHandleMediaMore, IHandleNewRelease, IInfoContext, IMangaContext,
IMediaRequestContext, INativeContext, IToPrintContext } from '.';
import { toNextAiring } from '../../anilist/formatting/media';
import { mediaMessage... |
<reponame>kigorw/eth-utils<filename>eth.ts
import { Log } from 'web3-core'
import { BigNumber } from 'bignumber.js'
import shuffle from 'lodash/shuffle'
import Web3 from 'web3'
import { TransactionReceipt, Transaction } from 'web3-core'
import { Eth } from 'web3-eth'
import { Contract } from 'web3-eth-contract'
impor... |
<gh_stars>0
import {Arguments, CommandModule} from 'yargs';
import * as glob from 'glob';
import * as fs from 'fs-extra';
import * as chalk from 'chalk';
import * as path from 'path';
// @ts-ignore 缺少类型声明
import * as lcfirst from 'lcfirst';
interface GConfigArgv extends Arguments {
type: string
}
interface Plugins ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.