text stringlengths 3.08k 15.5k |
|---|
<filename>dispatcher-service/src/workers/environment-manager.ts<gh_stars>0
import { WorkerApi } from './worker.api';
import { Container, ContainerConfiguration, Inject, Scope } from 'typescript-ioc';
import { LoggerApi } from '../logger';
import { forkJoin, Observable } from 'rxjs';
import { WorkerManager } from './wor... |
import React, { useMemo, useState } from 'react';
import { Link } from 'react-router-dom';
import useSWR from 'swr';
import { motion } from 'framer-motion';
import type { ICompetitionListResponse, IGenreResponse } from '../features/competitions/competition';
// import FeaturedCompetitions from '../features/competitions... |
<reponame>abey-george/amazon-chime-sdk-component-library-react<gh_stars>0
// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import styled from 'styled-components';
import { ControlBarProps, ControlBarLayout } from '.';
import { PopOverItemProps } from '.... |
import { Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from "@angular/core";
import { FormControl } from "@angular/forms";
import { Router } from "@angular/router";
import { DateUtils } from "@batch-flask/utils";
import { Job, Task } from "app/models";
import { Theme, ThemeService } from "app/services... |
<gh_stars>0
/**
* Created by nour on 7/8/17.
*/
import { Component, OnInit} from '@angular/core';
import {NotificationService, NotificationType, NotificationOptions} from '../lbd/services/notification.service';
import { DialogRef, ModalComponent, CloseGuard } from 'angular2-modal';
import {BanqueService} from "./banq... |
<reponame>pjhenning/box2d-wasm<filename>integration-test/src/world.ts
import type { Helpers } from './helpers';
export interface World {
step(deltaMs: number): void;
draw(): void;
destroy(): void;
}
export class WorldFactory {
constructor(
private readonly box2D: typeof Box2D & EmscriptenModule,
priva... |
import React, {ReactNode, ReactText, Component} from 'react';
import {
Animated,
Modal,
Platform,
StyleSheet,
TouchableWithoutFeedback,
View,
LayoutChangeEvent,
} from 'react-native';
import {STATES, DIMENSIONS, ANIMATION_DURATION, EASING, SCREEN_INDENT} from './constants/Popover.constants';
import styles from... |
import path from 'path'
import http from 'http'
import upng from 'upng-js'
import { checkScreenshot, TScreenshotsResultData, TScreenshotsFileResultData, TRunScreesnotsResult, TScreenshotsResult, TScreenshotsFileResult } from '@x-ray/screenshot-utils'
import { TarFs, TTarFs, TTarDataWithMeta } from '@x-ray/tar-fs'
impor... |
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import {
hover,
reset,
select,
CellState,
calendarRows,
highlightRange,
calendarColumns,
markersToMatrix,
AvailCalendarState,
dateToMatrixPosition,
cr... |
<gh_stars>0
/*
* Copyright 2017 BTC Business Technology AG
*
* 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 { getData, setData } from "./data";
import { getSettings, saveSettings, Settings } from "./settings";
import { $, $find, exponentialWait } from "./utils";
const DISCLAIMER_TEXT = `Disclaimer:
- "Watch and Learn" is not affiliated with UWaterloo, Learn, or its developers.
- Use "Watch and Learn" at your own resp... |
import { FsReaddir, FsExists, FsReadFile } from '../../file_op';
import { LineReader } from '../../large_file';
import { getHashDir, getTrigramDir } from './search_indexer';
const iPath = require('path');
const IGNORE = ['list.json', 'ri'];
function shuffle(list: any[]) {
if (!list || !list.length) return;
con... |
<filename>src/shared/metadata-zip.ts<gh_stars>1-10
import JSZip from 'jszip'
//we go explicitely to the common module to avoid exporting server side tokens in the
//client side code
import { common } from '../server/config/env/common.js'
export function metadataZip(describeMetadata, storyMetadatas, subMetadatas) {
... |
/*Copyright (C) 2016 <NAME>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH R... |
<filename>src/reflect.ts
import { isStage2FieldDecorator, isStage2MethodDecorator, MethodDecoratorResult, FieldDecoratorResult, ClassDecoratorResult, FieldDecoratorDescriptor, MethodDecoratorDesciptor } from "./stage2/stage2decorators";
/**
* Copyright (c) 2018 <NAME>
*
* Permission to use, copy, modify, and distri... |
import { exec, ExecOptions } from 'child_process'
import { Wallet } from 'ethers'
import fs from 'fs'
import http from 'http'
import { Socket } from 'net'
import { URL } from 'url'
import path from 'path'
import { Sequelize } from 'sequelize'
import stripAnsi from 'strip-ansi'
import {
createIndexerManagementClient,
... |
/*
* @Author: <NAME>
* @Date: 2022-04-28 15:46:06
* @LastEditTime: 2022-05-07 15:04:59
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /tinkerbell-ui-react/src/packages/Cascader/Menu.tsx
*/
// eslint... |
<filename>src/index.ts
import visit from 'unist-util-visit'
import { Data, Literal, Node } from 'unist'
// prettier-ignore
/* eslint-disable no-multi-spaces */
const cjkChars = [
'\\p{scx=Hani}',
'\\p{scx=Bopomofo}',
'\\p{scx=Yi}',
'\\p{scx=Hiragana}',
'\\p{scx=Katakana}',
'\\p{Radical}',
// Code points... |
<filename>serverless/src/types/event.ts
import Ajv, { JTDSchemaType } from "ajv/dist/jtd"
const ajv = new Ajv()
export enum ModuleType {
RPI = "rpi",
DHT22 = "dht22",
DS18B20 = "ds18b20",
BME680 = "bme680",
Relay = "relay"
}
export enum MetricType {
Temperature = "temperature",
Humidity = "humidity",
... |
// eslint-disable-next-line import/no-extraneous-dependencies
import { PROVIDER_SCOPES, TEST1_PROVIDER_ID } from '@mds-core/mds-test-data'
import { Device, TripMetadata, UUID, VehicleEvent } from '@mds-core/mds-types'
import { now, uuid } from '@mds-core/mds-utils'
import { StatusCodes } from 'http-status-codes'
import... |
<reponame>gelaechter/PoolPi-Angular
// Dosage pump dosing speed
const litres_per_hour: number = 0.96;
// Class modeling a time passed since 00:00
export class Time {
//This should be in minutes since 00:00
private time: number = 0;
// new Time based on either minutes, text or a Date
constructor(time: ... |
<filename>client/src/models.ts
import { observable, action, computed, runInAction } from "mobx";
import { sleep, pad, Frame, msFromFrame } from "picam-common";
import { field } from "bidi-mobx";
import { baseUrl } from "./config";
function getDayPath(day: Date) {
return `${day.getFullYear()}/${day.getMonth() + 1}/... |
import {execUtils, Manifest, structUtils, IdentHash, Descriptor} from '@yarnpkg/core';
import {PortablePath, npath, ppath, Filename} from '@yarnpkg/fslib';
import * as stageUtils from '../stageUtils';
const MESSAGE_MARKER = `Commit generated via \`yarn stag... |
import { buildSchema, print } from 'graphql'
import gql from 'graphql-tag'
import { executeExchange } from '@urql/exchange-execute'
import { Client, ClientOptions } from '@urql/core'
import {
equal,
Eventual,
Logger,
mutable,
NetworkContracts,
WritableEventual,
} from '@graphprotocol/common-ts'
import { Net... |
<reponame>devalexdom/victron-vedirect-pnp<gh_stars>0
declare const Buffer; //To silence TypeScript bug? in Buffer.from(-->[0x0d, 0x0a]<--) Maybe I gonna need some help here...
import { exec } from "child_process";
import { VEDirectParser } from "./ve-direct";
import SerialPort from "serialport";
import { VEDirectPnP_M... |
import { html, render } from "lit-html";
import { unsafeHTML } from "lit-html/directives/unsafe-html";
import SuperComponent from "@codewithkyle/supercomponent";
import env from "~brixi/controllers/env";
import { noop, parseDataset } from "~brixi/utils/general";
import soundscape from "~brixi/controllers/soundscape";
... |
import { createWriteStream } from 'fs';
import { ensureDir, pathExists, readFile, truncate, writeFile } from 'fs-extra';
import { IncomingHttpHeaders } from 'http';
import { dirname } from 'path';
import { tempDir } from './environment';
import { logger } from './logger';
import { nodeHttpFetch } from './network';
impo... |
<filename>packages/lib/test/test/refactor/mint.spec.ts
/* eslint-disable no-console */
import * as Chains from "@renproject/chains";
import {
LockAndMintParams,
LogLevel,
RenNetwork,
SimpleLogger,
} from "@renproject/interfaces";
import RenJS from "@renproject/ren";
import { extractError, SECONDS, sle... |
<reponame>lex111/percy-agent
import Axios from 'axios'
import * as crypto from 'crypto'
// @ts-ignore
import * as followRedirects from 'follow-redirects'
import * as fs from 'fs'
import * as os from 'os'
import * as path from 'path'
import * as puppeteer from 'puppeteer'
import { URL } from 'url'
import domainMatch fro... |
/**
* Copyright 2018 The AMP HTML 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... |
import * as React from "react";
import styles from "./ExperienceScreen.module.scss";
import headStyles from "../../generic/Name/Name.module.scss";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faCaretUp } from "@fortawesome/free-solid-svg-icons";
import { DeviceContext } from "../../../cont... |
import G6 from '@antv/g6';
import merge from 'lodash/merge';
import { constants } from 'gg-editor';
import { GGroup, Node, NodeModel, CustomNode } from 'gg-editor/lib/common/interfaces';
import { getNodeSide, getFoldButtonPath, getUnfoldButtonPath, textMetrics } from '../utils';
import { BizTableNodeModel } from '../..... |
<reponame>Iplaylf2/collection-query<gh_stars>1-10
import { PushStream } from "./type";
import { relayNext as _relay_next, RelayNextHandler } from "./push/relay-next";
import { Action, Selector, Predicate, Aggregate } from "../type";
import * as core from "./push/core";
import { relay } from "./push/relay";
import { red... |
import { flags } from '@oclif/command';
import { PluginsConfig, PLUGIN_INPUT_PARSER_REGEX } from '@twilio/flex-plugin-scripts';
import { findPortAvailablePort } from '@twilio/flex-plugin-scripts/dist/scripts/start';
import { FLAG_MULTI_PLUGINS } from '@twilio/flex-plugin-scripts/dist/scripts/pre-script-check';
import {... |
<reponame>renovate-bot/rushstack
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
import * as path from 'path';
import * as ts from 'typescript';
import colors = require('colors');
import { JsonFile } from '... |
<gh_stars>1-10
import { dirname, join, relative } from 'path';
import { Configuration } from './configuration';
export interface Endpoint {
name: string;
kind: 'EntitySet' | 'Singleton';
url: string;
}
export interface ImportInfo {
ns: string;
type: string;
}
export class PropertyInfo {
public constructo... |
<reponame>prettydev/shuttle-bus-passenger
import { StyleProp, TextStyle } from 'react-native';
import { AbortController } from 'abort-controller';
import { SFC } from 'react';
import { StackNavigationProp } from '@react-navigation/stack';
export interface RequestInitCustom extends RequestInit {
signal?: AbortContro... |
import { GithubRepo, Tool, Feature, features } from './Types';
import React from 'react';
import { useTable, useSortBy, useFlexLayout } from 'react-table';
import { DateTime } from 'luxon';
import { atom, useRecoilState } from 'recoil';
import { initialToolData } from './initialToolData';
const downArrow = (
<svg
... |
<reponame>fionnachan/wasabi
import styled, { css } from "styled-components";
export const Section = styled.div`
width: 100%;
`;
export const Header = styled.div`
text-align: center;
h3 {
margin-bottom: var(--space-xs);
}
`;
export const InfoTable = styled.div`
position: fixed;
max-height: 100vh;
wi... |
import { useEffect, useRef, useState } from 'react'
import Head from 'next/head'
import axios from 'axios'
import { toast } from 'react-toastify'
import PolygonLogo from '../assets/PolygonLogo'
import AccountManager from '../controller/accountManager'
import claimFaucet from '../controller/faucet'
import PolygonScan fr... |
<reponame>Lantern-chat/frontend<filename>src/lib/blurhash.ts<gh_stars>1-10
import { srgb2linear, linear2srgb, RGBColor } from "./color";
const { PI, sign, cos, abs, sqrt, round, min, max } = Math;
const BYTE_MASK: number = 0xFF;
function decode_dc(value: number): RGBColor {
return srgb2linear({
r: value ... |
<gh_stars>0
import * as dat from "dat.gui"
import * as THREE from "three"
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js"
import { bushes } from "./objects/bush"
import { floor } from "./objects/grass"
import { graves } from "./objects/grave"
import { house } from "./objects/house"
import {... |
<gh_stars>0
import { Util } from './event-util'
import { Hook } from './event-hook'
import { Core } from './event-core'
import { Store } from './event-store'
import { DomUtil } from '../../util/dom'
export namespace Special {
// Prevent triggered image.load events from bubbling to window.load
Hook.add('load', {
... |
<filename>lib/interface/ColourScale.ts
'use babel';
import { allowUnsafeEval, allowUnsafeNewFunction } from 'loophole';
import IEditor = AtomCore.IEditor;
import NodeColorGradient from 'node-color-gradient';
import * as GitData from '../data/GitData';
import * as ConfigManager from '../ConfigManager';
let editors: { ... |
import { Button, Checkbox, Col, Collapse, Input, List, message, Popconfirm, Row } from 'antd';
import * as localforage from 'localforage';
import * as React from 'react';
import { ItodoItem, ItodoList } from '../interfaces/index';
import { isInArray, removeItems } from '../utils/index';
const { Search } = Input;
const ... |
import React from 'react';
import { Helmet } from 'react-helmet-async';
import styled, { css } from 'styled-components';
import oc from 'open-color';
import { shadow } from '../../libs/styles';
import { MenuResponse } from '../../libs/api/menu';
interface ButtonProps {
submit?: boolean;
cancel?: boolean;
}
interf... |
<reponame>FrankSpierings/shift-refactor<gh_stars>10-100
import {default as codegen, FormattedCodeGen} from '@jsoverson/shift-codegen';
import * as tsdoc from '@microsoft/api-extractor-model/node_modules/@microsoft/tsdoc';
import vm from 'vm';
import api from '../../generated/shift-refactor.api.json';
const {testFuncti... |
// Require packages.
import * as util from 'util';
import * as mockconsole from 'mockconsole';
import * as wildemitter from 'wildemitter';
import { IApiBase, IApiRequest, ApiRequest } from '../ApiBase';
import { IAddressBook, AddressBook } from './addressbook';
import { IAgents, Agents } from './agents';
impo... |
<filename>src/contacts/show/details/details.component.ts
import * as uuid from 'uuid/v1';
import { assign, concat, defaultTo, eq, get, map, round, sumBy } from 'lodash/fp';
import { StateService } from '@uirouter/core';
import api, { ApiService } from '../../../common/api/api.service';
import contacts, { ContactsServic... |
import {
Configuration as WebpackConfiguration,
DefinePlugin,
Plugin as WebpackPlugin
} from "webpack";
import path from "path";
import HtmlWebpackEsModulesPlugin from "webpack-module-nomodule-plugin";
import HtmlWebpackPlugin from "html-webpack-plugin";
import { Configuration as WebpackDevServerConfigurat... |
<reponame>goldenfiredo/phala-polka-apps<filename>packages/page-phala-poc2/src/pruntime/index.ts
import { stringToU8a, u8aToHex, u8aToString } from '@polkadot/util';
import { KeyringPair } from '@polkadot/keyring/types';
import axios, {AxiosInstance} from 'axios';
import * as base64 from 'base64-js';
import Crypto, { ... |
<gh_stars>0
import { animate, style, transition, trigger } from "@angular/animations";
import {
Component,
Input,
ViewEncapsulation,
OnInit,
ElementRef,
ViewChild,
OnDestroy,
Inject,
} from "@angular/core";
import { PaidLiveChatMessage, Stream } from "src/app/models";
import { ApiService } from "src/app... |
<reponame>DTrombett/ms-royale
import { TimestampStyles } from "@discordjs/builders";
import { ClanMemberList } from "apiroyale";
import type {
APIEmbed,
APIEmbedField,
APISelectMenuOption,
Snowflake,
} from "discord-api-types/v10";
import { ComponentType } from "discord-api-types/v10";
import { Colors } from "disco... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------... |
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { connect } from 'react-redux';
import { match } from 'react-router-dom';
import {
Alert,
InputGroup,
Col,
Container,
Form,
ButtonGroup,
Button,
Row,
} from 'react-bootstrap';
import { FontAwesomeIcon } fro... |
import React, { CSSProperties, useContext, useState, useEffect } from "react";
import './Menu.css'
import Flag from 'national-flag-icons';
import type { flagCodeType } from "national-flag-icons";
export type languageType = {
code: string,
name: string,
flag?: string
}
export type { flagCodeType }
export const ... |
<filename>factory-ai-vision/EdgeSolution/modules/WebModule/ui/src/store/annotationSlice.ts
import {
createSlice,
createEntityAdapter,
PayloadAction,
createSelector,
Reducer,
nanoid,
ThunkAction,
Action,
} from '@reduxjs/toolkit';
import * as R from 'ramda';
import { State } from 'RootStateType';
import... |
import { Message, Collection, MessageEmbed } from "discord.js";
import { Listener } from "discord-akairo";
import { iTicket } from "../../models/interfaces";
import Ticket from "../../models/Ticket";
import blacklist from "../../models/blacklist";
import { claimChannel } from "../../config.json";
const filter = new Co... |
<gh_stars>0
import { useEffect } from 'react'
import { useDispatch } from 'react-redux'
import imageEmpty from 'assets/img/imageBlank2x.png'
import imageCoverPhotoBlank from 'assets/img/imageCoverPhotoBlank.jpg'
import profilePicEmpty from 'assets/img/imageProfilePicEmpty2X.png'
import useInstanceVar from 'hooks/useI... |
import * as Utilities from "../Utilities.js";
import * as UI from "./UI.js";
import { RemoteControl } from "./Main.js";
import { CursorInfo } from "../Models/CursorInfo.js";
import { Sound } from "../Sound.js";
var signalR = window["signalR"];
export class RCBrowserSockets {
Connection: any;
Connect() {
... |
/*
MIT License
Copyright (c) 2020 Looker Data Sciences, Inc.
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, modi... |
<reponame>cmu-delphi/www-covidcast
import { callAPI, EpiDataJSONRow } from './api';
import { timeDay, timeWeek } from 'd3-time';
import { parseAPIDateAndWeek, toTimeValue } from './utils';
import { getInfoByName } from './regions';
import type { RegionInfo } from './regions';
import { TimeFrame } from './TimeFrame';
im... |
<reponame>cuitlazotlac/self.id
import type { DefinitionContentType } from '@glazed/did-datastore'
import type { ModelTypeAliases } from '@glazed/types'
import { PublicID } from '@self.id/core'
import type { Core, CoreModelTypes } from '@self.id/core'
import type { AuthenticateParams, EthereumAuthProvider, SelfID } from... |
import * as chokidar from 'chokidar';
import * as events from 'events';
import * as fsPath from 'path';
import * as http from 'http';
import * as nunjucks from 'nunjucks';
import {Pod} from './pod';
import {StaticRoute} from './router';
import {debounce} from './utils';
import express = require('express');
import cha... |
/* eslint-disable camelcase */
// eslint-disable-next-line import/no-unresolved -- we use jQuery from WordPress
import jQuery from 'jquery';
import {
PublicKeyCredentialCreationOptionsPlain,
preparePublicKeyCreationOptions,
preparePublicKeyCredential,
decodeDOMException,
} from './common';
import {
L_UNKNOWN_ERROR... |
import React, { useState } from 'react'
import firebase from 'firebase'
import {
withStyles,
Theme,
createStyles,
makeStyles,
} from '@material-ui/core/styles'
import Table from '@material-ui/core/Table'
import TableBody from '@material-ui/core/TableBody'
import TableCell from '@material-ui/core/Tab... |
import _ from 'lodash'
import { Ability } from '../../types/Ability'
const phasePatterns = {
scouting: [
/ scouting /
],
deployment: [
/ before the first battle round /,
/ set up /,
/ cult ambush /
],
initiative: [
/ start of each battle round /,
/ beginning of each battle round /,
... |
import styles from "./GetStartedPage.module.less"
import logo from "icons/logo.svg"
import { useHistory } from "react-router-dom"
import * as React from "react"
import { LoginForm } from "./LoginForm"
import { SignupForm } from "./SignupForm"
/**
* This component <GetStartedPage /> is used for both login and signup p... |
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import StoreService from 'ember-data/store';
import { TestContext as Context } from 'ember-test-helpers';
import RequestFragment from 'navi-... |
<gh_stars>1-10
import { isGenerator, isAsyncGenerator } from "check-iterable";
export default dotry;
// Declarations need be ordered from complex to simple.
function dotry<E = Error, T = any, A extends any[] = any[], TReturn = any, TNext = unknown>(
fn: (...args: A) => AsyncGenerator<T, TReturn, TNext>,
...a... |
import React, { Fragment, useState, useRef } from 'react';
import { IRestaurantDetails, imageRequire } from './interfaces';
import { Text, View, Image, StyleSheet, ScrollView, Button, TouchableOpacity, FlatList } from 'react-native';
import { autoPane, onePane, PaneOverlay } from 'react-native-twopane-navigation';
impo... |
<gh_stars>0
/*
* Copyright (c) 2018-2020 Red Hat, Inc.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat, Inc. - i... |
import {CompositeValue, List, ObjectLike} from "../../interface";
import {Node, BranchNode, Tree, hashObjectToUint8Array} from "@chainsafe/persistent-merkle-tree";
import {
CompositeArrayTreeValue,
ContainerLeafNodeStructTreeValue,
TreeProxyHandler,
} from "../../backings/tree/treeValue";
import {TreeBacked} from... |
import * as React from 'react'
import { Rectangle } from '../touch-utils'
import { Warning } from '../constants'
enum ActionEnum {
NEXT = 'next',
PREV = 'prev'
}
enum TouchPhaseEnum {
TOUCH_START = 'TOUCH_START',
TOUCH_MOVE = 'TOUCH_MOVE',
TOUCH_END = 'TOUCH_END'
}
type Action = 'next' | 'prev'
type TouchP... |
<reponame>Simon-Initiative/authoring-client<filename>src/data/models/embedactivity.ts
import * as Immutable from 'immutable';
import * as contentTypes from '../contentTypes';
import createGuid from '../../utils/guid';
import { getKey } from '../common';
import { LegacyTypes } from '../types';
import { Maybe } from 'tsm... |
<reponame>andre989/imx<gh_stars>0
import { Value, NamedValue, SimpleValue, CompositeValue } from "./TreeElement";
import * as LazyList from "./LazyList";
import * as R from "ramda";
export type Zipper<A> = [Value<A>, LazyList.Generator<Crumb<A>>];
export interface Crumb<A> {
parentKey: string;
otherProps: LazyLis... |
<reponame>dzsm/adaptive-state-machine-dali
import {Component, Inject, NgZone, OnInit, ViewChild} from '@angular/core';
import {INode, StateMachineService} from '../../state-machine';
import {MAT_DIALOG_DATA, MatDialog, MatDialogRef} from '@angular/material';
import {FormBuilder, FormGroup} from '@angular/forms';
import... |
import React, { useEffect, useState } from 'react';
import Header from '../../components/Header';
import Navbar, { itemClasses } from '../../components/Navbar';
import { PrismaClient } from "@prisma/client";
import Link from 'next/link';
import moment from 'moment';
import showdown from 'showdown';
import Fo... |
<reponame>ElsevierSoftwareX/SOFTX-D-21-00051<filename>frontend/src/app/experiments/experiments.component.ts
import { Component, OnInit, ViewChild } from '@angular/core';
import { AddExperimentComponent } from '../add-experiment/add-experiment.component';
import { EditExperimentComponent} from '../edit-experiment/edit-e... |
// Copyright (c) 2018 by Audere
//
// Use of this source code is governed by an MIT-style license that
// can be found in the LICENSE file distributed with this file.
import React, { Fragment } from "react";
import { StyleSheet, View } from "react-native";
import { withNavigation, NavigationScreenProp } from "react-na... |
import { GraphBuilder } from '@ecolect/graph';
import { LanguageGraphFactory } from '@ecolect/language';
import {
DateTimeData,
combine,
reverse,
hasHour,
isHour,
time12h,
time24h,
toAM,
toPM,
Precision
} from '@ecolect/type-datetime';
import { integerGraph } from './integerGraph';
import { timeDurationGr... |
import { SpinText } from "./src/SpinText";
const ua = window.navigator.userAgent.toLowerCase();
const isIE: boolean = !!ua.match(/msie|trident\/7|edge/);
const isWinPhone: boolean = ua.indexOf('windows phone') !== -1;
const isIOS: boolean = !isWinPhone && !!ua.match(/ipad|iphone|ipod/);
const elementContainerEditor: ... |
<gh_stars>1-10
import resolve from "./resolve";
import { Awaited } from "./_types";
type AwaitedTuple<T extends readonly unknown[]> = { [K in keyof T]: Awaited<T[K]> };
type ProgressItems<T extends readonly unknown[]> = { [K in keyof T]: T[K] extends ProgressPromise<unknown, infer R> ? R : undefined };
type Progres... |
import { useEffect, useState } from 'react'
import SplitPane from 'react-split-pane'
import { v4 as uuid, validate } from 'uuid'
import { useLocation, useNavigate, useParams } from 'react-router'
import {
createSlides,
getSlides,
updateSlidesThrottled,
// , saveImage
} from '../../firebase'
import styledTheme ... |
/*
* The coLAB project
* Copyright (C) 2021 AlbaSim, MEI, HEIG-VD, HES-SO
*
* Licensed under the MIT License
*/
import { createAsyncThunk } from '@reduxjs/toolkit';
import {
AbstractCardType,
AbstractResource,
AccessControl,
Account,
ActivityFlowLink,
Block,
Card,
CardContent,
Change,
Document... |
import { computed, Ref, ComputedRef } from "@vue/reactivity";
import ColorHash from "color-hash";
import {
Asset,
IAssetAmount,
Network,
toBaseUnits,
TxHash,
Amount,
} from "@sifchain/sdk";
import { format } from "@sifchain/sdk/src/utils/format";
import { useCore } from "@/hooks/useCore";
export function s... |
import React from 'react';
import { SVEProject, SVESystemInfo, SVEData, SVEAccount } from 'svebaselib';
import { Block } from 'framework7-react';
import Dropzone from 'react-dropzone';
import HugeUploader from 'huge-uploader';
import { f7, f7ready, theme } from 'framework7-react';
export type UploadDropzoneSett... |
// NOTE: code below is shared between github.com/mjl-/sherpaweb and github.com/mjl-/sherpats.
// KEEP IN SYNC.
export const supportedSherpaVersion = 1
export function isStruct(t: NamedType): t is Struct {
return 'Fields' in t
}
export function isStrings(t: NamedType): t is Strings {
return 'Values' in t && typeof ... |
import nj from '../core';
import * as tools from '../utils/tools';
import { Template } from '../interface';
const REGEX_NUM = /^(-?([0-9]+[.]?[0-9]+)|[0-9])$/;
//提取style内参数
export function styleProps(obj) {
//If the parameter is a style object,then direct return.
if (tools.isObject(obj) || tools.isArray(obj) || to... |
import { ResizableWidget } from "./ResizableWidget";
import { Widget, WidgetOptions } from "./Widget";
import { Child, div, h1, section } from "./dom";
import "./Dialog.css";
import { is_property, Property } from "../observable/property/Property";
import { WidgetProperty } from "../observable/property/WidgetProperty";
... |
import { Request } from 'express';
import { Color, ExtendOptions, Region, RGBA } from 'sharp';
import {
IFastlyParams,
IMutableResponse,
NumericParams,
Param,
ParamMap,
Warning,
WarnType,
} from './imageopto-types';
import { Logger } from 'pino';
import { createLogger } from './logging';
const paramsLogg... |
<reponame>efortuna/minigo
// Copyright 2018 Google LLC
//
// 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 appli... |
<filename>ApiScanner.Web/ClientApp/app/components/api/api.component.ts<gh_stars>0
import { Component } from '@angular/core';
import { Subscription } from 'rxjs/Subscription';
import { ActivatedRoute } from '@angular/router';
import { NgxChartsModule } from '@swimlane/ngx-charts';
import { forkJoin } from "rxjs/observa... |
import chalk from "chalk";
import path from "path";
import { IImageRule, ImageMetaDetail, Observations } from "~/@types";
import { saveProjectConfig } from "~/shared/config";
import { csvParser } from "~/shared/data";
import { currentDirectory } from "~/shared/file";
import { getImages } from "~/shared/images";
import ... |
/*
MIT License
Copyright (c) 2021 <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 React from 'react';
import { connect } from 'react-redux';
import { Link, RouteComponentProps } from 'react-router-dom';
import { Button, Row, Col, Label } from 'reactstrap';
import { AvForm, AvGroup, AvInput, AvField } from 'availity-reactstrap-validation';
// tslint:disable-next-line:no-unused-variable
import ... |
<filename>src/index.ts
/**
* @description wangEditor v5 demo
* @author wangfupeng
*/
// import { IButtonMenu } from '@wangeditor/core'
import '@wangeditor/editor/dist/css/style.css'
import { createEditor, createToolbar, IEditorConfig, IDomEditor,
SlateElement, SlateTransforms, SlateEditor, SlateNode, DomEditor,... |
<filename>viewer/src/datamodels/cad/CadNode.ts
/*!
* Copyright 2020 Cognite AS
*/
import * as THREE from 'three';
import { SectorModelTransformation, SectorMetadata, SectorGeometry, SectorScene } from './sector/types';
import { SectorQuads } from './rendering/types';
import { ModelNodeAppearance } from './ModelNode... |
import { FragmentId, GridLayoutFragment } from '@vizstack/schema';
import { FragmentAssembler } from '../fragment-assembler';
import _ from 'lodash';
type GridCell = { row: number; col: number; height: number; width: number };
type GridBounds = { r: number; c: number; R: number; C: number };
export function withinBou... |
import { remote } from 'electron';
import { AppUpdater, UpdateInfo } from 'electron-updater';
import * as React from 'react';
import { Link } from 'react-router-dom';
import { ExodosBackendInfo, GamePlaylist } from '@shared/interfaces';
import { LangContainer } from '@shared/lang';
import { WithPreferencesProps } from ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.