text stringlengths 3.3k 33k |
|---|
/**
* @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 { Inject, Injectable, Optional, InjectionToken } from '@angular/core';
import { MAT_DATE_LOCALE } from '@angul... |
// random sample transactions for each functionality
import {AnalysisReport} from "./analyze";
import * as _ from "lodash";
import * as fs from "fs";
import * as path from "path";
export interface SampledFunctionality {
stack: string[],
sampledTransactions: string[],
bugType: "Bug-I" | "Bug-II";
}
export... |
/*------------------------------------------------------------------------------
About : Obmop Manager
Created on : Fri Jun 14 2019
Author : <NAME>
Copyright (c) 2019 Obopay Mobile Technologies Pvt Ltd. All rights reserved.
-------------------------------------------------------------------... |
// Copyright (c) 2019 by Audere
//
// Use of this source code is governed by an MIT-style license that
// can be found in the LICENSE file distributed with this file.
import React from "react";
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
import { Address, SurveyResponse } from "../../store... |
import {BasePlugin, SetuConfig, WaifuURLs} from "../types";
import {Client, GroupMessageEvent} from "oicq";
import axios from "axios"
import {GuildMessageEvent} from "oicq/lib/internal/guild";
import * as fs from "fs";
import * as path from "path";
import {random_item} from "../utils";
const defaultImg = {
"code":... |
import { escape } from './util'
import { SSR_ATTR } from 'shared/constants'
import { RenderContext } from './render-context'
import { resolveAsset } from 'core/util/options'
import { generateComponentTrace } from 'core/util/debug'
import { ssrCompileToFunctions } from './compiler'
import { installSSRHelpers } from './o... |
import {
equalTo,
get,
orderByValue,
push,
query,
ref,
set,
} from "firebase/database";
import { latLng, LatLng } from "leaflet";
import { useListVals, useObjectVal } from "react-firebase-hooks/database";
import { db } from "./firebase";
import slugify from "slugify";
import { getOptimizedRoute } from "..... |
<gh_stars>10-100
import fastify from "fastify";
import cors from "cors";
import toobusy from "toobusy-js";
import { ServiceConfig } from "../interfaces/ServiceConfig";
import { IncomingMessage, ServerResponse } from "http";
import { NextFunction } from "connect";
import Debug from "debug";
import Bluebird from "bluebir... |
<reponame>liuzyong/lcp
import {types, getEnv, applySnapshot, getSnapshot} from 'mobx-state-tree';
import {PageStore} from './Page';
import {when, reaction} from 'mobx';
import axios from 'axios';
import qs from 'qs';
import { number } from 'mobx-state-tree/dist/internal';
import { User } from "./User";
import { Config ... |
<reponame>earthiverse/adventureland-bots<filename>source/base/priest.ts<gh_stars>10-100
import AL, { Character, Constants, Entity, Mage, MonsterName, Player, Priest, Tools } from "alclient"
import FastPriorityQueue from "fastpriorityqueue"
import { LOOP_MS } from "./general.js"
export async function attackTheseTypesPr... |
import { empty, from as ofrom, timer, Observable, Observer, Subject, Subscription } from 'rxjs'
import {
catchError,
filter,
map,
mergeMap,
reduce,
switchMap,
take,
timeout,
} from 'rxjs/operators'
import { parseCertList } from './cert'
import { initialWsEvent, initialWsOpts } from './config'
import {
... |
<reponame>mtho11/mykiali
import logfmtParser from 'logfmt/lib/logfmt_parser';
import {
EnvoySpanInfo,
KeyValuePair,
OpenTracingBaseInfo,
OpenTracingHTTPInfo,
OpenTracingTCPInfo,
Span
} from '../../types/JaegerInfo';
import { retrieveTimeRange } from 'components/Time/TimeRangeHelper';
import { guardTimeRange... |
import { EventEmitter } from "events";
import { randomBytes } from "crypto";
import * as _Introspection from "./introspectionServer";
import { isBoolean } from "util"
export const Introspection = _Introspection;
export type ModuleState = {
status: "pending" | "online" | "offline" | "failure";
statusMessage: s... |
// Loaded from https://unpkg.com/luxon@1.25.0/src/impl/util.js
/*
This is just a junk drawer, containing anything used across multiple classes.
Because Luxon is small(ish), this should stay small and we won't worry about splitting
it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided ... |
<filename>tools/webpack.config.ts
import * as AssetsPlugin from 'assets-webpack-plugin';
import * as cssnano from 'cssnano';
import * as path from 'path';
import * as UglifyJsPlugin from 'uglifyjs-webpack-plugin';
import * as webpack from 'webpack';
import { Configuration, Resolve } from 'webpack';
import { BundleAnaly... |
<gh_stars>1-10
import MessageTypes from './message-types';
import { GRAPHQL_WS, GRAPHQL_SUBSCRIPTIONS } from './protocol';
import isObject = require('lodash.isobject');
import {
parse,
ExecutionResult,
GraphQLSchema,
DocumentNode,
validate,
ValidationContext,
specifiedRules,
GraphQLFieldResolver,
} from... |
import { Sound } from "./sound";
import { ColorMap } from "./colormap";
import { BayanKey } from "./bayan";
import { utility } from "./utility";
class PianoKey {
private pitch_;
private keydiv: any;
private isblack_;
public constructor(keydiv: any, pitch: number) {
this.keydiv = key... |
<filename>workspaces/cli-server/src/routers/spec-router.ts
import {getPathsRelativeToCwd, readApiConfig} from '@useoptic/cli-config';
import {parseIgnore} from '@useoptic/cli-config';
import express from 'express';
import * as bodyParser from 'body-parser';
import * as path from 'path';
import * as fs from 'fs-extra';... |
<reponame>kuafuwang/LPG-VScode<filename>src/Utils.ts
'use strict';
import * as net from 'net';
import * as fs from "fs-extra";
import * as path from 'path';
import { TextEditor } from "vscode";
import { workspace, WorkspaceConfiguration, TextDocument, ExtensionContext, Uri, window, Webview } from 'vscode';
import { Eve... |
import { Msg, MsgId } from 'ssb-typescript';
import {
Opts,
Thread,
ProfileOpts,
ThreadOpts,
UpdatesOpts,
FilterOpts,
} from './types';
const pull = require('pull-stream');
const cat = require('pull-cat');
const FlumeViewLevel = require('flumeview-level');
const sort = require('ssb-sort');
const ssbRef = re... |
import { ShellyModelIdentifier } from './common';
export type StatePropertyValue = number | string | boolean;
export type StateProperty = { key: string; value: StatePropertyValue };
type Custom = (value: unknown) => StatePropertyValue;
export type ShellyTrackPropertyType = typeof Boolean | typeof Number | typeof Stri... |
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... |
import {Component} from '@angular/core';
import * as Cookies from 'js-cookie';
import * as fp from 'lodash/fp';
import * as React from 'react';
import {ClrIcon} from 'app/components/icons';
import {SpinnerOverlay} from 'app/components/spinners';
import {EditComponentReact} from 'app/icons/edit';
import {PlaygroundMode... |
<filename>src/lib/barycentric.ts
import { vec } from "./vectors"
const dot2 = (a:vec.Vector2, b: vec.Vector2): number => a.reduce( (acc, cur, i) => acc+cur*b[i], 0)
const dot3 = (a:vec.Vector3, b: vec.Vector3): number => a.reduce( (acc, cur, i) => acc+cur*b[i], 0)
const from2 = (a:vec.Vector2, b: vec.Vector2):vec.Ve... |
/**
* Transmission RPC Client for Ionic/Capacitor, inspired by kkito-transmission-rpc
*/
import { isPlatform } from '@ionic/vue';
import { HTTP } from '@ionic-native/http';
import * as _ from 'lodash';
declare const Buffer: any
declare global {
interface Window {
net: any;
}
}
type Method = "get" | "post" ... |
import { benchmark, BenchmarkConfig, BenchmarkExecutionCallbacks, BenchmarkResult } from './async-bench';
import { arrayToObject, getOrSetFromMap, mapMapValues } from '../../../src/utils/utils';
const COMPARISON_ITERATIONS = 3;
export interface ComparisonBenchmarkResult {
readonly candidates: CandidateResult[];
}... |
import Button from "@material-ui/core/Button";
import Grid from "@material-ui/core/Grid";
import Typography from "@material-ui/core/Typography";
import _ from "lodash";
import { useReducer, useState } from "react";
import { useDispatch } from "react-redux";
import { BrainstoneLocation, Race, SortableIncomeType } from "... |
import React, { Component } from 'react';
import i18n from 'i18next';
import PropTypes from 'prop-types';
import { List, Divider, Modal, Form, Input, Select, InputNumber, Switch } from 'antd';
import ReactJson from 'react-json-view';
import WorkflowSiderContainer from './WorkflowSiderContainer';
import { CommonButton, ... |
<gh_stars>0
import {
JovoModelLuisData,
LuisModelClosedList,
LuisModelClosedSubList,
LuisModelEntity,
LuisModelFile,
LuisModelIntent,
LuisModelUtterances,
} from '.';
import {
InputType,
Intent,
IntentInput,
InputTypeValue,
JovoModel,
JovoModelData,
NativeFileIn... |
import { defaultUILayout } from './uilayout'
import { GraphType
, NodeType
, NodeByIdType
, UINodeType, UINodeByIdType
, UIGraphType
, UIArrowType
, UILayoutType
, UIPosType
, UISlotType
, nextNodeId
} from '../../../lib/Graph/types'
import { minSiz... |
import React, { useEffect, useState } from 'react';
import Link from 'next/link';
import classnames from 'classnames';
import { Box, Avatar, Select, Checkbox } from '@chakra-ui/react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faGithub } from '@fortawesome/free-brands-svg-icons';
import... |
import { Vector2D } from "../2d/Vector2D.js";
import { IRenderable2D, Rectangle } from "../2d/Renderable2D.js";
import { GameState2D } from "../2d/GameState2D.js";
import { GameStatus } from "../GameStatus.js";
import { Brick } from "./Brick.js";
export const MAP_ROWS: number = 17;
export const MAP_COLUMNS: number = ... |
import { createSelector } from 'reselect';
import {
selectSituasjon,
selectDekningsgrad,
selectSøkerErAleneOmOmsorg,
selectAnnenForelder,
selectSøker,
selectErEndringssøknad,
selectSøkerrolle,
selectEkstrainfo,
selectBarn,
} from './søknadSelector';
import {
selectFamiliehendels... |
/*
Copyright 2020 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... |
import {
TransactionContract as Transaction,
DatabaseContract as Database,
BuilderContract as Builder,
QueryContract as Query,
QueryCallback,
NumberResult
} from '../Database'
import { SuiteContract } from '../Test'
type Omit<T, K extends keyof T> = T extends any ? Pick<T, Exclude<keyof T, K>> : never
type... |
const pluralize = require('pluralize');
const normalize = require('normalize-strings');
export const problematic = {
abalone: 4,
abare: 3,
abbruzzese: 4,
abed: 2,
aborigine: 5,
abruzzese: 4,
acreage: 3,
adame: 3,
adieu: 2,
adobe: 3,
anemone: 4,
anyone: 3,
apache: 3,
aphrodite: 4,
apostroph... |
<filename>src/rudp/util.ts
import * as Udp from 'dgram';
import * as Dns from 'dns';
import { DataSegment, AckSegment, HandshakeSegment } from './';
/**
* converts a data segment to a JSON friendly format by encoding the buffer to base64
* @param dataSegment
*/
export function dataSegmentToJsonable(dataSegment: Da... |
// tslint:disable:no-console
// tslint:disable:no-shadowed-variable
import * as fs from "fs";
import * as path from "path";
import {
readCertificate,
split_der,
readCertificateRevocationList,
exploreCertificate,
exploreCertificateSigningRequest
} from "node-opcua-crypto";
import { } from "node... |
<gh_stars>10-100
import fs from 'fs-extra';
import _ from 'lodash';
import path from 'path';
import ts from 'typescript';
import {log} from './logger';
import {fail} from './test-tracker';
import {writeTempFile, matchAndExtract, getTempDir, matchAll} from './utils';
import {CodeSample} from './types';
import {runNode... |
<gh_stars>0
import { BigNumber } from "bignumber.js";
import { addHexPrefix, bufferToInt, ecsign, fromSigned, hashPersonalMessage, intToBuffer, stripHexPrefix, toUnsigned } from "ethereumjs-util";
import { TransactionMeta } from "../Transaction/ITransactionController";
/**
* General utility functions
*/
export fun... |
export enum KeyCodes {
KEY_A = 4,
KEY_B = 5,
KEY_C = 6,
KEY_D = 7,
KEY_E = 8,
KEY_F = 9,
KEY_G = 10,
KEY_H = 11,
KEY_I = 12,
KEY_J = 13,
KEY_K = 14,
KEY_L = 15,
KEY_M = 16,
KEY_N = 17,
KEY_O = 18,
KEY_P = 19,
KEY_Q = 20,
KEY_R = 21,
KEY_S = ... |
<reponame>Kanaries/visual-insights
import { DataSource} from "../commonTypes";
import { getMeaSetsBasedOnClusterGroups, getDimClusterGroups } from './subspaces';
import { CrammersVThreshold, PearsonCorrelation } from './config';
import { Cluster, Outier } from '../ml/index';
import { crammersV, getCombination, pearsonC... |
<filename>src/message/index.ts
import { createBrowser } from "../lib/browser";
import { login, isError } from "..";
import { Auth } from "../types/auth";
import { MailProperty, User, File } from "../types/mail";
import {
getNodeToString,
getNodeToHref,
getNodeToInnerText,
createPage,
downLoadFile,
} from "../... |
<reponame>chipster/Chipster-Web
import { Component, Input, OnInit, ViewChild } from "@angular/core";
import { FormControl, FormGroup } from "@angular/forms";
import { NgbActiveModal } from "@ng-bootstrap/ng-bootstrap";
import { Dataset } from "chipster-js-common";
import * as d3 from "d3";
import log from "loglevel";
i... |
<filename>src/extension.ts
'use strict';
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';
import * as fs from 'fs';
import * as path from 'path';
export class vscodeinterop {
public stat... |
<reponame>everscale-experts/hackathon_new<filename>Research/multisig/call_multisig2.ts
import { BatchOperation, TezosToolkit, MANAGER_LAMBDA, ContractAbstraction, WalletOperationBatch } from '@taquito/taquito';
import { InMemorySigner } from '@taquito/signer';
import { KeyToken } from '@taquito/michelson-encoder/dist/t... |
import { Cache, PathParams } from './types'
import { CHARCODE_QUESTIONMARK, DEFAULT_PARAM_PATTERN, escapeTextToRegexStr, PathGrammarType } from './grammar'
import { PathError } from './error'
import { PathAstNode } from './myna'
type Char = string
export interface AddContext {
readonly path: string
readonly d... |
import { Tabs, Tab, Badge } from "react-bootstrap";
import React, { useEffect, useState } from "react";
import { useParams, useHistory } from "react-router-dom";
import { FormattedMessage, useIntl } from "react-intl";
import { Helmet } from "react-helmet";
import Mousetrap from "mousetrap";
import * as GQL from "src/c... |
// @ts-ignore
import parser = require("./json");
export interface JSONRange {
start: { line: number; column: number };
end: { line: number; column: number };
}
export interface JsonString {
type: "string";
value: string;
range: JSONRange;
}
export interface JsonNull {
type: "null";
value: null;
range... |
// =============================================================================
// Hilbert.js – Function Evaluation
// (c) Mathigon
// =============================================================================
import {total} from '@mathigon/core';
import {gcd, isBetween, lcm} from '@mathigon/fermat';
import {Spec... |
import * as chai from 'chai';
import * as spies from 'chai-spies';
const expect = chai.expect;
const assert = chai.assert;
chai.use(spies);
const spy = chai.spy;
import { GltfLoader } from '../source/gltf-loader';
import * as XMLHttpRequest from 'xhr2';
import { GltfAsset } from '../source/gltf-asset';
import { Load... |
<filename>if-diff.ts
import {XE} from 'xtal-element/src/XE.js';
import {IfDiffActions, IfDiffProps} from './types';
import { LazyMTProps } from 'lazy-mt/types';
import('mut-obs/mut-obs.js');
import('lazy-mt/lazy-mt.js');
/**
* Alternative to Polymer's dom-if element that allows comparison between two operands, as wel... |
<filename>src/inputDateOld/date-utils.tsx
export const translateNumbers = (function () {
// Regexp that matches all supported digits.
// Most Unicode digit classes have the zero digit at a codepoint
// where the four least significant bits are ether zero or six.
// The notable exception is the Math-class where ... |
import { VALOR_EMPATES, VALOR_VICTORIAS } from "./constants";
import { Enfrentamiento, EnfrentamientoJSON } from "./enfrentamiento";
export interface EquipoJSON {
// unique id
nombre: string;
golesAFavor: number;
golesEnContra: number;
victorias: number;
empates: number;
derrotas: number;
faltas: number;
enf... |
import { useState, useEffect } from "react";
import DrawerPage from "./DrawerPage";
import DrawerButtons from "./DrawerButtons";
import CardsInfo from "./CardsInfo";
import SocialInfo from "./SocialInfo";
import BannerInfo from "./BannerInfo";
import drawerScrollInfo from "./DrawerScrollInfo";
import { resources } from... |
import { WrappedFormUtils } from 'antd/lib/form/Form';
import merge from 'deepmerge';
import produce from 'immer';
import { get, groupBy, set } from 'lodash';
import { action, computed, IKeyValueMap, IMapDidChange, observable, ObservableMap, transaction } from 'mobx';
import { BufferCacheGroup, createSimpleTimeBufferIn... |
/* *****************************************
* HTML5 WebGL很酷的文字
* https://wow.techbrood.com/fiddle/17803
* ****************************************/
import * as THREE from 'three'
import { Geometry } from 'three/examples/jsm/deprecated/Geometry'
import fontJson from '@/assets/three/font/Cyberpunk_Regular.json'
impo... |
<reponame>crli/vue3-admin-ts<gh_stars>0
/*
* @Author: crli
* @Date: 2021-10-13 15:50:47
* @LastEditors: crli
* @LastEditTime: 2022-01-10 13:22:53
* @Description: file content
*/
import { loginReq } from '@/api/user'
import { setToken, removeToken, getToken } from '@/utils/auth'
import { resetRouter } from '@/rout... |
// This file manages the rank system
var rankDB:Nedb; //Controls the Rank DB
var ranks:RankType[] = [];
var userRank = {rank: "user", canAddCommands: true, canEditCommands: false, canRemoveCommands: false,
canAddPoints: false, canEditPoints: false, canRemovePoints: false, canAddQuotes: true, canEditQuotes: false,
canRe... |
import {BufferGeometry, Float32BufferAttribute, Geometry, Matrix4, Vector3} from "three"
import {ARROW_LENGTH, ARROW_TIP_LENGTH_FACTOR, ARROW_TIP_WIDTH_FACTOR, ARROW_WIDTH} from "../island/shapes"
import {Direction, IFabricInstanceExports, SEED_CORNERS, SEED_RADIUS} from "./fabric-exports"
import {vectorFromFloatArra... |
import * as _ from 'lodash-es';
import * as React from 'react';
import { Helmet } from 'react-helmet';
import { Button, Chip, ChipGroup, ChipGroupToolbarItem, Expandable } from '@patternfly/react-core';
import { CloseIcon } from '@patternfly/react-icons';
import { getBadgeFromType } from '@console/shared';
import { As... |
<reponame>jgarverick/reqt-integrator
// ---------------------------------------------------------------------
// <copyright file="mappings.ts">
// This code is licensed under the MIT License.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
//... |
import { property, html, customElement, css } from 'lit-element';
import { LitElement } from 'lit-element';
import { SharedStyles } from 'styles/shared-styles';
import { ExplorerStyles } from '../model-explore/explorer-styles'
import { store, RootState } from 'app/store';
import { connect } from 'pwa-helpers/connect-... |
/*
* Copyright 2021 Shulie Technology, Co.Ltd
* Email: <EMAIL>
* 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 b... |
import {observer} from "mobx-react";
import * as React from "react";
import {ButtonBackToTop} from "../../../components";
import {themr} from "../../../theme";
import {GroupResult, SearchStore} from "../../store";
import {
ActionBar,
ActionBarStyle,
DetailProps,
DragLayerStyle,
EmptyPr... |
<filename>src/elements/entry-graph/processors.ts
import {
Dictionary,
EntryDetails,
NewEntryHeader,
SignedHeaderHashed,
Update,
timestampToMillis,
Delete,
EntryDhtStatus,
} from '@holochain-open-dev/core-types';
import {
Cell,
GetLinksResponse,
getAllHeldEntries,
getEntryDetails,
getLinksForEn... |
import {Definition, ProcedureDefinition} from "./../Definition";
import {Module} from "./../Module";
import {Quantity} from "./../Quantity";
import {Scope} from "./../Scope";
import * as Globals from "./../Globals";
import * as Utils from "./../Utils";
import * as Verify from "./../Verify";
import {CharacterValueRule... |
export const description = `
Util math unit tests.
`;
import { makeTestGroup } from '../common/framework/test_group.js';
import { diffULP } from '../webgpu/util/math.js';
import { UnitTest } from './unit_test.js';
export const g = makeTestGroup(UnitTest);
interface DiffULPCase {
a: number;
b: number;
ulp: num... |
<filename>src/SpudBot.ts<gh_stars>0
import { randomInt } from "crypto";
import { IChatWarriorState } from "./ChatWarrior";
import { IIrcBotAuxCommandGroupConfig, IPrivMessageDetail } from "./IrcBot";
import { ITwitchBotConnectionConfig, ITwitchUserDetail, TwitchBotBase } from "./TwitchBot";
import { Utils } from "./Uti... |
import React from 'react'
import { Grid, Select, FormControl } from '@material-ui/core';
import { MenuItem } from "material-ui";
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import { ReactSortable } from "react-sortablejs";
import sprite from "../../../../assets/img/icons-sprite.svg";
import Que... |
<gh_stars>10-100
import {
AsyncSubject, BehaviorSubject, concat, firstValueFrom, from, NEVER, Observable, ObservableInput,
ObservedValueOf, Observer, onErrorResumeNext, OperatorFunction, Subject, Subscription, throwError
} from 'rxjs';
import { mergeMap, publish, switchAll, tap } from 'rxjs/operators';
import { get... |
import React, { useState, useEffect } from "react";
import { Row, Col, Menu, Table, Image } from "antd";
import {
GroupOutlined,
UserOutlined,
MenuOutlined,
DollarOutlined,
SettingOutlined,
ContactsOutlined,
// EditOutlined,
// DeleteOutlined,
} from "@ant-design/icons";
import { useNavigate } from "rea... |
<filename>src/Tweet.ts
/**
* An fully typed tweet. Somewhat opinionated.
*
* For more information about the different twitter entities:
* Tweet: https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/object-model/tweet
* Entities: https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/... |
<reponame>SkyZero1228/node-graphql<filename>src/helpers/user.ts<gh_stars>0
import { User, Sponsor, Ancestry, UserReference, StripeData } from '../db/models/User';
import * as UserInterfaces from '../interfaces/users';
import { IDocumentSession } from 'ravendb';
import { ICookieSession } from '../utils';
import { revers... |
<reponame>yedhrab/EncodedRelativePath
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import {
window, workspace, commands, Disposable,
ExtensionContext, StatusBarAlignment, StatusBarItem,
TextDocument, QuickPickIte... |
const fs = require('fs');
import { fileForTranslations, fileForOverrides } from "./template";
import { TranslationEnum } from "./Types";
/**
* Parser pulls down the translations from Google sheets, and puts them
* in the right fields.
*/
const request = require('request-promise-native');
export type SheetsRespons... |
<reponame>nicofuccella/expo<filename>packages/expo-dev-client-components/src/create-primitive.tsx
import * as React from 'react';
import {
Appearance,
AccessibilityInfo,
AccessibilityChangeEventName,
StyleSheet,
ViewStyle,
ImageStyle,
TextStyle,
Dimensions,
} from 'react-native';
import { ThemePreferen... |
import React from 'react';
// material
import AppBar from '@material-ui/core/AppBar';
import IconButton from '@material-ui/core/IconButton';
import Menu from '@material-ui/core/Menu';
import Toolbar from '@material-ui/core/Toolbar';
import Tooltip from '@material-ui/core/Tooltip';
import BackIcon from '@material... |
<gh_stars>1-10
import Card from './card';
import Suit from './suit';
import { DeckCardsData, SuitCardsData } from '../data/deck-cards-data';
import shuffleArrayOfUniqueValues from '../lib/shuffle-array-of-unique-values';
import {
isNumber,
getPositiveIntegerOrZero,
} from '../lib/utils/value-checkers';
import getRa... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
<reponame>maruf22-dev/LinkEd
/**
* @license
* Copyright 2017 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 r... |
<reponame>hellomouse/stream-server
// redux but with instances
import {
Store,
Reducer,
Action,
Dispatch,
ActionCreator,
StoreCreator,
MiddlewareAPI,
Middleware,
compose
} from 'redux';
import { v4 as uuid } from 'uuid';
/** instance storage thing */
export const instanceStore: WeakMap<Store, Namespa... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {UnknownObject} from '@romejs/typescript-helpers';
import {
DiagnosticAdvice,
Diagnostic,
getDiagnosticsFromError,
... |
import {
ENDPOINTS,
formatNumber,
formatUSD,
Identicon,
MetaplexModal,
Settings,
shortenAddress,
useConnectionConfig,
useNativeAccount,
useWalletModal,
} from '@oyster/common';
import { useWallet } from '@solana/wallet-adapter-react';
import { LAMPORTS_PER_SOL, PublicKey } from '@solana/web3.js';
im... |
<filename>src/lib/flex/layout-gap/layout-gap.ts
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {
Directive,
ElementRef,
Input,
OnChanges,
SimpleChan... |
/// <reference path="_definitions.d.ts" />
export var mimeTypes: { [key: string]: string } = {
"*": "application/octet-stream",
323: "text/h323",
acx: "application/internet-property-stream",
ai: "application/postscript",
aif: "audio/x-aiff",
aifc: "audio/x-aiff",
aiff: "audio/x-aiff",
a... |
<reponame>angelstudio/penrose
import memoize from "fast-memoize";
import { times } from "lodash";
import seedrandom from "seedrandom";
import { Properties } from "types/shapeTypes";
seedrandom("secret-seed", { global: true }); // HACK: constant seed for pseudorandomness
/**
* Generate a random float. The maximum is ... |
<reponame>ZeaInc/zea-kinematics<gh_stars>1-10
import {
MathFunctions,
Vec2,
Vec3,
BooleanParameter,
NumberParameter,
Vec2Parameter,
Vec3Parameter,
ListParameter,
StructParameter,
TreeItemParameter,
Operator,
OperatorOutputMode,
Registry,
Xfo,
XfoOperatorOutput,
} from '@zeainc/zea-engine'
... |
// uses code from
// https://betterprogramming.pub/upload-files-to-next-js-with-api-routes-839ce9f28430
// https://stackoverflow.com/a/62547135
import multer from "multer";
import type { NextApiRequest, NextApiResponse } from "next";
import type { Query } from "../Types";
import nextConnect from "next-connect";
import ... |
<reponame>ElizabethAkin/ExcelPCF
import {IInputs, IOutputs} from "./generated/ManifestTypes";
import * as $ from 'jquery';
import './js/htmlson.js';
import BatchPostRecords from "./utils/BatchPostRecords";
declare var Xrm: any;
interface IDropdownOption{
key:string, text:string, type:string, schemaName:string
}
exp... |
import React, { createContext, useCallback } from 'react';
import { removeQueryArgument, setQueryArgument } from '../ConsoleInternal/components/utils/router';
import en from '../locales/en/quickstart.json';
import {
QUICKSTART_ID_FILTER_KEY,
QUICKSTART_SEARCH_FILTER_KEY,
QUICKSTART_STATUS_FILTER_KEY,
QUICKSTART... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
<gh_stars>1-10
import * as fs from "fs";
import * as path from "path";
const apiDir = path.join(__dirname, "../api/src/");
const swaggerDefinition: {
swagger: "2.0",
info: {
title: string;
version: string;
description: string;
license: {
name: string;
... |
<reponame>ja0nz/umbrella
import { adaptDPI } from "@thi.ng/adapt-dpi";
import { canvasWebGL } from "@thi.ng/hdom-components/canvas";
import { start } from "@thi.ng/hdom/start";
import { fitClamped } from "@thi.ng/math/fit";
import { concat } from "@thi.ng/matrices/concat";
import { lookAt } from "@thi.ng/matrices/looka... |
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*/
import { Arr } from '@ephox/katamari';
import { Compare, SugarElement... |
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import { NgxMatIntlTelInputModule } from 'ngx-mat-intl-tel-input';
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesti... |
<reponame>DawnKing/ctix
import {
ICreateTypeScriptIndex,
INonNullableOptionObjectProps,
IOptionObjectProps,
} from '@interfaces/IConfigObjectProps';
import { ICTIXOptions } from '@interfaces/ICTIXOptions';
import { exists, fastGlobWrap, replaceSepToPosix } from '@tools/misc';
import debug from 'debug';
import mer... |
import * as debug from 'debug';
import * as ts from 'ts-simple-ast';
import Project from 'ts-simple-ast';
const log = debug('typeworx');
export interface BuilderOptions {
handleDuplicates?: boolean;
ignoreCustomJsDocTags?: boolean;
}
export class TypeScriptJsonSchemaBuilder {
private static defaultOptions... |
<reponame>nz-chris/markdown-print-tools
import * as puppeteer from 'puppeteer';
import * as path from 'path';
import * as fs from 'fs';
import {promisify} from 'util';
import paginate, {Page} from 'paginate-dom';
function to_web_uri(absolute_path: string) {
if (/[a-z]+:\/\//.test(absolute_path))
return abs... |
/**
* @description 上传图片
* @author wangfupeng
*/
import Editor from '../../editor/index'
import { arrForEach, forEach } from '../../utils/util'
import post from '../../editor/upload/upload-core'
import Progress from '../../editor/upload/progress'
type ResImgItemType = string | { url: string; alt?: string; href?: st... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.