text stringlengths 3.08k 15.5k |
|---|
import React, { useState, useEffect } from 'react';
import { StyleSheet, TouchableOpacity, FlatList } from 'react-native';
import { Text, View } from 'native-base';
import { Divider } from 'react-native-paper';
import { useNavigation } from '@react-navigation/native';
import AppLoading from '@components/AppLoading';
im... |
/*
* Copyright 2018 Red Hat, Inc. and/or its affiliates.
*
* 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 ap... |
import React, { useState } from 'react'
import { useLocation, useHistory, Match, Redirect } from 'react-router-dom'
import { useDidMount, useDidUpdate } from 'react-hooks-lib'
import SVG from 'react-inlinesvg'
import _isEmpty from 'lodash/isEmpty'
import _cloneDeep from 'lodash/cloneDeep'
import _some from 'lodash/some... |
import { IProcessManager } from "../Services/ProcessManager";
import FS from "../Services/FileSystem";
import { FunctionSignature, IDisplayItem } from "../App/libOS";
import { OSApi } from "./Types";
import Identity, { IIdentityContainer, IIdentity } from "./Identity";
import OSLib from "./OSLib";
export interface IP... |
<gh_stars>0
import { useReducer, useRef, useMemo, useContext, useDebugValue } from 'react'
import { useReduxContext as useDefaultReduxContext } from './useReduxContext'
import { createSubscription, Subscription } from '../utils/Subscription'
import { useIsomorphicLayoutEffect } from '../utils/useIsomorphicLayoutEffect'... |
<reponame>ja0nz/umbrella
import type { Fn } from "@thi.ng/api";
import { peek } from "@thi.ng/arrays/peek";
import { isString } from "@thi.ng/checks/is-string";
import { canvas2D } from "@thi.ng/hdom-components/canvas";
import { fitClamped } from "@thi.ng/math/fit";
import type { ISubscription } from "@thi.ng/rstream";... |
<filename>src/main/integrations/net-breadcrumbs.ts
/* eslint-disable deprecation/deprecation */
import { getCurrentHub } from '@sentry/core';
import { Integration, Span } from '@sentry/types';
import { fill } from '@sentry/utils';
import { ClientRequest, ClientRequestConstructorOptions, IncomingMessage, net } from 'ele... |
import { float, formid, ubyte, uint32, ushort } from "../../types";
import { ESMBuffer } from "../../util";
import CommonSubrecordFactory from "./common/CommonSubrecordFactory";
import { Subrecord } from "./common/Subrecord";
import { Record } from "./Record";
/*
Expected fields:
EDID
FULL
MODL
MODB
ACBS
SNAM
INAM
RNA... |
/**
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... |
<filename>src/vs/platform/extensionManagement/node/extensionDownloader.ts
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license info... |
import { template } from "@babel/core";
import type { NodePath } from "@babel/traverse";
import type * as t from "@babel/types";
import assert from "assert";
type t = typeof t;
export default function transpileEnum(
path: NodePath<t.TSEnumDeclaration>,
t: t,
) {
const { node } = path;
if (node.declare) {
... |
import {
extensions,
TextDocument,
DiagnosticCollection,
Diagnostic,
workspace as Workspace,
WorkspaceFolder,
Position,
Range,
window,
DiagnosticSeverity,
commands,
Uri,
languages,
ExtensionContext,
} from "vscode";
import { existsSync, openSync, writeSync, unlink, closeSync } from "fs";
imp... |
import { AnsiItem, AnsiHighlight } from '../types'
import { byteLength, upperFirst } from './string'
const foregroundColors = {
30: 'black',
31: 'red',
32: 'green',
33: 'yellow',
34: 'blue',
35: 'magenta',
36: 'cyan',
37: 'white',
90: 'grey'
}
const backgroundColors = {
40: 'black',
41: 'red',
... |
import { league } from "../core";
import { idb } from "../db";
import g from "./g";
import helpers from "./helpers";
import local from "./local";
import type { OwnerMood } from "../../common/types";
const moodTexts = ["Horrible!", "Bad.", "Pretty good.", "Good.", "Excellent!"];
const getMoodScore = (total: number, de... |
import { App, Stack } from "@aws-cdk/core";
import { get, has, merge } from "lodash";
import chalk from "chalk";
import { AwsIamPolicyStatements } from "@serverless/typescript";
import * as path from "path";
import { readFileSync } from "fs";
import { dump } from "js-yaml";
import { FromSchema } from "json-schema-to-ts... |
<gh_stars>0
import { BrowserModule } from '@angular/platform-browser';
import { LOCALE_ID, NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HttpClientModule } from '@angular/common/http';
import {HttpClient} from '@angular/common/http'
import { FormsModule } from '@angul... |
<reponame>briefjudofox/expo<filename>packages/expo/src/logs/LogSerialization.ts
import Constants from 'expo-constants';
import prettyFormat from 'pretty-format';
import parseErrorStack, { StackFrame } from 'react-native/Libraries/Core/Devtools/parseErrorStack';
import symbolicateStackTrace from 'react-native/Libraries/... |
import { PureComponent, Component } from "react"
import {
createAtom,
_allowStateChanges,
Reaction,
$mobx,
_allowStateReadsStart,
_allowStateReadsEnd
} from "mobx"
import { isUsingStaticRendering } from "mobx-react-lite"
import { newSymbol, shallowEqual, setHiddenProp, patch } from "./utils/uti... |
import getSlug from 'speakingurl';
import { diff_match_patch as diffMatchPatch } from 'diff-match-patch';
import VersionNumber from 'react-native-version-number';
import { TARGET_APP } from '~/constants/blockchain';
export const getWordsCount = (text) =>
text && typeof text === 'string'
? text.replace(/^\s+|\s+$... |
<reponame>BhaskaranR/client-1
// ngx-parallax
import { Directive,
ElementRef,
Input,
OnInit } from '@angular/core';
/*
These are optional values you can include in the config object you can pass into the
directive for custom properties you want to use this with. This tool can be used for
more than j... |
<reponame>mjsso/console
import * as React from 'react';
import * as _ from 'lodash';
import { DeploymentConfigModel, DeploymentModel, DaemonSetModel, StatefulSetModel, ReplicationControllerModel, ReplicaSetModel, PodModel } from '@console/internal/models';
import { ChartLabel } from '@patternfly/react-charts';
import {... |
import {
millisToBlocks,
mkLockActions,
RelockParams,
} from '@ergolabs/ergo-dex-sdk';
import {
AssetAmount,
BoxSelection,
DefaultBoxSelector,
RustModule,
TransactionContext,
} from '@ergolabs/ergo-sdk';
import { DateTime } from 'luxon';
import React, { FC, useState } from 'react';
import { ERG_DECIMAL... |
import { Store, RowKey, CellValue } from '../store/types';
import GridEvent from '../event/gridEvent';
import { getEventBus } from '../event/eventBus';
import { isEditableCell, findIndexByRowKey, findRowByRowKey } from '../query/data';
import { isFocusedCell, isEditingCell } from '../query/focus';
import { getRowSpanBy... |
import { Request, Response, NextFunction } from "express";
import { CertificateItemPatchRequest, ItemOptionsRequest, CertificateItem, ItemOptions } from "@companieshouse/api-sdk-node/dist/services/order/certificates/types";
import { patchCertificateItem, getCertificateItem, getCompanyProfile } from "../../client/api.cl... |
/*!
* © Copyright 2021 Micro Focus or one of its affiliates.
*
* 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 app... |
import { Server, IncomingMessage, ServerResponse } from 'http';
import fastifyInit, { FastifyReply, FastifyRequest } from 'fastify';
import fastifyRateLimit from 'fastify-rate-limit';
import fastifyCors from 'fastify-cors';
import fastifySchedulePlugin from 'fastify-schedule';
import { RouteGenericInterface } from 'fas... |
// ----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// ----------------------------------------------------------------------------
import * as fse from 'fs-extra';
import * as path from 'path';
import { QuickPickItem, Uri, windo... |
<reponame>pazams/keystone
import { IncomingMessage } from 'http';
import { Readable } from 'stream';
import { GraphQLSchema, ExecutionResult, DocumentNode } from 'graphql';
import { InitialisedList } from '../lib/core/types-for-lists';
import { BaseListTypeInfo } from './type-info';
import { GqlNames, BaseKeystoneTypeI... |
/* adapted from https://github.com/gcanti/fp-ts */
import { identity as id } from "../../Function"
import type { IdURI } from "../../Modules"
import * as P from "../../Prelude"
import { structF, tupleF } from "../../Prelude/DSL"
import type { Equal } from "../Equal"
import type { Identity } from "../Identity"
import t... |
import { Neovim } from '@chemzqm/neovim'
import { Disposable } from 'vscode-languageserver-protocol'
import commands from '../../commands'
import events from '../../events'
import languages from '../../languages'
import BufferSync from '../../model/bufferSync'
import Highlighter from '../../model/highligher'
import { C... |
<reponame>dpraul/ng-mocks
import { NgModule, Provider } from '@angular/core';
import { getTestBed } from '@angular/core/testing';
import coreConfig from '../common/core.config';
import { extendClass } from '../common/core.helpers';
import coreReflectModuleResolve from '../common/core.reflect.module-resolve';
import { ... |
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import { store } from '/@/store/index.ts'
import { getSession, clearSession } from '/@/utils/storage.ts'
import { NextLoading } from '/@/utils/loading.ts'
import { getUserIn... |
<gh_stars>1-10
import * as THREE from 'three';
export type CameraPosition = {
x: number;
y: number;
d: number;
};
export class Camera extends THREE.PerspectiveCamera {
targetPosition: CameraPosition;
currentPosition: CameraPosition;
delayFactor = 0.75;
constructor(
fov: number,
aspect: number,
... |
import { Http } from '@angular/http';
import { MdError } from '@angular2-material/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/forkJoin';
import 'rxjs/add/observable/of';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/filter';
import 'rxjs/add/operator/do';
import 'rxjs/ad... |
import { GuildMember, Role, Snowflake, User } from "discord.js";
import Makibot from "../Makibot";
import { getLevelV2 } from "./karma";
import logger from "./logger";
import Server from "./server";
import TagBag from "./tagbag";
export interface KarmaStats {
messages: number;
upvotes: number;
downvotes: number;... |
import {
FullMatchMapStats,
TeamStat,
PlayerStat,
MatchStatsOverview,
TeamStatComparison,
PlayerPerformanceStats,
PlayerStats,
PerformanceOverview
} from '../models/FullMatchMapStats'
import { RoundOutcome, WeakRoundOutcome } from '../models/RoundOutcome'
import { Event } from '../models/Event'
import {... |
import { Command } from "commander";
import { log } from "console";
import { MindSphereSdk, SemanticDataInterconnectModels } from "../../api/sdk";
import { throwError } from "../../api/utils";
import {
adjustColor,
errorLog,
getColor,
getSdk,
homeDirLog,
printObjectInfo,
proxyLog,
servic... |
<filename>packages/loaders/json-schema/src/addExecutionLogicToComposer.ts
import { SchemaComposer } from 'graphql-compose';
import crossFetch from 'cross-fetch';
import { Logger, MeshPubSub } from '@graphql-mesh/types';
import { JSONSchemaOperationConfig } from './types';
import { getOperationMetadata, isPubSubOperatio... |
import ElectronAppWrapper from './ElectronAppWrapper';
import shim from '@joplin/lib/shim';
import { _, setLocale } from '@joplin/lib/locale';
const { dirname, toSystemSlashes } = require('@joplin/lib/path-utils');
const { BrowserWindow, nativeTheme } = require('electron');
interface LastSelectedPath {
file: string;... |
<reponame>tuScale/vscode-zephyrus
import { spawn } from 'child_process';
import { EventEmitter, Stream } from 'stream';
import * as vscode from 'vscode';
import BadZephyrPathException from './exceptions/BadZephyrPathException';
import CommandNotFoundException from './exceptions/CommandNotFoundException';
import { Me... |
import { warn } from "loglevel";
import { dropHeaderOrAlias, regNFlags, splitLinksRegex } from "../constants";
import type { BCSettings } from "../interfaces";
export function sum(arr: number[]): number {
return arr.reduce((a, b) => a + b);
}
export function normalise(arr: number[]): number[] {
const max = Math.m... |
import React, { useCallback, useMemo } from "react";
import { useDispatch, useSelector } from "react-redux";
import { ReduxActionTypes } from "constants/ReduxActionConstants";
import { WidgetProps } from "widgets/BaseWidget";
import AnalyticsUtil from "utils/AnalyticsUtil";
import {
PanelConfig,
PropertyPaneConfig... |
<gh_stars>1-10
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import {Tensor as TensorInterface} from './tensor';
type SupportedTypedArrayConstructors = Float32ArrayConstructor|Uint8ArrayConstructor|Int8ArrayConstructor|
Uint16ArrayConstructor|Int16ArrayConstructor... |
<filename>frontend/src/app/resource-form/volume/volume.component.ts
import { Component, OnInit, Input, OnDestroy } from "@angular/core";
import { FormGroup, Validators, ValidatorFn, AbstractControl, FormControl, FormGroupDirective, NgForm } from "@angular/forms";
import { Volume } from "src/app/utils/types";
import { S... |
import type { TableData } from "./types";
const ESCAPED = {
'"': """,
"'": "'",
"&": "&",
"<": "<",
">": ">",
};
/**
* Returns a function that clamps input value to range [min <= x <= max].
*/
export function clamp(x: number, min: number, max: number): number {
return Math.max(min, Math.m... |
<gh_stars>0
import { Injectable, Injector } from '@angular/core';
import { blank, empty as isEmpty } from 'app/shared/helper';
import { Configuration } from 'app/ui/configuration';
import { Banner } from 'app/ui/content/banner';
import { BannerCard } from 'app/ui/content/banner-card';
import { LoginService } from 'app/... |
<reponame>notrab/yoga2
import { ApolloServer } from 'apollo-server-express'
import { watch as nativeWatch } from 'chokidar'
import express from 'express'
import { existsSync } from 'fs'
import { Server } from 'http'
import { makeSchema } from 'nexus'
import { makePrismaSchema } from 'nexus-prisma'
import * as path from... |
type ValidationErrorPrimitive = string;
export interface ValidationErrorObject {
[key: string]: ValidationError;
}
interface ValidationErrorArray extends Array<ValidationError> {}
type ValidationError =
| ValidationErrorPrimitive
| ValidationErrorObject
| ValidationErrorArray;
export interface ResultValid {... |
import {UX} from '@salesforce/command';
import {AnyJson} from '@salesforce/ts-types';
import {Messages, SfdxError} from '@salesforce/core';
import fs = require('fs');
import {RecombinedRuleResults} from '../../types';
import {OUTPUT_FORMAT} from '../RuleManager';
import {INTERNAL_ERROR_CODE} from '../../Constants';
M... |
<gh_stars>0
import {
HDWallet,
GetPublicKey,
PublicKey,
RecoverDevice,
ResetDevice,
LoadDevice,
Coin,
Ping,
Pong,
BTCWallet,
ETHWallet,
Constructor,
ActionCancelled,
DeviceDisconnected,
PopupClosedError,
} from '@shapeshiftoss/hdwallet-core'
import { TrezorBTCWallet } from './bitcoin'
impo... |
import { ethers } from "hardhat";
import { FarmV2__factory, TokenV2__factory } from "../typechain-types";
import moment from "moment";
import { EventStruct } from "../typechain-types/FarmV2";
import axios from "axios";
import 'dotenv/config';
const { fruits } = require('./utils/fruits');
const { farmLenghts } = require... |
<reponame>MrMYHuang/cbetar2<gh_stars>1-10
import * as libxslt from 'libxslt-myh';
import * as fs from 'fs';
import { Document as XmlDoc, Element as XmlEle } from 'libxmljs';
import * as Globals from './Globals';
const libxmljs = libxslt.libxmljs;
let navDocBulei: XmlDoc;
let navDocVol: XmlDoc;
let catalogs: any;
let ... |
<reponame>elazar/unocss<filename>packages/preset-uno/src/rules/background.ts<gh_stars>0
import { Rule, RuleContext } from '@unocss/core'
import { Theme } from '../theme'
import { handler as h } from '../utils'
import { parseColorUtil } from './color'
const colorResolver = (mode: 'from' | 'to' | 'via') =>
([, body]: ... |
<reponame>joshbalfour/foundations
import {
DocumentNode,
IntrospectionEnumType,
IntrospectionInputTypeRef,
IntrospectionInputValue,
IntrospectionObjectType,
TypeKind,
} from 'graphql'
import { gql } from '@apollo/client'
import { nestedFieldsToString, queryableFieldToNestedDict } from './nested-fields'
impo... |
<reponame>mrseanryan/image-classifier-ts
import * as fs from "fs";
import * as path from "path";
import { ImageLocation } from "../model/ImageLocation";
import { Options } from "./args/Args";
import { CsvWriter } from "./CsvWriter";
import { FileUtils } from "./FileUtils";
import { IOutputter } from "./output/IOutputt... |
import {
addAccessibleWindow,
removeAccessibleWindow
} from './accessible-windows';
import { Emitter } from 'containerjs-api-utility';
import 'html2canvas';
declare let html2canvas: any;
const DEFAULT_OPTIONS = {
width: 800,
height: 600
};
let currentWindow = null;
const getWindowOffsets = (... |
import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from '@angular/core';
import { EMPTY, of } from 'rxjs';
import { isPlatformBrowser } from '@angular/common';
import { map, shareReplay, switchMap, observeOn } from 'rxjs/operators';
import {
ɵAngularFireSchedulers,
ɵlazySDKProxy,
ɵPromis... |
<filename>extensions/css-language-features/client/src/cssMain.ts
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
... |
import React, { useEffect, useState } from 'react';
import * as S from './Style';
import { ManufactureDate } from '../../Utils/ManufactureDate';
import { Link, useHistory } from 'react-router-dom';
import selfstudy from 'Api/selfStudy';
import { getCookie } from 'Utils/Cookie';
import { useSetRecoilState } from 'recoil... |
<filename>src/useScratch.ts
import {cloneVNode, createVNode, unref, VNode, renderSlot, computed, ComputedRef} from 'vue';
import {sources, useEffect, useReactive, useRef, useState} from './index';
import {noop, off, on} from './misc/util';
export interface ScratchSensorParams {
disabled?: boolean;
onScratch?: ... |
import "./App.css";
import { maxGuesses } from "./util";
import Game from "./Game";
import { useEffect, useState } from "react";
import { Row, RowState } from "./Row";
import { Clue } from "./clue";
function useSetting<T>(
key: string,
initial: T
): [T, (value: T | ((t: T) => T)) => void] {
const [current, setCu... |
import './lib/polyfills';
/**
* Layout
*/
export { default as Root } from './components/Root/Root';
export { default as View } from './components/View/View';
export { default as Panel } from './components/Panel/Panel';
export { default as PanelHeaderButton } from './components/PanelHeaderButton/PanelHeaderButton';
/... |
/**
* Transform template html and css into executable code.
* Intended to be used in a build step.
*/
import * as ts from 'typescript';
import * as path from 'path';
import {AngularCompilerOptions} from '@angular/tsc-wrapped';
import * as compiler from '@angular/compiler';
import {ViewEncapsulation} from '@angular/... |
/*
This example requires Tailwind CSS v2.0+
This example requires some changes to your config:
```
// tailwind.config.js
module.exports = {
// ...
plugins: [
// ...
require('@tailwindcss/aspect-ratio'),
],
}
```
*/
const people = [
{
name: '<NAME>',
role: 'Senior ... |
<filename>sdk/storage/Azure.Storage.Common/swagger/Generator/src/models.ts
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
import { ITemplate } from './template';
// ##################################... |
import { PHASE, PLAYER, PLAYER_STATS_TABLES } from "../../common";
import { idb } from "../db";
import { g } from "../util";
import type {
UpdateEvents,
ViewInput,
PlayerStatType,
} from "../../common/types";
const updatePlayers = async (
inputs: ViewInput<"playerStats">,
updateEvents: UpdateEvents,
state: any,
... |
<reponame>jacopo69/nativescript-photoviewer<filename>src/photoviewer.ios.ts
import { PhotoViewerOptions, NYTPhotoItem, PhotoViewer as PhotoViewerBase } from ".";
import { Color } from "tns-core-modules/color";
import { isFileOrResourcePath } from "tns-core-modules/utils/utils";
import * as imageSource from "tns-core-mo... |
import { ipcRenderer, webFrame } from 'electron';
import AutoComplete from './models/auto-complete';
import { getTheme } from '~/utils/themes';
import { WEBUI_BASE_URL } from '~/constants/files';
import { injectChromeWebstoreInstallButton } from './chrome-webstore';
const tabId = ipcRenderer.sendSync('get-webcontents... |
<gh_stars>100-1000
import {
Rule,
SchematicContext,
SchematicsException,
Tree,
} from '@angular-devkit/schematics';
import {
addPackageJsonDependency,
NodeDependency,
NodeDependencyType,
} from '@schematics/angular/utility/dependencies';
import semver from 'semver';
import { version } from '../../../packa... |
<filename>client/src/extension.ts
import * as path from 'path';
import {
commands as Commands,
ExtensionContext,
window as Window,
workspace as Workspace,
FileSystemWatcher,
} from 'vscode';
import {
DidChangeWatchedFilesNotification,
DidChangeWatchedFilesParams,
LanguageClient,
LanguageClientOptions,... |
import { LoadingSpinner } from '@sourcegraph/react-loading-spinner'
import MapSearchIcon from 'mdi-react/MapSearchIcon'
import React, { useMemo, useState } from 'react'
import { Route, RouteComponentProps, Switch } from 'react-router'
import { Observable } from 'rxjs'
import { map, tap } from 'rxjs/operators'
import { ... |
import {
createStyles,
Drawer,
List,
ListItem,
ListItemIcon,
ListItemText,
ListSubheader,
Theme,
} from "@material-ui/core";
import { WithStyles, withStyles } from "@material-ui/styles";
import clsx from "clsx";
import React from "react";
import { connect } from "react-redux";
import { NavLink } from "r... |
<gh_stars>1-10
import {
ODDS_TYPE,
BID,
NEGATIVE_ONE,
ONE,
FIFTY,
HUNDRED,
} from 'modules/common/constants';
import { createBigNumber, BigNumber } from 'utils/create-big-number';
import { AppStatus } from 'modules/app/store/app-status';
import {
formatNumber,
formatPercent,
formatFractional,
format... |
import { fork } from "child_process";
import * as graphene from "graphene-pk11";
import * as path from "path";
import * as Color from "../../color";
import { Command } from "../../command";
import { TEST_KEY_ID } from "../../const";
import { lpad, rpad } from "../../helper";
import { IEncThreadTestArgs, IEncThreadTest... |
import { useEffect, useState } from 'react'
import {
Box,
Button,
Collapse,
Drawer,
DrawerBody,
DrawerCloseButton,
DrawerContent,
DrawerOverlay,
Grid,
Heading,
IconButton,
Stack,
Tab,
TabPanel,
TabPanels,
Tabs,
Text,
useDisclosure,
VStack,
} from '@chakra-ui/react'
import { useTou... |
<filename>src/google-apis/auth-client.ts
// Copyright 2016 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless re... |
<reponame>Esri/appstudio-vscode
import { OutputChannel } from 'vscode';
import * as dgram from 'dgram';
import { AddressInfo } from 'net';
export class SyslogServer {
private static instance: SyslogServer;
public static getInstance(channel: OutputChannel): SyslogServer {
if (!SyslogServer.instance) {
SyslogSe... |
<gh_stars>1000+
'use strict';
import config from './config';
import Env from './env';
import log from './log';
import { extend, logError } from './util';
import SGPD from './syncedgetputdelete';
import Access from './access';
import Authorize from './authorize';
import Discover from './discover';
import BaseClient fr... |
import React, {
ChangeEvent,
FC,
FocusEvent,
KeyboardEvent,
MouseEvent,
ReactNode,
useState
} from 'react'
import {
InputValue,
MultiSelectElement,
SelectedElement,
Option,
SelectData
} from '../../models'
import {
Button,
initializeInputValues,
initializeSelectedList,
initializeMultiSel... |
<reponame>gmetrixr/r
import { ElementProperty } from "../../recordTypes/Element";
import { ItemProperty } from "../../recordTypes/Item";
import { RuleAction } from "../rules";
import { RuleEvent } from "../rules";
import { ICogObjectDefinition } from "../BaseCogObject";
import { pathUtils } from "@gmetrixr/gdash";
exp... |
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Step } from 'prosemirror-transform';
import { EditorView } from 'prosemirror-view';
import { mention, emoji, taskDecision } from '@atlaskit/util-data-test';
import { EmojiProvider } from '@atlaskit/emoji/resource';
import { Provider as Smar... |
import React, { useState } from 'react'
import { View, Text, ScrollView } from 'react-native'
import { Icon, Button } from 'react-native-elements'
import Modal from 'react-native-modal'
import Cs from '../styles/ContainerStyles'
import Ts from '../styles/TextStyles'
import Bs from '../styles/ButtonStyles'
import { conn... |
import * as Immutable from 'immutable';
import * as React from 'react';
import { oneLine } from 'common-tags';
export interface ConnectionOptions<Store, Props = {}, OptionalProps = {}, State = {}, Scope = Store> {
scope?: (store: Store) => Scope,
descope?: (store: Store, scope: Scope) => Store,
initialState?: St... |
import chalk from 'chalk'
import glob from 'fast-glob'
import fs from 'fs'
import os from 'os'
import path from 'path'
import { Duplex } from 'stream'
import { VLS } from 'vls'
import { Checker } from '../../Checker'
import { TextDocument } from 'vscode-languageserver-textdocument'
import {
createConnection,
create... |
import _ from 'lodash';
import angular, { ILocationService, IQService } from 'angular';
import locationUtil from 'app/core/utils/location_util';
import { DashboardModel } from '../../state/DashboardModel';
import { HistoryListOpts, RevisionsModel, CalculateDiffOptions, HistorySrv } from './HistorySrv';
import { dateTi... |
import * as React from "react";
import * as PropTypes from "prop-types";
import { Component } from "react";
import cname from "classnames";
import Translate from "react-translate-component";
import pw from "zxcvbn";
import LoadingIndicator from "components/LoadingIndicator";
import { Input } from "components/Common";
... |
import { replaceTagText, replaceText, runExtension } from "../entry-helpers";
import {
getTreeByBlockUid,
getTreeByPageName,
PullBlock,
TreeNode,
} from "roam-client";
type IdsCallback = (ids: number[]) => void;
type DiffOptions = {
addedCallback?: IdsCallback;
removedCallback?: IdsCallback;
callback?: (... |
<gh_stars>0
/**
* https://github.com/gre/bezier-easing
* BezierEasing - use bezier curve for transition easing function
* by <NAME> 2014 - 2015 – MIT License
* @private
*/
const NEWTON_ITERATIONS = 4;
const NEWTON_MIN_SLOPE = 0.001;
const SUBDIVISION_PRECISION = 0.0000001;
const SUBDIVISION_MAX_ITERATIONS = 10;
... |
import ts from "byots";
import luau from "LuauAST";
import { assert } from "Shared/util/assert";
import { TransformState } from "TSTransformer";
import { transformExpression } from "TSTransformer/nodes/expressions/transformExpression";
import { createTruthinessChecks, willCreateTruthinessChecks } from "TSTransformer/ut... |
import Map from './rot-js/map/map';
import '../client/src/utils';
import RotRNG from './rot-js/rng';
const RotMap = Map;
interface MapOptions {
north: boolean,
south: boolean,
east: boolean,
west: boolean,
alignVertical: string,
alignHorizontal: string,
meanWx: number,
mea... |
<gh_stars>1-10
export class Vector3 {
[key: string]: any
public x: number = 0
public y: number = 0
public z: number = 0
constructor(x: number, y: number, z: number) {
this.set(x, y, z)
}
public set(x: number, y: number, z: number) {
this.x = x
this.y = y
this.z = z
}
public move(x: ... |
import WebinyError from "@webiny/error";
import { SearchBody as esSearchBody } from "elastic-ts";
import { decodeCursor } from "@webiny/api-elasticsearch/cursors";
import { ElasticsearchBoolQueryConfig } from "@webiny/api-elasticsearch/types";
import { PageStorageOperationsListWhere } from "@webiny/api-page-builder/typ... |
import * as React from 'react';
import Layout from '../components/layout';
import AreasOfFocusList from '../components/areasOfFocusList';
import {FormattedMessage, useIntl} from 'gatsby-plugin-intl';
import {defineMessages} from 'react-intl';
interface IndexPageProps {
location: Location;
}
// markup
const IndexPag... |
<gh_stars>1-10
import puppeteer from "puppeteer";
type ClickableElement = {
elem: puppeteer.ElementHandle<Element>,
content: string,
selector?: string,
}
type NavigationElement = {
content: string,
tagName: string,
className: string,
url: string,
}
type ElementTarget = {
selector: string,
content... |
<filename>src/render/index.ts
import * as t from '../parser/types';
import * as dtsDom from 'dts-dom';
import { pascalCase } from 'change-case';
import SingleName from '../utils/singleName';
import { RenderOptions, defaultRenderOptions } from './types';
import { mergeObjectJTsonc } from 'src/parser/merge';
type Dts = ... |
import { EOL } from 'os';
import * as path from 'path';
import { TestEvent } from 'vscode-test-adapter-api';
import * as xml2js from 'xml2js';
import { empty } from '../utilities/collections';
import { readFile } from '../utilities/fs';
import { startsWith, concatNonEmpty } from '../utilities/strings';
interface ITe... |
<gh_stars>1-10
import { Matrix, Point, TextureUvs } from "pixi.js";
import { EShapePointsStyle } from "../e-shape-points-style";
import { toDash } from "./to-dash";
import { toScaleInvariant } from "./to-scale-invariant";
export const BAR_VERTEX_COUNT = 4;
export const BAR_INDEX_COUNT = 2;
const BAR_FMIN: number = 0.0... |
import { Direction, GridEngine, GridEngineConfig } from "grid-engine";
import { GAME_HEIGHT, GAME_WIDTH } from "../constants/game";
import { Sprites, Layers, Tilesets, Maps } from "../constants/assets";
import {
convertObjectPositionToTilePosition,
getObjectUnderPlayer,
handleBicycle,
handleClickOnObject,
ha... |
import { XOR } from '@/helper/util'
interface BaseResult {
extra?: Record<string, string | number | boolean | null>
}
export type Result = BaseResult &
XOR<
{
data: Record<string, unknown>
},
{
error: {
code: number
title: string
message: string
}
}
>
e... |
<gh_stars>0
/**
* Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author <NAME> <<EMAIL>>
* @author <NAME> <<EMAIL>>
*/
import { ParamDefinition as PD } from '../mol-util/param-definition';
import { StatefulPluginComponent } from '../mol-plugin-state/component';... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.