text
stringlengths
3.08k
15.5k
import { ClientMessage, ServerMessage, parseClientBinaryMessage, buildServerBinaryMessage, ClientBinaryMessage } from "./messages.mjs"; import { ServerHLC, Timestamp, UID } from "./engine_bg.mjs"; interface Env { SYNC_AGENT: any; } /** * ## Session * * Client node session storing the WebSocket connection and...
import type { DElementSelector } from '../../hooks/element-ref'; import type { DDragProps } from './Drag'; import { cloneDeep, isEqual, isUndefined } from 'lodash'; import React, { useImperativeHandle, useRef, useState } from 'react'; import { useEffect, useMemo } from 'react'; import { useComponentConfig, useRefSele...
/** * ?CardFeature Component */ import { cloneElement, FC, ReactElement } from "react"; import { CardFeatureProps } from "."; import { BadgeProps } from "../../../Atoms/Badges/Badge"; import { IconProps } from "../../../Atoms/Icons/Icon"; import { IconSimpleProps } from "../../../Atoms/Icons/IconSimple"; const newI...
import path from "path" import { Store } from "redux" import { Compiler, Module, NormalModule, Compilation } from "webpack" import ConcatenatedModule from "webpack/lib/optimize/ConcatenatedModule" import { isEqual } from "lodash" import { IGatsbyState, IGatsbyPageComponent, IGatsbyStaticQueryComponents, } from "....
import qs from 'qs' import React, { useState } from 'react' import { useHistory, useLocation, useRouteMatch } from 'react-router' import { Link } from 'react-router-dom' import { useCallback, useMemo } from 'use-memo-one' import { dictionaryToString } from '../function/dictionaryToString' import { queryToRegExp } from ...
<filename>packages/backend/api-core/src/database/seeds/index.ts /* * Copyright (c) 2021-2021. * Author <NAME> (tada5hi) * For the full copyright and license information, * view the LICENSE file that was distributed with this source code. */ import { DataSource, In } from 'typeorm'; import { Seeder } from 'typeorm...
import { useVirtualizationHelpers } from '@syndesis/api'; import { RestDataService, ViewDefinition, ViewEditorState, } from '@syndesis/models'; import { TableColumns } from '@syndesis/models'; import { Breadcrumb, DdlEditor, IViewEditValidationResult, } from '@syndesis/ui'; import { ExpandablePreview, PageS...
import mapRight from '../utils/mapRight'; import { fill } from 'lodash'; enum Sign { ZERO = 0, PLUS = 1, MINUS = -1 } //TODO: division support //TODO: right shift support //TODO: left shift support //IDEA: http://www.mortati.com/glusker/fowler/ternary.htm //IDEA: http://userpages.wittenberg.edu/bshelburne/Balan...
import React, { useState } from "react"; import { observer } from "mobx-react-lite"; import { format } from "date-fns"; import { ContextMenu } from "../common/context-menu"; import Confirmation from "../confirmation/confirmation"; import { IconButton } from "@episerver/ui-framework"; import MaterialIcon from "@material...
<gh_stars>0 import { bindActionCreators } from 'redux'; import { useDispatch, useSelector, shallowEqual } from 'react-redux'; import { useMemo, useRef, useEffect, useState, } from 'react'; import isEqual from 'react-fast-compare'; import { debounce, throttle } from './index'; const isObjectOrArray = (t: object | any...
import { useBlock, useFocusIdx } from 'realmail-editor'; import { AdvancedBlock, OperatorSymbol, AdvancedType, Operator, ICondition, IConditionGroup } from 'realmail-core'; import { Collapse, Grid, Switch, Button, Space, List, Message } from '@arco-design/web-react'; import { SelectField, TextField } from '@extensions/...
<filename>packages/sdk/src/services/client-task-queue-service.ts import { ClientTask, ClientTaskQueueApi, ClientTaskQueueGetStateEnum as ClientTaskState, ClientTaskQueueResponse, ClientTaskStateEnum, } from '@meeco/vault-api-sdk'; import { MeecoServiceError } from '../models/service-error'; import { getAllPag...
<gh_stars>0 import { RefSelector } from "../../../widgets/componentAnnotations"; import { _ } from "../../../utils"; import { SimpleFilter, ConditionPosition, ISimpleFilterModel } from "../simpleFilter"; import { ScalarFilter, Comparator, IScalarFilterParams } from "../scalarFilter"; import { AgInputNumber...
<gh_stars>0 import config from "./config"; import { Masto, Status } from "masto"; import strinptags from "striptags"; import dayjs from "dayjs"; import "dayjs/locale/ja"; import relativeTime from "dayjs/plugin/relativeTime"; import localizedFormat from "dayjs/plugin/localizedFormat"; dayjs.locale("ja"); dayjs.extend(r...
<reponame>javierpedrozaing/sofrest import { Component, OnInit, ViewChild, OnDestroy } from '@angular/core'; import { Subscription } from 'rxjs'; import { ScreenMobileChangeService } from 'src/app/services/screen/screen-mobile-change.service'; import { ToastrService } from 'ngx-toastr'; import { MatPaginator } from '@an...
import type { PropType, UniNode } from '@uni-component/core' import { computed, h, uni2Platform, uniComponent } from '@uni-component/core' // Styles import './VCard.sass' // Components import { VAvatar } from '@/components/VAvatar' import { VImg } from '@/components/VImg' import { VCardActions } from './VCardActions'...
import React, { ReactNode, useState } from 'react'; import { WarningOutlined } from '@ant-design/icons'; import { Avatar, Button, Col, Divider, Drawer, List, Modal, notification, Row, Typography, } from 'antd'; import axios, { AxiosResponse } from 'axios'; import { useParams } from 'react-router-do...
<reponame>hozuki/GLantern /** * Created by MIC on 2015/11/18. */ import Point from "./Point"; import ICopyable from "../../mic/ICopyable"; import ICloneable from "../../mic/ICloneable"; export default class Rectangle implements ICloneable<Rectangle>, ICopyable<Rectangle> { constructor(x: number = 0, y: number =...
<reponame>piggy-fawn-butterfly/piggy import { res } from "./Res"; import { i18n } from "./i18n"; import { logger } from "./Logger"; import { userdata } from "./Userdata"; import { strings } from "../Utils/Strings"; import { constants } from "../Const/Constant"; import { enums } from "../Const/Declare/Enums"; import { i...
import { RefHandle, systemToComponent } from '@virtuoso.dev/react-urx' import * as u from '@virtuoso.dev/urx' import * as React from 'react' import { createElement, FC } from 'react' import { gridSystem } from './gridSystem' import useSize from './hooks/useSize' import useWindowViewportRectRef from './hooks/useWindowV...
import { Icon } from '@makerdao/dai-ui-icons' import BigNumber from 'bignumber.js' import { Modal, ModalCloseIcon } from 'components/Modal' import { PriceInfo } from 'features/shared/priceInfo' import { CommonVaultState, WithChildren } from 'helpers/types' import { zero } from 'helpers/zero' import React, { ReactNode }...
import * as React from "react"; import { equals } from "../../../Data/Eq"; import { fmap } from "../../../Data/Functor"; import { consF, List, map, subscript } from "../../../Data/List"; import { ensure, Just, mapMaybe, Maybe } from "../../../Data/Maybe"; import { elems, OrderedMap } from "../../../Data/OrderedMap"; im...
import { HtmlAttrTarget, litAttributeModifierForTarget } from "../../../parse/parse-html-data/html-tag"; import { HtmlNodeAttr, HtmlNodeAttrKind } from "../../../types/html-node/html-node-attr-types"; import { HtmlNodeKind } from "../../../types/html-node/html-node-types"; import { findBestMatch } from "../../../util/f...
/** * @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://bangular.io/license */ import {CompileDiDependencyMetadata, CompileEntryComponentMetadata, CompileProviderMetadata, CompileTokenMetadata} ...
<filename>packages/extension/src/server/validator.ts import { BettererFileTest, BettererFiles, BettererFileIssuesRaw, BettererFileIssueRaw, BettererFileIssueDeserialised, BettererFileIssues } from '@betterer/betterer'; import * as assert from 'assert'; import { IConnection, TextDocuments, Diagnostic, Diagno...
<reponame>ScoutRFP/ag-grid import { PopupService, DragSourceType, Component, Autowired, ColumnController, Events, EventService, TouchListener, DragAndDropService, GridOptionsWrapper, DropTarget, PostConstruct, Column, DragSource, ColumnAggFuncChangeRequestEven...
import {Trans} from '@lingui/react' import {Action, ActionKey} from 'data/ACTIONS' import {Analyser} from 'parser/core/Analyser' import {dependency} from 'parser/core/Injectable' import CastTime from 'parser/core/modules/CastTime' import {ChargeHistoryEntry, CooldownEndReason, CooldownGroup, CooldownHistoryEntry, Coold...
<reponame>rfprod/nx-ng-starter<gh_stars>10-100 import * as fs from 'fs'; import { projects } from '../../jest.config'; import { COLORS } from './colors'; /** * Current working directory. */ const cwd = __dirname; /** * Jest projects array. */ const jestProjects = <string[]>[...projects]; interface ICoverageSumm...
<reponame>gentlemanyan/berry import {Filename, PortablePath, npath, ppath, xfs} from '@yarnpkg/fslib'; import {stringifySyml, parseSyml} from '@yarnpkg/parsers'; import klaw from 'klaw'; import tarFs from 'tar-fs'; import zlib...
import express from 'express'; import * as _ from 'lodash'; import { TimeSpan } from 'timespan'; import { unparse } from "papaparse"; import { eventDateCompare } from './utilities'; import { IReportData, IEvent, IModule, ITeacher, TEMode, ISession, IQuestionWrapper, PluginType } from './report-data-ty...
import * as xdb from "./xdb" import { Script, ScriptMeta } from "./script" import { db as _db } from "./data" import { EventEmitter } from "./event" import { editor } from "./editor" import exampleScripts from "./example-scripts" import resources from "./resources" // import { print, dlog } from "./util" interface Sc...
import { NextRouter } from 'next/router' import toast from 'react-hot-toast' import JSZip from 'jszip' import { fetcher } from '../utils/fetchWithSWR' import { getStoredToken } from '../utils/protectedRouteHandler' /** * Generates a loading toast with file download progress support * @param router Next router insta...
<gh_stars>0 import React from 'react'; import type Animated from 'react-native-reanimated'; import { Easing } from '../constants'; import { runOnJS, useSharedValue } from 'react-native-reanimated'; import type { TCarouselActionOptions, TCarouselProps, WithTimingAnimation, } from '../types'; import { dealWit...
<gh_stars>0 import axios from "axios"; import { Observable } from "rxjs/internal/Observable"; import { filter, mergeMap, map, groupBy, reduce, tap } from "rxjs/operators"; import { CountryActionTypes, FetchAllCountriesResult } from "./covidCountryActions"; import { CovidCountry, CovidDataPoint, CovidCountrySu...
<reponame>netama/salto /* * Copyright 2021 Salto Labs Ltd. * * 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 ...
import { Component, render, VNode } from "inferno"; import * as api from "./api.service"; import { Kink, WindowFList } from "./model"; import { cj, Q } from "./util"; import { le } from "./util-jsx"; import { XBtn } from "./xbtn"; const NO_SEL = "X"; let customs: Kink[]; let options: JSX.Element[]; let jsx: JSX.Elemen...
<gh_stars>1-10 import * as Jimp from 'jimp'; import fs from 'fs'; import os from 'os'; import path from 'path'; import CLI from './cli'; import process from 'process'; import { alginPowOfTwo, exec, Pool, walkDir } from './utils'; import { version } from '../package.json'; const cli = new CLI(); interface Args { w?:...
import PageTestCommon = require("./page-tests-common"); import {Page, ShownModallyData} from "ui/page"; import TKUnit = require("../../TKUnit"); import {Label} from "ui/label"; import helper = require("../helper"); import {View} from "ui/core/view"; import {EventData} from "data/observable"; import uiUtils = require("...
import * as express from 'express' import * as bodyParser from 'body-parser' import * as http from 'http' import * as https from 'https' import * as fs from 'fs' declare function ws(this: express.Server, url: string, callback: any) declare function ws(this: express.Express, url: string, callback: any) declare module ...
/** * Copyright 2018 ZenyWay S.A.S., <NAME> * @author <NAME> * @license Apache Version 2.0 * * 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....
<filename>src/Ratio.ts<gh_stars>1-10 function gcd( a: number, b: number ): number { if ( a === b ) { return a } else if ( a > b && a % b === 0) { return b } else if ( b > a && b % a === 0) { return a } else { let c = b while ( b !== 0 ) { c = b b = a % b a = c } return c } } export class Ra...
import React, { useState, useEffect, useRef, useCallback } from 'react'; type Position = { x: number; y: number; }; export type DraggableProps = { /** If blocking is true then stop propagation and prevent default are used on the event */ blocking?: boolean; /** An optional boundary for how far the element c...
import React from 'react'; import styled from '@emotion/styled'; import DateTimePicker from 'react-datetime-picker'; import { GithubPicker } from 'react-color'; import { colors, customColors, fonts } from '../../../constants'; import { Data } from '../../../models/tree/tree-base'; import Label from '../../../models/la...
<reponame>jometzner/intershop-pwa import { isPlatformBrowser } from '@angular/common'; import { HttpErrorResponse, HttpEvent, HttpHandler, HttpRequest, HttpResponse } from '@angular/common/http'; import { ApplicationRef, Inject, Injectable, PLATFORM_ID } from '@angular/core'; import { Router } from '@angular/router'; i...
import { onMounted, onBeforeUnmount, nextTick, shallowRef, Ref } from 'vue' import { use, init, graphic, ECharts, EChartsType } from 'echarts/core' import { SVGRenderer } from 'echarts/renderers' import { DatasetComponent, TitleComponent, TooltipComponent, GridComponent, LegendComponent, DataZoomComponent,...
export declare type CanaryTestCallbackBody = (((this: CanaryTest, test: CanaryTest) => void) | ((this: CanaryTest, test: CanaryTest) => Promise<any>)); export declare enum CanaryTestCallbackType { onBegin = "onBegin", onEnd = "onEnd", onEachBegin = "onEachBegin", onEachEnd = "onEachEnd" } export declare...
<gh_stars>1-10 import * as chokidar from 'chokidar'; import * as path from 'path'; import * as proc from 'child_process'; import * as makedir from 'make-dir'; import CommandTemplateProcessor from "./CommandTemplateProcessor"; import * as debugModule from 'debug'; import Configuration from "./Configuration/Configuration...
<filename>src/vscobolscanner.ts import { VSCodeSourceHandler } from "./vscodesourcehandler"; import { TextDocument } from 'vscode'; import COBOLSourceScanner from "./cobolsourcescanner"; import { InMemoryGlobalCachesHelper } from "./imemorycache"; import * as fs from 'fs'; import * as path from 'path'; import { logMe...
<gh_stars>100-1000 import ArtistForEventContract from '@DataContracts/ReleaseEvents/ArtistForEventContract'; import ReleaseEventContract from '@DataContracts/ReleaseEvents/ReleaseEventContract'; import SongListBaseContract from '@DataContracts/SongListBaseContract'; import VenueForApiContract from '@DataContracts/Ve...
import { add0x, remove0x, encodeHex } from '../common' import { BigNumber, ethers } from 'ethers' import { MinioClient } from './minio-client' import { MerkleTree } from 'merkletreejs' export interface BatchContext { numSequencedTransactions: number numSubsequentQueueTransactions: number timestamp: number bloc...
<reponame>byu-oit/waterworks<filename>src/phases/codebuild/index.ts /* * Copyright 2017 <NAME> University * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/...
import pako from 'pako'; import PNG from 'png-ts'; import PDFDocument from 'core/pdf-document/PDFDocument'; import { PDFArray, PDFDictionary, PDFIndirectReference, PDFName, PDFNumber, PDFRawStream, } from 'core/pdf-objects'; import { isInstance, validate } from 'utils/validate'; /** * A note of thanks to...
import * as React from "react"; import Grid from "@material-ui/core/Grid"; import Card from "@material-ui/core/Card"; import CardContent from "@material-ui/core/CardContent"; import Typography from "@material-ui/core/Typography"; import { Member, EarnedMembership, Requirement, ReportRequirement, Report, Ne...
// Parse commands YAML into a package JSON command structure import * as chalk from 'chalk'; import * as fs from 'fs-extra'; import * as yaml from 'js-yaml'; import * as logSymbols from 'log-symbols'; import * as path from 'path'; interface CommandMenuInfo { menu: string; group?: string; when?: string | st...
import * as fs from 'fs'; import * as _ from 'lodash'; import * as revalidator from 'revalidator'; import { SpinnerPromise } from 'resin-cli-visuals'; /** * @summary Validate object * @function * @protected * * @param {Object} object - input object * @param {Object} rules - validation rules * * @throws Will th...
/************************************************************************************************** * hoobs-desktop * * Copyright (C) 2020 HOOBS * * ...
/********************************************************************* * Copyright (c) Intel Corporation 2019 * SPDX-License-Identifier: Apache-2.0 * Author : <NAME> **********************************************************************/ import { ICommunicator, IStateProcessor, IRLEDecoder } from '../Interfaces' i...
import Koa from 'koa'; import autoBind from 'auto-bind'; import Logger from '@cardstack/logger'; import { ensureLoggedIn } from './utils/auth'; import { inject } from '@cardstack/di'; import { validateRequiredFields } from './utils/validation'; import { validate as validateUUID } from 'uuid'; import * as JSONAPI from '...
<reponame>muteor/ricos /* eslint-disable no-console */ import { Decoration, Node, Node_Type } from 'ricos-schema'; import { RicosInlineStyleRange, RicosEntityRange, RicosEntityMap } from '../..'; import { FROM_RICOS_DECORATION_TYPE, ENTITY_DECORATION_TO_DATA_FIELD } from '../consts'; import { emojiRegex } from '../emoj...
<reponame>EntEthAlliance/EEA-Trusted-Reward-Token<filename>ui/server/src/controllers/admin.controller.ts import { Request, Response } from 'express'; import * as db from '../utils/database'; import { Keccak } from 'sha3'; import { getWeb3, getMemberWeb3 } from '../utils/getWeb3'; import * as contracts from '../utils/co...
import { Injectable } from '@angular/core'; import * as d3 from 'd3'; // import * as selection from 'd3-selection'; import * as _ from 'underscore'; import { MfBarChartComparator } from './mf-bar-chart-comparator.model'; import { MfBarChartData } from './mf-bar-chart-data.model'; const MARGIN = 5; const COMPARATOR_X ...
// Type definitions for dinero.js 1.6 // Project: https://sarahdayan.github.io/dinero.js // Definitions by: BendingBender <https://github.com/BendingBender> // <NAME> <https://github.com/juandaco> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 export as na...
import React from 'react'; import PropTypes from 'prop-types'; import { isFunction, isReactUIComponent } from '../../lib/utils'; import { ThemeContext } from '../../lib/theming/ThemeContext'; import { Theme } from '../../lib/theming/Theme'; import { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../../inte...
<gh_stars>0 import * as OfficeHelpers from '@microsoft/office-js-helpers'; import * as Tone from 'tone'; import {Chord, Note} from 'tonal'; import {isTurtle} from './regex'; import {insertChord, addChordOctave} from './chords'; import {parseBrackets, processParsedBrackets} from './bracketsParse'; import {runTurtles, hi...
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; import { ActivatedRoute } from '@angular/router'; import { FormDataService, YFormData } from '@spartacus/dynamicforms'; import { Address, Cart, I18nTestingModule, RoutingService, } from '@spartacus/core'; import { Observable, of } ...
<filename>src/lib/cluster/k_means.ts import * as _ from 'lodash'; import * as Random from 'random-js'; import { IMlModel, Type1DMatrix, Type2DMatrix } from '../types'; import math from '../utils/MathExtra'; import { validateMatrix2D } from '../utils/validation'; export interface KMeansOptions { k: number; distance...
/** * @license * Copyright 2020 Google 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, modify, merge...
import * as db from "db/db" import * as wpdb from "db/wpdb" import * as lodash from "lodash" import { Tag } from "./Tag" import { QueryBuilder } from "knex" import { decodeHTML } from "entities" export namespace Post { export interface Row { id: number title: string slug: string typ...
import type { InitializationPayload, TickPayload, TickResult } from 'xxscreeps/engine/runner'; import 'xxscreeps/config/global'; import * as Fn from 'xxscreeps/utility/functional'; import * as Code from 'xxscreeps/engine/db/user/code-schema'; import * as RoomSchema from 'xxscreeps/engine/db/room'; import { inspect } fr...
/** * Copyright 2016 Palantir Technologies, Inc. All rights reserved. * Licensed under the Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0 */ import { IProps } from "@blueprintjs/core"; import * as classNames from "classnames"; import * as React from "react"; /** * Re-declare matching typ...
<reponame>yuchenghu/angular-cn /** * @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 * as semver from 'semver'; import {ReleaseTrain} from './release-trains'; impo...
// Name: Main // Description: Script Kit // Log: false import { Value } from "../core/enum.js" import { toggleBackground, run, cmd, } from "../core/utils.js" let modifiers = { cmd: "cmd", shift: "shift", opt: "opt", ctrl: "ctrl", } setFlags({ [""]: { name: "Run", description: "Run the selecte...
import { Core, Corestore, Vertex, Errors as HyperGraphErrors } from 'hyper-graphdb' import { DefaultCrypto, ICrypto, Cipher, KeyDef } from 'certacrypt-crypto' import { Transaction, BlockStorage, Errors as HyperObjectsErrors, Errors } from 'hyperobjects' import codecs from 'codecs' import { NoAccessError } from './Error...
import { expect } from 'chai'; import { describe, it } from 'mocha'; import * as sinon from 'sinon'; import { TokenService, User } from '../src/public_api'; import { Auth } from './index.spec'; const userData = { '#': 1, uid: 'xxx', email: '<EMAIL>', password: '<PASSWORD>', refreshToken: '<PASSWORD>', }; l...
import * as E from 'fp-ts/Either'; import * as O from 'fp-ts/Option'; import * as RA from 'fp-ts/ReadonlyArray'; import { pipe } from 'fp-ts/function'; import { isError as _isError, isLoading as _isLoading, isSuccess as _isSuccess, isReady as _isReady, getOrElse as _getOrElse, getOrElseW as _getOrElseW, c...
/* eslint-disable @typescript-eslint/no-non-null-assertion */ import { NS } from '@ns' import { listSleeves, getMeanCombatStat, getLowestPlayerCombatStat, getOrderedCombatStats, workout, travelTo, commitCrime, recoverShock, studyCs, retrieveSleeveInstructions, reportSleeveTasks, SleeveNo, Comb...
/// Renders the main view of the AdvancedApp.useState /// /// - Calls BackgroundGeolocation.ready. /// - Handles ON/OFF <Switch /> with BackgroundGeolocation.start / .stop() /// - [^] getCurrentPosition button. /// - [>] / [||] changePace button. /// import React from "react"; import { StyleSheet, Text, View, S...
<gh_stars>0 import {Injectable} from "@angular/core"; import {Http} from "@angular/http"; import * as $ from "jquery"; import {DiscriminatorMapping} from './discriminator-mapping'; import {BaseModel} from './base.model'; /** * Converts the JSON Graph representation to TypeScript models. * a = { ...
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ import { EuiButton, EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiF...
import {Transition} from "@headlessui/react" import {Dispatch, RootState} from "../../pages/_app"; import {useSelector, useDispatch} from 'react-redux' import {useForm} from "react-hook-form"; // TODO: Make only one day selectable, pull text out into global state, dispatch new chore function Repetition() { return...
import { DataFrame, dateTimeFormat, Field, FieldType, GrafInsightTheme, LinkModel, systemDateFormats, TimeZone, } from '@grafinsight/data'; import { FieldLinkList, Portal, TooltipContainer, useStyles } from '@grafinsight/ui'; import { css, cx } from 'emotion'; import React, { useCallback, useRef, useSta...
import { GetServerSideProps } from "next"; import { useRouter } from "next/dist/client/router"; import { parseCookies } from "nookies"; import React from "react"; import { BsArrowRight } from "react-icons/bs"; import { Button, Flex, Icon, Spinner, Stack, VStack } from "@chakra-ui/react"; import { Language } from "../...
import * as chai from "chai"; import { waffleChai } from "@ethereum-waffle/chai"; import { IERC20 } from "../typechain"; chai.use(waffleChai); import { ethers, deployments, getNamedAccounts } from "hardhat"; import { Accounts, addLiquidity, approveToken, buyToken, depositForWeth, getAccount, getERC20At, ...
<filename>client/src/test/diagnostics.test.ts import * as vscode from 'vscode'; import * as assert from 'assert'; import { getDocUri, activate } from './helper'; suite('Diagnostics checks', () => { const docUri = getDocUri('diagnostics.js'); test('Check that information message is thrown for all of the four conso...
import axios from 'axios'; import { CreateScenarioDTO } from 'src/scenario/dto/scenario.dto'; import NodeRedModels from './NodeRedModels'; const MQTT_NODE_ID = '77777777.777777'; interface NodeRedNode { id?: string; name?: string; type: string; topic?: string; label?: string; disabled?: boolean; datatyp...
<filename>packages/anchor-contrib/src/utils/coder.ts import type { Accounts, Idl } from "@project-serum/anchor"; import { BorshCoder, EventParser, utils } from "@project-serum/anchor"; import type { InstructionDisplay } from "@project-serum/anchor/dist/cjs/coder/borsh/instruction"; import type { IdlAccountItem, Idl...
<filename>src/base.ts // utility type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & { [K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>> }[Keys] // Base interfaces export interface IO { InputPath?:...
/** * Copyright 2019 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 applicable law ...
<reponame>emundo/joynr /* * #%L * %% * Copyright (C) 2019 BMW Car IT GmbH * %% * 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 * *...
//Originated from https://codepen.io/toshiya-marukubo/pen/qBXbWZZ import React, { useRef, useEffect } from 'react' type Config = { width: number height: number shapes: Shape[] size: number num: number maxDist: number } type Shape = { x: number y: number d: number a: number i: number } const in...
import { existsSync } from 'node:fs'; import { readFile, writeFile } from 'node:fs/promises'; import fetch from 'node-fetch'; import * as openpgp from 'openpgp'; import { equals, includes, isEmpty, isNil } from 'ramda'; import { apiInfoForStrategy } from '../api'; import { cacheDir, log } from '../config'; import { fi...
import React, { useContext, useState, useRef, useEffect } from 'react'; import NavBarItem from 'components/NavBarItem'; import ShareDropdown from 'components/ShareDropdown'; import SettingsDropdown from 'components/SettingsDropdown'; import { ErrorOccurrence, ErrorOccurrenceContext, hasDebugInfo, IgnitionConfigContext ...
import type { KonvaEventObject } from 'konva/lib/Node'; import { useEffect, useState, MouseEvent } from 'react'; import React from 'react'; import { Checkbox } from 'antd'; import { Item } from '~lib/Item'; import type { LabelQR } from '~lib/Label/LabelQR'; import { CheckboxValueType } from 'antd/lib/checkbox/Group'; ...
import { state } from './../../index'; import { Sheet, shift, str2Sheet } from './music'; import { GameSound } from './sound-effects'; const ms2s = 1000; // Milliseconds to Seconds // Holds information necessary to direct a song export class Conductor { constructor( public readonly ins: { [gsID: number]: GameSo...
<gh_stars>0 /* * REDUX API DATA - lib for handling api requests and response data. * Consists of the following: * * Configuration: * - Global configuration, see constants/apiDataConfig * - Endpoint configuration, see constants/apiDataConfig * * Getting and using data: * - withApiData HOC to bind data from the ...
<reponame>shmli/versea /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import 'reflect-metadata'; import { logWarn, VerseaError } from '@versea/shared'; import { decorate, injectable, ContainerModule, METADATA_KEY as inversify_METADATA_KEY, ...
import { encode64, decode64 } from 'unicrypto' /** * Awaitable timeout (yeah, again, reinventing the wheel every day). * @param millis to wait for. */ export async function timeout(millis: number): Promise<void> { return new Promise((resolve, _) => setTimeout(resolve, millis)); } /** * Execute some function u...
import { DynamoDB } from 'aws-sdk'; import * as winston from 'winston'; import { ensureDomainName, ensureLambdaMethod, ensureResource, ensureRestApi, ensureStagedDeployment } from '../apigateway/gateway'; import { ensureStreamingDB, ensureTable } from '../dynamodb/table'; import { ensureFunction, ensureFunctionDynamoTr...
import * as path from "node:path"; import * as fs from "fs-extra"; import { getCtfcliSpec, hasArtifact } from "./helpers"; import { CHALLENGE_CATEGORIES } from "../types"; import { ignoreWalk } from "../../../util/fsutil"; import { CHALLENGE_CONFIGURATION_FILE_NAME, DELETEME_FILE_NAME_FLAGS, } from "../../../...
import path from 'path' import { parse as parseUrl } from 'url' import { blobToPlain } from './util' type Route = { url: string method: string status: number headers: Record<string, string> body: any data?: string response?: string } const stringOrEmpty = (maybeString: any): string => typeof maybeStr...