text stringlengths 3.08k 15.5k |
|---|
/**
* TransactionLockHelper.ts
* Author: <NAME>
* Copyright: Microsoft 2017
*
* Several of the different providers need various types of help enforcing exclusive/readonly transactions. This helper keeps
* store-specific lock info and releases transactions at the right time, when the underlying provider can't han... |
<gh_stars>1-10
import {
Account,
AccountPaginated,
Attachment,
BLANKFIELD,
CurrencyType,
Customer,
RecurringPayment,
Transaction,
} from '../store/types';
export const currencyTypes: CurrencyType[] = ['AUD', 'CAD', 'CHF', 'EUR', 'GBP', 'JPY', 'NZD', 'USD'];
export const MINPHONENUMBERL... |
<filename>meteor/server/cache/CacheObject.ts
import { ProtectedString, mongoModify, unprotectString, getRandomId, clone } from '../../lib/lib'
import { TransformedCollection, MongoModifier } from '../../lib/typings/meteor'
import { Meteor } from 'meteor/meteor'
import _ from 'underscore'
import { profiler } from '../ap... |
/*global chrome*/
import React, { useRef, useState, useCallback } from 'react';
import { makeStyles } from '@material-ui/core/styles';
// import Button from 'react-bootstrap/Button';
import Button from '@material-ui/core/Button';
// import Spinner from 'react-bootstrap/Spinner';
import CircularProgress from '@materi... |
import {
camelToPascal,
capitalize,
constantToPascal,
dottedToCamel,
everyTwo,
kebabToCamel,
replaceConstantCase,
replaceSnakeCase,
snakeToCamel,
titleToCamel,
titleToPascal,
} from "./strings"
import { getHref, getHrefName, getTsType, handleArray, handlePartial } from "./types"
export function g... |
import React, { useEffect, Dispatch } from 'react'
import { Redirect, Route, RouteComponentProps } from 'react-router-dom'
import { Overview } from 'pages/bond/overview'
import { Outcomes } from 'pages/bond/outcomes'
// import Exchange from 'pages/bond/exchange'
// import Orders from 'pages/bond/orders'
import ProjectA... |
<reponame>pocesar/DefinitelyTyped<filename>jquery.window/jquery.window-tests.ts
/// <reference types="jquery"/>
function example_1() {
$.window({
title: "Cyclops Studio",
url: "http://apps.fstoke.me/"
});
}
function example_2() {
$.window({
showModal: true,
modalOpacity: 0.5,
icon: "http://www.fstoke.... |
<filename>packages/core/src/util/xmlUtils.ts<gh_stars>100-1000
/**
* Copyright (c) 2006-2015, JGraph Ltd
* Copyright (c) 2006-2015, <NAME>
* Updated to ES9 syntax by <NAME> 2021
* Type definitions from the typed-mxgraph project
*/
import { DIALECT, NODETYPE, NS_SVG } from './Constants';
import Point from '../view... |
<reponame>DariuszO/token-swap<filename>src/tests/test.ts
const expect = require('chai')
.use(require('chai-as-promised'))
.use(require('chai-bignumber'))
.expect;
const path = require('path');
const fs = require('fs');
const fetch = require('node-fetch');
import {TestNode as Node} from './env';
import * as ... |
<reponame>aidangillespie/Composer<filename>packages/composer-playground/src/app/test/transaction/transaction.component.ts
import { Component, OnInit } from '@angular/core';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { ClientService } from '../../services/client.service';
import { TransactionDec... |
<filename>functions/src/models/order/schema.ts
import { Common, CommonInterface, CommonType, Address, Condition, OrderBy, FullfillmentStatus, PaymentGateway } from '../common/schema'
import { ProductInterface } from '../product/schema'
import { ProductTypeInterface } from '../productType/schema'
import { SaleDiscountIn... |
<gh_stars>1-10
import { Injectable, NgZone, EventEmitter } from '@angular/core';
import { Config } from '../config/config';
import { DomController } from './dom-controller';
import { isTextInput } from '../util/dom';
import { KEY_TAB } from './key';
import { Platform } from './platform';
/**
* @name Keyboard
* @de... |
<gh_stars>0
import { Component, OnInit } from '@angular/core';
import {MatDialogRef, MatSnackBar} from '@angular/material';
import {HttpClient, HttpHeaders} from '@angular/common/http';
import {AppUtils} from '../../../app-utils';
import {AppSettings} from '../../../app-settings';
export interface InvoiceDataImportIn... |
import {
RuntimeError,
RETURN_TYPES,
TransactionLog
} from "@ganache/ethereum-utils";
import {
Data,
Quantity,
RPCQUANTITY_ONE,
BUFFER_ZERO,
RPCQUANTITY_EMPTY
} from "@ganache/utils";
import { TypedRpcTransaction } from "./rpc-transaction";
import type Common from "@ethereumjs/common";
import {
Ganach... |
import * as React from "react";
import { connect } from 'react-redux';
import { SkillMapState } from '../store/reducer';
import { ActivityActions } from './ActivityActions';
import { RewardActions } from './RewardActions';
import { CloudStatus } from "./CloudStatus";
import { dispatchShowLoginModal } from '../actions/... |
<gh_stars>1-10
import {
ReactNode,
CSSProperties,
MutableRefObject,
ReactElement
} from 'react';
/* eslint-disable no-shadow */
export enum Alignment {
Center = 'center',
Right = 'right',
Left = 'left'
}
export enum Positions {
TopLeft = 'TopLeft',
TopCenter = 'TopCenter',
TopRight = 'TopRight',
... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import * as log from "./log";
import * as os from "os";
import { packageJsonInfo } from "./util/constants";
import {
ConnectionConfig,
Constants,
ConnectionContextBase,
CreateConnectionContextBaseParameters,
Dicti... |
/*
© 2020 NetSuite Inc.
User may not copy, modify, distribute, or re-bundle or otherwise make available this code;
provided, however, if you are an authorized user with a NetSuite account or log-in, you
may use this code subject to the terms that govern your access and use.
*/
// @module Address
/// <amd-module na... |
import { APIGatewayEvent, Context, ProxyResult } from 'aws-lambda';
import { v4 as uuid } from 'uuid';
import { DietaryRequirements, Guest, GuestId, isFullRsvp, isPlaceholder, PlaceholderRsvp, RsvpAnswer } from '../shared';
import { guestsTable } from './db/guests.table';
import { rsvpTable } from './db/rsvp.table';
im... |
import clsx from 'clsx';
import React, { useState, useEffect } from 'react';
import type { RippleProps } from './types';
import MDBBtn from '../../components/Button/Button';
import MDBRippleWave from './RippleWave/RippleWave';
const MDBRipple: React.FC<RippleProps> = React.forwardRef<HTMLAllCollection, RippleProps>(
... |
import * as React from 'react';
import styled from 'styled-components';
import {
Nav,
NavItem,
Row,
Col,
Checkbox,
Panel,
FormControl,
Button,
} from 'react-bootstrap';
import { SiteViewFragment } from 'types/SiteViewFragment';
import { History, Location } from 'history';
import { match, Switch, Route, ... |
<filename>src/item.ts
import * as fs from 'fs';
import * as path from 'path';
import * as vscode from 'vscode';
import * as ply from '@ply-ct/ply';
import { TestHub, testExplorerExtensionId, TestAdapter } from 'vscode-test-adapter-api';
import { PlyRoots } from './plyRoots';
import { PlyConfig } from './config';
inter... |
// Copyright IBM Corp. 2018,2019. All Rights Reserved.
// Node module: strong-docs
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
import * as marked from 'marked';
import {
Application,
DeclarationReflection,
Reflection,
ReflectionKind,
} from '... |
import React, { useState } from "react";
import { Flex, Box, Heading, Text, Center } from "@chakra-ui/react";
import { ChevronLeftIcon } from "@chakra-ui/icons";
import { Link } from "@chakra-ui/react";
import { Auth } from "aws-amplify";
import { TextInput, PasswordInput, AuthButton } from "@components";
import {
... |
import React, { useState } from "react"
import { motion } from "framer-motion"
import { css } from "@emotion/react"
import { Link } from "gatsby"
import { isNonEmpty } from "../../utils/array"
const NAV_ITEMS: Array<Menu> = [
{ to: '/dev', label: 'Development',
subMenu: [
{ to: '/home', label: 'Home' }
... |
import { ApolloError, ReactiveVar } from '@apollo/client'
import { upperFirst, xor } from 'lodash'
import { useQuery, gql } from '@sourcegraph/shared/src/graphql/graphql'
import { Maybe, UserRepositoriesVariables } from '../graphql-operations'
import { MinSelectedRepo } from './useSelectedRepos'
interface UseRepoCl... |
import React from 'react';
import { SortDirectionType, Table } from 'react-virtualized';
import { WithStylesProps } from '../../composers/withStyles';
import { DataTable } from './DataTable';
export type DataTableRef = (instance: DataTable) => void;
export type TableRef = React.RefObject<Table>;
export type RowHeightO... |
import * as ts from 'typescript';
import * as path from 'path';
const options: ts.CreateProgramOptions = {
options: {
allowJs: false,
esModuleInterop: true,
forceConsistentCasingInFileNames: true,
noEmit: true,
lib: [
path.resolve(
__dirname,
'../../../node_modules/typescrip... |
<reponame>ms-deregtd/NoSQLProvider<gh_stars>10-100
/**
* CordovaNativeSqliteProvider.ts
* Author: <NAME>
* Copyright: Microsoft 2015
*
* NoSqlProvider provider setup for cordova-native-sqlite, a cordova plugin backed by sqlite3.
* Also works for react-native-sqlite-storage, since it's based on the same bindings, ... |
import React, { useEffect, useState } from 'react';
import styles from './myInfo.module.scss';
import {
FormButton,
FormInputError,
} from '../../../components/common/formElements';
import { Field, Form, Formik } from 'formik';
import { validationField } from '../../../services/validateForm/ValidatorsField';
import... |
<gh_stars>0
import { log, find_state_data, sleep, list_remove, get_random_int } from '../util';
import { Ifarmlist, Ivillage } from '../interfaces';
import { Ifeature, Irequest, feature_collection, feature_item, Ioptions } from './feature';
import { farming, village } from '../gamedata';
import api from '../api';
impor... |
<reponame>jginsburgn/semantic-locators<filename>javascript/src/lib/lookup_result.ts
/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {getNameFor} from './accessible_name';
import {computeARIAAttributeValue} from './attribute';
import {getRole} from './role';
import {AriaRo... |
/* eslint-disable no-undef */
import {
AppBar,
Divider,
Drawer,
IconButton,
LinearProgress,
List,
ListItem,
ListItemIcon,
ListItemText,
Toolbar,
Typography,
withStyles
} from '@material-ui/core'
import React, { Component } from 'react'
import { connect, ConnectedProps } from 'react-redux'
import... |
import { Contract } from "@ethersproject/contracts";
import { JsonRpcSigner } from "@ethersproject/providers";
import { bind, shareLatest } from "@react-rxjs/core";
import { BigNumber, utils } from "ethers";
import { from, fromEvent, Observable, of, range } from "rxjs";
import { filter, map, mergeMap, reduce, shareRepl... |
<reponame>boubad/XDataLib
//baseevent.ts
import InfoData = require('../../../infodata');
//
import BaseItem = require('./baseitem');
import DepartementChild = require('./departementchild');
//
class BaseEvent extends DepartementChild implements InfoData.IBaseEvent {
//
private _anneeid: string;
private _semestrei... |
/**
* @license
* Copyright 2017 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 UIUtil = require('./UIUtil');
import ButtonUI = require('./ButtonUI');
import TimeUtil = require('../TimeFormatUtil');
import EventData = require('../WHSLib/Interfaces/EventData');
import ColorUtil = require('./ColorUtil');
import EventRowUI = require('./EventRowUI');
/**
* Events list graphic.
*
* Includes... |
import * as React from 'react';
import { RenderResult, act, fireEvent, render } from '@testing-library/react-native';
import {
closeGesture,
getChangedDistanceRatio,
getTwoFingerStartEndPositions,
moveGesture,
openGesture,
} from './data/capturedGesture';
import { ImageSlider } from '../PinchZoom/PinchZoom.e... |
<reponame>IDEP-network/IDEP.js<gh_stars>0
import sha3 from 'js-sha3';
import * as scryptPbkdf from 'scrypt-pbkdf';
import {HexEncoded} from '../../types/aliases';
import {EncryptedPrivateKey, KdfParams} from '../../types/types';
import {getDefaultKdfParams} from '../../utils/default-kdf-params';
import {CryptoStrategy... |
<gh_stars>10-100
import { ActionUnion } from './action';
import { BoundingBox, emptyBoundingBox } from '../graphics/drawing';
import { ObjectID } from './sense/object';
import { BoxID } from './sense/box';
import { CardID } from './sense/card';
import { EdgeID } from './sense/edge';
import { findIndex, equals } from 'r... |
import "./style.scss";
import * as React from "react";
import { connect } from "react-redux";
import { isNoteActive, getModulationAmount } from "../../state/selectors";
import { Note } from "../Keybed/Keybed";
import { audioPlayer } from "../../audio";
import { actions } from "../../state";
const PITCH_SENSITIVITY = ... |
<filename>src/zones/generators/zones.generator.ts<gh_stars>1-10
import debug, { IDebugger } from 'debug';
import Zone from '../models/zones.model'
import { IIdentity } from '../../common/interfaces/identity.interface';
import { ModuleTypes } from '../../common/enums/module.enum';
import { IGenerate } from '../../common... |
import * as github from '@actions/github'
import * as core from '@actions/core'
import {GitHub} from '@actions/github/lib/utils'
export function initClient(
token: string = core.getInput('github-token')
): InstanceType<typeof GitHub> {
return github.getOctokit(token)
}
export async function getBotUserId(): Promis... |
<reponame>saanvijay/vmware-blockchain-samples
import { Injectable } from '@angular/core';
import { rx, AppService } from '../ganymede/components/services/app.service';
import { DigitalArt } from './models/digital-art.model';
import { EthereumService } from './ethereum.service';
const DigitalArtAbi = require('../../../... |
import * as React from 'react';
import {useEffect, useMemo, useState} from 'react';
import {ArgumentAxis, Chart, Legend, Tooltip, ValueAxis,} from '@devexpress/dx-react-chart-material-ui';
import {Card, CardContent, CircularProgress, Grid, Typography} from "@mui/material";
import {ArgumentAxis as ArgumentAxisBase, Argu... |
<reponame>NVYCO/kha-ching
import axios from 'axios'
import dayjs from 'dayjs'
import { pick } from 'lodash'
import { customAlphabet } from 'nanoid'
import { tradingQueue, addToNextQueue, TRADING_Q_NAME } from '../../lib/queue'
import { ERROR_STRINGS, STRATEGIES_DETAILS } from '../../lib/constants'
import { EXIT_STRAT... |
import browserslist from 'browserslist';
import invariant from 'invariant';
import semver from 'semver';
import {
semverify,
isUnreleasedVersion,
getLowestUnreleased,
findSuggestion,
} from './utils';
import { TargetNames } from './options';
import { Options, Targets } from './types';
const browserslistDefault... |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {SimpleChange} from '../change_detection/change_detection_util';
import {PipeTransform} from '../change_detec... |
import { ArrowUpIcon, CloseIcon } from '@chakra-ui/icons';
import {
Box,
Button,
Flex,
HStack,
Input, InputGroup,
InputLeftElement,
InputRightElement,
Popover,
PopoverContent,
PopoverTrigger,
Portal,
Stack,
Text
} from '@chakra-ui/react';
import ParamListCompact from '@components/create/params/paramListCom... |
<reponame>microsoft/flow2dts
import { $ElementType, $Keys } from "utility-types";
import $1 from "./flattenStyle";
import { ____ColorValue_Internal } from "./StyleSheetTypes";
import { ____Styles_Internal } from "./StyleSheetTypes";
import { ____DangerouslyImpreciseStyle_Internal } from "./StyleSheetTypes";
import { __... |
<reponame>Microsoft/pxt<gh_stars>100-1000
const STORAGE_KEY = "SAVED_SCREENSHOT_CODE";
const ENDPOINT_KEY = "SAVED_SCREENSHOT_ENDPOINT";
const existing = localStorage.getItem(STORAGE_KEY)
// @ts-ignore
const editor = monaco.editor.create(document.getElementById("container"), {
value: existing ||
`
`,
... |
/* eslint jsx-a11y/no-static-element-interactions: 0 */
/* eslint jsx-a11y/click-events-have-key-events: 0 */
/* eslint jsx-a11y/no-noninteractive-tabindex: 0 */
/**
* Plan:
*
* Create a 1-dimensional grid of new notebook types for clicking
* to create new notebooks
*
* Create a listing of running notebooks
* S... |
<reponame>ismacaulay/code-adventures
import { Euler, Matrix4, OrthographicCamera, Vector3 } from 'three';
function toRadians(v: number) {
return (v * Math.PI) / 180.0;
}
function constrainZoom(zoom: number) {
const [lower, upper] = [0.1, 5000];
if (zoom < lower) {
return lower;
}
if (zoom ... |
import * as React from 'react'
import { Component } from 'react'
// https://dmitripavlutin.com/typescript-index-signatures/
/**
* A step in the JsxGraph construction.
*/
export interface JsxGraphStep {
/**
* Type of the element to be constructed given as a string e.g. 'point' or 'circle'.
*/
type: Geometr... |
///<reference path="../tsoaTestModule.d.ts" />
import { Readable } from 'stream';
import { Controller, Example, Get, OperationId, Query, Request, Route, SuccessResponse, Tags, Res, TsoaResponse } from '@tsoa/runtime';
import '../duplicateTestModel';
import { GenericModel, GetterClass, GetterInterface, GetterInterfaceHe... |
import React, { Component, ComponentClass } from 'react';
import PropTypes from 'prop-types';
import { observer } from 'mobx-react';
import { findDOMNode } from 'react-dom';
import { Range, ReactQuillProps, UnprivilegedEditor } from 'react-quill/lib';
import 'react-quill/dist/quill.snow.css';
import isEqual from 'lodas... |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { ElementRef, EventEmitter, NgZone, OnChanges, SimpleChanges, OnDestroy } from '@angular/core';
/** Extra CSS c... |
import global, { DatabaseCount, FilterParams } from '../../types/GlobalType';
import BackendError from '../../exception/BackendError';
import Constants from '../../utils/Constants';
import { DataResult } from '../../types/DataResult';
import DatabaseUtils from './DatabaseUtils';
import DbParams from '../../types/datab... |
<reponame>ferbs/webstack-micro
import express, { Request, Response, NextFunction } from "express";
import passport from "passport";
import { Strategy as LocalStrategy } from "passport-local";
import {check, sanitize, validationResult, ValidationError, Result} from "express-validator";
import bcrypt from "bcryptjs";
imp... |
<gh_stars>1-10
import { ITimesheet } from './../../models/interfaces/i-timesheet';
import { IRfxType } from './../../models/interfaces/i-rfx-type';
import { IProjectRfx } from './../../models/interfaces/i-project-rfx';
import { IProjectIntakeContact } from './../../models/interfaces/i-project-intake-contact';
import { ... |
<filename>scripts/lib/MadnetFactory.ts
//separate deploy of template from deploy of deterministic address
//import { string } from "hardhat/internal/core/params/argumentTypes";
//assume you have to divide the transaction
//estimate gas, observe gas limit,
//return all addresses
//return the logs
import { BytesLike ... |
/* --------------------------------------------------------------------------------------------
* Copyright (c) Yseop. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* -----------------------------------------------------------------------------... |
import {
Collection,
ComponentRequestTable,
ConceptDb,
ConceptServer,
ConceptServerBuilder,
Config,
Context,
getReturnFields
} from '@deja-vu/concept-server';
import { IResolvers } from 'graphql-tools';
import * as _ from 'lodash';
import { v4 as uuid } from 'uuid';
import {
CreateScoreInput,
Delete... |
import { StageStore } from "~/dataStore/stages";
import {
getClearedLevels,
LevelDoc,
putClearedLevel,
recheckClearedLevels,
} from "~/db/level";
import { getClearedStagesInLevel, putClearedStages } from "~/db/stage";
import { Level, levelMetadata } from "~/definitions/stages/levels";
import { RemoteCompiler } ... |
import {
SupportedLocale,
SUPPORTED_LOCALES,
DEFAULT_LOCALE,
} from '../../config/locale';
import { ALLOWED_ID_PREFIX, ALLOWED_ID_SUFFIX } from './constants';
import { TranslationContent, Message, TranslationPerLocale } from './types';
/* eslint-disable @typescript-eslint/no-var-requires */
// eslint-disable-ne... |
import * as vscode from 'vscode'
import * as fs from 'fs'
import * as path from 'path'
import { Extension } from './../main'
export class SectionNodeProvider implements vscode.TreeDataProvider<Section> {
// private _onDidChangeTreeData: vscode.EventEmitter<Section | undefined> = new vscode.EventEmitter<Section ... |
import {Indicator} from '@/services/data/tuples/indicator-types';
import {
Navigation,
NavigationIndicator,
NavigationIndicatorCriteriaOperator
} from '@/services/data/tuples/navigation-types';
import {
isNavigationIndicatorCriteriaOnBucket,
isNavigationIndicatorCriteriaOnExpression
} from '@/services/data/tuples/... |
import useGlobalData from './useGlobalData';
import { default as App, app } from '../common/App';
export interface IToastOption {
popType: 'toast';
type?: 'none' | 'success' | 'fail' | 'exception';
duration?: number;
content?: string;
complete?: () => void;
isBlock?: boolean;
}
export type InputToastOptio... |
<reponame>silentorb/vineyard-cellar<gh_stars>0
/// <reference path="../vineyard/vineyard.d.ts"/>
/// <reference path="../vineyard-lawn/lawn.d.ts"/>
import Vineyard = require('vineyard')
var Lawn = require('vineyard-lawn')
var uuid = require('node-uuid')
var when = require('when')
var MetaHub = require('vineyard... |
<gh_stars>1-10
/*
* Copyright © 2019 Atomist, 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 applicabl... |
<filename>packages/localize/src/tools/src/extract/translation_files/xliff1_translation_serializer.ts
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {AbsoluteF... |
<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 readline from 'readline';
import * as process from 'process';
import colors from 'colors/safe';
import { AnsiEscape... |
import fs from 'fs';
import Material from './modules/Material.js';
import Weapon from './modules/Weapon.js';
import Character from './modules/Character.js';
import Cook from './modules/Cook.js';
// import Dungeon from './modules/Dungeon.js'
function saveToJson(obj, filename) {
const data = JSON.stringify(obj, null... |
<filename>src/parsePrimitives.ts
import * as Long from "long";
import {Utf8ArrayToStr} from './libs/Utf8ArrayToStr'
import base58 from './libs/base58';
import * as Base64 from "base64-js"
export const ALIAS_VERSION: number = 2;
const LENGTH_SIZE = 2;
type Option<T> = T | null | undefined
export type TParser<T> = (b... |
<reponame>imdada/overwatch
import { inject, injectable } from "inversify";
import TYPES from "../../common/types";
import { Log } from "../../common/log";
import { SystemInfoService } from "../system-info/system-info.service";
import { SystemInfoDto } from "../system-info/system-info.dto";
import { SystemStatsNode, Sys... |
<filename>kantera-web-ui/front/src/modules/mainProcess.ts<gh_stars>1-10
import { delay, fork, call, take, put, select, takeLatest } from 'redux-saga/effects';
import { eventChannel, END } from 'redux-saga';
import AudioManager from 'src/audioManager';
import config from 'src/config';
export interface State {
ws: Web... |
<gh_stars>0
import {expect} from 'chai';
const fs = require('fs');
import {SHIPP} from "./SHIPP";
import {ErosionDrop} from "./shipp/ErosionDrop";
function drawPixel(context, x, y, color) {
var roundedX = Math.round(x);
var roundedY = Math.round(y);
context.beginPath();
context.fillStyle = color || ... |
import jsc from "magda-typescript-common/src/test/jsverify";
import nock from "nock";
import express from "express";
import { Server } from "http";
import { encodeURIComponentWithApost } from "magda-typescript-common/src/test/util";
import {
WebHook,
AspectDefinition
} from "magda-typescript-common/src/generat... |
import * as React from 'react';
// Other controls
import { Field } from './Field';
import { Group } from './Group';
import { Uncontrolled } from './Uncontrolled';
import { FormContext, IFormContext } from './FomContext';
interface IProps {
children?: React.ReactNode;
/* Form data. */
data: any;
/** Called whe... |
import "~/utils/has_own_polyfill.ts";
import { isConfigModule } from "@mapcss/config/mod.ts";
import {
applyExtractor,
Config,
generate as g,
transform,
} from "@mapcss/core/mod.ts";
import initSWC, { transformSync } from "https://esm.sh/@swc/wasm-web@1.2.160";
import { isString } from "~/deps.ts";
import { tr... |
import { enrichCoachSequence } from 'server/coachSequence/commonMapping';
import type {
BaseFahrzeug,
BaseFahrzeuggruppe,
BaseFormation,
FahrzeugKategorie,
Halt,
Position,
Sektor,
} from 'types/reihung';
import type {
CoachSequence,
CoachSequenceCoach,
CoachSequenceCoachFeatures,
CoachSequenceGrou... |
const ora = require('ora');
const replace = require('replace-in-file');
const p = require('path');
// Example: `./src/ng2/**/*.html`;
export function run(path) {
console.log('\x1b[4m%s\x1b[0m', '\nStarting migration script');
const dir = p.resolve(process.cwd());
path = p.join(dir, path, '/**/*');
const noSpe... |
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Routes, RouterModule } from "@angular/router";
import { TranslateModule } from '@ngx-translate/core';
import { FormsModule } from '@angular/forms';
import { UserAuthenticationGuard } from '../service/UserAuthenticationGua... |
import { Injectable } from '@angular/core';
import { HttpClient, HttpParams, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import { PlagiarismCase } from 'app/exercises/shared/plagiarism/types/PlagiarismCase';
import { PlagiarismStatus } from 'app/exercises/shared/plagiarism/types/Plagi... |
import {Decoder} from "./Decoder";
import {Tape} from "./Tape";
import {TapeBrowser} from "./TapeBrowser";
import {Uploader} from "./Uploader";
import Split from "split.js";
import {AudioFile} from "./AudioUtils";
import {clearElement, flashNode} from "./Utils";
import {Trs80} from "trs80-emulator";
import exp from "c... |
/* eslint-disable jsx-a11y/no-noninteractive-tabindex */
/* eslint-disable no-shadow */
import { Button, GU, IconConnect, springs } from '@1hive/1hive-ui';
import { noop } from 'lodash-es';
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { animated, Transition } from 'react-spring/rend... |
import React, { useEffect, useRef, useState } from 'react';
import * as echarts from 'echarts/core';
import { GridComponent, TooltipComponent, LegendComponent, GridComponentOption, LegendComponentOption } from 'echarts/components';
import { BarChart } from 'echarts/charts';
import { CanvasRenderer } from 'echarts/rend... |
import { EventManager } from './EventManager.ts';
import { InMemoryCache } from './InMemoryCache.ts';
import {
FlowIdType, ListenerIdListType,
IDenominatorConfig, IDenominatorConfigService, IDenominatorConfigWorker,
IService, IServiceConfig,
IWorker, IWorkerConfig,
WorkerEventListenerProxy,
ServiceIdType, W... |
<filename>src/models/node.ts
/* eslint-disable @typescript-eslint/no-explicit-any */
import mongoose, { Schema, Document } from 'mongoose'
import Boom from '@hapi/boom'
import config from '../configs'
import { mergeDeep, setUniqueArray } from '../services/methods'
export interface INode extends Document {
name : s... |
import type { InitData, InitDataTrack } from '../utils/mp4-tools';
import {
getDuration,
getStartDTS,
offsetStartDTS,
parseInitSegment,
} from '../utils/mp4-tools';
import { ElementaryStreamTypes } from '../loader/fragment';
import { logger } from '../utils/logger';
import type { TrackSet } from '../types/track... |
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';
import { WpmMonitorStatusBar } from './wpmMonitorStatusBar';
// CONSTANTS
const wordsLength: number = 5; // number of characters to be considere... |
import bcrypt = require('bcrypt');
import { HelmChart, KubernetesManifest, ServiceAccount } from "@aws-cdk/aws-eks";
import { ManagedPolicy } from "@aws-cdk/aws-iam";
import { Construct } from "@aws-cdk/core";
import merge from "ts-deepmerge";
import * as spi from "../../spi";
import { btoa, getSecretValue } from '../.... |
/**
* Copyright 2017 Google Inc. 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 required by appli... |
import Taro from "@tarojs/taro"
const SERVER_API = "https://api.weixin.qq.com/sns/jscode2session"
import { getBrowserType } from './common';
import wx from 'weixin-js-sdk';
/**
* 获取codeid
*/
export const getCode = (): Promise<any> => {
return new Promise((resolve, reject) => {
Taro.login({
success(res) {
... |
<filename>src/utils/index.ts
const HTMLInputElementSpecialAttrs = ['value', 'autocomplete', 'autocorrect', 'autocapitalize', 'spellcheck'];
export function copyAttributes(src: HTMLElement, dest: HTMLElement, excludes?: string[], remove?: boolean) {
const attrs = Array.prototype.slice.call(src.attributes, 0);
for (... |
import { Component, OnDestroy,OnInit,ViewChild,AfterViewInit } from '@angular/core';
import { Title } from '@angular/platform-browser';
import 'datatables.net';
import { Subject } from 'rxjs';
import { environment } from '../../../../environments/environment';
import { HttpClient, HttpResponse } from '@angular/common/h... |
import { HttpHelper } from "../HttpHelper";
import { IBuild } from "./Build";
import { IBuilds, IPipeline, IReleases } from "./Pipeline";
import { IPipelineStage, IPipelineStages } from "./PipelineStage";
import { IRelease } from "./Release";
const buildFilterUrl =
"https://dev.azure.com/{organization}/{project}/_ap... |
import EventEmitter from 'events';
import {connect, Connection} from 'amqplib';
import {defaultReceiveEndpointOptions, ReceiveEndpoint, ReceiveEndpointConfigurator, ReceiveEndpointOptions} from './receiveEndpoint';
import {SendEndpoint} from './sendEndpoint';
import {delay} from './util';
import {SendEndpointArguments}... |
import { Directive, Component, TemplateRef, Input, ViewContainerRef, OnDestroy, AfterViewInit, NgModule, HostBinding, NgZone, Inject, ElementRef, ChangeDetectorRef, EventEmitter, Output } from '@angular/core';
import { PortalModule, TemplatePortal } from '@angular/cdk/portal';
import { CommonModule, DOCUMENT } from '@a... |
import { ComponentRef, Injectable } from '@angular/core';
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from '@angular/common/http';
import { Observable, throwError } from 'rxjs';
import { catchError, tap } from 'rxjs/operators';
import { PoComponentInjectorService } from '../../servic... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.