text stringlengths 3.08k 15.5k |
|---|
<filename>backend/services/ranobelib-me.service.ts<gh_stars>0
import { Browser, Page, Protocol } from 'puppeteer'
import { Logger } from 'tslog'
import { autoInjectable } from 'tsyringe'
import { ERanobeUrls } from '../tools/enums/Services.enum'
import { DefaultService } from '../tools/interfaces/RanobeService.interfac... |
import {
Pack,
Decode,
Encode,
Validate,
Normalize,
Format,
ErrEmptyName,
ErrBadChar,
ErrNoValues,
ErrTooManyValues,
ErrVersionChange,
ErrUnsuportedFormat,
} from '../src/index';
import { fromHex } from '../src/utils';
import { describe, it } from 'mocha';
import { expect } from 'chai';
const ... |
<gh_stars>1-10
import Tile, {TILE_TYPE} from "../Tile";
import {Graphics} from "pixi.js";
import Grid, {GRID_GRAVITY_DIRECTION} from "../Grid";
import Vec2 from "../../common/Vec2";
import {easeInCubic} from "../../common/easing";
const COLORS = [
0xff0068,
0xfed200,
0x00ddff,
0x7bd100,
0x01959f,
... |
import { config } from '@client/config';
import { ErrorWithCode } from '@client/core';
import * as jsCookie from 'js-cookie';
interface GETParams {
path: string;
params?: { [key: string]: string | number | Filter[] | string[] | number[] };
errorCode?: string;
tokenId?: string;
}
interface Filter {
[key: str... |
<reponame>pradeepmouli/isy-js<filename>lib/ISY.d.ts<gh_stars>1-10
/// <reference types="node" />
import { Client } from 'faye-websocket';
import { Categories } from './Categories';
import { ELKAlarmPanelDevice } from './Devices/Elk/ElkAlarmPanelDevice';
import { ElkAlarmSensorDevice } from "./Devices/Elk/ElkAlarmSensor... |
import io = require("socket.io");
import http = require('http');
import https = require("https");
import fs = require("fs");
import path = require("path");
export class CMCServer {
private isOpened: boolean = false;
private server: SocketIO.Server;
private server_https: SocketIO.Server;
private httpSvr... |
import _ from 'lodash'
import { ApolloClient, MutationOptions } from 'apollo-client'
import { InMemoryCache } from 'apollo-cache-inmemory'
import { createHttpLink } from 'apollo-link-http'
import fetch from 'node-fetch'
import dotenv from 'dotenv'
import pMap from 'p-map'
import { CalculateConfidence } from './modules... |
import { Emit, a, b, keyed, deferred } from '@literium/base';
import { KeyCode, VNode, h } from '@literium/core';
import { initHighlight } from '@literium/highlight';
import { State, Signal, Selection, Region } from './common';
import { cancelEvent, hasSpecialKey, getCharacter } from './utils';
const renderHightlight ... |
/**
* Copyright 2022 NTT 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 agr... |
import * as vscode from 'vscode';
import * as uriTools from '../Tools/UriTools';
import * as semver from 'semver';
import { logger } from '../Tools/Logger';
import { SystemGeneration, TargetArchitecture } from './CommonTypes';
import { spawnSync } from 'child_process';
import { AsProjectCBuildInfo } from './AsProjectCB... |
<filename>src/git.ts
import fs, { promises as fsPromise } from "fs";
import path from "path";
import assert from "assert";
import { Octokit } from "@octokit/rest";
import git from "isomorphic-git";
import http from "isomorphic-git/http/node";
import type { PluginLogger } from "reg-suit-interface";
import type { ObjectL... |
import { ReactElement, useCallback, useEffect, useRef, useState } from 'react';
import { DateTime } from 'luxon';
import { FieldComponentProps } from '@cezembre/forms';
import { formatRelativeDate, useClickOutside } from '@cezembre/fronts';
import Icon, { IconName } from '../general/icon';
import Button from '../genera... |
<gh_stars>1-10
import config = require('./config');
import log = require('./log');
import needle = require('needle');
import fs = require('fs');
import cheerio = require('cheerio');
import StatsD = require('node-statsd');
const statsd = new StatsD({
prefix: 'amzn_recs.fake_prodadv.',
host: config.get('STATSD_HOST')... |
// generated from terraform resource schema
import { Construct } from 'constructs';
import * as cdktf from 'cdktf';
/**
* AWS Elastic Beanstalk
*/
export interface ElasticBeanstalkApplicationVersionConfig extends cdktf.TerraformMetaArguments {
/**
* Docs at Terraform Registry: {@link https://www.terraform.io/docs... |
<gh_stars>0
import { ParserRuleContext } from 'antlr4ts';
import { getJSDocReturnTag } from 'typescript';
import { ErrorManager } from '../../managers/ErrorManager';
import { QualifiedIdentifier } from '../../misc/ast/QualifiedIdentifier';
import { Any } from '../data/Any';
import { CollectionType } from '../data/base/... |
import {NvidiaRegionInfo, regionInfos} from '../nvidia-api';
import {Series} from '../store';
import {cardLandingPageUrl} from './nvidia';
import cheerio from 'cheerio';
import {config} from '../../../config';
import {get} from 'request';
import {logger} from '../../../logger';
import {promisify} from 'util';
interfac... |
import React, { FC, useCallback } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import styled from 'styled-components';
import Modal from 'react-modal';
import TopBarProgress from 'react-topbar-progress-indicator';
import { SudokuGrid } from 'components/sudokuGrid';
import { NumberGroup } from ... |
// Wall
const snakeThroughWall = () => {
const ReachedLeftWall = snake1[0].x < 0;
const ReachedRightWall = snake1[0].x > snakeboard2.width - 10;
const ReachedTopWall = snake1[0].y < 0;
const ReachedBottomWall = snake1[0].y > snakeboard2.height - -10;
if (ReachedRightWall) {
let head1 = { x: -10, y: snake1... |
import Kendra from "aws-sdk/clients/kendra";
import _ from "lodash";
import { Range } from "rc-slider";
import "rc-slider/assets/index.css";
import React from "react";
import { DateRange } from "../SelectedFacetRetriever";
import { attributeNameToFacetTitle, attributeValueToDate } from "../utils";
import "./DateFacet.s... |
<gh_stars>1-10
import {
animate,
AnimationBuilder,
style,
} from '@angular/animations';
import type {
AnimationFactory,
AnimationPlayer,
} from '@angular/animations';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ContentChildren,
ElementRef,
EventEmitter,
HostListener,
Input,... |
import type { GradeModelType } from "@root/models";
import { observer } from "mobx-react";
import { usePaginator } from "@providers/model-provider/paginators";
import { ReactNode, useEffect, useState } from "react";
import { Box, Button, Container, Paper, Typography } from "@mui/material";
import { Delete, OndemandVide... |
<filename>src/labkey/dom/Utils.ts<gh_stars>1-10
/*
* Copyright (c) 2017-2018 LabKey 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/L... |
import React from "react";
import { Box, Typography, Chip, Button } from "@material-ui/core";
import styled, { AnyStyledComponent } from "styled-components";
import { withTranslation, WithTranslation } from "react-i18next";
import CTABox from "../common/CTABox";
import InitiativeCard from "../common/InitiativeCard";
... |
<filename>src/action-parser.ts
import { Action, ActionCombat, ActionCraft, ActionDominance, ActionGainVP, ActionLoseVP, ActionMove, ActionReveal, Card, Faction, Item, ItemState, Piece, Suit } from './interfaces';
import { parseConspiracyAction, parseCultAction, parseDuchyAction, parseEyrieAction, parseMarquiseAction, p... |
<reponame>DaanVermunt/node_mediator
import { Action } from '../MDP/action/action'
import { SimulationState } from './simulation-state'
import MState, { AutonomousConfidence, fromSimState, HumanConfidence, LoA } from '../mediator-model/state/m-state'
import Context from './context'
import { readFileSync } from 'fs'
impo... |
import * as readline from 'readline-sync';
type INVESTMENT = {
originalInvestment: number
currentInvestment : number | 0
timeHorizon : number,
returnValue : number,
reinvestmentGains ?: number,
preferences: string
}
type REQUESTED_USER_DATA = {
originalInvestment: number;
timeHorizon:... |
import { AnimatePresence, motion } from "framer-motion";
import React, { useEffect, useMemo, useReducer, useState } from "react";
import { InputContextProvider, useDisabled } from "../../utils";
import Button from "../Button";
import { InputFProps } from "./index";
import { BaseNumber } from "./__helpers__";
import { A... |
<filename>src/Config.ts<gh_stars>10-100
import { createForProject } from '@expo/package-manager';
import chalk from 'chalk';
import fs from 'fs-extra';
import * as path from 'path';
import resolveFrom from 'resolve-from';
// const PACKAGE_MAIN_PROCESS_PATH = '../template/main';
// const PACKAGE_TEMPLATE_PATH = '../../w... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// eslint-disable-next-line max-classes-per-file
import * as assert from 'assert';
import * as path from 'path';
import { SemVer } from 'semver';
import * as TypeMoq from 'typemoq';
import { Uri } from 'vscode';
import { Pa... |
<gh_stars>1-10
/**
* IHLP config variables
*
* @packageDocumentation
*/
import * as fs from "fs";
import {
CloudFormationClient,
DescribeStacksCommand,
} from "@aws-sdk/client-cloudformation";
import {
SSMClient,
SSMClientConfig,
GetParameterCommand,
GetParameterCommandInput,
} from "@aws-sdk/client-ss... |
/**
*
* 7th Ave - Blank Screen
*
*/
import React from "react";
import { useSelector, useDispatch } from "react-redux";
import { StyleSheet, Dimensions, View } from "react-native";
import { navigate } from "../../../../routers/RootNavigation";
const { width: SCREEN_WIDTH, height: SCREEN_HEIGHT } = Dimensions.get("wi... |
<reponame>sen-yang/rschedule
import {
DateAdapter,
DateTime,
freqToGranularity,
INormRuleOptionsBase,
InvalidDateTime,
IRecurrenceRulesIterator,
IRuleOptionsBase,
RecurrenceRuleResult,
RuleOption,
ValidDateTime,
} from '@rschedule/core';
import { RecurrenceRule } from '../utilities/recurrence-rule'... |
<reponame>Eonfuzz/codename-askellon<gh_stars>1-10
import { AbilityWithDone } from "../ability-type";
import { Trigger, Unit, Effect } from "w3ts";
import { getZFromXY } from "lib/utils";
import { PlayNewSoundOnUnit } from "lib/translators";
import { SoundWithCooldown, SoundRef } from "app/types/sound-ref";
import { ABI... |
import {
AmbientLight,
Box3,
Box3Helper,
Color,
DirectionalLight,
Matrix4,
PerspectiveCamera,
Scene,
Vector3,
WebGLRenderer } from 'three';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
import { PointCloudOctree, Potree } from '../src';
const computeTransformedBounding... |
import { filter, map, Subject, tap } from 'rxjs';
import { useI18n } from '@dvcol/web-extension-utils';
import type { ChromeNotification, SnackMessage, SnackNotification, StoreOrProxy, Task } from '@src/models';
import { ChromeMessageType, NotificationLevel, NotificationLevelKeys, NotificationType } from '@src/models... |
/**
* @file 鼠标绘制工具库
* @author hedongran
* @email <EMAIL>
*/
import React, { CSSProperties } from 'react';
import { Component, MapChildrenProps } from '../common';
import { requireScript, requireCss } from '../utils/requireScript';
import { default as Wrapper, registerEvents, toggleMethods, Events, Options, Methods... |
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { TranslateModule } from '@ngx-translate/core';
import { MatButtonModule } from '@angular/material/button';
import { MatMenuModule } from '@angular/m... |
<reponame>benishouga/sourcer
import * as cluster from 'cluster';
import { FrameDump, GameDump, ResultDump, PlayersDump } from '../core/Dump';
import Field from '../core/Field';
import TickEventListener from '../core/TickEventListener';
import SandboxedScriptLoader from '../core/SandboxedScriptLoader';
import { Sourcer... |
import React, { useState } from "react";
import "./App.css";
import Chessboard from "chessboardjsx";
import { ChessInstance, ShortMove } from "chess.js";
const Chess = require("chess.js");
const App: React.FC = () => {
const [chess] = useState<ChessInstance>(
new Chess("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKB... |
<gh_stars>10-100
import { window } from "vscode";
import path = require("path");
import fs = require("fs");
import { getAllMilestones } from "./MilestonesUtil";
import { compareDates, isLoggedIn } from "./Util";
import { monthNames } from "./Constants";
function getMilestonesTemplate(): string {
return path.join(_... |
import {Dispatch, Store} from 'redux';
import {ActionRouter} from './ActionRouter';
const CONNECT_TIMEOUT = 60000;
const MIN_RECONNECT_DELAY = 1000;
const MAX_RECONNECT_DELAY = 32000;
const RECONNECT_DELAY_GROWTH = 2;
const STOP_TRYING_AFTER = 60 * 60 * 1000; // 1hSTOP_TRYING_AFTER
const KEEP_ALIVE_MSG = 'ka';
cons... |
import { enharmonicPitchClass, getClassSet, getPitchClassSet, noteToObject, getInterval, isNote, normalizePitchClass } from './utilities/PureMusicUtils.js';
import {
FLAT_CLASS_NOTES, NUMBER_OF_PITCH_CLASSES, PITCH_CLASSES, SHARP_CLASS_NOTES,
} from './Constants.js';
import { freqToMidi } from './utilities/Scientific... |
import { ArrowRightOutlined, RightOutlined, SwapRightOutlined } from "@ant-design/icons";
import { Alert, Skeleton, Tree } from "antd";
import { observer } from "mobx-react";
import * as React from "react";
import { RouteComponentProps } from "react-router";
import { Link } from "react-router-dom";
import { APIUtils } ... |
<reponame>queoGmbH/queo-boards
import { Injectable, Inject } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { AuthInfoService } from './auth-info.service';
import { environment } from '../../../environments/environment';
import { IState } from '../../store/state.interface';
import { Store } f... |
<filename>src/server/Model/Service/Stream/RecordedStreamingMpegTsStream.ts
import { ChildProcess } from 'child_process';
import * as fs from 'fs';
import * as apid from '../../../../../api';
import ProcessUtil from '../../../Util/ProcessUtil';
import Util from '../../../Util/Util';
import { StreamingVideoConfig, VideoI... |
import { CogniteClient } from '@cognite/sdk';
import React, { Component } from 'react';
import styled from 'styled-components';
import { ClientSDKProxyContext } from '../../context/clientSDKProxyContext';
import { DataLoader } from './dataLoader';
import {
AxisDisplayMode,
AxisPlacement,
DataProvider,
LineChar... |
<reponame>StBozov/Core<gh_stars>0
import { Glue42Web } from "../../../packages/web/web";
import { Glue42WebPlatform } from "../../../packages/web-platform/platform";
import { Glue42Core } from "../../../packages/core/glue";
import { UnsubscribeFunction } from "callback-registry";
export interface ControlArgs {
ope... |
<filename>nuxt.config.ts<gh_stars>0
import { NuxtConfig } from '@nuxt/types'
import { MetaInfo } from 'vue-meta'
import nuxtFirebaseConfiguration from './nuxt-firebase.config'
import {
extendTheme as chakraUiExtendedTheme,
customIcons,
} from './nuxt-chakra-ui.config'
import { WEBSITE_NAME, WEBSITE_DESCRIPTION, VI... |
import $ from 'cafy';
import { ID } from '../../../../../misc/cafy-id';
import watch from '../../../../../services/note/watch';
import { publishNoteStream } from '../../../../../services/stream';
import { createNotification } from '../../../../../services/create-notification';
import define from '../../../define';
impo... |
<gh_stars>0
import { DataListItem, ChannelFunc, ILayer } from '../definitions';
import Marker from './Marker';
/** 渲染样式 散点|热力图 */
declare type MarkersLayerRenderType = 'point' | 'heat' | 'cluster' | 'bubble';
/** 渲染颜色样式 单色|分段|分类 */
declare type MarkersLayerRenderPointColorType = 'single' | 'segmented' | 'classified';
/... |
type Peeked<T> = { ready: true; value: T } | { ready: false };
class Peekable<T> implements IterableIterator<T> {
private _peeked: Peeked<T> = { ready: false };
private _iter: Iterator<T>;
constructor(iter: Iterable<T>) {
this._iter = iter[Symbol.iterator]();
}
peek() {
if (this._peeked.ready) {
... |
import { Injectable } from '@angular/core';
import { BehaviorSubject, Observable } from 'rxjs';
import {
catchError,
debounceTime,
first,
map,
shareReplay,
switchMap,
} from 'rxjs/operators';
import { endOfDay, format, startOfDay } from 'date-fns';
import {
approveBooking,
Booking,
... |
import React, { useState } from "react";
import Veilederpanel from "nav-frontend-veilederpanel";
import VeilederIcon from "assets/icons/Veileder.svg";
import { Knapp } from "nav-frontend-knapper";
import { Link } from "react-router-dom";
import InputMelding from "components/input-fields/InputMelding";
import { postRosT... |
import React, { useState, useEffect } from 'react'
import { View, Image, StyleSheet, Text, PixelRatio } from 'react-native'
import { JwsValidationOptions } from '../services/jws/jws-compact'
import { ValidationResult } from '../types'
import FontStyle from '../utils/FontStyleHelper'
import { useTranslation } from '../s... |
<reponame>ashuverma/electrode
import Fs = require("fs");
import _ = require("lodash");
import Path = require("path");
const pluginName = "SubAppPlugin";
const findWebpackVersion = (): number => {
const webpackPkg = JSON.parse(
Fs.readFileSync(require.resolve("webpack/package.json")).toString()
);
const webp... |
import { Inject, OnDestroy, ViewChild } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { UserToken } from 'app/models/usertoken';
import { Raide... |
<reponame>onelang/onelang
import { AstTransformer } from "../AstTransformer";
import { SourceFile, Class, Enum, Method, Lambda, GlobalFunction, IMethodBase, Constructor, Interface, MethodParameter } from "../Ast/Types";
import { ErrorManager } from "../ErrorManager";
import { Identifier, Expression } from "../Ast/Expre... |
<reponame>WellBeyond/wellbeyond-diagnostic-engine<filename>src/index.ts
// @ts-ignore
import { Engine, Rule, Fact, Almanac, RuleResult, Event, EngineResult } from 'json-rules-engine';
import {Diagnostic, Solution, Symptom, PotentialSolution, PotentialRootCause} from "./types";
export type DiagnosticCallback = {
(d... |
/*
* Copyright © 2018 Lisk Foundation
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, including this file, may be copied, modified,
* propagated... |
import * as React from "react";
import * as microsoftTeams from "@microsoft/teams-js";
import axios from "axios";
import { HashRouter, Switch, Route, useHistory } from "react-router-dom";
import { useTeams } from "msteams-react-base-component";
import { APP_ACCESS_TOKEN_HEADER } from "../../common";
import { SearchPage... |
import * as ts from 'typescript'
import { readFileSync, createWriteStream } from 'fs'
import writeVarInt from './varInt'
import BufferList = require('bl')
const YOO = Buffer.from('YOO')
const VERSION = Buffer.from([0x01])
const START = [YOO, VERSION]
const CONSTANT_IDENTIFIER = Buffer.from([0x00])
const CONSTANT_CALL ... |
<filename>packages/react-property-selectors/src/amount/use-amount-format-selector.tsx
/* eslint-disable functional/no-this-expression */
/*
UI to select a unit and a number of decimals independently of each other
*/
import React, { useState } from "react";
import { Unit } from "uom";
import * as ZipList from "./zip-l... |
<reponame>duocun/duocun-driver2
import { Component, OnInit, Input, OnChanges, ViewChild, ElementRef, OnDestroy } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { takeUntil } from '../../../../node_modules/rxjs/operators';
import { Subject } from '../../../../node_modules/rxjs';
imp... |
import React from "react";
import {
StyleSheet,
Text,
View,
ScrollView,
TouchableOpacity,
Platform,
ActivityIndicator
} from "react-native";
import { useFocusEffect } from "@react-navigation/native";
import AsyncStorage from "@react-native-community/async-storage";
import { Ionicons } from '@expo/vector-i... |
/*
* @module physics-math
* Copyright 2020 by <NAME>. Licensed under MIT license.
*
* Github: https://github.com/BobKerns/physics-math
*/
/**
* Test the arithmetic facilities on our types.
*/
import {add, equal, mul, near, sub} from "../arith";
import {isPoint, isRotation, isVector, point, rotation, vector, or... |
<filename>src/selection/instant-capture.ts
import { AppConfig } from '@/app-config'
import { message } from '@/_helpers/browser-api'
import * as selection from '@/_helpers/selection'
import {
MsgType,
MsgIsPinned,
MsgQueryQSPanel,
MsgQSPanelIDChanged,
MsgQueryQSPanelResponse,
} from '@/typings/message'
import... |
<filename>src/services/Calculator2.ts
// Taken from Bridge.NET:
// https://github.com/bridgedotnet/Bridge/blob/8b1a4a0dee448319ac7bb0879d0019a26285e100/Bridge/Resources/Integer.js#L834
const intMul = (a: number, b: number) => {
var ah = (a >>> 16) & 0xffff,
al = a & 0xffff,
bh = (b >>> 16) & 0xffff,
bl = b & 0xf... |
import React, { Component } from 'react';
import './UnitCircleControl.scss';
import { snap } from 'util/math-hacks';
type Props = {
onChange: (piRatio: number) => void;
piRatio: number;
revealLevel: number;
};
type State = {
activeDrag: boolean;
};
const sideLength = 150;
const padding = 25;
const domainMi... |
import { Matrix } from './interfaces';
class Matrix2D implements Matrix {
elements: Array<number> = new Array(16);
constructor() {
}
setIdentity() {
var e = this.elements;
e[0] = e[5] = e[10] = e[15] = 1;
e[4] = e[8] = e[12] = 0;
e[1] = e[9] = e[13] = 0;
e[2] = e... |
//******************************************************************************************************
// DataSlice.ts - Gbtc
//
// Copyright © 2021, Grid Protection Alliance. All Rights Reserved.
//
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
// the N... |
<filename>src/generated/graphql.tsx
import { gql } from '@apollo/client';
import * as Apollo from '@apollo/client';
export type Maybe<T> = T | null;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
/** All built-in and custom scalars, mapped to their actual values */
export type Scala... |
import { dialogflow, DialogflowConversation, Suggestions } from 'actions-on-google';
import { initLanguage } from './locales/initLang';
import { ChessSide, WhoseSide } from './chess/chessUtils';
import { ConversationData } from './storage/conversationData';
import { LongStorageData } from './storage/longStorageData';
... |
import HttpSwitchConfig from "./models/httpSwitchConfig";
import * as express from 'express';
import * as http from 'http';
import logService from './services/logService';
import fetch from 'node-fetch';
import { resolveTxt } from "dns";
export interface IHttpCallback {
callback(options: IQueryOptions, request: ex... |
import * as fs from 'fs';
import * as jsonc from 'jsonc-parser';
import { alertzy } from './alertzy';
import { ApiWrapper } from './api';
import { checkCredentials } from './login';
import { transporter } from './nodemailer';
import { AlertzyPriority, Item, ItemHistory, NotificationItems, Recipient, TgtgError } from '... |
import React, {
FC, memo, useCallback, useContext, useEffect, useMemo, useState,
} from 'react';
import Swipeable from 'react-native-swipeable-row';
import {
TouchableHighlight, Text, TouchableOpacity, View, StyleSheet,
} from 'react-native';
import CryptoViewerIconsMap from '../../assets/fonts/baseIcons/CryptoVie... |
import SuffixTree from "./suffix-tree";
import {humanizeTime} from "./utils/time";
import {PBruteI18n, translate} from "./i18n";
export type CharacterSet = {name: string, count: number, regex: RegExp}
const DEFAULT_CHARACTER_SETS = [
{
name: "lowercase",
count: 26,
regex: /[a-z]/
},
{
name: "upp... |
import { nonLatinAlphabetRanges, TLDs } from "./dictionary";
const email_address =
"([a-z0-9!#$%&'*+=?^_`{|}~-]+(\\.[a-z0-9!#$%&'*+=?^_`{|}~-]+)*)";
const domainWithTLD = `([a-z0-9]+(-+[a-z0-9]+)*\\.)+(${TLDs})`;
const domainWithAnyTLD = `([a-z0-9]+(-+[a-z0-9]+)*\\.)+([a-z0-9][a-z0-9-]{0,${
Math.max.apply(
th... |
import React from "react";
import styled from "styled-components";
import clsx from "clsx";
import { createComponentName, mergeRefs } from "@utils";
import { text } from "@theme";
import { useControllable } from "@hooks";
import { InputContainer } from "../InputContainer";
import { HTMLInputProps } from "../InputContai... |
import {Component, ElementRef, HostListener, ViewChild} from 'angular2/core';
import {SearchService} from '../services/search.service';
import {Observable} from 'rxjs/Observable';
import {HTTP_PROVIDERS} from 'angular2/http';
import * as D3 from '../../node_modules/d3-cloud/build/d3.layout.cloud.js';
import * as D33 f... |
import React, {useEffect, useState} from "react";
import {
RefreshControl,
SectionList,
SectionListData,
Text,
TouchableOpacity,
View,
} from "react-native";
import {
ReportFooter,
ReportHeader,
ReportHeaderProps,
ReportItem,
} from "../../components/home/report";
import Snackbar from "react-native-snackbar";... |
<reponame>pierprotocol/pier-smartcontracts
// NB signing moved to Soltsice, this is old playground
import {
DbrainGenesis, DbrainToken,
MultiSigWallet, MultiSigWalletFactory, DbrainLibrary
} from '../contracts';
import { BigNumber } from 'bignumber.js';
import { W3, testAccounts, getStorage } from 'soltsice';
... |
<filename>models.ts<gh_stars>0
/// <reference path="type_declarations/index.d.ts" />
import * as fs from 'fs';
import * as path from 'path';
import * as stream from 'stream';
import * as tex from 'tex';
import * as unorm from 'unorm';
import * as logger from 'loge';
import * as text from './text';
import {File} from '... |
import {
colors
} from './colors';
import {
Colors,
GlobalTheme
} from "./types";
const VALID_COLOR_HEX = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;
/**
* Converts a 6-digit hex colour into RGBA and applies the desired alpha
* @param {string} color - #RRGGBB hex colour code from theme
* @param {number} ... |
import { isObservableSeed, isProperty, isPropertySeed, ObservableSeed, Property, PropertySeed, Scope } from "./abstractions";
import { applyScopeMaybe } from "./applyscope";
import { combineAsArray, PropertyLike } from "./combine";
import { Predicate } from "./filter";
import { map } from "./map";
import { toPropertySe... |
import { FC, useEffect, useRef, useState } from "react";
import { Link, useHistory, useParams } from "react-router-dom";
import { Tooltip, Spinner, useToast } from "@chakra-ui/react";
import logoImg from "../../assets/images/logo.svg";
import powerImg from "../../assets/images/power.svg";
import deleteImg from "../../... |
import toLower from '@tinkoff/utils/string/toLower';
import eachObj from '@tinkoff/utils/object/each';
import toArray from '@tinkoff/utils/array/toArray';
import { LEVELS, LEVEL_NAMES } from './constants';
import type {
Logger as LoggerInterface,
Reporter,
Filter,
Extension,
Options,
LogObj,
LogFn,
Save... |
import { logger } from '@esss-swap/duo-logger';
import baseContext from '../../buildContext';
import { Proposal } from '../../models/Proposal';
import {
areDependenciesSatisfied,
getQuestionaryStepByTopicId,
} from '../../models/ProposalModelFunctions';
import { Answer, QuestionaryStep } from '../../models/Questio... |
import { test } from 'mocha';
import { expect } from 'chai';
import {
isArguments,
isArray,
isBoolean,
isDate,
isError,
isFunction,
isMap,
isNull,
isNumber,
isObject,
isRegExp,
isString,
isSet,
isSymbol,
isUndefined,
isWeakMap,
isPrimitive
} from '@fardel/utils';
// eslint-disable-next... |
<gh_stars>1-10
'use strict';
import { IColourContrast } from './interfaces';
import * as error from '../handlers/error';
const Vibrant = require('node-vibrant');
const ColorThief = require('color-thief');
const axios = require('axios');
let colorThief = new ColorThief();
export function toHex(rgb: Array<number>): s... |
import React from 'react'
import {
Container,
Content,
Text,
Button,
View,
Icon,
Header,
Left,
Right,
Title,
Body,
Picker,
} from 'native-base'
import { forOwn, isEmpty, isEqual, clone } from 'lodash'
import {
Form,
Page,
Question,
MultiInputQuestion,
TextInputQuestion,
SliderInputQuestion,
BaseInpu... |
<reponame>YueYuuta/biometrico<filename>src/modulos/biometrico/api/biometrico.controller.ts<gh_stars>0
import {
Body,
Controller,
Delete,
Get,
HttpStatus,
InternalServerErrorException,
Param,
ParseIntPipe,
Post,
Scope,
UsePipes,
ValidationPipe,
} from '@nestjs/common';
import { SalidaApi } from '... |
import type {JSX} from 'solid-js';
import {createSignal, createEffect, Show, Switch, Match} from 'solid-js';
import type {ConnectionState} from '../connection/connection-state-types';
import type {RegistryMirror} from '../registry-mirror/registry-mirror-types';
import type {Options} from '../../options/options-types'... |
<filename>src/gateway.ts
import { Gateway } from "detritus-client-socket";
import { PresenceOptions } from "detritus-client-socket/lib/gateway";
import { GatewayEventHandler } from "./handler";
import Redis from "ioredis";
import ReJSONCommands from "./redis";
import { GatewayDispatchEvents } from "discord-api-types/ga... |
<gh_stars>100-1000
import { IList } from "./../../dart/core/list";
import { DiagnosticLevel } from "./diagnosticLevel";
import { IDiagnosticsSerializationDelegate } from "./diagnosticsSerializationDelegate";
import { DiagnosticsTreeStyle } from "./diagnosticsTreeStyle";
import { ITextTreeConfiguration } from "./textTre... |
/*
Copyright 2018-2020 National Geographic Society
Use of this software does not constitute endorsement by National Geographic
Society (NGS). The NGS name and NGS logo may not be used for any purpose without
written permission from NGS.
Licensed under the Apache License, Version 2.0 (the "License"); you may... |
<reponame>imengyu/datacenter-web<gh_stars>0
export default {
isNullOrEmpty(str){
return !str || typeof str == 'undefined' || str == ''
},
isJSON,
isArray,
mergeJSON,
mergeJsonArray,
getReadableFileSize,
pad,
clone,
cloneValue,
swapItems,
upData,
downData,
setCookie,
setCookieWi... |
<filename>src/prototypes/RoomPropertiesForAllStructureTypes.ts<gh_stars>1-10
/**
Module: prototype.Room.structures v1.7
Author: SemperRabbit
Date: 20180309-13,0411
Usage: require('prototype.Room.structures');
This module will provide structure caching and extends the Room
class' prototype to provide `room.control... |
import resolveItems from './util/resolveItems';
const barrows = resolveItems([
"Ahrim's hood",
"Ahrim's robetop",
"Ahrim's robeskirt",
"Ahrim's staff",
"Ahrim's armour set",
"Dharok's helm",
"Dharok's platebody",
"Dharok's platelegs",
"Dharok's greataxe",
"Dharok's armour set",
"Guthan's helm",
"Guthan's p... |
<gh_stars>10-100
import { Epsg, GoogleTms, Nztm2000Tms, QuadKey, Tile } from '@basemaps/geo';
import { TestTiff } from '@basemaps/test';
import { ImageFormat, Tiler } from '@basemaps/tiler';
import { readFileSync, writeFileSync } from 'fs';
import o from 'ospec';
import * as path from 'path';
import PixelMatch from 'pi... |
import 'twin.macro'
import { useEffect, useState } from 'react'
import { useForm } from 'react-hook-form'
import { useAppContext } from '../context/state'
import ErrorMessage from '../components/AlertError'
import { getErrorMsg } from '../utils/helperFuncs'
import TextField from '~~/components/my-mui/TextField'
import... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.