text stringlengths 3.08k 15.5k |
|---|
<gh_stars>1-10
import { Logger, field } from "@coder/logger"
import * as express from "express"
import * as fs from "fs"
import * as path from "path"
import * as semver from "semver"
import * as pluginapi from "../../typings/pluginapi"
import { version } from "./constants"
import * as util from "./util"
const fsp = fs.... |
<filename>widgets/mindmap/src/layout/mindmap.ts
import { ILayout } from '../layout';
import { IConnector, ITopicViewNode } from '../topic';
import { IDimension, Justify } from '../common';
import { Vector } from '@fin/geometry';
export function getHorizionalSpacingOfChildren(tier: number) {
if (tier === 0) {
ret... |
<filename>UEVI/src/webparts/listItemCrudPnP/ListItemCrudPnPWebPart.ts
//gavdcodebegin 22
import { Version } from '@microsoft/sp-core-library';
import {
BaseClientSideWebPart,
IPropertyPaneConfiguration,
PropertyPaneTextField
} from '@microsoft/sp-webpart-base';
import { escape } from '@microsoft/sp-lodash-... |
<reponame>mattplant/suite-deploy
import { plainToInstance } from 'class-transformer';
import * as fs from 'fs';
import * as path from 'path';
import { parseString } from 'xml2js';
import { window } from 'vscode';
import { Nsi } from '../Nsi';
export class NsiObjectIndex {
constructor(
readonly type: string,
rea... |
import React, { useState } from "react";
import { v4 as uuidv4 } from "uuid";
import {
Formik,
Field,
FieldProps,
useFormikContext,
FormikProps,
} from "formik";
import Accordion from "react-bootstrap/Accordion";
import Alert from "react-bootstrap/Alert";
import Button from "react-bootstrap/Button";... |
#!/usr/bin/env node
import * as program from 'commander';
import { CLI } from './cli';
import { resolve } from 'path';
import * as updateNotifier from 'update-notifier';
import { l } from './utils/logs';
const pkg = require('../package.json');
function collect(val, memo) {
memo.push(val);
return memo;
}
cons... |
import * as React from "react"
import { ChangeEvent, useReducer, useState } from "react"
import * as CT from "countries-and-timezones"
import moment from "moment-timezone"
enum Tokens {
TIMES = "{{TIMES}}",
STREAM_LINK = "{{STREAM_LINK}}",
}
enum TimezonesActionType {
Add = "TimezonesActionTypeAdd",
Remove = ... |
import { Component, OnInit, Inject, Input, Output, EventEmitter, ViewChild } from '@angular/core';
import { MatPaginator, MatTableDataSource, MatDialog } from '@angular/material';
import { HttpClient } from '@angular/common/http'
import { NotificationService } from 'app/services/notification-service';
import { FormBuil... |
import UI_ROOT from "../UIRoot";
import { assert, getId, hexToRgb, normalizeDomId, num, px } from "../utils";
import ImageManager, { loadImage } from "./ImageManager";
export function genCssVar(bitmapId: string): string {
return `--bitmap-${bitmapId.replace(/[^a-zA-Z0-9]/g, "-")}`;
}
// http://wiki.winamp.com/wiki/... |
/*
* Copyright 2017,2019 IBM Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
// Copyright 2017-2021 @polkadot/app-files authors & contributors
// SPDX-License-Identifier: Apache-2.0
import FileSaver from 'file-saver';
import React, { useCallback, useContext, useRef, useState } from 'react';
import styled from 'styled-components';
import { useFiles } from '@polkadot/app-files/hooks';
import Up... |
<gh_stars>1-10
import { getAlpha2Code } from '@cospired/i18n-iso-languages';
import { Language } from '../language';
import {
findTemplates,
parseWiktionaryPage,
isHeading,
} from '../wiktionary/wiktionary-page-parser';
import { WiktionaryEdition } from '../wiktionary/wiktionary-edition';
import { PronunciationSo... |
<reponame>Koatty/koatty_router
/*
* @Description:
* @Usage:
* @Author: richen
* @Date: 2021-11-10 16:58:57
* @LastEditTime: 2021-12-23 00:43:51
*/
import * as Helper from "koatty_lib";
import { getParamter } from "./params";
import { Koatty, KoattyContext } from "koatty_core";
import { DefaultLogger as Logger }... |
/* eslint-disable */
import {
ASN1ConstructionError as _ConstructionError,
ASN1Element as _Element,
ASN1TagClass as _TagClass,
INTEGER,
} from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
import {
GeneralName,
_decode_GeneralName,
_encode_GeneralName,
} from "x50... |
<reponame>PabloG6/angular-mdc-web<gh_stars>100-1000
import {Component, OnInit, ViewChild} from '@angular/core';
import {ComponentViewer, ComponentApi} from '../../shared/component-viewer';
@Component({template: '<component-viewer></component-viewer>'})
export class ImageList implements OnInit {
@ViewChild(Component... |
import {Log4TSProviderImpl} from "./Log4TSProviderImpl";
import {Log4TSProvider} from "../api/Log4TSProvider";
import {$internal, DefaultChannels, formatArgument, formatDate, LogLevel, util} from "typescript-logging";
import {Log4TSGroupConfig, Log4TSGroupConfigOptional} from "../api/Log4TSGroupConfig";
import {Log4TSC... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*----------------------------------------------------------------------... |
import { createContext } from 'react'
import Loki from 'lokijs'
import isPlainObject from 'is-plain-object'
import { contextRegistry as defaultContextRegistry, ContextRegistry } from './contextRegistry'
import { TSerializeReplacerKey, TLoadJSONOptions, TDBCollection, TDB, TDBOptions, TDBContext, TDBCollectionOptions } ... |
<reponame>zykure/acid-banger
/*
Copyright 2021 <NAME>
This work is licensed under a Creative Commons Attribution 4.0 International License
https://creativecommons.org/licenses/by/4.0/
*/
import {FullNote, midiNoteToText} from "./audio.js";
import {choose, rndInt} from "./math.js";
import {
GeneralisedParamet... |
<filename>packages/es-dev-server/src/utils/inject-polyfills-loader.ts<gh_stars>0
import {
getAttribute,
getTextContent,
remove,
setTextContent,
} from '@open-wc/building-utils/dom5-fork';
import { findJsScripts } from '@open-wc/building-utils';
import { parse, serialize, Document as DocumentAst, Node as NodeAst... |
<reponame>emilio-cea/secret-agent
import { AddressInfo, ListenOptions, Socket } from 'net';
import * as WebSocket from 'ws';
import Log from '@secret-agent/commons/Logger';
import * as http from 'http';
import { IncomingMessage, ServerResponse } from 'http';
import { createPromise } from '@secret-agent/commons/utils';
... |
import React, { useCallback, useEffect, useRef, useState } from "react";
import { ReactSketchCanvas } from "react-sketch-canvas";
import { Subject } from "rxjs";
import { debounceTime } from "rxjs/operators";
import cx from "classnames";
import styles from "./styles.module.scss";
import * as tf from "@tensorflow/tfjs"... |
<gh_stars>100-1000
import {
EnhancedRxState,
NGT_OBJECT_INPUTS_CONTROLLER_PROVIDER,
NGT_OBJECT_INPUTS_WATCHED_CONTROLLER,
NgtLoopService,
NgtObject3dInputsController,
NgtObject3dInputsControllerModule,
NgtStore,
} from '@angular-three/core';
import { NgtGroupModule } from '@angular-three/core/group';
impo... |
<gh_stars>1-10
import NanachiWebpackPlugin from '../nanachi-loader/plugin';
import SizePlugin from '../nanachi-loader/sizePlugin';
import QuickPlugin from '../nanachi-loader/quickPlugin';
import ChaikaPlugin from '../nanachi-loader/chaika-plugin/chaikaPlugin';
import CopyWebpackPlugin, {} from 'copy-webpack-plugin';
i... |
<filename>node_modules/keen-slider/react-native.d.ts
import { MutableRefObject } from 'react'
import { GestureResponderEvent } from 'react-native'
import { LayoutChangeEvent } from 'react-native'
import { NativeMethods } from 'react-native'
export declare interface AnimatorInstance {
active: boolean
start: (
k... |
<reponame>flwal-alanda/alanda
import { Component, OnInit, Input } from '@angular/core';
import { AlandaProject } from '../../api/models/project';
import { AlandaGroup } from '../../api/models/group';
import { AlandaRole } from '../../api/models/role';
import { FormGroup, FormControl, AbstractControl } from '@angular/fo... |
import * as cdk from '@aws-cdk/core';
import * as cognito from '@aws-cdk/aws-cognito';
import * as iam from '@aws-cdk/aws-iam';
import { AccountRecovery, Mfa, OAuthScope, UserPoolClientIdentityProvider, UserPoolIdentityProvider } from '@aws-cdk/aws-cognito';
import { Duration, Stack } from '@aws-cdk/core';
import { Man... |
<filename>packages/yforms/src/YForm/utils.ts
import { isValidElement, useRef } from 'react';
import { isImmutable } from 'immutable';
import {
get,
map,
join,
set,
mapKeys,
forEach,
sortBy,
isArray,
find,
isEqual,
mergeWith,
} from 'lodash';
import { ColProps } from 'antd/lib/col';
import warning... |
import React, { ReactElement } from 'react'
import { View, StyleSheet, TouchableOpacity } from 'react-native'
import _ from 'lodash'
import {
NavigationProp,
StackActions,
useNavigation,
} from '@react-navigation/native'
import BigNumber from 'bignumber.js'
import { AccAddress } from '@terra-money/terra.js'
impo... |
import { History } from 'history'
import * as React from 'react'
import { Route, NaviError, Status, Segment, Router, isSegmentSteady } from 'navi'
import { NavContext } from './NavContext'
import { NavLoadingContext, NavLoading } from './NavLoading'
export interface NavSegmentProps {
/**
* A render function that... |
import {defaultMemoize} from "reselect"
import {
addDays,
addHours,
addMinutes,
addMonths,
addQuarters,
addWeeks,
addYears,
getYear,
set,
startOfDay,
startOfMonth,
startOfQuarter,
startOfWeek,
startOfYear
} from "date-fns"
import {shallowEqual} from "react-redux"
... |
import {
Auto,
IPlugin,
execPromise,
getLernaPackages,
inFolder,
validatePluginConfiguration,
} from "@auto-it/core";
import botList from "@auto-it/bot-list";
import fs from "fs";
import path from "path";
import match from "anymatch";
import on from "await-to-js";
import { execSync } from "child_process";
i... |
<filename>src/gas-prices.test.ts<gh_stars>0
import { BigNumber, ethers } from 'ethers';
import { PriorityFee } from '@api3/airnode-node';
import * as state from './state';
import * as gasPrices from './gas-prices';
import { BASE_FEE_MULTIPLIER, PRIORITY_FEE_IN_WEI } from './constants';
const setupMocks = () => {
jes... |
<gh_stars>1-10
import { ActionTree, GetterTree, Module, MutationTree } from 'vuex'
import { ArticleState, Coding, QuickTypingState, SettingState, Word } from './types'
import { Edge, Graph, ShortestPath } from './util/Graph'
import { TrieNode } from './util/TrieTree'
const alphaPattern = /[a-zA-Z0-9]/
/**
* 处理标点顶屏
... |
<reponame>data-gymnasia/courses
// =============================================================================
// Coordinate Plane Component
// (c) Mathigon
// =============================================================================
import {numberFormat} from '@mathigon/fermat';
import {Bounds, Point, Transfor... |
<gh_stars>0
import { Logger } from 'simple-logging-system';
import { genericError, HttpError, HttpResponse } from '../client/HttpResponse';
const logger = new Logger('HttpPromise');
/**
* A function that takes a parameter of type `P` and returns a result of type `R`
*/
export interface PromiseFunction<P, R> {
(pa... |
<gh_stars>0
/// <reference types="react" />
import { Toast } from "../Toast";
import { StyleManager, CustomCSSProperties, StyleClasses } from "./StyleManager";
import { getAcrylicTextureStyle, AcrylicConfig, isSupportBackdropFilter } from "./getAcrylicTextureStyle";
import { getThemeBaseCSS, getBaseCSS } from "./ge... |
import destination from '@turf/destination';
import bearing from '@turf/bearing';
import pointToLineDistance from '@turf/point-to-line-distance';
import { point } from '@turf/helpers';
import {
Position,
Point,
LineString,
FeatureOf,
FeatureWithProps,
Viewport,
} from '@nebula.gl/edit-modes';
import WebMerc... |
<filename>src/window/workspace/layers/layer_utilities.ts
import { indexOfObjectProperty } from '@pups/utility/build/Array'
import { IProjectSceneChild } from 'urpflanze/dist/services/types/exporters-importers'
import store from '@redux-store/root'
import { ctrlKeyPressed } from '@ui-services/utilities/utilies'
export ... |
// vbox hbox span image <hr /> <spacer />
interface ParseOption {
onclosetag(): void;
onopentag(name: string, attribs: {
[s: string]: string;
}): void;
ontext(data: string): void;
}
const enum State {
Text = 0,
BeforeTagName, // After <
InTagName,
InSelfClosingTag, // <br />
BeforeClosingTagName... |
<reponame>tigerabrodi/Yummly
import styled, { keyframes } from 'styled-components/macro'
import { ReactComponent as RecipeBookSVG } from 'assets/recipe.svg'
import { ReactComponent as Search } from 'assets/search.svg'
import { Link } from 'react-router-dom'
import { media } from 'theme/media'
import { focusStyles, wrap... |
import {
Flex,
Join,
Text,
Spacer,
Input,
TextVariant,
useThemeConfig,
TextTransform,
} from "@artsy/palette"
import { CountrySelect } from "v2/Components/CountrySelect"
import * as React from "react"
import { TwoColumnSplit } from "../Apps/Order/Components/TwoColumnLayout"
export interface Address {
... |
<reponame>Aarrtteemm123/study-system-client
import {Component, OnInit} from '@angular/core';
import {Router} from '@angular/router';
import {Student} from '../models/student';
import {User} from '../models/user';
import {FormControl, Validators} from '@angular/forms';
import {Teacher} from '../models/teacher';
import {... |
import { isArray, isFunction, hasOwn, warn } from "@crush/common"
import { ReactiveFlags, ReactiveTypes, ReactiveTypeSymbol, toRaw } from "./common"
import { reactive, readonly } from "./reactive"
import { track, trigger, } from './effect'
// global state
let _isReadonly = false
let _isShallow = false
let _target: an... |
<filename>src/utils/helpers.ts
import { Coordinate } from './coordinate';
/**
* Moves a given array of `Coordinate`s by a specified distance in the
* x and y axes.
* @param c A `Coordinate` or `Coordinate`s to move.
* @param dx A `Coordinate` to use for the translate values, or a number to move
* in the x-axis;
... |
import firebase from "firebase/app";
import "firebase/auth";
import "firebase/database";
import { PieceColor } from "./piece";
export function setup() {
const firebaseConfig = {
apiKey: "AIzaSyA6CcPjAnaBbLYSioafyNsVePSiNNkOZ_I",
authDomain: "ajedrez-dc7d2.firebaseapp.com",
databaseURL: "https://ajedrez-dc7d2-def... |
<filename>src/network/p2p.ts
import * as WebSocket from 'ws';
import { Server } from 'ws';
import Block, * as Blockchain from '../blockchain/';
// active sockets for each nodes (peers)
const sockets: WebSocket[] = []
/**
* MessageType (Communicating with other nodes)
*
* 0: When a node connects to a new... |
<filename>src/index.ts
import {Command, flags} from '@oclif/command'
import {createHash, Hash} from 'crypto'
import {readdirSync, writeFileSync} from 'fs';
import {Choice} from 'prompts';
import {FFMpegService, FFMpegServiceResponse} from './ffmpeg/FFMpegService';
import * as chalk from "chalk";
import {homedir} from '... |
import path from 'path';
import httpContext from 'express-http-context';
import createError, { HttpError } from 'http-errors';
import express from 'express';
import { Request as ExpressRequest, Response as ExpressResponse } from 'express';
import methodOverride from 'method-override';
import compress from 'compression'... |
import { EntidadesService } from './../../services/entidades.service';
import { BehaviorSubject, Observable, merge, AsyncSubject, Subject } from 'rxjs';
import { first, takeUntil } from 'rxjs/operators';
import { Injectable } from '@angular/core';
import { DescriptorNodo } from '../../model/descriptor-nodo';
import { E... |
import { _ } from "marionext-lodash";
import { buildRegion } from "./View-buildRegion.function";
import { Region } from "../Region";
import { _invoke } from "../Utils/Utils-functions";
/**
* ViewRegionMixin
* ----------------
*/
// MixinOptions
// - regions
// - regionClass
type regionObject = {
[key: strin... |
import React, { FunctionComponent, useMemo, useRef, useState } from "react";
import {
ScrollView,
StyleSheet,
Text,
TextStyle,
View,
ViewStyle,
} from "react-native";
import { useStyle } from "../../styles";
import { registerModal } from "../../modals/base";
import { RectButton } from "../rect-button";
exp... |
import { cloneObject, EventEmitter, logger } from '@plantarium/helpers';
import * as storage from '$lib/storage';
import { browser } from "$app/env"
import createId from 'shortid';
import type { Writable } from 'svelte/store';
import type { PlantariumSettings } from "$lib/types"
import { writable } from 'svelte/s... |
import { is } from '../src/is'
const symbol = Symbol()
const object = { a: 1 }
const emptyObject = {}
const nullPrototype = Object.create(null)
const array = [1]
const emptyArray: any[] = []
const map = new Map()
const set = new Set()
const weakMap = new WeakMap()
const weakSet = new WeakSet()
const anonFn = function(... |
<reponame>ausseabed/product-catalogue<filename>client/src/store/reports/actions.ts
import { ActionTree } from 'vuex'
import { StoreInterface } from '../index'
import { ReportsStateInterface } from './state'
import { ObservableSurveysApi, ObservableProductsL3DistApi, ObservableProductsL3SrcApi } from '@ausseabed/product... |
import { makeStyles } from '@material-ui/styles'
import ValidatedForm from 'core/components/validatedForm/ValidatedForm'
import Theme from 'core/themes/model'
import { masterNodeLengthValidator, masterNodesLengthErrorMsg } from 'core/utils/fieldValidators'
import { allPass, sort } from 'ramda'
import React, { useState,... |
<filename>src/schema-builder.ts<gh_stars>1-10
import {
Constructable,
FieldMetadata,
RecordMetadata,
TypeMetadata,
} from './types'
import {
AvroOrder,
BasicAvroType,
Schema,
RecordSchemaType,
EnumSchemaType,
ArraySchemaType,
MapSchemaType,
FixedSchemaType,
UnionSchemaType,
} from './avro.type... |
<reponame>lmtedds/BC-Basic-Income-Data-Visualization<filename>src/charts/applicationSunburst.ts
import { data as applicationData } from "~data/20201117_application";
import { scaleOrdinal } from "d3-scale";
import { buildZoomableSunburstChart, ISunburstChart } from "~charts/d3/sunburst";
const workingAgeData = appli... |
import React, { Component } from 'react';
import { AxiosError } from 'axios';
import {
Bullseye,
Button,
Toolbar,
ToolbarGroup,
ToolbarItem,
TextInput,
Dropdown,
DropdownPosition,
DropdownToggle,
DropdownItem,
Text,
TextVariants
} from '@patternfly/react-core';
import { Table, TableHeader, Table... |
/**
* @license
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors ma... |
<reponame>mojaloop/poc-architecture
/*****
License
--------------
Copyright © 2017 Bill & Melinda Gates Foundation
The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License.... |
import InputController from "../../core/InputController";
import Hoplite from "./Hoplite";
import Cloth from "../../core/physics/shapes/Cloth";
import Animation from "../../core/Animation";
import { altAttack, specialAttack } from "./hopliteAnimationConfigs";
import { Game } from "../../main";
import { CollisionRect } ... |
/*********************************************************************************************************************
* Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. *
* ... |
import { Address, IDAOState, IProposalStage, Proposal, Vote, Scheme, Stake } from "@daostack/client";
import { getArc, getArcSettings } from "arc";
import Loading from "components/Shared/Loading";
import withSubscription, { ISubscriptionProps } from "components/Shared/withSubscription";
import gql from "graphql-tag";
i... |
<filename>src/app/components/scenario-templates/scenario-template-list/scenario-template-list.component.ts<gh_stars>0
// Copyright 2021 <NAME>. All Rights Reserved.
// Released under a MIT (SEI)-style license. See LICENSE.md in the project root for license information.
import {
Component,
EventEmitter,
Input,
... |
import { readdir, readFile, writeFile, ensureDir, emptyDir, stat } from 'fs-extra'
import { minify } from 'html-minifier'
import { resolve, parse } from 'path'
import { join } from 'path/posix'
import { build } from 'vite'
import { promisify } from 'util'
import { gzip as _gzip, constants as ZLIB } from 'zlib'
import {... |
<filename>src/theme/material/icon.m.css.d.ts
export const slide: string;
export const img: string;
export const root: string;
export const icon: string;
export const colored: string;
export const more: string;
export const bounce: string;
export const redaktorLogo: string;
export const redaktor: string;
export const pe... |
import React, { useState, useMemo, useRef } from 'react';
import {View, StyleProp, ViewStyle, StyleSheet, StatusBar} from 'react-native';
import Animated, {Extrapolate} from 'react-native-reanimated';
import {useSafeArea} from 'react-native-safe-area-context';
import Modal, {LastModalRef} from './Modal';
import {viewp... |
<filename>packages/common/src/utils/CommentUtils.ts<gh_stars>1-10
import { IComment, IReply } from "./Apis";
interface ICommentStore {
[key: string]: IComment;
}
interface IReplyStore {
[key: string]: { [key: string]: IReply };
}
interface IReplyNextStore {
[key: string]: null | undefined | number;
}
/**
* @... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import './dashboard-header.scss';
import autoBind from 'autobind-decorator';
import cx from 'classnames';
import { History } from 'history';
import { resolve } from 'inversify-react';
import { observer } from 'mobx-react';
import React, { Comp... |
/** @jsx jsx */
import { jsx } from "@emotion/core";
import * as React from "react";
import algoliasearch from "algoliasearch";
import algolia from "./Search";
import debug from "debug";
import { Link, useRoute, useLocation } from "wouter";
import { useSession } from "./auth";
import * as firebase from "firebase/app";
... |
import { AbstractCommand } from './AbstractCommand';
import { RequestContext } from './RequestContext';
import { ApplicantFinder } from '../../data-source/finder/ApplicantFinder';
import { IApplicantModel } from '../model/IApplicantModel';
import { allMatchers } from '../../matching-algo/matcher-client/AllMatchers';
im... |
<gh_stars>0
'use strict';
import * as vandium from 'vandium';
import * as Slack from 'slack-node';
interface ICommand {
token?: string;
team_id?: string;
team_domain?: string;
channel_id?: string;
channel_name?: string;
user_id?: string;
user_name?: string;
command?: string; // /something
text?: str... |
import type { FixedLengthArray } from 'type-fest';
/*
* char8 | 0x8 | signature | "ubi/b0-l"
* uint32 | 0x1 | internal type | 0x3
* uint32 | 0x1 | title length | [aa]
* char16 | [aa] | title |
* Timestamp | 0x1 ... |
import "leaflet.markercluster"
import "leaflet.markercluster/dist/MarkerCluster.css"
import "leaflet-geometryutil"
const uuidv4 = require('uuid/v4')
import { GeojsonLayer } from "./geojsonLayer"
import {
GradientLayer,
WavePeriodGradientLayer,
WaveHeightGradientLayer
} from "./gradient/gradientLayer"
... |
import * as Sentry from "@sentry/react";
import axios from "axios";
import { ipcRenderer as ipc } from "electron";
import { Agent } from "https";
import { platform } from "os";
import React, { useEffect, useState } from "react";
import discord from "./images/discord.svg";
import github from "./images/github.svg";
imp... |
<filename>src/inMemory/inMemorySearch.ts
import { logger } from '../logger';
import { asAlphaNumeric, getAllWordsAsAlphaNumericUpperCase } from '../offlineSync/Utils/util';
import { Filter, filterOnProps } from './searchFilter';
/**
* Search the collection and return results sorted on best match.
* @param collection... |
import * as React from 'react';
import { Announced } from '../Announced';
import {
DetailsList,
DetailsListLayoutMode,
Selection,
IColumn,
IDetailsList,
IDetailsRowProps,
DetailsRow
} from 'office-ui-fabric-react/lib/DetailsList';
import { MarqueeSelection } from 'office-ui-fabric-react/lib/Mar... |
import moment from 'moment'
import React from 'react'
import { FlatList, Image, StyleSheet, Text, TouchableHighlight, View } from 'react-native'
import { useNavigation } from '@react-navigation/native'
import I18n from '../../../../i18n/i18n'
import MainCard from '../../../components/MainCard'
import ReloadButton from ... |
<filename>testing/index/test_multi_row_numerical_key.ts
/**
* Copyright 2018 The Lovefield Project Authors. All Rights Reserved.
*
* 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
*
* ... |
<filename>src/v2/view-builder/internals/FormInputFactory.ts
import { Collection, _, loc, createButton, InputOptions } from 'okta';
import AuthenticatorEnrollOptions from '../components/AuthenticatorEnrollOptions';
import AuthenticatorVerifyOptions from '../components/AuthenticatorVerifyOptions';
import { getAuthentica... |
<reponame>rurush47/ca-pathfinding
import * as THREE from 'three';
import Stats from 'three/examples/jsm/libs/stats.module.js'
import { GUI } from 'three/examples/jsm/libs/dat.gui.module.js';
import { Scene, Renderer, PerspectiveCamera, WebGLRenderer, PlaneGeometry, MeshBasicMaterial, Vector3, Vector2 } from 'three';
im... |
import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { Redirect } from 'react-router-dom';
import { useForm } from "react-hook-form";
import { yupResolver } from '@hookform/resolvers/yup';
import * as yup from "yup";
import { login } from '../redux/action/auth';
import { RootState }... |
<gh_stars>0
import { assert } from 'chai'
import { SHA256 } from 'crypto-js'
import { web3, getTestConfig, getAddresses } from '../config'
import {
Config,
ProviderInstance,
Aquarius,
NftFactory,
NftCreateData,
Datatoken,
getHash,
Nft,
downloadFile
} from '../../src'
import { ProviderFees, Erc20Create... |
<reponame>kontrollanten/node-uploadx<filename>packages/core/src/handlers/base-handler.ts
import { EventEmitter } from 'events';
import * as http from 'http';
import { BaseStorage, File, UploadEventType } from '../storages';
import * as url from 'url';
import { ERRORS, getBaseUrl, Logger, pick, setHeaders, typeis, Uploa... |
import { Dialogs, EventData, knownFolders, Label, Observable, ObservableArray } from "@nativescript/core";
import { TugResult } from "~/core/tug-test/result";
import { resultsStore } from "~/core/store/results-store";
import { toLegibleDate, toLegibleDuration } from "~/view/utils";
import { getNodeDiscoverer, Node, Nod... |
<filename>src/main/mode.ts
// Copyright 2013-2014 <NAME>
//
// 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 requ... |
import { Button, Box, Flex, H1, HR, Input, Panel, Select, Form as StyledForm, Textarea, Text, FlexItem } from "@bigcommerce/big-design";
import { useRouter } from "next/router";
import { ArrowBackIcon, ArrowUpwardIcon } from "@bigcommerce/big-design-icons";
import { ChangeEvent, FormEvent, useState } from "react";
impo... |
// WebSocketRT: Real-time websocket library
// Copyright (c) <NAME> <<EMAIL>>
// See LICENSE in the project root for license information.
import { FramedSocketError, IFramedSocket } from './IFramedSocket';
import { AsyncAutoResetEvent, AsyncEventWaitHandle, AsyncManualResetEvent, BinaryConverter, Queue,
Stopwatch, T... |
import type {byte} from "./base_types";
import {ValueType, i32Type, i64Type, f32Type, f64Type} from "./wtypes";
export function encodeF32(n: number): byte[] {
const buffer = new ArrayBuffer(4);
new DataView(buffer).setFloat32(0, n, true);
return [...new Uint8Array(buffer)] as byte[];
}
export function enc... |
// ===============================================
// Inspiration from express-oidc-jwks-verify
// I couldn't use the express implementation within a WebSocket and I've decided to do a more generic implementation
// using the promises.
// ===============================================
import { disconnect } from "... |
import { ICommandDefinition } from "../command-parser";
import { Player } from "../room-activity";
import { Game } from "../room-game";
import { Room } from "../rooms";
import { IGameFile } from "../types/games";
import { User } from "../users";
const GRID_SIZE = 4;
const name = "Trevenant's Trick-or-Treat";
const da... |
<gh_stars>0
import * as cdk from '@aws-cdk/core';
import * as ec2 from '@aws-cdk/aws-ec2';
import * as ecs from '@aws-cdk/aws-ecs';
import * as iam from '@aws-cdk/aws-iam';
import * as logs from '@aws-cdk/aws-logs';
export interface AmundsenStackProps extends cdk.StackProps {
/*
* A cidr to add to the security gr... |
<filename>src/lib/Board.ts<gh_stars>0
export enum Orientation {
Horizontal,
Vertical
}
export enum BlockType {
Main = 'main',
Block = 'block'
}
export enum Direction {
North = 'north',
East = 'east',
South = 'south',
West = 'west'
}
export interface Block {
id: number;
x: numb... |
import { debounce } from 'rxjs/operators';
import * as Rx from 'rxjs';
import { FullDocNode, Link, defaultLangKey } from './standard-map';
import { TreeModel, TreeNode, ITreeState, TREE_ACTIONS } from 'angular-tree-component';
import { GraphService } from './graph.service';
import { ViewSettings } from './ViewSett... |
/* -------------------------------------------------------------------------- */
/* Product Name: ForumEngine */
/* Author: Mediasoftpro (<NAME>) */
/* Email: <EMAIL> */
/* License: Re... |
import {
DataCursor,
smolvReadLengthOp,
smolvWrite4,
smolvRead4,
smolvOpHasType,
smolvReadVarint,
smolvOpHasResult,
smolvZigDecode,
smolvOpDeltaFromResult,
smolvRead1,
smolvOpVarRest,
smolvDecorationExtraOps,
smolvCheckSmolvHeader
} from './common';
import {
SpvO... |
import React, { useState, useCallback, useEffect, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { CircularProgress } from '@material-ui/core';
import { isToday, isAfter, format, parseISO } from 'date-fns';
import { ptBR, enUS } from 'date-fns/locale';
import DayPicker, { DayModifiers }... |
import React, { FC, useState } from 'react';
import { useToggle } from 'react-use';
import { AnimatePresence, motion } from 'framer-motion';
import { useForm, FormProvider } from 'react-hook-form';
import * as yup from 'yup';
import { yupResolver } from '@hookform/resolvers/yup';
import {
ProposalCard,
ProposalCar... |
<gh_stars>1-10
import assert from "assert";
import _ from "lodash";
import { makeAutoObservable } from "mobx";
import { Beat } from "./beat";
import { BPM } from "./bpm";
import { Time } from "./time";
import { toBeat, toTime } from "./util";
/**
* Represents a BPM change at a point in time.
*/
export interface BPM... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.