text stringlengths 3.08k 15.5k |
|---|
<filename>packages/cli/src/helper/util.ts
/* eslint-disable unicorn/no-abusive-eslint-disable */
import * as Parser from '@oclif/parser';
import * as _ from 'lodash';
import { makeAbsolute, readConfigFromPath } from '@rockset/core/dist/filesystem/pathutil';
import { RockCommand } from '../base-command';
import { perfor... |
import {Run, Tag, TagWithSingleRun, TagsData} from '~/types';
import {color, colorAlt} from '~/utils/chart';
import {useCallback, useEffect, useMemo, useReducer} from 'react';
import groupBy from 'lodash/groupBy';
import intersectionBy from 'lodash/intersectionBy';
import uniq from 'lodash/uniq';
import {useRouter} fr... |
import { HTMLAttributes } from "react";
import { styled } from "@linaria/react";
const Element = styled.span<TextStyleProps>`
color: ${(props) => colors[props.color]};
font-size: ${(props) => fontSizes[props.size]}px;
font-family: ${(props) => fontFamily[props.font]};
font-weight: ${(props) => fontWeight[props... |
<filename>node_modules/angular2-cookie/ts/services/cookies.service.ts<gh_stars>0
/**
* angular2-cookie - Implementation of Angular 1.x $cookies service to Angular 2
* @version v1.2.6
* @link https://github.com/salemdar/angular2-cookie#readme
* @license MIT
*/
import {Injectable, Optional} from '@angular/core';
... |
<gh_stars>0
type PosisPID = string | number;
interface PosisInterfaces {
baseKernel: IPosisKernel;
spawn: IPosisSpawnExtension;
sleep: IPosisSleepExtension;
coop: IPosisCooperativeScheduling;
}
// Bundle for programs that are logically grouped
interface IPosisBundle<IDefaultRootMemory> {
// host will call that on... |
<reponame>Matsuuu/lit-html
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
import {_Σ, Part, DirectiveParent, TemplateResult} from './lit-html.js';
import {
DirectiveResult,
DirectiveClass,
PartInfo,
AttributePartInfo,
} from './directive.js';
type Primitive = null | u... |
import * as path from 'path';
import { CustomTransformers } from 'typescript';
import { ITransformer } from '../compiler/interfaces/ITransformer';
import { createCompilerOptions } from '../compilerOptions/compilerOptions';
import { ICompilerOptions } from '../compilerOptions/interfaces';
import { createTsTargetResolver... |
<reponame>JiriKursky/Microbit_HA<filename>ha_api.ts
/**
* Použijte tento soubor k definování personalizovaných funkcí a bloků.
* Přečtěte si více na https://makecode.microbit.org/blocks/custom
*/
enum MyEnum {
//% block="one"
One,
//% block="two"
Two
}
enum HttpMethod {
GET,
... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { SPACES } from '../../common/lib/spaces';
import {
testCaseFailures... |
import {
ChangeDetectionStrategy,
Component,
ElementRef,
Inject,
OnInit,
TemplateRef,
ViewChild
} from '@angular/core';
import {AngularFireAuth} from '@angular/fire/auth';
import {
AngularFirestore,
AngularFirestoreDocument
} from '@angular/fire/firestore';
import {FormBuilder, FormControl, FormGroup,... |
import { Component, Inject, OnInit } from '@angular/core';
import { NavParams, Platform, PopoverController } from '@ionic/angular';
import { AppRatingService } from '@app/services/app-rating.service';
import { TelemetryGeneratorService } from '@app/services/telemetry-generator.service';
import { UtilityService } from '... |
<reponame>NEOLANT-Service/ns_pluginExample
import { IP3DBPluginWrapper, IPluginEventArgs } from "./p3dbplugin-wrapper.types";
import { P3DBSceneLoadMode, Plugin3DEvent } from "../p3dbplugin.type";
import { ICachedItem } from "./p3dbplugin-wrapper-cache";
import { P3DBPlugin_LoadManager } from "./p3dbplugin-load-manager... |
import { ShortMatchData, ParticipantWithUserData, ExtendedMatch } from '@dl/api'
import {
Card,
Typography,
Grid,
Box,
makeStyles,
Theme,
createStyles,
Button,
Fab,
Divider,
} from '@material-ui/core'
import EditIcon from '@material-ui/icons/Edit'
import DeleteIcon from '@material-ui/icons/Delete'
i... |
<gh_stars>1-10
/**
* 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 l... |
import { FunctionalComponent } from 'preact';
import { html } from 'htm/preact';
import {JsonRpcMethod} from '../../../../common/src/messaging/types';
import {StoreContext} from '../../services/StoreContext';
import {sendMessage} from '../../services/Messaging';
import './style.scss';
import {useState, useContext, useE... |
<reponame>hcfw007/puppet<filename>src/schemas/message.ts
/**
* Wechaty Puppet Unified Schema for Message
*/
export enum MessageType {
Unknown = 0,
Attachment = 1, // Attach(6),
Audio = 2, // Audio(1), Voice(34)
Contact = 3, // ShareCard(42)
ChatHistory = 4, // ChatHistory(19)
Emoti... |
import * as THREE from "three";
import { Color, Mesh, Object3D, Scene } from "three";
import randomColor from "randomcolor";
export class Stackable {
dx : number;
dy : number;
dz : number;
name: string;
id: string;
step : number;
constructor(name : string, id : string, step: number, dx ... |
const ContentEditable = require('../ContentEditable');
const getInVis = require('../../util/immutable-utils').getInVis;
const ctrl = require('../../ctrl');
import * as React from 'react';
import {connect} from 'react-redux';
import { AnyAction } from 'redux';
import {ThunkDispatch} from 'redux-thunk';
import {setSigna... |
import {Gaia} from './lib/Gaia';
import {ChannelType} from './lib/support/ChannelType';
import {OffSwitchListener} from './lib/listener/OffSwitchListener';
import {Defaults} from './lib/support/Defaults';
import EventStream from "./lib/event/EventStream";
import {VoiceBehaviour} from "./lib/behaviour/VoiceBehaviour";
i... |
<reponame>mojaloop/finance-portal-v2-ui
import { State } from '../store/types';
import { buildApis } from './api';
import { ApiConfig } from './api/types';
// Note that prefixes are used to conceptually separate backend services even though they may
// be served by the same ingress/service.
export const services = {
... |
import { insertMedia as integrationInsertMedia } from '../../integration/_helpers';
import { Page } from 'puppeteer';
import { getBoundingRect, scrollToElement } from './_editor';
import { snapshot } from '../../visual-regression/_utils';
import commonMessages, { linkToolbarMessages } from '../../../messages';
import ... |
/*
* BASTET Program Analysis and Verification Framework
*
* Copyright 2020 by University of Passau (uni-passau.de)
*
* See the file CONTRIBUTORS.md for the list of contributors.
*
* Please make sure to CITE this work in your publications if you
* build on this work. Some of our maintainers or contribu... |
// loosely based on https://github.com/ianstormtaylor/slate/blob/d22c76ae1313fe82111317417912a2670e73f5c9/site/examples/paste-html.tsx
import { Descendant, Element } from 'slate';
import { Mark } from '../utils';
import {
addMarksToChildren,
getTextNodeForCurrentlyActiveMarks,
forceDisableMarkForChildren,
} from... |
<gh_stars>1-10
import kebabCase from 'kebab-case';
import { DefaultDirections, DirectionKey, IContainer, NodePosition, NodePositionData } from './Container';
export const checkDragOut = (nodePositionData: NodePosition, $container: HTMLElement): NodePosition => {
let { x, y, w, h } = nodePositionData;
const maxLef... |
import {
createTheme,
responsiveFontSizes,
ThemeProvider,
ThemeOptions
} from '@material-ui/core/styles'
import React, { FunctionComponent, useMemo } from 'react'
import CssBaseline from '@material-ui/core/CssBaseline'
import parseFont from '../../utils/parseFont'
import { GlobalStyles } from './GlobalStyles'
i... |
<reponame>kaciras-blog/web-server
import fs from "fs-extra";
import path from "path";
import Axios from "axios";
import { getLogger } from "log4js";
import { BaseContext, ExtendableContext, Next } from "koa";
import conditional from "koa-conditional-get";
import compress from "koa-compress";
import multer from "@koa/mu... |
<filename>src/lib/minecraft/inventory.ts
import * as skyblockAssets from 'skyblock-assets'
import { vanilla } from '$lib/packs'
import { browser } from '$app/env'
export interface Item {
id?: string
count?: number
vanillaId: string
display?: {
name?: string
lore?: string[]
glin... |
import deburr from "lodash.deburr";
import trim from "lodash.trim";
import { JSONSchema, Properties, JSONSchemaObject } from "@json-schema-tools/meta-schema";
import traverse from "@json-schema-tools/traverse";
import titleizer from "@json-schema-tools/titleizer";
/**
* Capitalize the first letter of the string.
*
... |
<filename>packages/mosc/src/mosc.ts
//
// types
//
export type MoscNote = {
type: 'NOTE_TIME';
time: number;
timeEnd: number;
hz: number;
label: string;
};
export type MoscNoteMs = {
type: 'NOTE_MS';
ms: number;
msEnd: number;
hz: number;
label: string;
};
export type MoscPara... |
//In your react App.js or yourComponent.js file add these lines to import
import "survey-react/survey.css";
import "./spreadsheetwidget";
import "jsuites/dist/jsuites.css";
import "jspreadsheet-ce/dist/jspreadsheet.css";
import "jspreadsheet-ce/dist/jspreadsheet.theme.css";
import React, { useEffect, useState } from "r... |
import { GlowFilter } from "@pixi/filter-glow";
import { SmoothGraphics as Graphics } from "@pixi/graphics-smooth";
import { TickQueue } from "../../core/engine";
import { Text } from "./Text";
import { Align, ContainerBackground, ContainerBackgroundShape, drawContainerBackground, FlexDirection, PositionType } from "..... |
import React, { useEffect, useRef, useState } from 'react';
import { observer } from 'mobx-react';
import styled from '@emotion/styled';
import Button from '../Button';
import StarComponent from '@/components/common/Star';
import ModalWrapper from '@/components/common/ModalWrapper';
import ReviewApi from '@/apis/Revi... |
<reponame>aleclarson/vite
import { InputOption, InputOptions, OutputOptions, RollupOutput } from 'rollup'
import { klona } from 'klona/json'
import fs from 'fs-extra'
import path from 'path'
import mime from 'mime-types'
import slash from 'slash'
import { BuildConfig } from '../config'
import { createLogger } from '../... |
<reponame>JIoffe/PastryEditor
import { FormattingUtils } from 'src/utils/formatting-utils';
import { Enemy } from './enemy';
import { Item } from './item';
import { ItemTypes } from 'src/assets/item-definitions/baolongtu-items';
const LEVEL_SEPARATOR = '**************************************************\r\n';
export ... |
<reponame>macabeus/elderjs
/* eslint-disable no-param-reassign */
/* eslint-disable global-require */
import fs from 'fs-extra';
import defaultsDeep from 'lodash.defaultsdeep';
import path from 'path';
import { ShortcodeDefs } from '../shortcodes/types';
import { validatePlugin, validateHook, svelteComponent, HookOpti... |
<reponame>neungkl/fire-simulator
import { Renderer } from "../renderer";
import { AssetsManager } from "../assetsManager";
import { Controller } from "../controller";
import { Constants } from "../constants";
import { Utils } from "../utils";
class FlareParticle {
private geometry: THREE.BufferGeometry;
private par... |
<reponame>sasa-djuric/react-cli
// @ts-ignore
import indentJs from 'indent.js';
export type fileType = 'js' | 'ts' | 'css' | 'scss';
export interface InsertOptions {
newLine?: {
beforeCount?: number;
afterCount?: number;
};
insertAfter?: string;
insertBefore?: string;
insertAtIndex?: number;
}
... |
<gh_stars>1-10
/// <reference path="../../../lib/third-party-libs.d.ts" />
import type { Token, JSXToken } from "js-tokens";
import jsTokens from "js-tokens";
import {
isStrictReservedWord,
isKeyword,
} from "@babel/helper-validator-identifier";
import Chalk from "chalk";
type ChalkClass = ReturnType<typeof getC... |
import moment from 'moment'
moment.defineLocale('zh-cn', {
months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
weekdaysMin: '日_一_二_三_四... |
export const AppConfig = {
'apiBaseUrl': "https://www.octerine.com/api/", // modify this to change API base url
// 'apiBaseUrl': "http://localhost:3000/", // modify this to change API base url
'defaultCurrency': 'IDR' // modify this to change currency
}
export const APIUrls = { // modify this only when s... |
import { Component, OnInit, Inject, HostListener, ViewChild, ElementRef } from '@angular/core';
import { Router, Routes } from '@angular/router';
import { Event, shell } from 'electron';
const ElectronStore = require("electron-store");
import * as Slack from "node-slack";
import * as slackdown from "slackdown";
import ... |
import { RuntimeBlock } from "@ganache/ethereum-block";
import { Quantity, Data, hasOwn, keccak, BUFFER_EMPTY } from "@ganache/utils";
import { Address } from "@ganache/ethereum-address";
import Message from "@ethereumjs/vm/dist/evm/message";
import VM from "@ethereumjs/vm";
import { BN } from "ethereumjs-util";
import... |
import { EventEmitter } from 'events';
import Joi from 'joi';
import { cloneDeep, map, merge, reduce } from 'lodash';
import path from 'path';
import { PartialDeep, ValueOf } from 'type-fest';
import TypedEventEmitter from './TypedEventEmitter';
export interface Topic<T> {
defaults?: PartialDeep<T> | T;
validator: ... |
<filename>src/controls/ar/common/ARSwipeControl.ts
/*
* Copyright (c) 2020 NAVER Corp.
* egjs projects are licensed under the MIT license
*/
import * as THREE from "three";
import ARControl from "./ARControl";
import Motion from "~/controls/Motion";
import RotationIndicator from "../ui/RotationIndicator";
import * ... |
<reponame>graphile/smart-tags-table
import {
makePgSmartTagsPlugin,
PgSmartTagRule,
UpdatePgSmartTagRulesCallback,
} from "graphile-utils";
import {
getPgClientAndReleaserFromConfig,
PgEntityKind,
} from "graphile-build-pg";
import type { Plugin } from "graphile-build";
import { Client, Pool } from "pg";
/**... |
import React from 'react';
import { Meta, Story } from '@storybook/react/types-6-0';
import Icon1 from '@material-ui/icons/ReplyAll';
import Icon2 from '@material-ui/icons/Markunread';
import Icon3 from '@material-ui/icons/CloudDownload';
import TextField from '@material-ui/core/TextField';
// eslint-disable-next-line ... |
import { IKeyPairBytes } from '../../interfaces';
import * as CryptoJS from 'crypto-js';
import axlsign from '../libs/axlsign';
import base58 from '../libs/base58';
import * as blake from '../libs/blake2b';
import converters from '../libs/converters';
import secureRandom from '../libs/secure-random';
import { keccak2... |
/* External Imports */
import {
getLogger,
logError,
numberToHexString,
remove0x,
ScheduledTask,
} from '@eth-optimism/core-utils'
import { Contract } from 'ethers'
/* Internal Imports */
import {
TransactionBatchSubmission,
BatchSubmissionStatus,
L2DataService,
} from '../../../types/data'
import { Tr... |
import path from "path";
import express, { Router } from "express";
// https://dev.to/mr_cea/remaining-stateless-a-more-optimal-approach-e7l
// userSchema.pre<IUser>("save", function(next) {
// if (!this.isModified("password")) { return next(); }
// const hash = bcrypt.hashSync(this.password, 10);
// this.passwo... |
<filename>packages/solid/src/render/flow.ts
import { createMemo, untrack, createSignal, onError, children, Accessor, Setter, onCleanup } from "../reactive/signal";
import { mapArray, indexArray } from "../reactive/array";
import { sharedConfig } from "./hydration";
import type { JSX } from "../jsx";
/**
* creates a l... |
import {Location} from '@angular/common';
import {
ChangeDetectionStrategy,
Component,
HostListener,
Inject,
Input,
NgZone,
Optional,
} from '@angular/core';
import {TuiLineChartHintContext} from '@taiga-ui/addon-charts/interfaces';
import {draw} from '@taiga-ui/addon-charts/utils';
import {... |
import {
// CompleteResult,
// DocumentSelector,
ExtensionContext,
// FloatFactory,
MapMode,
ProviderResult,
TextEdit,
commands,
languages,
listManager,
// sources,
// window,
workspace,
} from 'coc.nvim';
import ExtList from './lists/lists';
import CommandsList from './lists/commands';
import... |
export class EventCommandMap {
protected eventDispatcher: EventTarget;
protected eventTypeMap: Map<string, Map<string, Map<any, CommandMapping>>>;
constructor(eventDispatcher: EventTarget) {
this.eventDispatcher = eventDispatcher;
//this.injector.map()
this.eventTypeMap = new Map<string, Map<string, Map... |
// Copyright 2020 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.
/* eslint-disable no-console */
// no-console disabled here as this is a test runner and expects to output to the console
import {assert} from 'chai';
im... |
import { vec2, mat3 } from "gl-matrix";
const EPSILON = 0.000001;
const scaleSpeed = 0.5;
const scaleMax = 3.0;
const scaleMin = 0.5;
const panBound = 0.8;
// private
const scratch0 = new Float32Array(16);
const scratch1 = new Float32Array(16);
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXM... |
import { IBotMessage } from 'MaytrixAPI';
import { IBot, Command, IBotCommandConfig, Eval, CodeBlock } from '../../@types/Maytrix'
import {collectMessage, onCollectMessage, denyAll, allowAll} from '../../utils';
import { Message, Client, CategoryChannel, DiscordAPIError, RichEmbed, MessageReaction, Collection, Collecto... |
<filename>src/index.ts
declare var global: any;
declare var OAuth2: any;
declare var process: any;
global.build = () => {
// List sheet names
const sheets = SpreadsheetApp.openById(process.env.DRIVE_FILE_ID).getSheets();
const sheetNames = sheets.map(sheet => sheet.getName());
Logger.log(sheetNames);
// Exp... |
<reponame>Bhanditz/ShapeShifter<gh_stars>1-10
import { Injectable, NgZone } from '@angular/core';
import { VectorLayer } from 'app/model/layers';
import { Animation } from 'app/model/timeline';
import { AnimationRenderer } from 'app/scripts/animator';
import { PlaybackService } from 'app/services/playback.service';
imp... |
import { DtypeString } from '../types';
import { NestedArrayData, TypedArray, TypedArrayConstructor, getTypedArrayCtr, getTypedArrayDtypeString } from './types';
import { ArraySelection, Slice } from '../core/types';
import { slice } from '../core/slice';
import { ValueError } from '../errors';
import { normalizeShape,... |
import * as Statements from "./statements";
import * as Expressions from "./expressions";
import {Unknown, MacroContent, MacroCall, Comment, Empty} from "./statements/_statement";
import {StatementNode, ExpressionNode, TokenNodeRegex, TokenNode} from "./nodes";
import {ABAPFile} from "../files";
import {Identifier} fro... |
import * as angular from 'angular';
import * as _ from "underscore";
const moduleName = require('feed-mgr/module-name');
var directive = function() {
return {
restrict: "E",
bindToController: {
entity:'=',
roleMembershipsProperty:'@?',
allowOwnerChange:'=?',
... |
import React, {Component} from "react";
import {History} from "history";
import {Modal, Button, FormControl} from "react-bootstrap";
import {Global} from "../../store/global/types";
import {Account} from "../../store/accounts/types";
import BaseComponent from "../base";
import ProfileLink from "../profile-link";
im... |
import {
Component,
NgZone,
ViewChild,
OnInit,
AfterViewInit,
Input,
Output,
EventEmitter,
Inject
} from '@angular/core';
import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
import { MatPaginator } from '... |
<gh_stars>0
import { Account, CurrencyType } from "../../redux/account/account.reducer";
import { Currency } from "./../../redux/account/account.reducer";
export const initialFormValues = {
fromAccount: "",
toAccount: "",
transferAmount: 0,
currency: "",
description: "",
formSubmitted: false,
formSubmitt... |
/**
* 3D Foundation Project
* Copyright 2021 Smithsonian Institution
*
* 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 requir... |
import React, { ReactElement, useCallback } from 'react';
import {
default as ReactSelect,
components,
ValueContainerProps,
DropdownIndicatorProps,
ClearIndicatorProps,
} from 'react-select';
import classnames from 'classnames';
import { customStyles } from './selectStyles';
import { IOption } from './types'... |
<filename>src/_metronic/layout/core/LayoutSetup.ts
import {
IAside,
IContent,
IFooter,
IHeader,
IToolbar,
ILayout,
ILayoutCSSClasses,
ILayoutHTMLAttributes,
ILayoutCSSVariables,
IPageTitle,
} from './LayoutModels'
import {DefaultLayoutConfig} from './DefaultLayoutConfig'
const LAYOUT_CONFIG_KEY = p... |
<reponame>hayes/girphql<filename>packages/deno/scripts/build.ts
import * as fs from 'fs/promises';
import { statSync, existsSync } from 'fs';
import * as path from 'path';
import * as ts from 'typescript';
const packageDir = path.resolve(__dirname, '../../');
const targetDir = path.resolve(__dirname, '../packages');
c... |
/* tslint:disable:max-classes-per-file */
import { Component, DebugElement } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { ButtonComponent, IDropdown } from './button.component';
let fixture: ComponentFixture<Pa... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*-------------------------------------------------------------------------... |
import { useState, useReducer } from "react";
import Head from "next/head";
import { useRouter } from "next/router";
import Breadcrumbs from "@/components/Breadcrumbs";
import Title from "@/components/Title";
import Text from "@/components/Text";
import Label from "@/components/Label";
import Button from "@/components... |
<gh_stars>1-10
import { InjectorTreeNode } from '@core/diagram-tree/injector-tree';
import { Injectable, ComponentFactoryResolver } from '@angular/core';
import { NgArchUiService, ArchUi, ArchUiType, ArchPartTheme } from 'ng-arch-ui';
import { ToastrService } from 'ngx-toastr';
import { AnalysisElementType } from... |
import './App.css'
import React, {Component} from 'react'
// import Notebook from './Notebook2';
import KernelManager from './kernelManager'
import JupyterKernel from './kernels/jupyterKernel'
import { KernelMessage, Kernel, ServerConnection } from '@jupyterlab/services';
// import Finder from 'finder-component';
// //... |
<filename>src/client/classes/DownloadService.ts
import debugging from 'debug';
import { saveAs } from 'file-saver';
import { BufferLike, TransferControlMessage, TransferFile } from '../types';
import DecompressProcessor from './downloadProcessors/DecompressProcessor';
import DefaultProcessor from './downloadProcessors/... |
// Import React modules.
import React, { Component } from "react";
// Import CardBack component.
import CardBack from "./CardBack";
import PlayerNameCard from "./PlayerNameCard";
import ConfirmCard from "./ConfirmCard";
// Import translate function.
import { t, cookies } from "../../i18n";
// Interfaces for props an... |
<reponame>rudolfix/platform-frontend
import { promisify } from "@neufund/shared-utils";
import { isValid as isMnemonicValid } from "bitcore-mnemonic";
import * as LightWalletProvider from "eth-lightwallet";
import * as ethSig from "eth-sig-util";
import { addHexPrefix, hashPersonalMessage, toBuffer } from "ethereumjs-u... |
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-nocheck
import { Message,
Type,
Field } from 'protobufjs/light'
export enum Action {
DEFAULT,
UNAUTHORIZED,
MAINTAINENCE,
GEOIP_BLOCKING,
}
export enum Language {
ENGLISH,
SPANISH,
FRENCH,
INDONESIAN,
POR... |
import * as React from 'react';
import * as fp from 'lodash/fp';
import { faTimes } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { ErrorCode, ErrorResponse, Profile } from 'generated/fetch';
import { Button } from 'app/components/buttons';
import {... |
<gh_stars>100-1000
import { IGroupable, SpatialSearch } from './spatial-search';
import { Rect } from '../../primitives/rect';
/**
* Quad helps to maintain a set of objects that are contained within the particular region
*/
/** @private */
export class Quad {
/** @private */
public objects: IGroupable[];
... |
<filename>src/app/authoring/dialogs/export-unit.component.ts
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { SelectionModel } from '@angular/cdk/collections';
import { MatTableDataSource } from '@angular/material/table';
import { Component, Inject, OnInit } from '@angular/core';
import { FormBuilde... |
<filename>src/FestivalPOS/src/serving/dashboard.ts
import { Disposable, PLATFORM, autoinject } from "aurelia-framework";
import { ServingCreated, ServingHub, ServingUpdated } from "../api/serving-hub";
import { AddServerDialog } from './add-server-dialog';
import { Api } from "../api";
import { DateTime } from "luxon"... |
import thumbnail from './assets/images/thumb.png';
import { SIZES, COLORS, LinkBlot } from './Extends/index';
import { v4 as uuidv4 } from 'uuid';
// 光标选中元素
export const selectDom = (dom: Element) => {
if (!dom) {
return;
}
const selection = document.getSelection();
const range = document.createRange();
... |
/*
We can ask the v8 engine the following:
- is a given function optimized?
- What is the memory representation of a given javascript object
This package helps make this a bit more convenient: https://www.npmjs.com/package/v8-natives#variableobject-information-commands
Though we also need to start chrome with a ... |
/**
* `react-atom` is a _lightweight_ abstraction around React's proposed Hooks API
* that provides the ability to ___share and update state across function
* components___. It offers a very simple and straightforward approach to managing
* state, whether local component state, or shared application state.
*/
impo... |
import puppeteer, { Page } from 'puppeteer';
import { Config, ThrottleSetting } from './configs.js';
import { Metric } from './metrics.js';
async function handleThrottle(throttleSetting: ThrottleSetting, page: Page): Promise<void> {
if (throttleSetting === ThrottleSetting.THROTTLE_4X) {
// Connect to Chrome DevTool... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import React, { Fragment, useState, useEffect } from 'react';
import { Formatt... |
<filename>packages/vuepress-shared-utils/src/moduleResolver.ts
"use strict";
/**
* Module dependencies.
*/
import path from "upath";
import chalk from "chalk";
import { resolveModule, loadModule } from "./moduleLoader";
import tryChain from "./tryChain";
import { fsExistsFallback } from "./fallback";
import hash fr... |
/**
* Start to capture error events of resources loaded by link, script and img elements, and replace error elements with fallback elements.
* The error element will dispatch a pre-url-fallback event before and a post-url-fallback event after fallback element generated.
* @param config - Set url fallback rules.
* @... |
import { difference, union } from 'lodash';
import { map, filter } from 'rxjs/operators';
import { Favorite, RecordClass } from 'wdk-client/Utils/WdkModel';
import { MesaState } from 'wdk-client/Components/Mesa';
import {
TYPE_GETTER,
SORT_TABLE,
START_FAVORITES_REQUEST,
END_FAVORITES_REQUEST_WITH_SUCCESS,
EN... |
<filename>src/install.ts
import * as _ from 'lodash';
import * as Bluebird from 'bluebird';
import * as path from 'path';
import { contains } from 'js-object-tools';
import * as fs from 'fs';
import { defaults } from './defaults';
import { VinylOptions, VinylFile, src, map, dest, wait, symlink } from './file';
import ... |
/**
* Exports resizeFlexVHandle() for resizing flex items. The returned handle should be attached to
* a flexbox container next to the item that needs resizing. Usage:
*
* dom('div.flex',
* dom('div.child-to-be-resized', ...),
* resizeFlexVHandle({target: 'left', onSave: (width) => { ... })
* d... |
'use strict';
import { Chart, Types, BaseChartConfig } from '../common/types';
import Base from "../common/Base";
import errorWrap from '../common/errorWrap';
import themes from '../themes';
import { getDataIndexColor, propertyAssign, propertyMap } from '../common/common';
import guide, { GuideConfig } from '../common... |
<reponame>yamanoku/adventar
import {
SignInRequest,
UpdateUserRequest,
ListCalendarsRequest,
GetCalendarRequest,
CreateCalendarRequest,
UpdateCalendarRequest,
DeleteCalendarRequest,
ListEntriesRequest,
CreateEntryRequest,
UpdateEntryRequest,
DeleteEntryRequest,
GetUserRequest,
ListCalendarStat... |
import React, { useState } from 'react';
import { makeStyles, useTheme, withStyles } from '@material-ui/core/styles';
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core/TableCell';
import TableFooter from '@material-ui/core/TableFoo... |
import {COMMA, ENTER, SPACE} from '@angular/cdk/keycodes';
import {Location} from '@angular/common';
import {ChangeDetectionStrategy, Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, OnDestroy, Output, ViewChild} from '@angular/core';
import {UntypedFormControl, UntypedFormGroup} from '@angular/fo... |
import React from "react";
import axios from "axios";
import styles from "./App.module.css";
import List from "./components/List";
import { Stories, Story } from "./components/List/Stories";
import SearchForm from "./components/SearchForm";
// o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o
// CONSTANTS... |
/*
* Copyright (C) 2016 Yannick
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distribut... |
import React from 'react';
import { _cs } from '@togglecorp/fujs';
import { FaChevronLeft, FaChevronRight } from 'react-icons/fa';
import RawButton from '#components/RawButton';
import styles from './styles.module.scss';
function range(start: number, end: number) {
const foo: number[] = [];
for (let i = start; i... |
<reponame>geometryzen/symbolic-math
import { Sym } from "../tree/sym/Sym";
import { NIL, U } from "../tree/tree";
/**
* Size of the symbol table.
* We fix the size and grumble if the user tries to define too many symbols.
*/
const NSYM = 1000;
export interface Binding {
sym: Sym;
binding: U;
}
// The fol... |
<reponame>MonoInfinity/fpt-blog<filename>FPTBlog/WebBuilder/src/package/components/listBadge.ts
import { debounce } from '../helper/debounce';
import { loadingComponent } from './loading';
//Component Render
const deleteIcon = `<svg viewBox="64 64 896 896" focusable="false" data-icon="close" width="1em" height="1em" ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.