text stringlengths 3.08k 15.5k |
|---|
import { literals, Literal } from "./literal";
export interface IKVObject<T = any> {
[key: string]: T;
}
export interface IDBOptions {
/** query condition object */
where?: IDBWhere;
/** select columns, default is `'*'` */
columns?: string | string[];
/** result rows sort condition */
orders?: IDBOrder;... |
import { MailData } from "@sendgrid/helpers/classes/mail"
import admin from "firebase-admin"
import * as functions from "firebase-functions"
import ua from "universal-analytics"
import database from "../database"
import { Step } from "../enums"
import { ITranscript } from "../interfaces"
import sendEmail from "../sendE... |
import { Injectable } from '@angular/core';
import { Action } from '@ngrx/store';
import { Actions } from '@ngrx/effects';
import { DataServiceError, flattenArgs } from './interfaces';
import { Observable } from 'rxjs/Observable';
import { Operator } from 'rxjs/Operator';
import { filter, share, takeUntil } from 'rxjs... |
import React, { useState } from 'react'
import { Layer, Ellipse, Text, Line } from 'react-konva'
import styled, { ThemeProvider } from 'styled-components'
import { Portal } from 'cad/Portal'
import { useDispatch } from 'react-redux'
import { Wall } from 'cad/ElementsType'
import { tools } from 'cad/Workplace'
import {... |
import React, { createContext, useContext } from 'react';
import {
StateKey,
SetInitialStateCallback,
ComponentState,
ComponentMeta,
ComponentError,
ComponentProps,
DisplayState,
FormErrors,
FormMeta,
RequiredHandler,
ButtonData,
ButtonID,
ShouldUpdate,
InitialState,
SetInitialState,
Ini... |
import {
Button,
Modal,
ModalBody,
ModalCloseButton,
ModalContent,
ModalFooter,
ModalHeader,
ModalOverlay,
Select,
Textarea,
VStack
} from '@chakra-ui/react';
import { yupResolver } from '@hookform/resolvers/yup';
import { endOfDay } from 'date-fns';
import { useForm } from 'react-h... |
import { LitElement, html, customElement, css, property } from 'lit-element';
import { Unsubscribe } from 'redux';
import {
ACTION_ID,
ACTION_ROOT,
ApplicationStore,
DataStoreListener,
DataStoreState
} from '../../../data/store';
import { buttonStyles, cardStyles, globalStyles } from '../../global_styles';
im... |
import {
convertFactory,
NamingConvention,
ConvertOptions,
ConvertFn,
buildScalars,
ScalarsMap,
NormalizedScalarsMap,
EnumValuesMap,
ParsedEnumValuesMap,
LoadedFragment,
} from "@graphql-codegen/visitor-plugin-common"
import { GraphQLSchema } from "graphql"
import { DEFAULT_SCALARS } from "./scalars... |
/** helper to swap item to end and pop(), instead of splice()ing */
export function removeUnorderedListItem<T>(list: T[], item: T) {
var i = list.indexOf(item)
if (i < 0) {
return
}
if (i === list.length - 1) {
list.pop()
} else {
list[i] = list.pop()!
}
}
/** loop over... |
import * as tf from '@tensorflow/tfjs';
import { WorkerCommand, WorkerResponse, SplitCanvasMetaData } from './const';
const ctx: Worker = self as any // eslint-disable-line no-restricted-globals
let model:tf.GraphModel|null
let splitMargin =0.2
let modelWidth=300
let modelHeight=300
let maskColor = 255 // all v... |
<filename>api/__tests__/plugin/formula/meanCutoff/meanCutoff.spec.ts
import { questionMock } from '../../../../db/mocks/question';
import { questionOptionMock } from '../../../../db/mocks/questionOption';
import { surveyCompositeMock } from '../../../../db/mocks/surveyComposite';
import { surveyCompositeItemMock } from... |
<filename>types/core-object/core-object-tests.ts
import { Mix, MethodNames } from 'core-object/-private/utils';
import CoreObject = require('core-object');
//////////// Mix ////////////
declare const mix1: Mix<{ a: number }, { b: string }>;
mix1.a; // $ExpectType number
mix1.b; // $ExpectType string
declare const mi... |
import { power_set, breadth_first_search } from "./common"
interface State {
elevator_loc: number,
moves_till_here: number;
// Each positions is the floor of one element, microchips on odd indices, generators on even indices.
elements_loc: number[];
}
var max_floor = 3;
function parse(input: string[... |
<reponame>aairom/kui
/*
* Copyright 2021 The Kubernetes Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ... |
import "../lib/env";
import alphavantageAPI from "../alphavantageAPI/alphavantageAPI";
/**
* Calculate position sizing, example we only want to risk 2% of total balance amount
*/
type sizingCalculationType = {
buyOrSell: string;
candle: string;
balance: number;
riskSatsAmount: number;
riskDollarAmount: num... |
<gh_stars>1-10
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { InjectModel } from '@nestjs/mongoose';
import { Model } from 'mongoose';
import { IImage } from '../interfaces/image.interface';
const ImageKit = require('imagekit')
@Injectable()
export class ImageSer... |
<filename>src/platform.ts
import {
API,
Characteristic,
DynamicPlatformPlugin,
Logger,
PlatformAccessory,
PlatformConfig,
Service
} from 'homebridge'
import { isIPv4 } from 'net'
import { UserConfig, VieramaticPlatformAccessory } from './accessory'
import { Abnormal, Outcome, isEmpty, isValidMACAddress, ... |
<reponame>TankerHQ/sdk-js<filename>packages/functional-tests/src/helpers/AppHelper.ts
import type { b64string } from '@tanker/core';
import { Tanker } from '@tanker/core';
import { ready as cryptoReady, utils } from '@tanker/crypto';
import { getPublicIdentity, createProvisionalIdentity, createIdentity } from '@tanker/... |
<reponame>locoslab/vue-ts-component
import * as VueStatic from 'vue'
import * as VueRouter from 'vue-router'
/**
* This package contains utilities to create view components that look like classes.
* Note that this code relies on the decorator feature of typescript to perform the
* conversions. At time of writing, (... |
<filename>src/app/security/auth/login/login.component.ts
import { Component, OnDestroy, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { AuthService } from './../services/auth.service';
import { HttpErrorResponse } from '@angular/common/http';
import { Router ... |
<gh_stars>10-100
import { Clarinet, Tx, Chain, Account, types } from 'https://deno.land/x/clarinet@v0.14.0/index.ts';
import { assertEquals } from 'https://deno.land/std@0.90.0/testing/asserts.ts';
const ONE_8 = 100000000
const tokenAddress = "<KEY>"
export class ManyRecord {
constructor(
readonly recipient:... |
import {AfterViewInit, Component, OnInit} from "@angular/core";
import {BehaviorSubject, zip} from "rxjs";
import {PageService} from "../page.service";
import {Logger, ValueWithLogger} from "@gorlug/pouchdb-rxjs";
import {PouchWikiPage} from "../PouchWikiPage";
import {ActivatedRoute, NavigationStart, Router} from "@an... |
<reponame>gamestdio/box2d<filename>Box2D/Box2D/Dynamics/Joints/b2Joint.ts
/*
* Copyright (c) 2006-2007 <NAME> http://www.box2d.org
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
* Per... |
<reponame>gms1/angular-dynaform
// tslint:disable no-use-before-declare
// tslint:disable-next-line no-require-imports no-var-requires
import * as jsep from 'jsep';
// to make rollup happy: (should normally be able to use imported 'jsep' instead)
const jsepCall = jsep;
import { JsonPointer } from 'jsonpointerx';
imp... |
import {
FieldNode,
FragmentDefinitionNode,
FragmentSpreadNode,
GraphQLResolveInfo,
Kind,
ObjectFieldNode,
SelectionNode,
} from "graphql"
interface ISelection {
field: string
selections: ISelection[] | null
where?: any
}
export type ParsedResult = {
select: {
[key: string]: true | ParsedResu... |
import {
AsyncThunk,
combineReducers,
createAction,
createAsyncThunk,
createSlice,
PayloadAction,
} from "@reduxjs/toolkit";
import { BigNumber, ethers } from "ethers";
import { AppDispatch, RootState } from "../../app/store";
import { setWalletConnected } from "../wallet/walletSlice";
import {
fetchAll... |
import { Component, HostListener, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { MainService } from '../../services/main.service';
import { LoaderService } from '../../helper/loader/loader.service';
import { AppSetting } from '../../app.setting';
import { WindowUtilSer... |
import { useState, useRef, useEffect } from "react";
import {
Paper,
TextField,
InputAdornment,
IconButton,
Button,
Snackbar,
LinearProgress,
} from "@material-ui/core";
import { makeStyles, createStyles } from "@material-ui/core/styles";
import { Visibility, VisibilityOff } from "@material-ui/icons";
imp... |
<filename>src/app/pages/comment/components/detail/detail.component.ts<gh_stars>1-10
/**
* @file 评论详情页面组件
* @desc app/page/comment/component/detail
* @author Surmon <https://github.com/yah0130>
*/
import * as lodash from 'lodash';
import * as API_PATH from '@app/constants/api';
import { ActivatedRoute } from '@angu... |
import cx from 'classnames'
import createDOMPurify from 'dompurify'
import hljs from 'highlight.js'
import 'highlight.js/styles/default.css'
import memoize from 'lodash/memoize'
import * as R from 'ramda'
import * as React from 'react'
import * as Remarkable from 'remarkable'
import { linkify } from 'remarkable/linkify... |
import { useState, useEffect, useRef } from "react";
import { FormMethod, useFetcher, useLoaderData } from "@remix-run/react";
import { User } from "~/lib/user/data/userSchema";
import { Post } from "~/lib/post/data/postSchema";
let mojs: any;
const getMojs = () => {
if (!mojs) mojs = require("@mojs/core");
retur... |
/**
* @license
* Copyright 2016 Google Inc.
* 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... |
import {call, put, take, takeEvery, takeLatest, select} from 'redux-saga/effects';
import {SagaIterator, eventChannel, END} from "redux-saga";
import {AccountAddAction, AccountUpdateRequest, ContractLoadedAction, FeedNewError, Web3LoadedAction} from "../..";
import * as Web3 from 'web3';
import {
BacklinkConnected,... |
import {
Object3D,
Color,
Matrix4,
AxesHelper,
Mesh,
ConeBufferGeometry,
MeshBasicMaterial,
Vector3,
} from 'three'
/**
* Mesh for representing an IKJoint.
* @private
* @extends {THREE.Object3d}
*/
export class BoneHelper extends Object3D {
/**
* @param {number} height
* @param {number?} boneSize
* ... |
import {
IonContent,
IonHeader,
IonItem,
IonLabel,
IonList,
IonMenu,
IonToolbar,
IonMenuToggle,
} from '@ionic/react';
import React from 'react';
import styled from 'styled-components';
import {ScheduleIcon, LocationIcon, HeartIcon, UserIcon} from '../assets/Icons';
import {IEvent} from '../services/Eve... |
import { NetGlobalMiddleware } from "../middleware";
import { $dbg, $nameof, $print } from "rbxts-transform-debug";
import ServerAsyncFunction from "../server/ServerAsyncFunction";
import ServerEvent from "../server/ServerEvent";
import ServerFunction from "../server/ServerFunction";
import {
AsyncServerFunctionDeclar... |
<filename>midway/src/app/scheduler/SchedulerRouter.ts
/*
University of Illinois/NCSA Open Source License
Copyright (c) 2018 Terrain Data, Inc. and the authors. All rights reserved.
Developed by: Terrain Data, Inc. and
the individuals who committed the code in this file.
https://github.com... |
<filename>src/modules/meetings/model/index.ts
import { Schema } from 'mongoose'
import * as mongoose from 'mongoose'
import { IFMeeting,MeetingModel } from '../interface'
import { MeetingDto } from '../dto/dto'
export const MeetingSchema = new Schema({
name: {
type: String
},
document: [
{
... |
<reponame>apacheli/whirlybird
// deno-lint-ignore-file camelcase
import type { Snowflake } from "../reference.ts";
import type { Channel } from "./channel.ts";
import type { Guild, GuildMember, Integration } from "./guild.ts";
// https://discord.dev/resources/user
/** https://discord.dev/resources/user#user-object *... |
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { TareasService } from "../../tareas/tareas.service";
import { Validators, FormGroup, FormControl } from '@angular/forms';
import { FileService } from "./file.service";
import { DatePipe } from '@angular/common';
// import { Subscription, Obse... |
import {ensureDirExists, FileJson, isDirectory, removeForce} from '@do-while-for-each/fs';
import {readdirSync, readFileSync, writeFileSync} from 'fs';
import {join} from 'path';
import {IFileInfo, IFileMetadata, IStorage, IStorageGet, IStorageIndex, IStorageIndexValue} from './storage.contract'
import {Env, IEnvOpt} f... |
import React from 'react';
import { Dispatch } from 'redux';
import { connect } from 'react-redux';
import Canvas from './canvas';
import CanvasContextMenu from './canvas-context-menu';
import { ContextMenuTrigger } from 'react-contextmenu';
import { NodeMap, EdgeMap, Point, AbstractCanvasObject } from '../types';
impo... |
import { Stack as Pool } from '../../../../utils/struct/Stack';
import { Line } from './Line';
import { Pen } from './Pen';
import { PropType } from '../parser/BaseParser';
import { NewLineMode } from '../Types';
export type PenPoolType = Pool<Pen>;
export class PenManager {
pens: Pen[] = [];
lines: Line[] = ... |
<filename>src/execute.ts
import {
// Notebook,
NotebookPanel
} from "@jupyterlab/notebook";
import { KernelMessage, Kernel } from "@jupyterlab/services";
import { ICellModel, Cell } from "@jupyterlab/cells";
import { ConsolePanel } from "@jupyterlab/console";
import { JSONObject } from '@lumino/coreutils';
imp... |
import {
APIGatewayEventDefaultAuthorizerContext,
APIGatewayProxyEventBase,
APIGatewayProxyHandler,
Context
} from "aws-lambda";
import {Asset} from "../../interfaces/IAsset";
import {errorResponse, newResponse} from "./response";
import {getAsset, searchAsset, verifyUserHasAssetAccess} from "../../lib/assets";... |
<filename>packages/next/server/post-process.ts
import type { RenderOpts } from './render'
import { parse, HTMLElement } from 'next/dist/compiled/node-html-parser'
import { OPTIMIZED_FONT_PROVIDERS } from '../shared/lib/constants'
import { nonNullable } from '../lib/non-nullable'
let optimizeAmp: typeof import('./optim... |
export { Alert } from './Alert';
export { ArrowDown } from './ArrowDown';
export { ArrowLeft } from './ArrowLeft';
export { ArrowRight } from './ArrowRight';
export { ArrowUp } from './ArrowUp';
export { ArrowBoth } from './ArrowBoth';
export { ArrowSmallDown } from './ArrowSmallDown';
export { ArrowSmallLeft } from '.... |
<filename>src/api/one/actions/index.ts<gh_stars>0
/**
* Copyright 2020 jhaemin
*
* Refresh One API Schemas & Functions
*
* This file is automatically generated
* by the script "generate".
* Do not modify this file manually.
* If there comes a situation where this file
* should move to other place,
* please up... |
import { useState } from 'react';
import { createContainer } from 'unstated-next';
import { AppState } from 'state/appState';
import axios from 'axios';
import { PresentationDataType } from 'components/pages/form/WebBuilderTypes';
import { clamp, IFormData, IImgData, useAsyncEffect } from 'core/utils';
import { asMap ... |
export const cyan = 'rgba(0,139,208,1)';
export const white = 'rgba(255,255,255,1)';
export const whiteSmoke = 'rgba(239,239,239,1)';
export const whiterSmoke = 'rgba(248,248,248,1)';
export const lighterGray = 'rgba(211,211,211,1)';
export const tuna = 'rgba(75,78,82,1)';
export const eclipse = 'rgba(62,62,62,1)';
exp... |
import {
Button,
ButtonGroup,
IconButton,
Stack,
Text as ChakraText,
} from '@chakra-ui/react';
import React from 'react';
import { FaTrash, FaWrench } from 'react-icons/fa';
import { useAppDispatch, useAppSelector } from '../../app/hooks';
import {
BoundaryAnnotation,
ComparisonOperator,
... |
<reponame>Bubz43/ep2e
import type { KineticWeaponAttackData } from '@src/combat/attacks';
import {
renderSelectField,
renderLabeledCheckbox,
renderNumberField,
renderFormulaField,
renderTextareaField,
} from '@src/components/field/fields';
import { renderAutoForm, renderUpdaterForm } from '@src/components/for... |
import * as apigateway from '@aws-cdk/aws-apigateway';
import {
AuthorizationType,
CorsOptions,
HttpIntegration,
HttpIntegrationProps,
IResource,
LambdaIntegrationOptions,
MethodOptions,
PassthroughBehavior
} from '@aws-cdk/aws-apigateway';
import * as lambda from '@aws-cdk/aws-lambda';
... |
import React, { ReactNode } from 'react'
import { useId } from '@react-aria/utils'
import styled, { css, CSSProp } from '@monorail/helpers/styled-components'
import {
FontSizes,
FontWeights,
typographyFont,
} from '@monorail/helpers/typography'
import { isNil, isObject, isString } from '@monorail/sharedHelpers/t... |
import React from 'react'
import {data as d} from '@karma.run/sdk'
import {
KeyPath,
Model,
ValuePath,
TuplePathSegment,
SortConfiguration,
FilterConfiguration,
FieldOptions,
TypedFieldOptions
} from '@karma.run/editor-common'
import {
EditComponentRenderProps,
Field,
EditRenderProps,
CreateFi... |
import React, { Component } from 'react';
import Grid from '@material-ui/core/Grid';
import { withI18n } from '@lingui/react';
import { connect } from 'react-redux';
import { Formik } from 'formik';
import * as Yup from 'yup';
import { compose } from 'react-apollo';
import {
Button,
ErrorBoundary,
DatePicker,
D... |
<gh_stars>1-10
import MStorage from "../storage";
import { WeatherService, Weather, WeatherUnits, WeatherIcon } from "./common";
export enum DSWeatherUnit {
/** Automatically select units based on geographic location */
Auto="auto",
/** Same as si, except that windSpeed is in kilometers per hour */
Ca... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
<filename>www/cube.ts
import * as THREE from 'three';
import { Axis, Move, RotationType } from 'autocuber';
import Cubelet from './cubelet';
function pieceIndex(x: number, y: number, z: number): number {
return x * 9 + y * 3 + z;
}
function mod(n: number, m: number): number {
return ((n % m) + m) % m;
}
fun... |
import {Clause} from "../Clause";
import {NebulaService} from "../NebulaService";
import {ApnsFields} from "./ApnsFields";
import {GcmFields} from "./GcmFields";
import {SseFields} from "./SseFields";
import {Nebula} from "../Nebula";
import {_createError, _errorText, _promisify, Callbacks, nbLogger} from "../Head";
im... |
import { Build } from '@stencil/core';
import { last } from '../../core/utils/general';
import { Singleton } from '../../singleton';
interface UIEventHistoryEntry {
target: HTMLElement | Window;
didRelateTo: HTMLElement;
}
interface TracerDefinition {
criteria: Function;
depth: number;
stack: UIEventHistor... |
import {ICanvasCellRenderer} from "../canvas-cell-renderer";
import {ICell} from "../../../../cell/cell";
import {IRectangle} from "../../../../util/rect";
import {TableEngine} from "../../../../table-engine";
import {IRenderContext} from "../../canvas-renderer";
import {ICellRendererEventListener} from "../../../cell/... |
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under... |
<gh_stars>0
import { MessageActionRow, MessageButton, MessageComponent, Guild, Message, MessageEmbed, TextChannel, User, MessageInteraction, MessageComponentInteraction } from 'discord.js'
import Page from './Page'
import Button from './Button'
import Toggle from './Toggle'
// function clone(obj) {
// if (obj ==... |
<filename>src/index.ts
import { Worker } from "cluster";
import { ApolloServer, ServerRegistration } from 'apollo-server-express';
import express from 'express';
import dotenv from 'dotenv';
import * as v8 from "v8";
import { resolvers } from './graphql-resolvers';
import { DBManager } from './neo4j';
import * as fs fr... |
import { Action, BLACK, Player, WHITE } from "./KonaneUtils";
import KonaneGame, { getKonaneStaticEval } from "./KonaneGame";
import { MinMax, MinMaxNode } from "../utils/MinMax";
import Konane from "./Konane";
import { randInt } from "../utils/misc";
import {
computerDifficultyDepths,
oppositeColor,
konaneDiffic... |
import once from 'lodash/once'
import google_private from '../config/google_private'
async function buildGCPClient() {
return new GCPClient(google_private)
}
export const getGCPClient = once(buildGCPClient)
type Config = typeof google_private
export class GCPClient {
url: string
config: Config
constructor(c... |
import * as recast from "recast"
import * as vscode from 'vscode'
import { MarkdownString } from "vscode"
import { removeShebang, ParameterPosition, showVariadicNumbers, chooseTheMostLikelyFunctionDefinition } from "../utils"
export function getParameterNameList(editor: vscode.TextEditor, languageParameters: Parameter... |
import { Page } from "puppeteer";
import { formatText } from "../helpers/formatting";
import { extractText } from "../helpers/puppeteerHelper";
import { setupBrowser, setupPage } from "../helpers/setupPuppeteer";
import estados from "../utils/estados";
import { isObjectEmpty } from "../utils/utils";
import { SintegraBA... |
/**
* @license
* Copyright 2022 JBoss Inc
*
* 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 o... |
import {
Component,
Prop,
h,
State,
Method,
Event,
EventEmitter
} from "@stencil/core";
//import { format } from "../../utils/utils";
export interface FunnelState {
phoneNumber: string;
isValid: boolean;
title1: string;
title2: string;
image?: string;
location?: { lat: number; lng: number };
... |
import {
getElementsForInputEvent,
getFormFieldElements,
hasTouch,
labelRequiresActiveState,
setTouchState,
} from '@module/forms/common'
import dropDown from '@module/forms/drop-down'
import { InputType, MouseAndTouchType } from '@type/enum'
import {
FORM_EVENT_GLOBAL_CLICK,
FORM_EVENT_INPUT_CHANGE,
... |
/*
* Copyright 2022 by LunaSec (owned by Refinery Labs, Inc)
*
* 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... |
<filename>src/blocks/block-definition.ts
// NetTango Copyright (C) <NAME>, <NAME>, and <NAME>. https://github.com/NetLogo/NetTango
import interact from "interactjs"
import type { InteractEvent } from '@interactjs/core/InteractEvent'
import { StringBuffer } from "../utils/string-buffer"
import { StringUtils } from "..... |
import {dirname} from 'path';
import ErrorWithMetadata from './ErrorWithMetadata.js';
import {promises as fs} from './fs.js';
import stat from './fs/stat.js';
/**
* Summary of differences between actual and desired state of a file-system
* object (ie. a file, directory, or link).
*
* Notable properties:
*
* - ... |
import test, { ExecutionContext } from 'ava'
import { createServer, build } from 'vite'
import { resolve } from 'path'
import { writeFileSync, rmdirSync, existsSync, mkdirSync, readdirSync, createReadStream } from 'fs'
import { ReadEntry, t as tarT } from 'tar'
import { v4 as uuid } from 'uuid'
import { CustomReportMet... |
import axios from "axios";
import getAuthConfig from "../util/auth-config";
import validateToken from "../util/token-validity";
import isStringEmpty from "../util/is-string-empty";
import formattedGistIdentifier from "../util/formatted-gist-identifier";
import constants from "../constants";
import GistFile from "./G... |
<reponame>WolfgangKurz/BeerViewer
import BaseAPI from "./Base/API";
declare global {
interface Window {
modules: Modules;
CALLBACK: Callback;
BaseAPI: BaseAPI;
}
}
export type CallbackFunction = (...Parameter: any) => void;
export interface IModule {
init(): void;
}
class ModuleInfo {
public ModuleObject: I... |
import React, { ReactElement } from "react";
import { restdatoTilLesbarDato } from "@/utils/datoUtils";
import PersonkortFeilmelding from "./PersonkortFeilmelding";
import { Adresse, Fastlege } from "@/data/fastlege/types/Fastlege";
import { useFastlegerQuery } from "@/data/fastlege/fastlegerQueryHooks";
import { Colum... |
import {useTranslation} from "react-i18next";
import React, {useState} from "react";
import {DefaultButton, DefaultEffects, Link, TextField} from "@fluentui/react";
import Alert from "./Alert";
import * as Cookies from "js-cookie";
import i18next from "i18next";
import {resetPassword, sendEmail, validate} from "../util... |
/*
MIT License
Copyright (c) 2020 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distrib... |
import { Component, Input, forwardRef, ViewEncapsulation, ViewChildren, QueryList, ElementRef, OnInit } from "@angular/core";
import { NG_VALUE_ACCESSOR, ControlValueAccessor } from "@angular/forms";
import { randomId } from "@sebgroup/frontend-tools";
export const CUSTOM_RATING_VALUE_ACCESSOR: any = {
provide: NG... |
import {FieldValue} from '@google-cloud/firestore';
import * as crypto from 'crypto';
import * as express from 'express';
import gql from 'graphql-tag';
import * as api from '../../types/api';
import {ViewerLoginQuery} from '../../types/gql-types';
import {firestore} from '../../utils/firestore';
import {github} from ... |
import {pick} from "../util/functional";
import type {IAction, IActionHandle} from "./actions";
/**
* Represents the Svelte Action initializer signature for [[keybind]]
*/
export type IKeybindAction = IAction<Document | Element, IKeybindOptions, IKeybindHandle>;
/**
* Represents the Svelte Action handle returned b... |
import * as winston from 'winston';
import * as path from 'path';
import * as fs from 'fs';
import { FileTransportInstance } from 'winston/lib/winston/transports';
const logFolder:string = 'Logs'
const serverLogFileName:string = 'serverLog.log';
const serverHttpFileName: string = 'serverHttp.log';
const documentsFi... |
import * as kh from "kamihubuki-js";
let windX = 0;
let windY = 0;
const colors = [
"blue", "navy", "teal", "green",
"lime", "aqua", "yellow", "red",
"fuchsia", "olive", "purple", "maroon"
];
let colorIndex = 0;
function createConfetti(x: number, y: number): kh.Confetti {
const vx = 0;
const vy = 200;
... |
<reponame>guizmo51/sportident.js<gh_stars>1-10
/* eslint-env jasmine */
import {testISiDeviceDriver} from 'sportident/lib/SiDevice/testUtils/testISiDeviceDriver';
import {testISiDeviceDriverWithAutodetection} from 'sportident/lib/SiDevice/testUtils/testISiDeviceDriverWithAutodetection';
import {SiDeviceState} from 'sp... |
<reponame>hedata/quizwire<filename>src/app/components/stream/stream.component.ts
import { Component, OnInit, Input, SimpleChanges } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { finalize, debounce } from 'rxj... |
import type { KonvaEventObject } from 'konva/lib/Node';
import { Component, useContext, useState } from 'react';
import React from 'react';
import { Modal, AutoComplete, Form, Checkbox, Mentions } from 'antd';
// import CheckboxGroup from 'antd/lib/checkbox/Group';
import { LabelText, FormatOptionsT } from '~lib/Label/... |
/** @jsxImportSource @emotion/react */
import { css, useTheme } from '@emotion/react';
import React, { useCallback, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from 'react';
import { Theme } from '../../styles/themes';
import { clamp } from '../../utils';
import SwiperItem from './SwiperItem';... |
import { Actor } from 'apify';
import log from '@apify/log';
import type { Page } from 'puppeteer';
import { inspect } from 'util';
import { RESOURCE_LOAD_ERROR_MESSAGE, SNAPSHOT } from './consts';
import { createRandomHash } from './tools';
/**
* Creates a string with an appended pageFunction to be evaluated in
* t... |
<reponame>toddfoster/venite
import { Component, OnInit, Inject } from "@angular/core";
import { Router, ActivatedRoute } from "@angular/router";
import { Observable, of, combineLatest, merge } from "rxjs";
import {
mapTo,
switchMap,
map,
tap,
filter,
startWith,
take,
} from "rxjs/operators";
import {
Li... |
/**
* Just some constants for use below
* @public epoch : indicates the default local 'beginning of time'
* set to 1970 initially, following UNIX's lead
* @public currentYear : the current calendar year
* also indicates the default local 'end of time' (dec 31 $currentYear)
* @public monthNames
* duh, ob... |
<gh_stars>0
/**
* @typedef {object} Scanner
* @property {function} next [See here]{@link next}
* @property {function} hasNext [See here]{@link hasNext}
* @property {function} nextLine [See here]{@link nextLine}
* @property {function} hasNextLine [See here]{@link hasNextLine}
* @property {function} nextNumber [See... |
import * as Phaser from "phaser";
import * as Constants from "../../constants";
import { clamp } from "../../util";
import { GameScene } from "../game";
export enum Direction {
Up,
Down,
Left,
Right,
}
export class Player {
x: integer;
y: integer;
dir: Direction;
static readonly WIDTH = 30;
static... |
import originDayjs, { Dayjs, OpUnitType, UnitType } from 'dayjs';
import customParseFormat from 'dayjs/plugin/customParseFormat';
import isBetween from 'dayjs/plugin/isBetween';
import weekOfYear from 'dayjs/plugin/weekOfYear';
import AdvancedFormat from 'dayjs/plugin/advancedFormat';
import weekYear from 'dayjs/plugin... |
import React, { Component } from 'react';
import debounce from 'lodash/debounce';
import throttle from 'lodash/throttle';
import CodeMirror from 'codemirror';
import 'codemirror/addon/display/placeholder';
import 'codemirror/addon/scroll/scrollpastend';
import 'codemirror/addon/scroll/simplescrollbars';
import 'codem... |
<reponame>DanPopa46/neo-one<gh_stars>0
import { common, crypto, UInt160 } from '@neo-one/client-common';
import {
assertArrayStackItem,
assertStructStackItem,
BlockchainSettings,
NameService as NameServiceNode,
NativeContractStorageContext,
RecordType,
StackItem,
utils,
} from '@neo-one/node-core';
impo... |
/*
* Copyright (c) 2020 <NAME>, All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and ... |
<filename>apps/heft/src/utilities/fileSystem/TypeScriptCachedFileSystem.ts
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
import * as fs from 'fs';
import {
Encoding,
Text,
IFileSystemWriteFileOptions... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.