text
stringlengths
3.08k
15.5k
<gh_stars>10-100 import { isPrimitive } from '@recore/utils/is-primitive'; import { invariant } from '@recore/utils/invariant'; import { hasOwnProperty } from '@recore/utils/has-own-property'; import { globalState } from '../global-state'; import { untrackedStart, untrackedEnd, IDerivation, DerivationState, ...
<gh_stars>0 import { HttpRequest } from '@angular/common/http'; import { getActions } from '../../../store/src/actions/action.helper'; import { endpointSchemaKey } from '../../../store/src/helpers/entity-factory'; import { EntitySchema } from '../../../store/src/helpers/entity-schema'; import { PaginatedAction } from ...
import React, {useState, useEffect} from 'react'; import { SafeAreaView, StyleSheet, ScrollView, View, Text, TouchableOpacity, GestureResponderEvent, } from 'react-native'; import {Colors} from 'react-native/Libraries/NewAppScreen'; import { Robot, BumpersState, CliffSensorState, TouchSensorsStat...
import React, { cloneElement, AnchorHTMLAttributes, Children, Component, ComponentType, ReactElement, StatelessComponent, } from 'react'; import { NavLink as ReactRouterNavLink, NavLinkProps as ReactRouterNavLinkProps } from 'react-router-dom'; import { css, styled } from 'z-frontend-theme'; import { A, ...
<reponame>hacknorris-aka-penguin/gamejolt import Vue from 'vue'; import { Component, Emit, Prop, Provide, Watch } from 'vue-property-decorator'; import { propRequired } from '../../../../utils/vue'; import { CommunityChannel } from '../../../../_common/community/channel/channel.model'; import { Community } from '../../...
import { DrawSetting } from "../../models"; import { ColorPattern, IColorGenerator } from "./interface"; type ColorGradientItem = { position: number; red: number; green: number; blue: number; }; class ColorGenerator implements IColorGenerator { private readonly config: DrawSetting; private colorStartIndex...
<reponame>AnandChowdhary/changebar import { LibraryInterface, GitHubResponse, Constructor } from "./interfaces"; import Popper from "popper.js"; // @ts-ignore import snarkdown from "snarkdown"; import "./styles.scss"; import { unreadCountClass, hasUnreadCountClass, hasUnreadCountVisibleClass, unreadCountDataAtt...
import { Listbox } from "@headlessui/react"; import kebabCase from "lodash.kebabcase"; import Head from "next/head"; import Link from "next/link"; import { useRouter } from "next/router"; import { ReactNode } from "react"; import { Controller, useForm } from "react-hook-form"; import ColorSelect from "src/components/Co...
<reponame>ZooRoyal/coding-standard let test = name => { let b; b = 1; const c = 2; return "hurra" + name + " " + b + c; }; for (let i = 0; i < 10; i++) { test("dudel"); } //Arrow Functions let odds = evens.map(v => v + 1) let pairs = evens.map(v => ({ even: v, odd: v + 1 })) let nums = evens.m...
// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. import { expect } from "chai"; import "mocha"; import { ResultUtils } from "../../../common"; import { Lexer, LexerSnapshot, TriedLexerSnapshot } from "../../../lexer"; import { TriedLexerUpdate } from "../../../lexer/lexer"; import { DefaultSe...
<reponame>hozuki/kk-save-edit import FreeDict from "../../common/FreeDict"; import Guard from "../../common/Guard"; import ArgumentError from "../../common/errors/ArgumentError"; import InvalidOperationError from "../../common/errors/InvalidOperationError"; import Nullable from "../../common/types/Nullable"; import Gen...
<gh_stars>1-10 /** * Copyright(c) Microsoft Corporation.All rights reserved. * Licensed under the MIT License. */ import { Activity, ActivityTypes, BotTelemetryClient, ConversationReference, Middleware, ResourceResponse, TurnContext } from 'botbuilder'; import { TelemetryExtensions } from './telemetryExtensions'; ...
<gh_stars>0 import { Collection, FileInfo, JSCodeshift, types } from 'jscodeshift'; import { getElementMapping, styledComponentImportFunctionShouldBeRemove } from './utils/mappings'; import { processElement } from './utils/process-element'; import * as _ from 'lodash/fp'; import { registerImportSpecifiers } from './uti...
import React, { useContext, useMemo, useCallback } from 'react'; import { ScaleBand, ScaleLinear } from 'd3-scale'; import { // from HoverLayer HoverLayer, // from hooks useHoverState, // from TooltipLayer TooltipLayer, // from Legend, LegendGroup, // from common types AxisEncoding, // from themes...
<filename>src/object/board.ts import {inject, injectable} from "inversify"; import {SocketService} from "../service/socketService"; import {Deck} from "./deck"; import {BoardDisplay, BoardInfo, PlayerDisplay, Score} from "./boardComponent"; import {BoardEventHandler} from "../handler/boardEventHandler"; import { Co...
import * as controller from 'htmlrapier/src/controller'; import * as events from 'htmlrapier/src/eventdispatcher'; import * as hal from 'htmlrapier.halcyon/src/EndpointClient'; import { MainLoadErrorLifecycle } from './MainLoadErrorLifecycle'; import * as form from 'htmlrapier/src/form'; import { JsonSchema } from 'htm...
import * as React from "react"; import Button from "@mui/material/Button"; import Dialog from "@mui/material/Dialog"; import DialogActions from "@mui/material/DialogActions"; import DialogContent from "@mui/material/DialogContent"; import DialogTitle from "@mui/material/DialogTitle"; import Tabs from "@mui/material/Tab...
'use strict'; import fsNode = require('fs'); import * as MatcherCollection from 'matcher-collection'; import ensurePosix = require('ensure-posix-path'); import path = require('path'); import { IMinimatch, IOptions as MinimatchOptions, Minimatch } from 'minimatch'; function walkSync(baseDir: string, inputOptions?: wal...
import { HealthCheckError } from '../../health-check/health-check.error'; import { Injectable, Scope } from '@nestjs/common'; import type * as NestJSMicroservices from '@nestjs/microservices'; import { join } from 'path'; import { Observable } from 'rxjs'; import { HealthIndicatorResult, TimeoutError, UnhealthyRe...
import React, {createContext, useState, ReactNode, useEffect, useContext} from 'react'; import { useColorScheme } from 'react-native'; import { NewEntriesContext } from './newEntriesContext'; import AsyncStorage from '@react-native-community/async-storage'; type ColorSchemeName = 'light' | 'dark' | null | undefined; ...
import React, { ClipboardEventHandler, FormEventHandler, KeyboardEvent, } from "react"; import DefaultTheme from "../theme/default"; import TagsFactory from "./TagsFactory"; import color from "color"; import debug from "debug"; const TAG_LENGTH_LIMIT = 200; // const ADD_A_TAG_STRING = "Add a tag..."; // This is...
import _ from "lodash" import * as React from "react" import { connect } from "react-redux" import { Spinner, Row, Col, Form, InputGroup, Modal, Button, Tabs, Tab, Card, } from "react-bootstrap" import { IApplicationState, AppError } from "../../../store/types" import { Account...
<filename>src/app/emov/ethmov/ethmov.component.ts<gh_stars>0 import { Component, OnInit } from '@angular/core'; import {Web3Service} from '../../util/web3.service'; import { MatSnackBar } from '@angular/material'; import Web3Utils from 'web3-utils'; declare let require: any; const ethmov_artifacts = require('../../../...
<filename>config/db_bootstrap.ts import { Model, Sequelize } from 'sequelize' import { dbConfig, Story, TwitterData, Town } from '../models' import csv from 'csv-parser' import fs from 'fs' import path from 'path' interface seqObject { [key: string] : Model | any | Sequelize; sequelize :Sequelize; } const seq...
import { isEmptyArray, isFunction, isPlainObject, isString, isUndefined, } from '../helpers/is'; import { assert, throwError } from '../helpers/utils'; import { AxiosProgressCallback, AxiosRequestConfig, AxiosRequestData, AxiosRequestFormData, AxiosRequestHeaders, AxiosResponse, AxiosResponseErr...
import { Dictionary, Logger, Service } from '@navarik/types' export type Timestamp = string export type UUID = string export interface Compiler<FromType, ToType> { compile(field: FromType): ToType } export interface IdGenerator<T extends object> { id(body: T): UUID } export interface SchemaField<P = Dictionary<...
<reponame>rvennam/kui<filename>app/plugins/modules/core-support/src/lib/cmds/history/reverse-i-search.ts /* * Copyright 2018 IBM Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License ...
<reponame>chitkadia/server-filter<filename>src/app/app.component.ts import { Component } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; import { environment } from '../environments/environment'; import { jsonData } from '../assets/data/localdata'; interface jsonData { Model: string...
import { useState, useMemo, ChangeEvent, FC } from "react"; import { FaSort, FaSortDown, FaSortUp } from "react-icons/fa"; export type IndexedObject<T> = { index: Record<string, string[]>; source: T; }; function tokenize(s: string): string[] { return s .toLowerCase() .trim() .replace(/[^a-z0-9.\-_: ]...
import U from './util' let MIN_AFFECTED_ENTITIES = 1 const BEACON_EFFECT_RADIUS = 3 const BEACON_SIZE = 3 interface IBeacon extends IPoint { collisionArea: IPoint[] effectsGiven: number avgDistToEntities: number nrOfOverlaps: number } /* How the algorithm works: 1. form valid beacon positio...
import { BigNumber, BigNumberish, FixedNumber, utils } from 'ethers' import { Currency, WEI_PER_UNIT } from 'src/consts' import { ExchangeRate } from 'src/features/exchange/types' import { FeeEstimate } from 'src/features/fees/types' import { TokenExchangeTx } from 'src/features/types' import { Balances } from 'src/fea...
import { toolbarConfigs } from '@admin/components/form/FormEditor'; import FormFieldEditor from '@admin/components/form/FormFieldEditor'; import releaseMetaGuidanceService from '@admin/services/releaseMetaGuidanceService'; import Accordion from '@common/components/Accordion'; import AccordionSection from '@common/compo...
import * as fs from 'fs'; import * as path from 'path'; import { getAccessToken, getAccessTokenResult, getJsapiTicket, getJsapiTicketResult } from './wxRequest'; import * as request from 'request'; import { REGISTER_WX, TOKEN_FOLDER, JSAPI_TICKET_FOLDER } from '../config'; import * as BPromise from 'bluebird'; const { ...
import fs from "fs"; import path from "path"; interface ContentInterface { title: string; description: string; tags: string[]; lastmod: Date; publishdate: Date; content: string; coverImageUrl: string; coverGifUrl: string; filePath: string; fileName: string; } class Content { title: string; des...
import { app, BrowserWindow, ipcMain, screen } from 'electron'; import * as path from 'path'; import * as fs from 'fs'; import * as url from 'url'; import * as download from 'electron-dl'; import * as md5 from 'spark-md5'; import { fork, execFile } from 'child_process'; // Initialize remote module require('@electro...
import { Component, ViewChild } from '@angular/core'; import { AgGridAngular } from 'ag-grid-angular'; import { GridOptions } from 'ag-grid-community/main'; import { AvalaibleYearsService } from '../../services/avalaibleYears.service'; import localeTextESPes from '../../../assets/data/localeTextESPes.json'; import { ...
import { FieldRequest, FieldSelection } from '../../graphql/query-distiller'; import { BasicType, ConditionalQueryNode, FieldQueryNode, NullQueryNode, ObjectQueryNode, PreExecQueryParms, PropertySpecification, QueryNode, RuntimeErrorQueryNode, TransformListQueryNode, TypeCheckQueryNode, VariableAssignmentQueryNode, Var...
import * as bBot from 'bbot' import { SlackClient } from './client' import { AttachmentAction, MessageAttachment } from '@slack/client' import { IEvent, isUser, IUser, IBot, isConversation } from './interfaces' import * as cache from './cache' /** Slack adapter processes incoming/outgoing and queries via Slack RTM...
/** * Smaller version of the async library constructs. * @ignore */ function _noop(): void { /* empty */ } /** * Ensures a function is only called once. * @ignore * @param {function} fn - The function to wrap. * @return {function} The wrapping function. */ function onlyOnce(fn: (() => void) | null): () => vo...
<filename>src/app/routes/material/material-routing.module.ts import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { AutocompleteComponent } from './autocomplete/autocomplete.component'; import { BadgeComponent } from './badge/badge.component'; import { BottomSheetCom...
<filename>src/Graph.ts import { BitSet, HierarchicalBitset, createIterator, one, zero, not, and } from "hibitset-js/lib"; import { Storage, StorageMap, NullStorage, VectorStorage } from "./Storage"; import { VertexTraverser, EdgeTraverser } from "./Traverser"; export type Vertex = number; export type Edge = number; e...
import * as React from 'react'; import "./FrameBox.module.css" import {inject, observer} from "mobx-react"; import scoreStore from "../../stores/scoreStore"; import {ScoreModal} from "../ScoreModal"; import {InputModal} from "../InputModal"; interface FrameProps { p_index: number, f_index: number; } @inject('...
import * as core from "@webcrypto-local/core"; import * as proto from "@webcrypto-local/proto"; import { RemoteIdentity, Server, ServerOptions, Session } from "./connection"; import { WebCryptoLocalError } from "./error"; import { PCSCCard } from "./pcsc"; import { IProviderConfig } from "./provider"; import { CardRead...
/** * GitHub: https://github.com/hexojs/hexo-front-matter * GitHub: https://github.com/nodeca/js-yaml * 源码来自 hexo-front-matter,为其添加类型,修改为 TS 版本 * 使用的依赖为 js-yaml */ import yaml from "js-yaml"; import { formatDate } from "@/shared/utils"; import { BLANK_PATTERN, FRONT_MATTER_PATTERN } from "@/shared/pattern"; impo...
import * as React from 'react'; import { cn } from '@bem-react/classname'; import PageTools from 'lib/pages/PageTools'; import PageAnim from 'blocks/layout/PageAnim/PageAnim'; import { IPage } from 'lib/pages/PageLoader'; import Spinner from 'blocks/content/Spinner/Spinner'; import LoadedPage from 'blocks/pages/Load...
import moment = require('moment'); import * as soap from 'soap'; import { IConfigService } from '../IConfigService'; import { WsServicesNames } from '../SoapMethods'; import { debug, LOG, parseXml, readStringFromFile, signMessage, writeFile, } from '../util'; import { NTPClient } from 'ntpclient...
import { parseDocument } from "htmlparser2"; import { DataNode, Document, Element, isText, Node, Text } from "domhandler"; import render from "dom-serializer"; import { appendChild, getAttributeValue, getElementsByTagName, prependChild, replaceElement, textContent } from "domutils"; import { Web...
<filename>lib/VolumeExpander.ts /* * Copyright (c) 2018 <NAME>. All rights reserved. * * @LICENSE_HEADER_START@ * * 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, i...
import React, {useEffect, useState, ChangeEvent, FormEvent} from 'react'; import './styles.css'; import {Link, useHistory} from 'react-router-dom'; import {FiArrowLeft} from 'react-icons/fi'; import logo from '../../assets/logo.svg'; import {Map, TileLayer, Marker } from 'react-leaflet'; import {LeafletMouseEvent} from...
<reponame>luck7710/sba-angular import { Component, forwardRef, Input, OnInit, ViewChild, ElementRef } from '@angular/core'; import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; import { Utils, NameValueArrayView, Keys } from "@sinequa/core/base"; export interface SelectOptions { items: NameVal...
import React, { useEffect, useState } from 'react'; import { useHistory, useParams } from 'react-router-dom'; import api from '../../service/api'; import socketIo from 'socket.io-client'; import Score from '../../component/Score/Score'; import WaitingRoom from '../../component/Waiting-Room/WaitingRoom'; import GameBoa...
import * as fs from "fs"; import * as debug from "../util/debug"; import { URI } from "../util/URI"; import merge from "lodash.merge"; import type { ImporterReturnType, AsyncImporter, AsyncContext } from "node-sass"; import { IEyeglass } from "../IEyeglass"; import { SassImplementation } from "../util/SassImplementatio...
<filename>src/api/modules/crud/controller.ts import boom from '@hapi/boom'; import { DatabaseTransactionConnectionType } from 'slonik'; import { insertCrudItem, selectCrudItem, selectAllCrudItems, updateCrudItem, deleteCrudItem, } from './queries'; import { CreateItem, CrudControllerFactory, CrudItem, ...
<filename>src/client/UnifyreExtensionKitClient.ts import {Injectable, JsonRpcRequest, Network, ValidationUtils} from "ferrum-plumbing"; import {ServerApi} from "../common/ServerApi"; import {WalletJsonRpcClient} from "./WalletJsonRpcClient"; import {AppUserProfile} from "./model/AppUserProfile"; import {SendMoneyRespon...
/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import { IFluidHandle, IFluidLoadable } from "@fluidframework/core-interfaces"; import { Serializable } from "@fluidframework/datastore-definitions"; import { NamedFluidDataStoreRegistryEntries,...
import express from "express"; import * as fs from "fs"; import * as path from "path"; import useAsync from "common/server-only/middlewares/useAsync"; import ProjectService from "domain/services/ProjectService"; import HistoryId from "common/all/types/HistoryId"; import DetectionResult from "common/all/types/Detection...
import { ILabShell, JupyterFrontEnd, JupyterFrontEndPlugin } from "@jupyterlab/application"; import { ICommandPalette } from "@jupyterlab/apputils"; import { ISettingRegistry, URLExt, PathExt } from "@jupyterlab/coreutils"; import { IDocumentManager } from "@jupyterlab/docmanager"; import { ServerConnection } from "@ju...
import { withMobileProp } from 'ameo-utils/dist/responsive'; import React, { useEffect, useMemo, useState } from 'react'; import { useQuery } from 'react-query'; import { useRouteMatch } from 'react-router'; import { Link, useLocation } from 'react-router-dom'; import { fetchComparison } from 'src/api'; import { Image...
import { NextFunction, Request, Response } from "express"; import { Details } from "express-useragent"; import { compare } from "bcrypt"; import { getManager } from "typeorm"; import { RandomGenerator } from "typeorm/util/RandomGenerator"; import { Controller } from "../controller"; import { User, UserSession } from "...
import { SidebarItem, Endpoint } from './types/sidebarItems'; async function createYoutubeClient() { const homePageResponse = await fetch('https://www.youtube.com/'); const homePageText = await homePageResponse.text(); const idTokenMatches = homePageText.match(/"ID_TOKEN":"([^"]+)"/); const idToken: string | n...
import { assign } from './helpers' export const ERROR_BLOCK_NAME_TYPE = 'Block name should be a string' export const ERROR_BLOCK_NAME_EMPTY = 'Block name should be non-empty' export interface BemSettings { ns?: string el: string mod: string modValue: string classMap?: Record<string, string> } export interface B...
<filename>chapter-2/src/after/client.ts import { Server, DataType, ClientChange, ClientIncrementChange, ClientValueChange, ClientSetChange, ClientChangeList, SyncingRequest, SyncingResponse } from './'; import { client as valueStrategy } from './strategies/value'; impor...
<filename>packages/morphic-model-algebras/src/primitives.ts import { Option } from 'fp-ts/lib/Option' import { URIS2, Kind2, URIS, Kind, HKT2 } from '@morphic-ts/common/lib/HKT' import { ConfigsForType, AnyEnv } from '@morphic-ts/common/lib/config' import { UUID } from 'io-ts-types/lib/UUID' import { Either } from 'fp-...
<filename>packages/dialogs/src/windows/layers/LayersWindow.ts // import { EditorUI } from "ui/EditorUI"; import { Dialog } from "../../../dialog/Dialog"; import mx from "@mxgraph-app/mx"; import { IDimensions } from "../types"; import { LayerRefreshManager } from "./LayerRefreshManager"; import { LayerDuplicator } from...
<gh_stars>10-100 import { createGlobalStyle } from 'styled-components'; import { theme } from './theme'; export const codeColors = { textShadow: '#222245', selection: '#a599e9', comment: '#b362ff', delimiter: theme.colors.code.color, operator: '#FFB300', punctuation: theme.color('white'), boolean: 'rgb(2...
<filename>assets/src/data/activities/model/rules.ts<gh_stars>10-100 import { setDifference } from 'components/activities/common/utils'; import { Response } from 'components/activities/types'; import { Maybe } from 'tsmonad'; export const invertRule = (rule: string) => `(!(${rule}))`; const andTwoRules = (rule1: strin...
import { generateUuid } from 'back-end/lib'; import { Connection, tryDb } from 'back-end/lib/db'; import { readOneUserSlim } from 'back-end/lib/db/user'; import { ValidatedCreateRequestBody, ValidatedUpdateRequestBody } from 'back-end/lib/resources/content'; import { valid } from 'shared/lib/http'; import { Content, Co...
import { Dialog, DialogChainObject, LocalStorage, LooseDictionary } from "quasar" import { Component } from "vue" import * as dialog from "@tauri-apps/api/dialog" import * as fs from "@tauri-apps/api/fs" import * as path from "@tauri-apps/api/path" import { invoke } from "@tauri-apps/api/tauri" import * as nati...
<filename>src/Config.ts /** * Responsive Image Builder - Config * Exports the config interface, and the config parser */ import Ajv from "ajv"; import chalk from "chalk"; import merge from "deepmerge"; import { ConfigurationError } from "./Interfaces"; import { Logger } from "./Logger"; /** * A single image expor...
import LanguageCode from "./languageCode"; const langCodes: Array<LanguageCode> = [ { text: "Afrikaans", code: "af" }, { text: "Albanian", code: "sq" }, { text: "Amharic", code: "am" }, { text: "Arabic", code: "ar" }, { text: "Armenian", code: "hy" }, { text: "Assamese", code: "as" }, { text: "Azerbaijani", cod...
<filename>src/trackers/lineTracker.ts 'use strict'; import { Disposable, Event, EventEmitter, TextEditor, TextEditorSelectionChangeEvent, window } from 'vscode'; import { isTextEditor } from '../constants'; import { debug, Deferrable, Functions } from '../system'; export interface LinesChangeEvent { readonly editor: ...
import bytes from "bytes"; import { getReasonPhrase, StatusCodes } from "http-status-codes"; import React, { useContext, useState, useEffect } from "react"; import path from "path-browserify"; import { useDropzone } from "react-dropzone"; import { SkynetContext } from "../state/SkynetContext"; import { Container, Head...
import React, { useContext, useEffect, Fragment, useState } from "react"; import { Spinner } from "reactstrap"; import { SuggestionsContext } from "../suggestionsContext/SuggestionsContext"; import { Analyze } from "../analyze/Analyze"; import randomWords from "random-words"; import { FormContext } from "../formContext...
<reponame>MeetzhDing/tencentcloud-monitor-grafana-app // 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service) import { DetailQueryConfig, FildDescriptorType } from '../_base/types'; import { instanceQueryParamsBaseParse } from '../../common/utils'; const namespace = 'QCE/APIGATEWAY'; // 组件名称。这里名字要和index.ts中的SERV...
<reponame>abdonrd/apollo-elements import type { BaseOptions, AppOptions, ComponentOptions } from './options'; import { app } from './app.js'; import { component } from './component.js'; import Case from 'case'; import inquirer from 'inquirer'; import BANNER from './banner.js'; import m from 'module'; const require...
import { AfterViewInit, Component, ElementRef, EventEmitter, Input, NgZone, OnChanges, Output, SimpleChanges, TemplateRef, ViewChild } from '@angular/core'; import { TsObject } from '../../interfaces/common-interfaces'; import { CodemirrorComponent } from '@ctrl/ngx-codemirror'; import { Editor, EditorF...
import { AirPollutionData } from './interfaces/AirPollutionData'; import { OneCallData } from './interfaces/OneCallData'; import { GeocodeData } from './interfaces/GeocodeData'; import fetch, { Headers } from 'node-fetch'; import Bottleneck from 'bottleneck'; import CacheMap from 'cache-map'; export { AirPollutionData...
<reponame>nth-commit/pbt<filename>packages/pbt/src/Property/Property.ts /* istanbul ignore file */ import { pipe } from 'ix/iterable'; import { map } from 'ix/iterable/operators'; import { indexed, Size } from '../Core'; import { Gen, Gens, GenIteration } from '../Gen'; import { GenTree } from '../GenTree'; import { R...
<reponame>Dr-Electron/wasp // Copyright 2020 <NAME> // SPDX-License-Identifier: Apache-2.0 import * as wasmtypes from "./wasmtypes" import {log} from "./sandbox"; // returns a hex string representing the byte buffer function hex(buf: u8[]): string { const hexa = "0123456789abcdef"; let res = ""; for (let ...
/* * Copyright The OpenTelemetry Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or...
import React, { Fragment, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; import { useForceUpdate } from '../../../../common/utils'; import { ConnectedConsoleSpace } from '../../../../services/console/types'; import { PaletteContextProvider, usePalette } from './palette-context'; imp...
/* © 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. */ /// <amd-module name="Facets.Router"/...
<reponame>aemx/dark-plus-material<gh_stars>10-100 import { arrayMap, isNull, stringMapReplace } from "@vangware/utils"; import * as Color from "color"; import fetch from "node-fetch"; /** * Parse string nulls. * @param value Value to parse. */ export const stringNull = (value: string): string => // eslint-disable-...
import React, { FC, useState } from 'react'; import { ipcRenderer } from 'electron'; import { Mode, CustomizedLimit, defaultCustomizedOptions, defaultOptions } from '../config/game.config'; import { OPTIONS_CONFIRM, OPTIONS_CANCEL } from '../config/msg-constant.config'; import { ICustomizedOptions } from '../types';...
import React, { FormEvent, useEffect, useRef, useState } from 'react'; import { FiArrowRight, FiMinus, FiPlus, FiToggleLeft, FiToggleRight } from 'react-icons/fi'; import { useHistory, useLocation } from 'react-router-dom'; import backIcon from '../assets/images/icons/back.svg'; import FormField from '../components/Fo...
import { ElementRef } from '@angular/core'; import * as d3 from 'd3'; import { IDrawForceDirectedChartOptions, IForceDirectedChartData, IForceDirectedChartDataNode, } from '../interfaces/force-directed-chart.interface'; const ticked = ( link?: d3.Selection<SVGLineElement, d3.SimulationLinkDatum<IForceDirected...
import React, { ReactElement, useContext, useRef, useState } from 'react'; import { FileMessage, GroupChannel, OpenChannel, UserMessage } from 'sendbird'; import IconButton from '../../../ui/IconButton'; import { getClassName, copyToClipboard, isUserMessage, isSentMessage, isFailedMessage, } from '../../../u...
import React from 'react'; import * as CSS from 'csstype'; import { useEffect, useState, useRef } from 'react'; import { Messaging } from '../../messaging'; import Urbit from '@urbit/http-api'; import { Command } from './types'; interface InputProps { nextArg: Boolean; previousArg: Boolean; sendCommand: Boolean;...
import React, { FunctionComponent, ReactNode } from 'react'; import Eula from '../Eula'; import { ClickToDial, ClickToDialProps } from './SettingItems/ClickToDial'; import { FooterProps } from './SettingItems/Footer'; import { HeaderProps } from './SettingItems/Header'; import { LinkLineItem } from './SettingItems/Li...
import { Anchor, Card, Icon, Skeleton, Tag } from 'antd'; import dayjs from 'dayjs'; import hljs from 'highlight.js'; import 'highlight.js/styles/atom-one-dark.css'; import _ from 'lodash'; import MarkDownIt from 'markdown-it'; import anchor from 'markdown-it-anchor'; import toc from 'markdown-it-table-of-contents'; im...
<filename>scripts/apidoc/signature.ts import sanitizeHtml from 'sanitize-html'; import type { Comment, ParameterReflection, Reflection, SignatureReflection, SomeType, } from 'typedoc'; import { ReflectionFlag, ReflectionKind } from 'typedoc'; import { createMarkdownRenderer } from 'vitepress'; import type { ...
import { arrayFromFunction, assert, assertInst, eq0, M4, newtonIterate1d, V, V3 } from '../../../ts3dutils/index' import { EPS, ImplicitSurface, ParametricSurface } from '../index' import { atan2, cos, PI, sin } from '../math' /** * Rotation surface with r = f(z) */ export class RotationREqFOfZ extends ParametricS...
import { StyleSheet } from 'react-native'; import chroma from 'chroma-js'; import { iosHomeIndicatorOffset, isLWidth, isMWidth, baseHeaderHeight, viewportWidth } from '../base/metrics.style'; import { COLLAGE_DIMENSIONS, PICTURE_DIMENSIONS } from '../../utils/images'; import { baseFont, titleFont } from '../base/fonts....
import JSZip from 'jszip'; import { saveAs } from 'file-saver'; // import { Diff2HtmlUI } from 'diff2html/lib-esm/ui/js/diff2html-ui.js'; // import { createPatch } from 'diff/lib/index.es6'; const THEME = '#0f1b84'; const questionsElement = Array.from(document.querySelectorAll('h3')) .filter(e => e.textContent === '...
import { exceptionHandler } from '../pk-util/exception'; import { PkProjectConf } from '../pk-conf/projectConf'; import { IPkApp, IPkModule } from '../pk-conf'; import { normalize, join } from 'path'; import { MODULE_DIR } from '../pk-conf/module'; import { homedir } from 'os'; import { preserveDir } from '../pk-util/p...
<reponame>devopstation/graph<gh_stars>0 import { GetBucketLocationCommandOutput, S3 } from '@aws-sdk/client-s3' import { Injectable, Scope } from '@nestjs/common' import * as fs from 'fs' import * as fse from 'fs-extra' import * as os from 'os' import * as path from 'path' import { InMemoryCache } from 'src/helpers/cac...
import { SourceFileProvider } from './SourceFileProvider'; import { fdir } from 'fdir'; import NormalizedPath from '../types/NormalizedPath'; import { promisify } from 'util'; import * as fs from 'fs'; import * as path from 'path'; const readFile = promisify(fs.readFile); const stat = promisify(fs.stat); import...
<filename>packages/susuru/src/hook.ts<gh_stars>0 import { NOOP } from "./constants"; import { EffectHook, Fiber, StateHook, StoreHook, RouterRegisterHook } from "./types"; import { isServer, proxyHandlerFactory } from "./utils"; import lodashMerge from 'lodash.merge'; type ServerSideStoreHydrationData = { [key: st...
import React, { useEffect, useState } from "react" import { View, TouchableOpacity, Text, ActivityIndicator, StyleSheet, Dimensions, FlatList, Image } from "react-native" import { useNavigation } from "@react-navigation/native" import { observer } from "mobx-react-lite" import { Screen } from "../../components" import ...
<filename>src/modules/functions/query/Filter.ts<gh_stars>0 import { EEntType, EFilterOperatorTypes, getArrDepth, GIModel, idsBreak, idsMake, isEmptyArr, TAttribDataTypes, TEntTypeIdx, TId, } from '@design-automation/mobius-sim'; import { checkAttribNameIdxKey, checkAttribValue, ...