text stringlengths 3.3k 33k |
|---|
import { i18n } from '@labelbee/lb-components';
// the translations
// (tip move them in a JSON file and import them,
// or even better, manage them separated from your code: https://react.i18next.com/guides/multiple-translation-files)
const resources = {
en: {
translation: {
NewProject: 'New Project',
... |
<gh_stars>0
import { EventEmitter } from 'events';
import * as crypto from 'crypto';
import d from 'debug';
import Bluebird from 'bluebird';
import PacketReader from './packetreader';
import RollingCounter from './rollingcounter';
import Packet from './packet';
import Auth from '../auth';
import Client from '../client'... |
import React, { useState, useEffect, useRef } from "react";
import { withRouter } from "react-router";
import { Radio, Checkbox, Button, Menu, Dropdown, message } from "antd";
import {
SaveOutlined,
DownOutlined,
DownloadOutlined,
CloseOutlined,
} from "@ant-design/icons";
import { saveAs } from "file-saver";
i... |
<gh_stars>0
import * as moment from 'moment';
import * as util from 'util';
import * as chevre from '../../chevreapi';
import { factory } from '../../factory';
import { MongoRepository as ActionRepo } from '../../repo/action';
import { MongoRepository as TransactionRepo } from '../../repo/transaction';
import { hand... |
/*
Copyright (c) 2017-2020 X<NAME> Software Co., Ltd.
https://www.cocos.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limited,
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
t... |
<gh_stars>100-1000
import {every} from 'lodash';
import { WORLD_SIZE } from '../../../../utils/lba';
import * as THREE from 'three';
import { compile } from '../../../../utils/shaders';
import VERT_SEA from './shaders/sea.vert.glsl';
import FRAG_SEA from './shaders/sea.frag.glsl';
import { loadSubTexture, makeNoiseText... |
import React from "react";
import { GetServerSidePropsContext, NextPage } from "next";
import styled from "styled-components";
import { useTranslation } from "next-i18next";
import { useRouter } from "next/router";
import Head from "next/head";
import { serverSideTranslations } from "next-i18next/serverSideTranslations... |
<reponame>ickeep/fullBase-components<gh_stars>0
import { action } from 'mobx'
import Conf from '../config'
export interface ICURDOpt {
formName?: string,
dataFn?: Function
}
export interface ICURD<T> {
add: (opt?: ICURDOpt) => Promise<T>
getDetail: (opt?: ICURDOpt) => Promise<T>
edit: (opt?: ICURDOpt) => Pr... |
import React, {useEffect} from 'react';
import axios from 'axios';
import {v4 as uuidv4} from "uuid";
import { GlobalHotKeys } from "react-hotkeys";
import styled from 'styled-components'
import {getDataDir} from './path';
import HelpScreen from "./components/HelpScreen";
import DocumentImage from "./components/Documen... |
/*!
* tgbotjs - Telegram Bot API for Node.js and browsers.
* https://github.com/modern-dev/tgbotjs
*
* Copyright (c) 2020 <NAME>
* Licensed under the MIT license.
*/
import wretch from 'wretch';
import { Bot } from './index';
// eslint-disable-next-line no-unused-vars
import { ITgBotParams } from './params';
imp... |
/**
* Temporary API for development
*/
import axios, { AxiosRequestConfig, CancelToken } from 'axios';
import { GenomeFeature } from "genome-visualizer/@types/track/annotation/AnnotationTypes";
class SiriusApi {
public static apiUrl: string = '';
public static getAccessToken(): string {return ''};
pri... |
/**
* Copyright 2019 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... |
<filename>src/sourcekit-lsp/LanguageClientManager.ts
//===----------------------------------------------------------------------===//
//
// This source file is part of the VSCode Swift open source project
//
// Copyright (c) 2021 the VSCode Swift project authors
// Licensed under Apache License v2.0
//
// See LICENSE.t... |
import { FC, useEffect, useReducer, useState } from "react";
import Link from "next/link";
import Loading from "components/header/mobile/Loading";
import SubCategories from "components/header/mobile/SubCategories";
import Search from "components/header/search/Search";
import Tab from "components/header/Tab";
import M... |
import * as React from "react";
import * as ReactDOM from 'react-dom'
import * as _ from 'lodash'
import * as hljs from 'highlight.js'
require('../node_modules/highlight.js/styles/vs2015.css');
require('./styles/grouped-log-items.scss');
import UnfoldLess from 'svg-react-loader?name=UnfoldLess!../node_modules/materia... |
// --- Day 2: Corruption Checksum ---
// As you walk through the door, a glowing humanoid shape yells in your direction. "You there! Your state appears to be idle. Come help us repair the corruption in this spreadsheet - if we take another millisecond, we'll have to display an hourglass cursor!"
// The spreadsheet co... |
/*-----------------------------------------------------------------------------------------------
* Copyright (c) Red Hat, Inc. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*---------------------------------------------------------------------... |
<gh_stars>0
import { Class } from '../class.type';
import { ANNOTATIONS_KEY } from './consts';
import {
ClassAnnotationAlreadyExistsError,
PropertyAnnotationAlreadyExistsError,
ParameterAnnotationAlreadyExistsError,
MethodAnnotationAlreadyExistsError,
} from './../errors';
import { AnnotationTypes, Annotation, Clas... |
/* eslint-disable react-hooks/exhaustive-deps */
/* eslint-disable @typescript-eslint/no-unused-vars */
import {
Box,
Button,
ButtonGroup,
Center,
Divider,
Flex,
HStack,
Slider,
SliderFilledTrack,
SliderThumb,
SliderTrack,
Text,
useToast,
VStack,
Wrap,
} from "@chakra-ui/react";
import { m... |
import * as React from 'react';
import type GrowthBook from '@growthbook/growthbook';
import { captureScreenshots } from './screenshot';
import CameraIcon from './CameraIcon';
import { default as COLORS } from './colors';
import ScreenshotEditor from './ScreenshotEditor';
import ScreenshotPromptOverlay from './Screensh... |
/*
About preprocessor, please check the document at
https://github.com/Hedgehog-Computing/Hedgehog-Package-Manager
Hedgehog Lab supports three types of "*import":
a. *import YOUR_FULL_URL, for example *import http://website.com/mylib/myfunction.hhs
b. *import Package_Name: Function_1, Function_2, Function_3 ... the p... |
<filename>src/utils/cosmosdb_model_versioned.ts
import * as t from "io-ts";
import * as O from "fp-ts/lib/Option";
import { TaskEither } from "fp-ts/lib/TaskEither";
import * as TE from "fp-ts/lib/TaskEither";
import {
INonNegativeIntegerTag,
NonNegativeInteger
} from "@pagopa/ts-commons/lib/numbers";
import {
... |
import { ISchedule } from 'tui-calendar'
import { flattenDeep, get, has } from 'lodash'
import { endOfDay, formatISO, isAfter, parse, parseISO, startOfDay } from 'date-fns'
import dayjs from 'dayjs'
import { getInitalSettings } from './baseInfo'
import { ICategory, IQueryWithCalendar, ISettingsForm } from './type'
impo... |
import { Component, Input, Output, EventEmitter, ChangeDetectorRef } from "@angular/core";
import * as moment from 'moment/moment';
import { MessageboxService } from "../../../shared/messagebox/messagebox.service";
import { DLService } from "../../../shared/dl.service";
import { CoreService } from "../../../core/shared... |
<filename>src/extension.ts
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
'use strict';
import * as vscode from 'vscode';
import { listProcesses, ProcessItem } from './ps';
import { T... |
import Duration from "./Duration";
import Key from "./Key";
import KeySignatures from "./Key/KeySignatures";
import Mode from "./Key/Mode";
import Melody from "./Melody";
import Note from "./Note";
import Pitch from "./Pitch";
import Accidental from "./Pitch/Accidental";
import ScaleValue from "./Pitch/ScaleValue";
imp... |
import React, { useCallback, useMemo } from "react"
import * as Yup from "yup"
import { SubmitHandler } from "@unform/core"
import { EditTaskContentView } from "../EditTaskContent"
import Button from "../../../../components/Button/Button"
import {
QuizAnswer,
QuizContent,
QuizQuest,
useEditTaskContext,... |
import React from 'react'
import Link from 'next/link'
import { Pane, majorScale } from 'evergreen-ui'
import matter from 'gray-matter'
import path from 'path'
import fs from 'fs'
import orderby from 'lodash.orderby'
import Container from '../../components/container'
import HomeNav from '../../components/homeNav'
impor... |
<filename>src/journey-maps/angular/journey-maps.interfaces.ts
import { TemplateRef } from '@angular/core';
import { FeatureCollection } from 'geojson';
import { LngLatBoundsLike, LngLatLike, MapboxGeoJSONFeature } from 'maplibre-gl';
import { SbbMarker } from './model/marker';
export type SbbStyleMode = 'bright' | 'd... |
<filename>src/contract-factory/nft.ts<gh_stars>0
import * as bsv from "@sensible-contract/bsv";
import { BN } from "@sensible-contract/bsv";
import {
ContractAdapter,
dummyAddress,
dummyPadding,
dummyPayload,
dummyPk,
dummyRabinPubKey,
dummyRabinPubKeyHashArray,
dummySigBE,
dummyTx,
dummyTxId,
PLA... |
import {
App,
Editor,
MarkdownView,
OpenViewState,
Plugin,
TAbstractFile,
TFile,
View,
WorkspaceLeaf
} from 'obsidian';
import {
EditorView
} from '@codemirror/view';
import {
EditorState,
EditorSelection
} from '@codemirror/state';
import {
around
} from 'monkey-around';
impor... |
import * as React from 'react';
import { instantiate } from '../../data/scriptable';
import {
GameModel,
Player,
VariableDescriptor as VDSelect,
} from '../../data/selectors';
import { useStore, store } from '../../data/store';
import { featuresCTX, isFeatureEnabled } from '../Contexts/FeaturesProvider';
import {... |
<reponame>gopartyparrot/msig
import { Program } from "@project-serum/anchor"
import { MintLayout, Token, TOKEN_PROGRAM_ID, u64 } from "@solana/spl-token"
import { Keypair, PublicKey, SystemProgram, Transaction } from "@solana/web3.js"
import { buildMultisigProgram, findMultisigSigner } from "../utils"
import { Proposal... |
<filename>docker/disk-usage-statistics/index.ts
import Debug from 'debug'
const debug = Debug('disk-usage-metrics')
import http from 'http'
import URL from 'url'
import fetch from 'node-fetch'
import lines from 'lines-async-iterator'
import { UnaryFunction } from 'ix/interfaces'
import { AsyncIterableX, from } from 'ix... |
const {abs, ceil, floor, log, max, min, pow, round, sqrt} = Math;
const $ = (selector: string) => <Element & HTMLInputElement> document.querySelector(selector);
const $$ = (selector: string) => [].slice.apply(document.querySelectorAll(selector));
declare var ace: any;
// TODO:
// * Support for multiple I/O
// * Expec... |
/* eslint-disable @typescript-eslint/naming-convention */
/**
* 【全部选项拖拽完成】,即 correctRuleType = and;此时 correctGroups.length = 1,correctGroups[0] = [所有有终点 item 的 id];
* 【任意起点拖入终点】,即 correctRuleType = or;此时 correctGroups.length = [有终点 item 个数],correctGroups[idx] = [有终点 item 的 id];
* correctGroups = string[][];
*/
impo... |
import React, { useCallback, useMemo, useState } from "react";
import { format } from "date-fns";
import { createAsset } from "use-asset";
import Chart from "../../components/ZoomableLineChart";
import Map, { useBounds } from "./Map";
import { Link } from "../../components/Link";
import useDebounce from "../useDebounce... |
<filename>packages/rum-core/src/domain/rumEventsCollection/view/trackViews.ts<gh_stars>0
import {
addEventListener,
DOM_EVENT,
Duration,
elapsed,
generateUUID,
monitor,
noop,
ONE_MINUTE,
relativeNow,
RelativeTime,
throttle,
} from '@vidyard/browser-core'
import { NewLocationListener } from '../../... |
<filename>src/showrunners/oasis/oasisChannel.ts
// @name: Oasis Channel
// @version: 1.0
// @recent_changes: First
import { Service, Inject, Container } from 'typedi';
import config from '../../config';
import showrunnersHelper from '../../helpers/showrunnersHelper';
import { ethers, logger } from 'ethers';
import ep... |
//
// Copyright (c) Microsoft.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
import express = require('express');
const router = express.Router();
import async = require('async');
import { ReposAppRequest, IProviders } from '../../../../transitional';
import... |
import * as React from 'react'
import { Dialog, DialogContent, DialogFooter, OkCancelButtonGroup } from '../dialog'
import { FoldoutType, RebaseConflictState } from '../../lib/app-state'
import { WorkingDirectoryStatus } from '../../models/status'
import { isRepositoryWithGitHubRepository, Repository } from '../../mode... |
<filename>ts/types.ts
import * as _ from 'lodash';
import * as BigNumber from 'bignumber.js';
// Utility function to create a K:V from a list of strings
// Adapted from: https://basarat.gitbooks.io/typescript/content/docs/types/literal-types.html
function strEnum(values: string[]): {[key: string]: string} {
return... |
/// <reference types="node" />
import { EventEmitter } from 'events';
import Common from '@ethereumjs/common';
import { TypedTransaction } from '@ethereumjs/tx';
import { BaseController, BaseConfig, BaseState } from '../BaseController';
import type { NetworkState, NetworkController } from '../network/NetworkController'... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*-------------------------------------------------------------------------... |
<filename>src/api/traversal/edges/dark-world/mirror.ts
import { makeEdge } from '../helpers';
import NodeConnectionId from '../../nodes/node-connection-id';
import NodeId from '../../nodes/node-id';
import Edge from '../edge';
const makeMirrorEdge = (
from: NodeId,
to: NodeId,
how: NodeConnectionId = NodeConnec... |
import { formatHexToBN, formatHexToInt, hexToUnit } from "./conversion";
import { BigNumber } from "@ethersproject/bignumber";
export const MIN_LOCKUP_DAYS = 14;
export const DAY_IN_SECONDS = 60 * 60 * 24;
export const BASE_APR = 0.042;
export const LOCK_APR = 0.0981;
export interface Validators {
stakers: Validato... |
import { faCheck } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import dayjs from 'dayjs';
import React from 'react';
import styled from 'styled-components';
import { useForceUpdate } from '../../../../../common/utils';
import {
ConsoleSpaceSubjectDataSetF... |
/**
* Copyright (c) 2020, 2021 Visa, Inc.
*
* This source code is licensed under the MIT license
* https://github.com/visa/visa-chart-components/blob/master/LICENSE
*
**/
import { Component, Prop, Element, State, h } from '@stencil/core';
import { IBoxModelType } from '@visa/charts-types';
import { DataTableDefau... |
<reponame>alex34567/AdventOfCode2020<gh_stars>0
export interface Arrayish<T> extends Iterable<T> {
[index: number] : T;
readonly length: number;
}
export function reverseSubarray<T>(array: Arrayish<T>, begin: number, end: number): void {
end--;
while (begin < end) {
let tmp = array[begin];
... |
<gh_stars>0
import { IPdfObject, IStringMap, PdfReference, IPdfResource } from "./PdfObject"
import { Graphics } from "./Graphics";
const pageCatalogId = 1;
const pagesId = 2;
export class PdfDocument {
private _version: string = "1.6";
private _pages: Array<PdfPage> = new Array<PdfPage>();
private _idCou... |
import { StageProps, Stage, Sprite, SpriteProps } from 'canvas2djs';
import { pathToRegexp } from './PathToRegexp';
import { IComponent, ComponentManager } from './ComponentManager';
import { Resource, Loader, ResourceType } from './Loader';
import { ViewManager } from './ViewManager';
import { TemplateManager } from '... |
import { encode } from "he";
import { GraderSpecificationFor, QuestionGrader } from "../graders/QuestionGrader";
import { applySkin, highlightCode } from "../core/render";
import { ExamComponentSkin } from "../core/skins";
import { BLANK_SUBMISSION, MALFORMED_SUBMISSION } from "./common";
import { ResponseHandler, Viab... |
<filename>src/core/operations/preRender.ts
/* eslint-disable max-lines */
import * as puppeteer from 'puppeteer';
import * as expressjs from 'express';
import * as path from 'path';
import { AsyncCommand, Result, Strings } from 'tsbase';
import { FileSystemExtraAdapter, IFileSystemExtraAdapter } from '../../fileSystem/... |
import { Terrain } from '@serge/config'
import { LabelStore, SergeGrid3, SergeHex3 } from '@serge/custom-types'
import { Feature, GeoJsonProperties, Geometry } from 'geojson'
import { CoordIJ, experimentalH3ToLocalIj, geoToH3, H3Index, h3ToGeo, h3ToGeoBoundary, polyfill } from 'h3-js'
import L from 'leaflet'
import { o... |
<filename>src/app.ts
import minify = require("jsonminify")
import * as fs from "fs";
import * as rd from "rd";
import * as luaparse from "luaparse";
import * as commentsData from "./modules/comments_data"
import * as analyse from "./modules/analyse"
import * as codedata from "./modules/code_data";
//读取配置
let cfg = JSO... |
<gh_stars>0
import { ColorValue } from '@fluentui-react-native/theme-types';
import { DynamicColorMacOS } from 'react-native-macos';
/** Palette of colors defined in FluentUI Apple */
export interface FluentUIAppleBasePalette {
blue10: ColorValue;
blueMagenta20: ColorValue;
blueMagenta30: ColorValue;
communica... |
import TextField from '@mui/material/TextField';
import fuzzysort from 'fuzzysort';
import { useEffect, useRef, useState } from 'react';
import { styled } from '@mui/system';
import { Command as CoreCommand } from 'src/frontend/components/MissionControl';
import { useGetConnectionById, useGetConnections } from 'src/fro... |
import * as d3 from 'd3'
import * as d3Hexbin from 'd3-hexbin'
import { isString, max, range, get, sum } from 'lodash'
import { ILine } from './LineChartCore'
/**
* 图表布局设置,支持数字或百分数 (50 | '2%')
*/
export interface IChartMargin {
top: string | number
left: string | number
right: string | number
bottom: string ... |
// Copyright (c) 2018, 2019 by Audere
//
// Use of this source code is governed by an MIT-style license that
// can be found in the LICENSE file distributed with this file.
import Sequelize, { Op } from "sequelize";
import logger from "../util/logger";
import { HutchUploadModel } from "../models/db/hutchUpload";
impor... |
import {randomBytes as randomBytesOrig} from 'crypto';
import {isRight} from 'fp-ts/lib/Either';
import * as t from 'io-ts';
import levelup from 'levelup';
import GitHubStrategy from 'passport-github';
import {promisify} from 'util';
const randomBytes = promisify(randomBytesOrig);
type Db = ReturnType<typeof levelup>... |
/**
* Name: dependencies-installer.ts
* Description: Node.js dependencies installer
* Author: <NAME> <<EMAIL>>
* @since 1.1.0
*/
import chalk from 'chalk';
import { spawn } from 'child_process';
import * as path from 'path';
import { Stream } from 'stream';
import { Config } from '../config-manager';
import FileR... |
<filename>src/DateManager.ts
import {AddS, ReplaceAll} from './Functions'
import {DigitsNth, ToDigits} from './StringManipulation'
export const DATE_FORMAT_DATE = 'YYYY-MM-DD'
export const DATE_FORMAT_TIME_SECONDS = 'HH:mm:ss'
export const DATE_FORMAT_TIME_NO_SECONDS = 'HH:mm'
export const DATE_FORMAT_DATE_TIME = DATE... |
<reponame>likebot0/vscode-php-phan
import * as childProcess from "child_process"
import * as fs from "fs"
import * as net from "net"
import * as path from "path"
import * as semver from "semver"
import * as url from "url"
import * as vscode from "vscode"
import { LanguageClient, LanguageClientOptions, StreamInfo } from... |
import { u32, u64, Bytes, Option } from "@polkadot/types";
import { BN, isUtf8 } from "@polkadot/util";
import { CID } from "multiformats/cid";
import { AnyNumber } from "@polkadot/types/types";
import { AccountId32 } from "@polkadot/types/interfaces/runtime";
import { Balance } from "@polkadot/types/interfaces";
impor... |
<gh_stars>0
import {
BaseLanguageClient,
Convert,
LanguageClientConnection,
ActiveServer,
} from 'atom-languageclient'
import { TextBuffer, TextEditor, Emitter, Range } from 'atom'
import * as cp from 'child_process'
import * as t from 'vscode-languageserver-types'
import * as UPI from 'atom-haskell-upi'
import... |
/**
* Javascript string methods
*
* | Method | Description |
* | :-------------------------------------------------------... |
import {int_from_bytes} from "./casts";
import {SExp} from "./SExp";
import {Bytes, Tuple, t, isBytes} from "./__type_compatibility__";
import type {CLVMType} from "./CLVMObject";
import {EvalError} from "./EvalError";
import {
ARITH_BASE_COST,
ARITH_COST_PER_ARG,
ARITH_COST_PER_BYTE,
CONCAT_BASE_COST,
CONCAT... |
<filename>src/main/services/ssl.ts<gh_stars>1-10
/* eslint-disable class-methods-use-this */
import * as asn from '@peculiar/asn1-schema';
import * as x509 from '@peculiar/asn1-x509';
import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';
import { PemConverter } from 'webcrypto-core';
import ... |
<filename>website-frontend/src/app/archive/archive-session.ts
//
// Copyright (c) 2018 Electronic Arts Inc. All Rights Reserved
//
import {Component, ElementRef} from '@angular/core';
import {Router, ActivatedRoute, Params, NavigationEnd} from '@angular/router';
import { Pipe, PipeTransform } from '@angular/core';
i... |
// This code is based on the `mssql-jdbc` library published under the conditions of MIT license.
// Copyright (c) 2019 Microsoft Corporation
import { ClientSecretCredential } from '@azure/identity';
import { CryptographyClient, KeyWrapAlgorithm, KeyClient, KeyVaultKey } from '@azure/keyvault-keys';
import { createHash... |
import UserList from '@/components/room/UserList'
import { app } from '@/utils/api'
import { ROOM } from '@/utils/constant'
import { Disclosure } from '@headlessui/react'
import {
AnnotationIcon,
ClockIcon,
CogIcon,
FlagIcon,
QuestionMarkCircleIcon,
} from '@heroicons/react/outline'
import confetti from 'canv... |
<filename>src/config/main.ts<gh_stars>10-100
// Convict formats require throwing errors to validate values
import path from 'path'
import fs from 'fs'
import * as os from 'os'
import {homedir} from 'os'
import convict, {Format} from 'convict'
import {pipe} from 'fp-ts/lib/pipeable'
import * as array from 'fp-ts/lib/Arr... |
<filename>packages/canvas/Canvas/common.ts<gh_stars>0
import {CSSType, PercentLength, View, Screen, GestureStateTypes, Utils, Application} from '@nativescript/core';
import {CanvasRenderingContext, TouchList} from '../common';
import {PinchGestureEventData, Pointer} from '@nativescript/core/ui/gestures';
export interf... |
<gh_stars>0
import { ReactNode } from 'react';
import { hcl } from 'd3-color';
import { defaultsDeep, cloneDeep } from 'lodash';
import { ReactElement, MouseEvent } from 'react';
import {
LinkRouter, TypeStyleResolver, LinkTemplateResolver, TemplateResolver,
ElementTemplate, LinkTemplate, RoutedLink, RoutedLin... |
/*
University of Illinois/NCSA Open Source License
Copyright (c) 2018 Terrain Data, Inc. and the authors. All rights reserved.
Developed by: Terrain Data, Inc. and
the individuals who committed the code in this file.
https://github.com/terraindata/terrain
Permission is ... |
import dgram from 'dgram'
import net from 'net'
import uuidv4 from 'uuid/v4'
import { ExtendedSocket } from 'extendedsocket'
import { PacketId } from 'packets/definitions'
import { InPacketBase } from 'packets/in/packet'
import { InHolepunchPacketUdp } from 'packets/holepunch/inholepunch'
import { OutHolepunchPacket... |
import { Component, OnInit, ViewChild } from '@angular/core';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
import { Activated... |
<reponame>rodoufu/rest2grpc<filename>src/rest2grpcServer.ts
import express, {Request, Response} from "express";
import {
loadPackageDefinition,
credentials,
ChannelCredentials,
GrpcObject,
} from '@grpc/grpc-js';
import {load} from '@grpc/proto-loader';
import {ErrorHandler} from "./errorHandler";
import {Intercept... |
// Copyright (c) 2022 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... |
import {
ConfigSimilarityResponse,
DecisionSurfaceResponse,
EnsembleOverview,
FANOVADetails,
FANOVAOverview,
FeatureImportance,
GlobalSurrogateResult,
HPImportanceDetails,
Label,
LimeResult,
LinePoint,
LocalExplanation,
OutputDescriptionData,
PDPResponse,
Perf... |
/*
* @Author: lijianzhang
* @Date: 2018-09-15 19:40:17
* @Last Modified by: lijianzhang
* @Last Modified time: 2021-02-02 23:48:27
*/
import EncodeFrame from './frame/encode-Frame';
export type Dictionary = Map<string | number, number>;
class LzwDecode {
constructor(colorDepth: number) {
this.defaul... |
let GUI_BACKGROUND_COLOR = LCD_COLOR.WHITE
let FONT_BACKGROUND_COLOR = LCD_COLOR.WHITE
let FONT_FOREGROUND_COLOR = LCD_COLOR.BLACK
//% weight=20 color=#436EEE icon="\uf108"
namespace LCD1IN8{
function Swop_AB(Point1: number, Point2: number): void {
let Temp = 0;
Temp = Point1;
Point1 = Poin... |
<gh_stars>1-10
// Copyright 2018 The Outline Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applica... |
import React, { useCallback, useEffect } from 'react'
import {
Heading,
Text,
Box,
Button,
Image,
ButtonGroup,
Stack,
AvatarGroup,
Avatar,
AvatarBadge,
Alert,
AlertIcon,
AlertTitle
} from '@chakra-ui/react'
import { useState } from 'react'
import { Slider } from './components/Slider'
import { ... |
/**
* MIT License
*
* Copyright (c) 2020 ManBang Group
* 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, modi... |
/* eslint-env jest */
import { wait } from '@/utils';
interface Component {
props: {
[key: string]: number;
};
model: {
[key: string]: number;
};
}
const renderDef = ( { props, model }: Component ): number => props.a + model.b;
describe( 'native JS features', () => {
it( 'Test scop... |
// generated from terraform resource schema
import { Construct } from 'constructs';
import * as cdktf from 'cdktf';
/**
* AWS Lambda
*/
export interface LambdaPermissionConfig extends cdktf.TerraformMetaArguments {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_permi... |
import React, {useCallback, useEffect, useState} from "react";
import {defineMessages, useIntl} from "react-intl";
import {
Box,
Button,
ButtonGroup,
CircularProgress,
Code,
Collapse,
Flex,
Heading,
HStack,
Link,
Text,
useToast
} from "@chakra-ui/core";
import AuthToken from "../AuthToken";
impo... |
/* tslint:disable */
import {IAnnotatedImageData, ImageData} from '../image-data'
import {IToneOptions, ColorChannel, IHSLAdjustment} from '../types'
function validateCurvesInput(curve?: number[][]): number[][] {
if (!curve) throw new Error('curve is not defined')
let lastEntry = -Infinity
for (const entry of c... |
<reponame>timlebrun/node-atem-connection
export declare enum Model {
Unknown = 0,
TVS = 1,
OneME = 2,
TwoME = 3,
PS4K = 4,
OneME4K = 5,
TwoME4K = 6,
TwoMEBS4K = 7,
TVSHD = 8,
TVSProHD = 9,
TVSPro4K = 10,
Constellation = 11,
Constellation8K = 12,
Mini = 13,
Min... |
// Copyright 2018 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 ... |
import {App, NavController} from "ionic-angular";
import {BehaviorSubject} from "rxjs/BehaviorSubject";
import {Component, Injectable} from "@angular/core";
import {CRMarker} from "../markers/crMarker";
import {isDefined} from "ionic-angular/util/util";
import {MarkersComponent} from "../markers/markers";
import {GeoLo... |
import * as React from "react";
import { StyleSheet, View, Text, PixelRatio, Platform } from "react-native";
import { useRecoilState } from "recoil";
import { IconButton } from "../components/IconButton";
import {
editingModeState,
glContextState,
glProgramState,
imageBoundsState,
imageDataState,
processing... |
"use strict";
import * as vscode from "vscode";
import { expandVars, getArrayStrFromConfigExpandingVars, getStrFromConfigExpandingVars } from "./expandVars";
import {
workspace,
window,
commands,
DebugConfiguration,
WorkspaceFolder,
CancellationToken,
DebugConfigurationProvider,
debug,
... |
<filename>src/modules/Logs.ts
import _ from 'lodash';
import BigNumber from 'bignumber.js';
import Web3 from 'web3';
import { Log, EventLog } from 'web3-core';
import { Contract } from 'web3-eth-contract';
import { AbiInput, AbiItem } from 'web3-utils';
import { Contracts } from '../modules/Contracts';
import {
Bala... |
import { EntitySystem } from './ecs';
import { Vector2 } from '../vector';
import { TILE_SIZE } from '../constants';
import { BARRIER_MASK, AGENTS_MASK, OBSTACLE_MASK } from '../colisions-masks';
export enum Shape {
gridCell,
point,
circle,
}
export interface Collidable {
pos: Vector2;
shape: Shape;
radiu... |
<reponame>pp123pp/threejs-map
/* eslint-disable no-useless-escape */
/* eslint-disable eqeqeq */
/**
* @license
*
* Grauw URI utilities
*
* See: http://hg.grauw.nl/grauw-lib/file/tip/src/uri
*
* @author <NAME> (http://www.grauw.nl/)
*
* Copyright 2012 <NAME>
*
* Licensed under the Apache License, Version... |
import * as THREE from 'three';
import { Uniforms } from '../utils/Uniforms';
import { PointerEventArgs } from './Controller';
export declare interface LayerBindParam extends THREE.WebGLRendererParameters {
name: string;
canvas?: HTMLCanvasElement;
aspectSetting?: AspectSetting;
wrapperElement?: HTMLElement;
wra... |
<reponame>codeforboston/CFB_static
import * as fs from 'fs';
import * as path from 'path';
import { EOL } from 'os';
import { promisify } from 'util';
import * as gm from 'gray-matter';
import * as hb from 'handlebars';
import * as marked from 'marked';
import * as yaml from 'js-yaml';
import fetch from 'node-fetch';
... |
import React, { useEffect, useRef } from "react"
import SubjectComponent from "./components/SubjectItem"
import "./Subjects.css"
import "./components/Switch.css"
import isMobile from "functions/isMobile"
import { version } from "components/../../package.json"
import { connect, useDispatch } from "react-redux"
import { ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.