text stringlengths 3.08k 15.5k |
|---|
import { isPlainObject, isAnyObject } from 'is-what'
import { IPluginState, AnyObject } from '../declarations'
/**
* Grab until the api limit (500), put the rest back in the syncStack.
*
* @param {string} syncStackProp the prop of _sync.syncStack[syncStackProp]
* @param {number} count the current count
* @param {... |
import React, { useState } from 'react';
import {
StyleSheet,
Text,
View,
Alert,
Image,
TouchableOpacity,
Platform,
ScrollView,
Button as Btn,
} from 'react-native';
import { Feather } from '@expo/vector-icons';
import DateTimePicker, { Event } from '@react-native-community/datetimepicker';
import { ... |
<reponame>simonmetcalfe/spotify-dedup
import { fetchUserOwnedPlaylists } from './library';
import { PlaylistDeduplicator, SavedTracksDeduplicator } from './deduplicator';
import PlaylistCache from './playlistCache';
import { PlaylistModel } from './types';
import SpotifyWebApi, {
SpotifyUserType,
SpotifyPlaylistTyp... |
<filename>packages/playground/examples/editor/turn_restriction_editor.ts<gh_stars>10-100
import {MVTLayer, TileLayer, SpaceProvider} from '@here/xyz-maps-core';
import {Map} from '@here/xyz-maps-display';
import {Editor, Navlink} from '@here/xyz-maps-editor';
/** setup the Map **/
// Create a custom provider.
class My... |
/* eslint-disable no-restricted-syntax */
/* eslint-disable @typescript-eslint/restrict-template-expressions */
/* eslint-disable @typescript-eslint/no-shadow */
/* eslint-disable @typescript-eslint/no-loop-func */
/* eslint-disable no-await-in-loop */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* ... |
import { ISettings, INavigation, IFile, IMenu, INavItem } from "../types";
import { dirname, join } from "path";
import rimraf from "rimraf";
export const buildNavigation = async (
settings: ISettings
): Promise<ISettings> => {
let nav: INavigation[] = [];
settings.files.forEach((file: IFile) => {
const link = fi... |
<reponame>glitchassassin/screeps
import { ExtensionsPlan } from "RoomPlanner";
import { PlannedStructure } from "RoomPlanner/PlannedStructure";
import { costMatrixFromRoomPlan } from "Selectors/costMatrixFromRoomPlan";
import { calculateAdjacentPositions, getCostMatrix, getRangeTo, isPositionWalkable } from "Selectors/... |
<filename>js/RedditD2X.ts
///<reference path="../typings/globals/jquery/index.d.ts" />
import TagBar = require('./TagBar')
import TrustHandler = require('./TrustHandler');
import ISubject from './SubjectInterface';
class RedditD2X {
settings: any;
subjectService: any;
packageBuilder: any;
trustchainSer... |
/**
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership.
*
* 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... |
/** The MIT License (MIT) Copyright(c) 2016-present <NAME> */
import { Utils, IPromise, Debounce } from "jriapp_shared";
import { ITemplate, ITemplateEvents, IViewOptions } from "jriapp/int";
import { DomUtils } from "jriapp/utils/dom";
import { createTemplate } from "jriapp/template";
import { bootstrapper } from "jr... |
<gh_stars>10-100
import DefaultCacheContext from './CacheContexts/DefaultCacheContext'
import {
CacheConfig,
CacheContextContract,
CacheManagerContract,
CacheStorageContract,
AsyncFunction,
ConstructorParams,
} from '@ioc:Adonis/Addons/Adonis5-Cache'
import CacheEventEmitter from './CacheEventEmitter'
import { zi... |
import { AnalysisSeverity } from '@snyk/code-client';
import * as vscode from 'vscode';
import { IAnalytics } from '../../../common/analytics/itly';
import { SNYK_OPEN_BROWSER_COMMAND } from '../../../common/constants/commands';
import { SNYK_VIEW_FALSE_POSITIVE_CODE } from '../../../common/constants/views';
import { E... |
import { getAttrsForDirectiveMatching } from '@angular/compiler/src/render3/view/util';
import { GameRound } from '../model/game-round';
import { ScoreMember } from '../model/score-member';
export const SCORE_MEMBERS: ScoreMember[] = [
{ id: 11, name: '<NAME>', score: 1 },
{ id: 20, name: '<NAME>', score: 0 },
{... |
import * as fs from "fs";
import cliUx from "cli-ux";
import { IConfiguration, IConfigurationScript } from "../interfaces";
import { STACKPATH_CONFIGFILE_PATH } from "../constants";
import * as Validation from "./validation";
import * as Http from "./http";
import * as Log from "./log";
import { continueOnErrorPrompt }... |
import { NextApiResponse } from 'next'
import {
ERROR,
FIELD_VALIDATION_ERROR,
FORBIDDEN,
INVALID_CREDENTIALS,
SUCCESS,
USER_ALREADY_REGISTERED,
USER_NOT_FOUND
} from '../../../../configs/APIConfig'
import { IRequest } from '../../../../configs/types/IRequest'
import { IResponse } from '../../../../confi... |
<reponame>austinkelleher/simple-template-evaluator
import {
MuttonCompiledTemplate,
MuttonCompiledNodeType,
MuttonCompiledLiteralNode,
MuttonCompiledExpressionNode,
} from './types';
const TEMPLATE_START_CHAR = '{';
const TEMPLATE_END_CHAR = '}';
const SINGLE_QUOTE_CHAR = "'";
const DOUBLE_QUOTE_CHAR = '"';
/... |
<filename>src/model/recipe/Player.ts
/*
* MIT License
*
* Copyright (c) 2019 <NAME> <<EMAIL>>,
* Chair for Process Control Systems, Technische Universität Dresden
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"... |
import bigInteger from "big-integer";
// tslint:disable-next-line: no-submodule-imports
import { Buffer } from "buffer/";
const MAX_UINT8 = bigInteger("255");
const MAX_INT8 = bigInteger("127");
const MIN_INT8 = bigInteger("128").negate();
const MAX_UINT16 = bigInteger("65535");
const MAX_INT16 = bigInteger("32767");... |
import * as vscode from 'vscode';
import { DothttpExecuteResponse, MessageType, NotebookExecutionMetadata, Response } from '../../common/response';
import { generateLang } from "../commands/export/generate";
import { addHistory, contructFileName, showInUntitledView } from '../commands/run';
import { ClientHandler } fro... |
import * as fs from 'fs-extra';
import * as open from 'open';
import * as os from 'os';
import * as path from 'path';
import * as vscode from 'vscode';
import * as config from './config';
import * as fileutils from './file-utils';
import * as vscu from './vscode-utils';
import DataPlugin from './dataplugin';
import Exa... |
import { GpxFile, GpxPoint, GpxSegment } from '@/models/Gpx'
import { DateTime, Duration } from 'luxon'
export class Displayable {
static kilometersPerMile = 0.62137
static yardsPerMile = 1760
static feetPerMile = 5280
public nowWithMsecs(): string {
return DateTime.local().toFormat('HH:mm:ss.SSS')
}
... |
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import classNames from 'classnames';
import { CustomIcon, ImageViewer } from 'components/common';
import { ExternalLink } from 'components/common/ExternalLink';
import { ArtworkCreditsList } from 'components/oc/ArtworkCreditsList';
import { CutieMarkButt... |
import * as fs from 'fs-extra';
import * as highlight from 'highlight.js';
import * as _ from 'lodash';
import * as markdownIt from 'markdown-it';
import * as normalizePath from 'normalize-path';
import * as path from 'path';
import * as prettier from 'prettier';
import * as url from 'url';
import { vai } from '../../n... |
import { Action } from '../action.interface';
import { Context } from '../context';
import { asCollapsedPath, bold, TableAlignment } from '../utils/message.util';
import { readFile } from '../utils/promises.util';
interface Params {
header?: string;
file?: string;
warnThreshold?: number;
errorThreshold?: numbe... |
import {
getLogger,
CustomSagaParams,
actions,
sagaEffects,
} from '@signalwire/core'
import type { SagaIterator, Task } from '@signalwire/core'
import { setMediaElementSinkId } from '@signalwire/webrtc'
import {
buildVideo,
cleanupElement,
makeDisplayChangeFn,
makeLayoutChangedHandler,
setVideoMediaT... |
<reponame>daviwil/ide-powershell<gh_stars>10-100
import fs = require('fs');
import net = require('net');
import path = require('path');
import utils = require('./utils');
import cp = require('child_process');
import { CompositeDisposable } from 'atom';
import { AutoLanguageClient, DownloadFile } from 'atom-languagecli... |
<filename>src/hooks/useCountDown/index.tsx
/* eslint-disable react-hooks/exhaustive-deps */
import { useEffect, useRef, useCallback } from 'react'
import { exchangeKey } from '../../utils/function'
import useSetState from '../useSetState'
/**
* 倒计时 hooks,支持毫秒级
* 当 diff 小于 16.6ms ≈ 17ms 时直接使用 raf,由浏览器调度
*
* 使用方法:
... |
/** Simple worker description */
export interface IWorker {
name: string;
weight: number;
}
/** Simple topology description */
export interface ITopology {
uuid: string;
worker: string;
weight: number;
affinity: string[];
forced_affinity: string[];
}
/** This class represents a single need... |
import React, { useState, useEffect, useMemo } from "react";
import { useTranslation } from "next-i18next";
import { useQuery } from "@apollo/client";
import { GetServerSideProps } from "next";
import styled from "styled-components";
import queryString from "query-string";
import { useRouter } from "next/router";
impor... |
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms633548(v=vs.85).aspx
export const enum CmdShow {
// Hides the window and activates another window.
SW_HIDE = 0,
// Activates and displays a window. If the window is minimized or maximized,
// the system restores it to its original size and ... |
import { Injectable } from '@nestjs/common';
import { connect } from './db';
import { HeadID } from '../constant'
import { ObjectId } from 'mongodb';
export abstract class IMemberService{
abstract exists(openid: string)
abstract import(members)
abstract refund(id: string)
abstract getAllChargeList(sta... |
import { Inject } from '@nestjs/common';
import { Query, Resolver } from '@nestjs/graphql';
import { WINSTON_MODULE_PROVIDER } from 'nest-winston';
import { toWithError } from 'src/server/utils/async';
import { Logger } from 'winston';
import { GetChannelType } from '../../node/lnd/lnd.types';
import { NodeService } fr... |
<filename>src/custom-providers.ts
import { ethers, providers, version, BigNumber } from 'ethers';
import { Deferrable } from '@ethersproject/properties';
import { TransactionRequest } from '@ethersproject/abstract-provider';
import { Logger } from '@ethersproject/logger';
import {
isHexString,
parseBytes32String,
... |
<gh_stars>0
import {
Polkadot,
Kusama,
Currency,
PolkadotAmount,
KusamaAmount,
PolkadotUnit,
KusamaUnit,
BitcoinUnit,
KintsugiUnit,
InterlayUnit,
InterBtc,
KBtc,
InterBtcAmount,
KBtcAmount,
Kintsugi,
Interlay,
VoteInterlay,
VoteKintsugi,
Moneta... |
<reponame>ajDon/sp-dev-fx-webparts<filename>samples/react-events-dynamicdata/src/webparts/map/MapWebPart.ts
import * as React from 'react';
import * as ReactDom from 'react-dom';
import { Version } from '@microsoft/sp-core-library';
import {
BaseClientSideWebPart,
IPropertyPaneConfiguration,
PropertyPaneTextField... |
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers';
import { expect } from 'chai';
import { BigNumberish } from 'ethers';
import { ethers } from 'hardhat';
import { deployUniswap, evmIncreaseTime, getBlockTimestamp, toTokens, ZERO_ADDRESS } from '../shared/utils';
import { LedgityPriceOracle, MockERC... |
<gh_stars>10-100
import PricingDefinition, { PricingEntity } from '../../types/Pricing';
import global, { FilterParams } from '../../types/GlobalType';
import Constants from '../../utils/Constants';
import { DataResult } from '../../types/DataResult';
import DatabaseUtils from './DatabaseUtils';
import DbParams from '... |
import * as React from "react";
import ReactToolTip from "react-tooltip";
import format from "date-fns/format";
import { connect, useSelector } from "react-redux";
import Link from "next/link";
import { Product } from "@t/Product";
import { State } from "@t/State";
import { useHouseId } from "@hooks/useHouseId";
impor... |
import * as vscode from "vscode";
import * as path from 'path';
import * as fs from 'fs';
import * as net from 'net';
import * as os from 'os';
import * as cp from 'child_process';
let fzfTerminal: vscode.Terminal | undefined = undefined;
let initialCwd: string;
let rgCaseFlag: string = '--smart-case'; // --case-sensi... |
import {
GraphQLSchema,
GraphQLObjectType,
visit,
Kind,
GraphQLInterfaceType,
GraphQLUnionType,
getNamedType,
TypeInfo,
visitWithTypeInfo,
isLeafType,
isNullableType,
} from "graphql"
import { Transform, Request } from "graphql-tools"
import {
visitSchema,
VisitSchemaKind,
TypeVisitor,
} fro... |
<gh_stars>10-100
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
import _ from 'lodash'
import { MsgExecuteContract, MsgSend } from '@terra-money/terra.js'
import { Coin } from '@terra-money/terra.js'
import { BankData, Whitelist } from '../types'
import { PostPage, CoinItem, User, Field... |
import fs from "fs";
import path from "path";
import tempDir from "temp-dir";
import { CommandLine, parseCommandLine } from "../src/command-line";
import { createProgram, createIncrementalProgram } from "../src/program";
import ts from "typescript";
const fixturePath = path.join(process.cwd(), "test", "__fixtures__")... |
import { notifyUndoableActionPerformed } from ".";
import { InteractiveState } from "./types";
// Listen for saved state requests.
// Each request receives the state produced by the last listener and should
// return the state it wants to pass to the next listener. The state produced
// by the last listener will be se... |
import { getComponentFactory } from ".";
import { operatorType, IRawType } from "./component";
import { ICollectionSnapshoot } from "./collection";
import StructureCollection from "./structure-collection";
import Block from "./block";
import ComponentType from "../const/component-type";
import updateComponent fro... |
import * as objectFilter from '@arnaudnyc/object-filter';
import {DangerDSLType} from 'danger/distribution/dsl/DangerDSL';
import * as fs from 'fs';
import * as ncu from 'npm-check-updates';
import * as path from 'path';
import {
Options as NpmCheckUpdatesOptions,
Packages,
OutdatedDependencies,
RunOptions,
D... |
import React, { useState, useEffect } from 'react'
import { makeStyles } from '@material-ui/core/styles';
import { CardHeader, Card, CardContent, CardActions, Box, Typography, IconButton, Button, Snackbar, SnackbarCloseReason, Dialog, DialogTitle, DialogContent, TextField, DialogActions } from '@material-ui/core';
impo... |
<gh_stars>0
/// <amd-module name="Types/_collection/Flags" />
/**
* Flags type. It's an enumerable collection of keys and values every one of which can be selected or not.
* @class Types/_collection/Flags
* @extends Types/_collection/Dictionary
* @implements Types/_collection/IFlags
* @implements Types/_entity/ICl... |
import { Fragment, useState } from 'react'
import { getPlayers } from '../lib/data'
import { Listbox, Switch, Transition } from '@headlessui/react'
import { CheckIcon, SelectorIcon } from '@heroicons/react/solid'
import { createSearchParams, useNavigate } from 'react-router-dom'
const playersCountList = [
{ value:... |
import * as React from 'react'
const { useEffect, useState, useRef } = React;
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd'
import { makeStyles, useTheme, Theme, createStyles } from '@material-ui/core/styles';
import List from '@material-ui/core/List';
import Divider from '@material... |
import BoardPosition from "../engine/board_position";
import Globals from "../engine/constants";
import RuneChess from "../engine/game";
import { TeamColor } from "../engine/team";
import Unit from "../engine/unit/unit";
import UnitType from "../engine/unit/unit_type";
import DataDragon from "../riot/data_dragon";
impo... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { Checkbox, PrimaryButton, Fabric, IStackTokens, mergeStyles, mergeStyleSets, Stack, TextField } from 'office-ui-fabric-react';
import * as React from 'react';
import { useState } from 'react';
import PBIReportViewer from '../../libs/pbi... |
import React, { useEffect, useState } from 'react';
import Layout from 'Layouts';
import withAuth from '@hocs/withAuth';
import { Table, Space, Pagination, Button, Input, Modal, Tag, Row, Col, Select } from 'antd';
import Link from 'next/link';
import { OrderList, OrderDelete } from 'core/services/product';
import Orde... |
import React, { useState } from "react";
import { View, ScrollView, Text } from "react-native";
import {
BorderlessButton,
RectButton,
TouchableOpacity,
} from "react-native-gesture-handler";
import { Feather } from "@expo/vector-icons";
import { useFocusEffect } from "@react-navigation/native";
import AsyncStora... |
import fs from 'fs';
import path from 'path';
import {requireTechnologies} from "@ohoareau/technologies";
export const detectTechnologies = (rawDir: string): string[] => {
const dir = path.resolve(rawDir);
const technos = {};
const packageJson = `${dir}/package.json`;
const makefile = `${dir}/Makefile`... |
import { Request } from 'express';
export interface ParamsDefinition {
name: string;
type: 'string' | 'number' | 'object' | 'date' | 'boolean';
isArray?: boolean;
elementsDivider?: string;
default?: unknown;
required?: boolean;
in: 'query' | 'path' | 'body';
properties?: ParamsDefinition[]
}
export in... |
import * as _ from 'lodash';
import {deepRemoveNulls, shallowDifference, shallowMissingOrNull} from "../utils/general";
import {BasicFieldModel, MapModel, TypedDictFieldModel} from "../ModelsFields";
export interface FieldSetterModel {
fieldKey: string;
value: any;
queryKwargs?: {};
}
export interface Fie... |
import { useRouter } from "next/router"
import { BiDollar } from "react-icons/bi";
import { useLazyQuery } from "@apollo/client";
import { Parking, Review } from "utils/types"
import { GET_PARKING_WITH_ID, GET_PARKING_REVIEWS } from "queries";
import { useEffect, useState, useContext } from "react";
import { UserContex... |
import React, { useEffect, useRef, useState } from 'react';
import { IIcon } from './models';
import { useStyles } from './styles';
import { simpleUID } from './utils';
import { WorldDaylightMapGen as WDMG } from './WorldDaylightMapGen';
export type TControlsPosition =
| 'outer-top'
| 'top'
| 'top-left'
| 'to... |
'use strict';
//core
import * as path from 'path';
import * as fs from 'fs';
//npm
import readline = require('readline');
import chalk from 'chalk';
const dashdash = require('dashdash');
import async = require('async');
import residence = require('residence');
//project
import options, {NLUInitOpts} from "./cmd-lin... |
import { OverviewDefiProtocol } from '@/store/defi/types';
const FINNEXUS = 'FinNexus';
const PICKLE_FINANCE = 'Pickle Finance';
const DODO = 'DODO';
const BEREZKA = 'Berezka';
const BZX = 'bZx';
const CREAM = 'C.R.E.A.M.';
const SWERVE = 'Swerve';
const SASHIMISWAP = 'SashimiSwap';
const HARVEST = 'Harvest';
const KI... |
<filename>src/deepcode/lib/modules/LoginModule.ts<gh_stars>0
import * as vscode from "vscode";
import * as open from "open";
import DeepCode from "../../../interfaces/DeepCodeInterfaces";
import http from "../../http/requests";
import { httpDelay } from "../../utils/httpUtils";
import { deepCodeMessages } from "../../... |
import { Feature } from 'ol';
import { FrameState } from 'ol/PluggableMap';
import LayerRenderer from 'ol/renderer/Layer';
import VectorLayer from 'ol/layer/Vector';
import Geometry from 'ol/geom/Geometry';
import { Vector as VectorSource } from 'ol/source';
import { Polygon as olPolygonGeometry } from 'ol/geom';
impor... |
import dynamic from "next/dynamic";
import { useContext, useEffect, useState } from "react";
import {
ApolloClient,
InMemoryCache,
gql,
ApolloQueryResult,
} from "@apollo/client";
import { ResponsiveBar } from "@nivo/bar";
import { ColorSchemeContext } from "src/contexts/colorSchemeToggle/colorSchemeContext";
... |
import React, { useCallback, useState, useEffect, useMemo } from 'react';
import { Radio, Space, Button, Modal, Form, Input, Popconfirm } from 'antd';
import { SelectOutlined } from '@ant-design/icons'
import { RadioChangeEvent, Typography } from 'antd/lib'
import { Rule } from 'antd/lib/form';
import styles from './in... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';
import {ProjectInitializer} from '... |
<reponame>Pong420/TaiSiuSyut
import { BookService } from '@/modules/book/book.service';
import {
Schema$Authenticated,
Schema$Book,
UserRole,
BookStatus
} from '@/typings';
import {
createUserAndLogin,
setupRoot,
setupUsers,
getGlobalUser
} from '../../service/auth';
import { createBook, getBooks, updat... |
import { NodeTypes, CompilerError } from '@vue/compiler-core'
import { parse, compileTemplate } from '@vue/compiler-sfc'
import { isObject, isString, isSymbol } from '@intlify/shared'
import { traverseI18nCallExpression } from './babel'
import type {
Node,
TemplateChildNode,
SimpleExpressionNode,
ElementNode,
... |
const fs = require("fs");
const axios = require("axios");
var profileAPILink = "https://randomuser.me/api/?results=10&password=lower, 5-10&inc=name,email,login";
var postsAndCommentsAPILink =
"https://api.stackexchange.com/2.2/questions?order=desc&min=20&max=25&sort=votes&site=stackoverflow&filter=!9McUSqKnjnKWxX9(D... |
import * as React from 'react';
import LeafBlock from '../LeafBlock'
import { BlockDef, CreateBlock, NullBlockStore, ContextVar, duplicateBlockDef } from '../blocks'
import ModalWindowComponent from 'react-library/lib/ModalWindowComponent'
import { BlockPaletteEntry } from '../../designer/blockPaletteEntries';
import {... |
/*
* Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
* BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
*
* License for BK-BASE 蓝鲸基础平台:
* ----------------------------------------------------... |
<gh_stars>0
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import { GameOptions } from '../../App';
import {
countMaxMines,
create2DArray,
getNeighbours,
getRandomInteger,
revealMines,
} from './utils';
export interface ICell {
x: number;
y: number;
isRevealed: boolean;
isMine: boolean;
isF... |
import * as React from 'react';
import * as _ from 'lodash';
import styles from './styles.css';
export type Props = { text: string }
export interface IAppProps {
elements?: React.ReactNode[],
startOfScrollInVH?: number
}
export interface IDivState {
isCur: boolean,
height?: number,
marginLeft: nu... |
import { R, Schema, t, Uri } from './common';
import { TypedSheet } from './TypedSheet';
export type IArgs = {
typename: string;
typeDef: t.IColumnTypeDef<t.ITypeRef>;
parent: t.ITypedSheetRefParent;
ctx: t.SheetCtx;
};
type LinkInfo = { data: t.ICellData; links: t.IUriMap; linkKey: string; link?: t.IRefLink ... |
<filename>src/compat/eme/custom_media_keys/old_webkit_media_keys.ts
/**
* Copyright 2015 CANAL+ Group
*
* 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/lice... |
import path = require("path");
import fse = require("fs-extra");
import {
PROJECT_FOLDER,
RPO_FOLDER,
RPO_RESET_TARGET,
RPO_RESET_SOURCE,
RPO_CUSTOM,
} from "./scenario";
import {
By,
VSBrowser,
InputBox,
WebElement,
QuickPickItem,
ContextMenu,
ViewItem,
ViewControl,
EditorView,
TreeItem,
... |
'use strict';
import { Response, NextFunction } from 'express';
import { KeyValue } from '../lib/interface';
/** ENV PARSER */
const parseEnvConfig = (settingsStr: string): KeyValue => {
let settings: KeyValue = {};
if (!settingsStr) return settings;
const settingsComponent = settingsStr.split('&');
... |
<gh_stars>0
import {Vector, V} from 'vector';
// fudge factor for floating point inaccuracy
const epsilon = 0.00001;
/** A ray proceeding from a point in a constant direction at one unit distance per one unit time. */
export class Ray {
origin: Vector;
direction: Vector;
constructor(origin: Vector, dir... |
<reponame>bluayer/eodiro-server
import Auth, { SignUpInfo } from '@/modules/auth'
import { DataTypes, Model } from 'sequelize'
import Db, { MysqlInsertOrUpdateResult } from '@/db'
import EodiroMailer from '@/modules/eodiro-mailer'
import SqlB from '@/modules/sqlb'
import { TableNames } from '../table-names'
import Tim... |
import h from 'web/html'
import {Canvas, newCanvas} from 'web/canvas'
import {app, chat, menu} from 'app'
import {Pos, Dim} from 'game/geo'
import {newLayout} from 'game/dock'
const style = `
#sunrise-canvas {
flex: 0 1 auto;
align-self:center;
}
#sunrise .dock-main {
justify-content:center;
}`
let stop = false
ap... |
import * as express from 'express';
import * as compression from 'compression';
import * as cors from 'cors';
import * as morgan from 'morgan';
import * as serveFavicon from 'serve-favicon';
import { join } from 'path';
import { pathExists, fileExists } from '@tne/common';
import { appThrowable } from './appThrowable';... |
/**
* Based on:
* https://material-ui.com/components/autocomplete/#Virtualize.tsx
* Asynchronous Requests for autocomplete:
* https://material-ui.com/components/autocomplete/
*/
import React, { useMemo, useEffect, useState } from 'react'
import { observer } from 'mobx-react'
import { getEnv } from 'mobx-state-tr... |
import React, {useEffect, useRef} from 'react'
import * as leaflet from 'leaflet'
import {AntPath, LatLng} from 'leaflet-ant-path'
import {pushBigArray} from './utils'
const calculateAngleFromLatlon = (p1: LatLng, p2: LatLng) =>
360 -
((Math.atan2(p2[0] - p1[0], p2[1] - p1[1]) * (180 / Math.PI) + 360) % 360)
cons... |
<filename>tests/scenarios/v2-addon-dev-test.ts
import path from 'path';
import { appScenarios, baseV2Addon } from './scenarios';
import { PreparedApp } from 'scenario-tester';
import QUnit from 'qunit';
import merge from 'lodash/merge';
import { pathExistsSync, readJsonSync } from 'fs-extra';
const { module: Qmodule, ... |
export class InputBuilder<T> {
protected _dictionary: InputBuilder.FragmentListDictionary<T> = {};
protected _whenFnDictionary: InputBuilder.FragmentWhenFnDictionary<T> = {};
public static fragment<T>(fragmentDictionary: InputBuilder.FragmentDictionary<T>, when?: InputBuilder.FragmentWhenFn<T>): I... |
<gh_stars>1-10
import Vue from "vue";
import Vuex from "vuex";
import {
DEFAULT_URL,
fetchDicebotInfo,
setBcdiceURL,
fetchDicebots
} from "./dice";
Vue.use(Vuex);
const defaultShotcuts = ["2D6", "2D6<=?", "1D100"];
const state: State = {
gameType: "DiceBot",
gameName: "",
gameInfo: "ロード中…",
apiURL: "... |
<reponame>ms-deregtd/NoSQLProvider
/**
* TransactionLockHelper.ts
* Author: <NAME>
* Copyright: Microsoft 2017
*
* Several of the different providers need various types of help enforcing exclusive/readonly transactions. This helper keeps
* store-specific lock info and releases transactions at the right time, whe... |
/* eslint-disable camelcase */
import * as mysql from 'mysql'
import { mapValues, isEqual } from 'lodash'
import { URL } from 'url'
import { TableDefinition, Database, EnumDefinition } from './schemaInterfaces'
import Options from './options'
import { convertToEntity } from './utils'
const columnsSchemaNames = [
'ta... |
<gh_stars>0
import { CreatureData } from '@actor/data-definitions';
import { ItemDataPF2e } from '@item/data-definitions';
import { PF2RuleElementSynthetics } from './rules-data-definitions';
export interface Bracket {
start?: number;
end?: number;
value: number;
}
export interface BracketedValue {
fi... |
import { app, App, AutoUpdater, BrowserWindow, IpcMain, ipcMain, IpcMainEvent, IpcMainInvokeEvent, Menu, Session, Tray } from 'electron'
import { autoUpdater, AppUpdater } from 'electron-updater'
import path from 'path'
import fs from 'fs-extra'
import { URL } from 'url'
import { MicrosoftAuth } from 'minecraft-auth... |
import { checkIfRestartNeeded } from './main/squirrel-startup';
import appConfig from '../config/config.json';
import path from 'path';
import * as electron from 'electron';
import * as errorHandling from './main/error-handling';
import * as updates from './main/updates';
import * as grpcIpcMain from './main/grpc-ipc-m... |
let _ = require('lodash');
import { AbstractService } from './AbstractService';
import { ComponentDescriptor } from '../config/ComponentDescriptor';
import { ComponentSet } from '../ComponentSet';
import { DynamicMap } from '../portability/DynamicMap';
import { ComponentConfig } from '../config/ComponentConfig';
impor... |
<reponame>mikiec84/electrode-native
import {
PackagePath,
shell,
yarn,
log,
readPackageJsonSync,
writePackageJsonSync,
kax,
} from 'ern-core'
import { ApiGenUtils } from 'ern-api-gen'
import _ from 'lodash'
import chalk from 'chalk'
import path from 'path'
import fs from 'fs'
import semver from 'semver'
i... |
import Benchmark = require("benchmark");
var suite = new Benchmark.Suite;
// add tests
suite.add('RegExp#test', function() {
/o/.test('Hello World!');
})
.add('String#indexOf', function() {
'Hello World!'.indexOf('o') > -1;
})
.add('String#match', function() {
!!'Hello World!'.match(/o/);
})
// add listeners
.o... |
import { _getColumnSchema, _isIndex } from "./schema";
import catLabelSort from "../util/catLabelSort";
import {
unassignedCategoryLabel,
overflowCategoryLabel,
globalConfig,
} from "../globals";
import { Dataframe } from "../util/dataframe";
// eslint-disable-next-line @typescript-eslint/explicit-module-boundar... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
import { nextTick } from "vue";
import {
createRouter,
createWebHistory,
RouteRecordRaw,
RouterScrollBehavior,
NavigationGuard,
} from "vue-router";
import { startCase, clone } from "lodash";
import { hideAll } from "tippy.js";
import PageHome from "@/views/PageHome.vue";
import PageExplore from "@/views/expl... |
import { Space, Tooltip } from 'antd';
import React from 'react';
import Avatar from 'components/Avatar';
import Badge, { BadgeType } from 'components/Badge';
import { ConditionalWrapper } from 'components/ConditionalWrapper';
import HumanReadableNumber from 'components/HumanReadableNumber';
import Icon from 'componen... |
<gh_stars>0
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------... |
import * as React from 'react'
import { connect } from 'react-redux'
import { Dispatch } from 'redux'
import { CityModel, ErrorCode, EventModel, EVENTS_ROUTE, EventsRouteType } from 'api-client'
import { NavigationPropType, RoutePropType } from '../constants/NavigationTypes'
import withPayloadProvider, { StatusPropsT... |
import { EventEmitter } from "stream"
import ChildProcess from "child_process"
import ENV from "./env"
import prisma from "./database"
export interface PortScanRequest {
serviceId: number
host: string
port: number
type: "tcp" | "udp"
}
interface RegisteredPortScanRequest extends PortScanRequest {
scanId: number
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.