text stringlengths 3.08k 15.5k |
|---|
<gh_stars>1-10
import { CancelTokenService } from './../service/cancel-token.service';
import http, { AxiosResponse } from 'axios';
import { API_CONFIG, HttpResponeType } from '@/config/http.config';
import {
ApiSendConfig,
httpErrorHandle,
HTTP_METHODS,
HTTP_BODY_TYPES
} from './http.dto';
import qs from 'qs';... |
import { ChangeEvent, useRef, useState, useEffect } from "react";
import { Row, RowState } from "./Row";
import { Clue, CluedLetter, foundReducer } from "./clue";
import { makeGuess } from "./guess";
declare const window: { ga: (action: string, options: any) => void };
enum GameState {
Playing,
Won,
Lost,
}
in... |
<reponame>Saperlu/UA-api
/* eslint-disable consistent-return */
import dotenv from 'dotenv';
import crypto from 'crypto';
dotenv.config();
// Load dotenv only if we are not in testing
// The testing must be able to be loaded without any environment variable except the DATABASE
// We had to use a function to check if ... |
import { Dialog } from "@headlessui/react";
import { XIcon } from "@heroicons/react/solid";
import classNames from "classnames";
import { AnimatePresence, motion } from "framer-motion";
import {
ComponentProps,
FC,
ReactElement,
useEffect,
} from "react";
import { useTransition, NavLink } from "remix";
import {... |
<filename>src/api/types/TypeProxy.ts<gh_stars>10-100
'use strict';
import { ConstructorFunction } from '../../types';
import { constants } from '../../constants';
const {
SymbolGaia,
} = constants;
import { hop } from '../../utils/hop';
import { ErrorsTypes } from '../../descriptors/errors';
const {
WRONG_TYPE_DE... |
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-nocheck
import {
Client,
DefaultRequestRunner,
OAuthProvider,
} from "@mixer/client-node";
import { User } from "../entity/User";
import { EncryptionHelper } from "../helpers/EncryptionHelper";
import { UserHelper } from "../helpers/UserHelper";... |
<filename>js-core/src/channel/MethodChannel.ts
/**
* MIT License
*
* Copyright (c) 2020 ManBang Group
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including with... |
import * as observe from '../platform/observe'
import * as url from "../platform/url"
import * as genString from "../platform/gen-string"
import { handlerFunc, RouterEvent, RouterEventType } from './types'
import { Request } from './request'
import { Response } from './response'
import { Group } from "./group"
import ... |
/* eslint-disable */
import {
ASN1Element as _Element,
ASN1TagClass as _TagClass,
OBJECT_IDENTIFIER,
OCTET_STRING,
OPTIONAL,
} from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
export { CONTENT_TYPE } from "../CryptographicMessageSyntax-2010/CONTENT-TYPE.oca";
export { Con... |
var Body = require('./Body');
var Sphere = require('../shapes/Sphere');
var Box = require('../shapes/Box');
var Vec3 = require('../math/Vec3');
var HingeConstraint = require('../constraints/HingeConstraint');
module.exports = RigidVehicle;
/**
* Simple vehicle helper class with spherical rigid body wheels.
* @class... |
import { Component, AfterViewInit, OnDestroy } from '@angular/core';
import {
Axis,
Point,
ChartXY,
ChartXYOptions,
lightningChart,
IntensityGridSeries,
AxisTickStrategies,
DateTimeTickStrategy,
NumericTickStrategy,
TickStrategyStyler,
TickStrategyParameters,
EngineOptions,
PalettedFill,
em... |
<reponame>datavisyn/tdp_core<gh_stars>1-10
/**
* Created by <NAME> on 12.09.2017.
*/
import {IDataProvider, IColumnDesc, ScaleMappingFunction, ValueColumn, NumberColumn, BoxPlotColumn, NumbersColumn, Column, toCategories} from 'lineupjs';
import {LineupUtils} from '../utils';
import {IScoreRow,IScoreColumnPatcherExte... |
/*
* Copyright 2021 InfAI (CC SES)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... |
import styled from 'styled-components'
export const Section = styled.section`
background: #fff;
margin: 130px 0 40px 0;
position: relative;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 25px 50px 0 rgba(0, 0, 0, 0.1);
`
export const H1 = styled.h1`
position: absolute;
top: -155px;
width: 100%;
font-size: 100p... |
import { Diced } from "../../types.ts";
import { nrepl, unknownutil } from "../../deps.ts";
// std
import * as bufForm from "../../std/buffer/form.ts";
import * as msg from "../../std/message/core.ts";
import * as nreplEval from "../../std/nrepl/eval.ts";
import * as nreplNs from "../../std/nrepl/namespace.ts";
import... |
import defaults from "./utils/defaults";
import DataLoader from "dataloader";
import { withFields, string } from "@commodo/fields";
import { validation } from "@webiny/validation";
import getPKPrefix from "./utils/getPKPrefix";
import { Category, PbContext } from "../../types";
import { ContextPlugin } from "@webiny/ha... |
import {
GraphQLSchema,
GraphQLObjectType,
GraphQLString,
execute,
subscribe,
GraphQLNonNull,
} from 'graphql';
import { EventEmitter } from 'events';
import WebSocket from 'ws';
import net from 'net';
import http from 'http';
import { createServer, ServerOptions, Server } from '../../server';
// distinct ... |
import { filterCountriesByValue } from '../task2/Task2';
import { CountriesStats, Country, CountryStat, LangStat } from '../types/interfaces';
const countryStat: CountryStat = {
countries: [],
population: 0,
languages: {},
currencies: [],
area: 0,
};
const countriesStats: CountriesStats = {};
['EU', 'NAFTA'... |
<reponame>MarcinGanczorz/spartacus
import { Injectable } from '@angular/core';
import {
EpdVisualizationConfig,
EpdVisualizationInnerConfig,
UsageIdConfig,
} from '@spartacus/epd-visualization/root';
import { BehaviorSubject, Observable } from 'rxjs';
import { first, map } from 'rxjs/operators';
import {
Metada... |
import {h, input, mount} from 'flaco';
import {Job, User, users} from './fixture';
import {DisplayedItem, FilterOperator, FilterType, smartTable, SortDirection} from 'smart-table-core';
import {withFilter, withIndicator, withListChange, withPagination, withSearch, withSort, withTable} from '../dist/src';
const compose... |
import { join } from 'path';
import Engine from '.';
import fetch from 'node-fetch';
const consola = require('consola');
import { ChildProcess, spawn } from 'child_process';
import {
executeInSequence,
getTestPatternForPath,
getTestPatternForTestName
} from './util';
import { Config } from './types/Config';
impor... |
<reponame>wixplosives/tokey
import {
Seeker,
tokenize,
isComment,
isStringDelimiter,
isWhitespace,
createToken,
getJSCommentStartType,
isCommentEnd,
getUnclosedComment,
Token,
Descriptors,
} from '@tokey/core';
type Delimiters = ',' | ';' | ':' | '{' | '}' | '[' | ']' | '(' ... |
<reponame>snayan/canvas-demo
/* 精灵🧚♀️ */
enum SpriteType {
Circle,
Rect,
Image,
}
export interface Behavior {
execute(sprite: Sprite, now: number, lastFrameTime: number, fps: number): void;
[attr: string]: any;
}
export interface Artist {
draw(sprite: Sprite): void;
[attr: string]: any;
}
export abs... |
<reponame>arajkumar/console
import { getSchemaType } from '@rjsf/core/dist/cjs/utils';
import { JSONSchema7 } from 'json-schema';
import * as _ from 'lodash';
import { getSchemaAtPath } from '@console/shared';
import {
ARRAY_COMPATIBLE_CAPABILITIES,
DEPRECATED_CAPABILITIES,
OBJECT_COMPATIBLE_CAPABILITIES,
PRIMI... |
import { IOptions } from "./conf";
import { LRU_BASE } from "./lru-base";
import { LruNode } from "./lru-node";
const CACHE_SIZE = "__@cache_size_";
const HEAD_KEY = "__@cache_head_key_";
const TAIL_KEY = "__@cache_tail_key_";
export class LRU extends LRU_BASE {
private store: any = null;
constructor(options: IO... |
<reponame>dfabulich/asyncglk
/*
Web Metrics
===========
Copyright (c) 2022 <NAME>
MIT licenced
https://github.com/curiousdannii/asyncglk
*/
import {throttle} from 'lodash-es'
import {OFFSCREEN_OFFSET} from '../../common/constants.js'
import * as protocol from '../../common/protocol.js'
import {create, DOM, EventF... |
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not u... |
<gh_stars>1-10
export type Dictionary<T = string> = Record<string, T>;
export interface Options {
forUnsupported?: 'error' | 'warn' | 'avoid';
extraTypes?: TypeDescriptor[];
serializing?: {
preferUTF16?: boolean;
refineArrayBufferView?: false;
treatSpecialObjectsAsPlain?: false;
... |
import { Card } from '../../../interfaces'
import Set from '../Burning Shadows'
const card: Card = {
name: {
en: "Darkrai GX",
fr: "Darkrai GX",
es: "Darkrai GX",
it: "Darkrai GX",
pt: "Darkrai GX",
de: "Darkrai GX"
},
illustrator: "5ban Graphics",
rarity: "Secret Rare",
category: "Pokemon",
set: Se... |
<reponame>maxim1989/react31032020<gh_stars>0
import * as _ from 'lodash';
import { Priority, simpleOperation, symbols } from './constants';
type ArrayOfStrings = string[];
type ArrayOfStringsNumbers = Array<number | string>;
export function splitBySpace(str: string): ArrayOfStrings {
return str.split(' ');
}
ex... |
<filename>api/services/application-sp.ts
import { AddableApplication, Application } from "../interfaces/application";
import {
AddableApplicationListItem,
PersistedApplicationListItem,
} from "../interfaces/application-sp";
import { OrderBySpec } from "../interfaces/sp-items";
import { getWorkforcePortalConfig } fr... |
/**
* Tree
* @author: oldj
* @homepage: https://oldj.net
*/
import clsx from 'clsx'
import lodash from 'lodash'
import React, { useEffect, useState } from 'react'
import { canBeSelected, flatten, getNodeById, selectTo, treeMoveNode } from './fn'
import Node, { ITreeNodeData, NodeUpdate } from './Node'
import style... |
/**
* Some utilities for the subcommands of the package @bldr/cli.
*
* @module @bldr/cli-utils
*/
import * as childProcess from 'child_process'
import os from 'os'
import ora from 'ora'
// TODO remove dependency object-assign
// Error: Cannot find module 'object-assign'
import 'object-assign'
import Gauge from 'g... |
<filename>src/screen.ts
import ankerColors, * as anker from 'anker-colors';
import * as deepAssign from 'deep-assign';
import * as hexRgb from 'hex-rgb';
export type Flavor = 'light' | 'dark';
function screen(flavor: Flavor, custom = {}) {
if (flavor !== 'light' && flavor !== 'dark') {
flavor = 'dark';
}
c... |
<reponame>Suredbits/sb-api
import * as t from 'io-ts'
import * as types from 'io-ts-types'
import { StatType } from '../rest/nfl'
export type NflTeamType = t.TypeOf<typeof NflTypes.NflTeamType>
export type NflGamesResponseType = t.TypeOf<typeof NflTypes.GamesResponseType>
export type NflPlayerResponseType = t.TypeOf<... |
// @ts-ignore
import * as d3 from "d3";
import { DataViewRow } from "spotfire-api";
import { setBusy, setIdle } from "./interactionLock";
// /**
// * Adds a tooltip to a D3 selection object
// * @param {Spotfire.mod} mod
// * @param {Array<Spotfire.Axis>} items
// */
export function highlight(
mod: Spotfire.Mo... |
/* eslint-disable no-dupe-class-members */
import { Snowflake } from '@klasa/snowflake';
import { Routes } from '@klasa/rest';
import { WebhookMessageBuilder, WebhookMessageOptions } from './messages/WebhookMessageBuilder';
import { Structure } from './base/Structure';
import { extender } from '../../util/Extender';
im... |
import { FetchInfo, fieldIs, ResolveQuery, State } from './typings';
import { getFilterFields, isEqual, isNewId, runFilter, undefOr } from './utils';
const getFields = (fields: (string | ResolveQuery | null)[]) => {
const filtered = fields.filter(s => s) as (string | ResolveQuery)[];
if (filtered.length === 0) ret... |
import {
createTmpDir,
android,
ios,
config as ernConfig,
PackagePath,
NativeApplicationDescriptor,
shell,
reactnative,
ErnBinaryStore,
log,
kax,
} from 'ern-core'
import { getActiveCauldron } from 'ern-cauldron-api'
import { generateMiniAppsComposite } from 'ern-container-gen'
import _ from 'loda... |
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates.
*
* 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 app... |
import { useState, useEffect } from 'react';
import { Text, DateTimeDisplay } from '@pega/cosmos-react-core';
import { SearchResults } from '@pega/cosmos-react-work';
import { sendData } from '../services';
import { genStatus } from '../utils/status';
type SelectFilterProps = any;
const STATUS_TYPES = ['blocked', 'pe... |
import axios, { AxiosRequestConfig } from 'axios';
import { useDispatch } from 'react-redux';
import { apiConstants, relationshipConstants, offlineConstants } from '../../config/constants';
import { IAuthenticatedUser, IDeleteRelationship, INewRelationship, IRelationshipErrorState, IReplayableAction, restoreOfflineW... |
import * as debug from "debug"
import * as JSON5 from "json5"
import { connect, Document, model, Schema } from "mongoose"
import _ = require("lodash")
import { getTemporaryAccessTokenForInstallation } from "../api/github"
import { dangerRepresentationForPath } from "../danger/danger_run"
import { getGitHubFileContent... |
<filename>src/types.ts
import { IMeta } from './util/metaquerier';
import { IDataTransferItem } from './util/entry-reader';
export enum MatcherKey {
RECEIVE_NEW_EVENT = 'matcher.browser_event.new',
EMIT_NEW_STEP = 'matcher.step_event.new',
EMIT_UPDATE_STEP = 'matcher.step_event.update',
EMIT_END_STEP = 'match... |
import * as ts from "typescript";
import * as assert from "assert";
import {
DeclarationReflection,
IntrinsicType,
ParameterReflection,
PredicateType,
Reflection,
ReflectionFlag,
ReflectionKind,
SignatureReflection,
TypeParameterReflection,
} from "../../models";
import type { Contex... |
import { Key, forceGet } from '../utils'
import { directive, ensurePartType } from '../directive'
import { NodePart } from '../part'
import { DuplicatedKeyError } from '../error'
export type DiffKey = Key | null
export type Change =
| {
type: 'insert'
key: DiffKey
after: DiffKey
}
| {
t... |
import { NativeStackScreenProps } from "@react-navigation/native-stack";
import {
Flex,
Box,
Text,
ScrollView,
Heading,
Badge,
HStack,
VStack,
Input,
Image,
Spinner,
} from "native-base";
import React, { Fragment, useState } from "react";
import { CustomerHomeStackParamsList } from "../customer-ta... |
<reponame>mojadev/wsl-path
import {
windowsToWsl,
wslToWindows,
resetCache,
wslToWindowsSync,
windowsToWslSync,
_setForceRunInWsl
} from "./wsl-path";
import { exec, execSync } from "child_process";
import { ERROR_FILEPATH_MUST_BE_ABSOLUTE } from "./path-handling";
const DEFAULT_OPTIONS = { mountPoints: [... |
/*
* Copyright 2021, 2022 Macquarie University
*
* 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... |
<reponame>yippeesoft/NotifyTools
//https://www.cnblogs.com/mazey/p/6809457.html
//https://lellansin.wordpress.com/2014/04/30/node-js-%E7%AB%AF%E5%8F%A3%E6%89%AB%E6%8F%8F/
'use strict'
import {Socket} from "net";
import {HashMap} from "TypeScriptCollectionsFramework";
import {isNull} from "util";
class ScanS... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
import localforage from 'localforage';
export abstract class FileSystemNode {
private _id: number;
public name: string = '';
public parent: FolderNode | null = null;
static idcnt: number = 0;
public constructor(name: string | any) {
this._id = FileSystemNode.idcnt++;
if (typeof(name) === 'st... |
import { Test, TestingModule } from "@nestjs/testing"
import { SendGridModule, SendGridService } from "@anchan828/nest-sendgrid"
import { User } from "../auth/entities/user.entity"
import { EmailService } from "./email.service"
import { ConfigModule } from "@nestjs/config"
import { ArcherListing, Language } from "../..... |
import { Nullable } from "../globals";
type nodeConstructor<T> = {
parent: Nullable<T>; // The parent folder of the file/folder
children?: Nullable<T[]>; // A list of all folders in a folder
leafs?: Nullable<T[]>; // A list of all files in a folder
id?: Nullable<string>; // The Google Drive id of the file/folder o... |
// Copyright (c) 2021 Cloudflare, Inc. and contributors.
// Copyright (c) 2021 Cloudflare, Inc.
// Licensed under the BSD-3-Clause license found in the LICENSE file or
// at https://opensource.org/licenses/BSD-3-Clause
import { ctEqual, joinAll } from './util.js'
import { scrypt } from '@noble/hashes/lib/scrypt'
exp... |
import Button from '@Bootstrap/Button';
import EntryType from '@Models/EntryType';
import SongType from '@Models/Songs/SongType';
import EntryUrlMapper from '@Shared/EntryUrlMapper';
import PVPlayerStore from '@Stores/PVs/PVPlayerStore';
import PlayListStore from '@Stores/Song/PlayList/PlayListStore';
import clas... |
<filename>lib/base85.ts
import * as utf8 from './utf8';
const BASE85_CHARS_Z85 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-:+=^!/*?&<>()[]{}@%$#";
export type Base85Variant = "ascii85" | "z85";
export interface Base85Options {
variant?: Base85Variant;
zeroesAsZ?: boolean;
spacesAsY?... |
import { TestBed } from '@angular/core/testing';
import { Component, NgModule } from '@angular/core';
import {
NbThemeModule,
NbOverlayModule,
NbPositionBuilderService,
NbOverlayService,
NbComponentPortal,
NbLayoutModule, NbLayoutComponent,
} from '@nebular/theme';
import {
NbAdjustableConnectedPositionSt... |
//
// Copyright © 2020 Province of British Columbia
//
// 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 la... |
<filename>src/lib/redisNormal.ts
import * as Redis from 'ioredis';
import * as logger from 'heroku-logger';
import * as ua from 'universal-analytics';
import {
DeleteRequest,
deployRequest,
clientDataStructure
} from './types';
import utilities = require('./utilities');
import { shellSanitize } from './shellSan... |
<gh_stars>0
export declare const randomInt: (min?: number, max?: number) => number;
export declare const randomDec: (min?: number, max?: number) => number;
export declare const randomList: <T>(list: T[]) => T;
export declare const mapRange: (value: number, source: number[], target: number[]) => number;
export declare c... |
<filename>src/db/entity/User.ts<gh_stars>0
/* eslint-disable camelcase */
import {
Entity,
PrimaryGeneratedColumn,
Index,
Column,
CreateDateColumn,
UpdateDateColumn,
BeforeInsert,
BeforeUpdate,
OneToMany,
} from 'typeorm';
import {
IsString,
IsEmail,
IsEnum,
Length,
IsEmpty,
IsOptional,
... |
/*!
* Copyright 2019 <NAME>. Please see LICENSE file at the root of this repository.
*/
import { IConnection, TextDocuments, ServerCapabilities, TextEdit, Range } from "vscode-languageserver";
import { LanguageService } from "../server";
import { accessCache } from "../util/cache";
import { Compilation } from "../ut... |
<reponame>vixriihi/Ilmari<filename>src/app/services/location-store.service.ts
import { Injectable } from '@angular/core';
import { Gatherings } from '../model/Gatherings';
import { Geometry } from '../model/Geometry';
import { WindowRef } from '../ref/window.ref';
import { Observable } from 'rxjs/Observable';
import { ... |
import React, { useState } from 'react';
import { observer } from 'mobx-react';
import { defineMessages, intlShape, injectIntl } from 'react-intl';
import { Button } from 'react-polymorph/lib/components/Button';
import { PopOver } from 'react-polymorph/lib/components/PopOver';
import classNames from 'classnames';
impor... |
import { readFileSync, existsSync } from 'fs'
import { FILE_PATH } from './constants'
import Mail from 'nodemailer/lib/mailer'
import { IUserAdmin } from './database/schemas/IUserAdmin'
class EnvVar<T> {
private _isSet: boolean = false
value: T
constructor(evar: Optional<string>, defaultValue: T) {
... |
<gh_stars>0
/**
* @license
* Copyright (c) 2020 Handsoncode. All rights reserved.
*/
import { SimpleCellAddress } from './Cell';
import { ClipboardCell } from './ClipboardOperations';
import { RawCellContent } from './CellContentParser';
import { AddColumnsCommand, AddRowsCommand, ColumnsRemoval, Operations, RemoveC... |
//
// Copyright (c) 2018 Electronic Arts Inc. All Rights Reserved
//
import { Component, Input, Output, ElementRef, EventEmitter } from '@angular/core';
import { ActivatedRoute, Params } from '@angular/router';
import { ArchiveService } from './../archive/capturearchive.service';
class RGBColor {
r : number = 0;
... |
<reponame>dev-shit/coc
import {
SlashCommand,
CommandOptionType,
CommandContext,
SlashCreator,
Message,
ApplicationCommandPermissionType,
ComponentType,
ButtonStyle
} from 'slash-create';
import axios from 'axios';
// const allowedIDs = ['125916793817530368', '262522481376493568',"246599730979799040","... |
<gh_stars>0
import confluxWeb from '@/vendor/conflux-web'
import { sendSignedTransactionPromise, toFixedForDisplay } from '../fc'
import Axios from 'axios'
const namespace = 'cfx'
const maxInterval = 1000 * 60 * 10
/* Max gas for send transaction (not gas price) */
export const maxGasForSend = 10000000
export const non... |
/* eslint-disable react/jsx-one-expression-per-line */
import React from 'react';
import moment from 'moment';
import {Badge} from 'react-bootstrap';
import {t, moneyFormat} from '../../utils';
import {FullProjectMonthModel} from '../models/FullProjectMonthModel';
import {ConsultantModel} from '../../consultant/models/... |
import {
createStyles,
Hidden,
TableBody,
TableCell,
TableRow,
Theme,
Typography,
useMediaQuery,
useTheme,
WithStyles,
withStyles,
} from "@material-ui/core";
import ErrorIcon from "@material-ui/icons/Error";
import React, { useEffect, useMemo, useState } from "react";
import { useDispatch, useSel... |
import { resolve } from "path";
const sort_mod = require("../mods/sort/sort");
/*** 動作させるかどうかの判定
* Notes
* 問題ページだけ動作してほしい。すなわちURLのpathnameが、
* "/contests/typical90/tasks"
* のときだけである。
*/
const is_target_url = async (): Promise<boolean> => {
const pathname: string = location.pathname;
ret... |
<reponame>KatherineWinter/node-win32-api
/* eslint-disable id-length */
// windows data types struct for ref-struct module https://github.com/TooTallNate/ref-struct
/**
Complex structure see:
https://github.com/waitingsong/node-win32-api/blob/master/packages/win32-api/src/data-struct-ext/
*/
import { parse_windef } fr... |
<gh_stars>0
import { logging } from '@angular-devkit/core';
import {
chain,
Rule,
SchematicContext,
Tree,
} from '@angular-devkit/schematics';
import {
addPackageJsonDependency,
NodeDependency,
} from '@schematics/angular/utility/dependencies';
import semver from 'semver';
import collectedDependencies from ... |
import { SoundKeys, DOMEventSound } from "./types";
import SOUND_KIT_01 from "./json/01.json";
import SOUND_KIT_02 from "./json/02.json";
const BUTTON = "button";
const CAUTION = "caution";
const CELEBRATION = "celebration";
const DISABLED = "disabled";
const NOTIFICATION = "notification";
const PROGRESS_LOOP = "progr... |
/*
* @Author: <NAME>
* @Date: 2021-11-12 15:31:24
* @Last Modified by: <NAME>
* @Last Modified time: 2022-01-28 16:44:26
*/
import * as path from 'path';
import * as fs from 'fs';
import { execSync } from 'child_process';
import { DependencySet, DependencyTag } from '@@install/utils/load-dependencies';
import ... |
<filename>packages/foam-vscode/src/core/services/markdown-provider.ts
import {
NoteLinkDefinition,
Resource,
ResourceLink,
ResourceParser,
} from '../model/note';
import { isNone, isSome } from '../utils';
import { Logger } from '../utils/log';
import { URI } from '../model/uri';
import { FoamWorkspace } from '... |
<filename>lib/spotify.ts<gh_stars>0
import { URLSearchParams } from 'url';
const clientId = process.env.SPOTIFY_CLIENT_ID;
const clientSecret = process.env.SPOTIFY_CLIENT_SECRET;
const refreshToken = process.env.SPOTIFY_REFRESH_TOKEN;
const basic = Buffer.from(`${clientId}:${clientSecret}`).toString('base64');
const ... |
import {
Colors,
Coordinates,
fabric,
TopologyNodeDataStats,
TopologyNodeDataStatsSection,
TopologyNodeDataStatsItem,
} from "../../../models";
import { GroupControls } from "../../../constants";
import { NodeSize } from "./constants";
interface StatsContent {
group: string;
items: fabric.Group;
titl... |
/*
* Copyright (c) 2021 CohesionForce Inc | www.CohesionForce.com | <EMAIL>
*
* 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
*
* Un... |
import React, { ReactElement, useEffect, useState } from 'react';
import { Alert, Flex, FlexItem, Spinner, Title, Divider, Button } from '@patternfly/react-core';
import { useFormikContext } from 'formik';
import { DryRunAlert, checkDryRun, startDryRun } from 'services/PoliciesService';
import { ClientPolicy } from 't... |
import { Command } from '@expo/commander';
import JsonFile from '@expo/json-file';
import chalk from 'chalk';
import inquirer from 'inquirer';
import fetch from 'node-fetch';
import path from 'path';
import semver from 'semver';
import { EXPO_DIR, LOCAL_API_HOST, STAGING_API_HOST, PRODUCTION_API_HOST } from '../Consta... |
import * as core from '@actions/core'
import {Config, Extends} from './types'
import {getSlackUserId, toOxfordComma} from './utils'
import {MessageAttachment} from '@slack/types'
import {WebClient} from '@slack/web-api'
import {WebhookPayload} from '@actions/github/lib/interfaces'
type MessageType =
| 'mentionCommen... |
import React, { useEffect, useState } from "react";
import { useHistory } from "react-router";
import { XHeadCell } from "../../../components/table/XTableHead";
import { Avatar } from "@material-ui/core";
import Typography from "@material-ui/core/Typography";
import Box from "@material-ui/core/Box";
import DataList fro... |
import { IThemeEntry } from '../definitions';
import { BrowserView, BrowserWindow, dialog, IpcMainInvokeEvent } from 'electron';
import * as fs from 'fs';
import * as path from 'path';
import { createMarkup, exportToMultipleFormats } from '../../lib/build';
import { fetchTheme, getThemeList, getLocalTheme } from './the... |
import * as inquirer from 'inquirer'
interface IPromptsDef {
flow: string[]
sections: any
}
function isFunction(value: any) {
return typeof value === 'function'
}
export function validate(sections: any, name: string, options: any) {
const section = sections[name]
if (!sections) {
options.error(`Flow ${... |
import * as React from "react";
import DockLocation from "../DockLocation";
import Border from "../model/BorderNode";
import TabNode from "../model/TabNode";
import {BorderButton} from "./BorderButton";
import {ILayoutCallbacks} from "./Layout";
import {showPopup} from "../PopupMenu";
import Actions from "../model/Acti... |
import { App, LogLevel } from '@slack/bolt'
import { UsergroupsListArguments, UsersInfoResponse, WebClient } from '@slack/web-api'
import { Usergroup } from '@slack/web-api/dist/response/UsergroupsListResponse'
import envConfig from '../config'
import { Block } from '../shared/typings/SlackService'
import NodeCache fro... |
<reponame>JuliaWinchester/aleph-fork<filename>src/aframe/components/AlEdgeComponent.ts
import { Constants } from "../../Constants";
import { ThreeUtils, AlGraphEvents, ShaderUtils } from "../../utils";
import { AlGraphEntryType } from "../../enums";
import { BaseComponent } from "./BaseComponent";
import { Entity } fro... |
import '@jxa/global-type';
import { run } from '@jxa/run';
// @ts-ignore
import * as alfy from 'alfy';
// @ts-ignore
import defaultBrowser from 'default-browser';
import * as convert from 'convert-layout/ru';
import type { default as MiniSearchT, SearchOptions } from 'minisearch';
import MiniSearch from 'minisearch';
i... |
<reponame>kiprobinson/wordle-solver
import * as fs from 'fs';
import { FrequencyTable } from './frequency-table';
import { arrayCount, arrayRemoveValue } from './util';
export type WordListStats = {
overallFrequencies: FrequencyTable;
characterFrequencies: Array<FrequencyTable>;
}
type SortedWordListEntry = {
w... |
<filename>packages/core/src/core.ts
import * as CSS from 'csstype';
// import assign from 'object-assign'
import {
ObjectOf,
StyleFn,
ParserProps,
ParserConfig,
ResponsiveValue,
TLengthStyledSystem,
ResponsiveArrayValue,
ResponsiveObjectValue,
ConfigStyle,
Config,
... |
import slugify from "slugify";
import { HTMLAttributes, HTMLProps, ReactNode } from "react";
import { TypographyProps, Typography, Box, Paper } from "@mui/material";
import { Link } from "../components/Link";
import { InfoCardWrapper } from "../components/InfoCard/InfoCardWrapper";
import { InfoCard } from "../componen... |
/*
* Copyright 2020 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... |
import { autoBindMethodsForReact } from 'class-autobind-decorator';
import React, { PureComponent } from 'react';
import { AUTOBIND_CFG } from '../../../common/constants';
import { docsGitAccessToken, docsGitSync } from '../../../common/documentation';
import type { GitRepository } from '../../../models/git-repository... |
<gh_stars>0
import { Memoize } from '@prismamedia/ts-memoize';
import { EventEmitter } from 'events';
import { setInterval } from 'timers';
import { AdapterInterface, GarbageCycle } from './adapter';
import { AcquireTimeoutLockError, LockError } from './error';
import {
AcquiredLock,
Lock,
LockName,
LockOptions... |
/**
* @license Use of this source code is governed by an MIT-style license that
* can be found in the LICENSE file at https://github.com/cartant/rxjs-tslint-rules
*/
/*tslint:disable:no-use-before-declare*/
import decamelize from "decamelize";
import * as Lint from "tslint";
import * as tsutils from "tsutils";
impo... |
<filename>src/mtoon-outline-renderer.ts
import { Engine } from '@babylonjs/core/Engines/engine';
import { Mesh, _InstancesBatch } from '@babylonjs/core/Meshes/mesh';
import { SubMesh } from '@babylonjs/core/Meshes/subMesh';
import { Scene } from '@babylonjs/core/scene';
import { ISceneComponent, SceneComponentConstants... |
import { readFileSync, readdirSync } from 'fs';
import { dirname, basename, join } from 'path';
import { createHash } from 'crypto';
const sha1 = (s:string) => {
const shasum = createHash('sha1');
shasum.update(s);
return shasum.digest('hex');
};
// TODO: Exports a private function just to make it easy to test
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.