text stringlengths 3.08k 15.5k |
|---|
/*
* Copyright © 2021 PS2106, licensed under the MIT License,
* the full text of which can be found under LICENSE.md at the top level of this repository,
* or at https://mit-license.org
*/
import React, {
useState,
useEffect,
} from 'react';
import {
ScrollView,
StyleSheet,
Text,
View,
Image,
Ref... |
import React, { useEffect, useState, useLayoutEffect, useRef } from 'react';
import type { Rectangle } from 'electron';
import { useDispatch } from 'react-redux';
import { push } from 'connected-react-router';
import { Redirect, useLocation } from 'react-router';
import { loadIdentities } from '~/features/IdentitySlice... |
<filename>src/server/land/generator.ts<gh_stars>1-10
import { BiomePicker, BiomeType } from './biome';
import { expose } from 'threads/worker';
import { Vector2 } from '../utils/vector2';
import { BrickData, BrickType } from '../bricks';
import { generateHeightMap, HeightMapValue } from './height-map';
import { RandPic... |
/**
* Analytics packages, eg. package dependency relationship
*/
import type { Packages } from './packages'
import type { SemVerLevel } from './semver'
import { SemVer } from './semver'
/**
* Generate package dependency relationship tree
*/
export type DependenciesTree = Map<string, DependenciesLeaf>
// The two ... |
<gh_stars>10-100
/* eslint-disable import/no-extraneous-dependencies */
import {CursorProperty} from 'csstype';
import {
styled,
getTypographyPreset,
getSize,
getSpace,
getStylePreset,
getResponsiveSize,
getTransitionPreset,
} from '../utils/style';
import {
StyledTrackProps,
SliderProps,
ThumbLabel... |
<filename>src/library/activity-data/best-split-calculator.ts<gh_stars>0
import { sortNumeric } from 'library/utils/array-utils';
export type BestAverage = {
startIndex: number;
average: number;
};
export type Result = {
distance: number;
best: BestAverage | null;
};
const sumRange = (values: number[], from: numb... |
import React, { ReactElement, useContext, useState } from 'react';
import './App.css';
// styling
import 'bootstrap/dist/css/bootstrap.min.css';
import './main.css';
// app-switching
import { Redirect } from 'react-router';
import { BrowserRouter as Router, NavLink, Route } from 'react-router-dom';
import modules fro... |
import { App, HeadingCache, Notice, TFile } from "obsidian";
import { bookAndChapterRegexForOBSK, multipleVersesRegEx, oneVerseRegEx } from "./link-regexes";
import { PluginSettings } from "./main";
/**
* Capitalizes given string (skips leading whitespaces and numbers)
*/
function capitalize(str: string) {
str ... |
import underscore = require('underscore');
import urijs = require('urijs');
import item_store = require('./item_store');
import stringutil = require('./base/stringutil');
import url_util = require('./base/url_util');
export class FieldMatch {
url: item_store.ItemUrl;
field: item_store.ItemField;
formField... |
import * as $ from 'jquery'
import * as React from 'react'
import * as ReactDOM from 'react-dom';
import PropTypes, { string } from 'prop-types';
import * as ReactBootstrap from 'react-bootstrap';
import * as NavbarModule from './navbar-module';
import * as SidebarModule from './sidebar-module';
class SidebarItem exte... |
<reponame>zhutf509/earthengine-api
import {HttpErrorResponse, HttpHeaders, XhrFactory} from '@angular/common/http';
import {MakeRequestParams} from './request_params';
import {Config} from './angular_2_http_client_request_service';
import {ObservableRequestService} from './observable_request_service';
import {concatUrl... |
<gh_stars>1-10
import { logger } from '@shared';
import { Request, Response, Router } from 'express';
import { BAD_REQUEST, OK } from 'http-status-codes';
import query from 'src/query/query';
import {
Participant,
Incident,
IncidentCharacteristic,
Gun,
Location,
} from 'src/table';
// Init shared
const route... |
import React, { FC } from 'react';
import { Typography } from '@material-ui/core';
import { addPhoneCounryCode } from '../../../../../../utils';
import styles from './styles.module.sass';
interface IAdditionalInfo {
pharmacy: any;
}
const AdditionalInfo: FC<IAdditionalInfo> = ({ pharmacy }) => {
const valueOfFaci... |
import * as _ from 'lodash';
import {argv} from 'yargs';
export type NibAction = (context: IContext) => void;
export interface Command {
name: string;
description?: string;
aliases?: string[];
usage?: string;
action?: NibAction;
subcommands?: Command[];
args?: ArgumentDefinition[];
flags?: FlagDefinit... |
<filename>target/flow-frontend/Authentication.ts<gh_stars>0
import { MiddlewareClass, MiddlewareContext, MiddlewareNext } from './Connect';
const $wnd = window as any;
export interface LoginResult {
error: boolean;
token?: string;
errorTitle?: string;
errorMessage?: string;
redirectUrl?: string;
}
export i... |
import { useFormikContext, FormikValues } from 'formik';
import React, { ReactNode, useCallback, useContext, useMemo, useRef } from 'react';
import { useValueRef } from './hooks';
import { AutoSaveOptions } from './types';
interface FormikUndoContext<Values extends FormikValues> {
saveCheckpoint: (values?: Values) ... |
#!/usr/bin/env node
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* U... |
<filename>projects/laji/src/app/+observation/observation.facade.ts
import { Injectable } from '@angular/core';
import { WarehouseQueryInterface } from '../shared/model/WarehouseQueryInterface';
import { BehaviorSubject, Observable, of, Subscription } from 'rxjs';
import { catchError, distinctUntilChanged, map, share, s... |
import { promisify } from 'util'
import { pipeline, finished, Readable, Transform } from 'stream'
import { once } from 'events'
import split2 from 'split2'
import fs from 'fs'
import readline from 'readline'
import tmp from 'tmp'
import esort from 'external-sorting'
tmp.setGracefulCleanup()
const streamFinished = pr... |
import React, { useCallback } from "react";
import { AppContext, AppContextType } from "../../context/AppContext";
import { Alert, Button, Card, Container } from "react-bootstrap";
import { apiClient, ApiOptions } from "../../api/api";
import { withI18n, WithI18nProps } from "../../utils/i18n";
import { AttributeEntity... |
<reponame>terrorizer1980/urban-bot<gh_stars>100-1000
import {
Button,
ChannelsSelect,
Checkboxes,
ConversationsSelect,
Datepicker,
ExternalSelect,
KnownBlock,
MultiChannelsSelect,
MultiConversationsSelect,
MultiExternalSelect,
MultiStaticSelect,
MultiUsersSelect,
Over... |
import moment from 'moment';
import React from 'react';
import styled from 'styled-components';
import Month from '../../Calendar/Month';
import { MonthSelect } from '../../Calendar/MonthSelect';
import { Grid, Item } from '../../Grid';
import { Date } from '../../interfaces/Date';
import * as Yup from 'yup';
import B... |
/* GENERATED FILE */
import { useContext } from "solid-js";
import { IconContext, IconProps } from "../lib";
const renderPathFor = (weight: string, color: string) => {
switch (weight) {
case "bold":
return (
<>
<line x1="160" y1="96" x2="40" y2="216" fill="none" stroke={color} stroke-li... |
/**
* @file AnchorNav
* @description 锚点导航
* @author hsm-lv
*/
import React from 'react';
import {Schema} from '../types';
import {ThemeProps, themeable} from '../theme';
import {PlainObject} from '../types';
import {autobind} from '../utils/helper';
import {uncontrollable} from 'uncontrollable';
import {find} from... |
import invariant from 'invariant';
import isUUID from 'is-uuid';
import { omit } from 'lodash';
import { ILocations, ILogger, IRestaurant, IRestaurantItem, IRestaurantModels } from '../../types';
import { upsert } from '../utils';
// Note: returning extId for jobs
const RAW_DINING_ATTRIBUTES = [
'admissionRequired',... |
<filename>gen/generator.ts
/* eslint-disable no-console, no-eval */
import fs from 'fs'
// import Manifest from '@oclif/dev-cli/lib/commands/manifest'
import { join } from 'path'
import axios from 'axios'
import { snakeCase } from 'lodash'
const Inflector = require('inflector-js')
const COMMANDS_DIR = 'src/commands'... |
import { useCallback, useState } from "react";
import { AnchorButton, ButtonGroup, MenuItem, Intent, Button } from "@blueprintjs/core";
import { IconNames } from "@blueprintjs/icons";
import { useTranslation } from "react-i18next";
// project
import { ConfirmMenu } from "../../components/ConfirmMenu";
import { Notific... |
<gh_stars>0
/**
* Created by <NAME> on 05.08.2014.
*/
import * as d3 from 'd3';
import {AShape} from 'phovea_core/src/geom';
import {list as rlist} from 'phovea_core/src/range';
import {IDType} from 'phovea_core/src/idtype';
var _id = 0, line = d3.svg.line();
function nextID() {
return _id++;
}
function selectCor... |
/* eslint-disable no-mixed-spaces-and-tabs */
import {connect} from "react-redux";
import React from "react";
import {
FlatList,
Text,
TouchableOpacity,
View,
Dimensions,
Alert,
} from "react-native";
import Icon from "react-native-vector-icons/FontAwesome";
import {State} from "../../redux/store";
import {
getO... |
/*!
* © 2019 Atypon Systems 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 required by applicable law or agreed to i... |
import { Menu } from '@headlessui/react'
import { useMemo } from 'react'
import { CheckCircleIcon, ChevronDownIcon } from '@heroicons/react/solid'
import styled from '@emotion/styled'
import useWalletStore from '../stores/useWalletStore'
import {
getWalletProviderByUrl,
WALLET_PROVIDERS,
} from '../utils/wallet-ada... |
import { TileMatrixSet } from '@basemaps/geo';
import { Env, fsa, LogConfig, LogType, Projection } from '@basemaps/shared';
import { CommandLineAction, CommandLineFlagParameter, CommandLineStringParameter } from '@rushstack/ts-command-line';
import Batch from 'aws-sdk/clients/batch.js';
import { CogStacJob } from '../.... |
/*
* Copyright 2018 <NAME> <<EMAIL>>
* Copyright 2018 Institute of the Czech National Corpus,
* Faculty of Arts, Charles University
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the ... |
<reponame>TatsuyaYamamoto/coupling-tune-player<filename>packages/share/src/models/CouplingPlayer/CouplingPlayer.ts<gh_stars>0
import { EventEmitter } from "eventemitter3";
import { analyzeBpm, AnalyzeResult } from "./BpmAnalyzer";
export type CouplingPlayerEventTypes = "play" | "pause" | "update" | "end";
const log ... |
<filename>src/http/stream/HttpResilientStream.ts<gh_stars>1-10
// Copyright 2021 Twitter, Inc.
// SPDX-License-Identifier: Apache-2.0
import { assert, Obj } from '../../util'
import { testAfter } from '../../util/test'
import { HttpEndpoint } from '../HttpEndpoint'
import { EventContext, EventDispatcher, EventListener... |
/**
* Mapwize UI view
* https://mapwize.io
*
* @format
* @flow strict-local
*/
import {
ClickEvent,
CreateMapwizeAPI,
Direction,
DirectionMode,
DirectionOptions,
DirectionPoint,
DirectionProp,
LatLngFloor,
MapOptions,
MapwizeApi,
MapwizeConfiguration,
MapwizeViewRef,
MarkerProp,
Navig... |
<filename>src/frontend/ts/main.ts
interface DeviceInt{
id:string;
name:string;
description:string;
state:string;
type:string;
}
class Main implements EventListenerObject, GETResponseListener, POSTResponseListener{
public myFramework: MyFramework;
counter:number=0;
public main(): void ... |
import React, { useEffect, useState } from 'react';
import 'bulma';
import styled from 'styled-components';
import * as rm from 'typed-rest-client';
import config from '../config'
import LoaderWrapper from './Loading';
import Error from './Error';
import { UserStatsComponent } from '../generated/graphql';
const Styled... |
<filename>client/src/utils/geometry/Rectangle.ts
/*eslint-disable no-unused-vars */
import Intersection from './Intersection'
import Point from './Point'
import Segment from './Segment'
import { FACE, INCH } from '../constants'
enum SideStrings {
B = 'B',
F = 'F',
L = 'L',
R = 'R',
}
interface Si... |
<gh_stars>0
import * as core from '@actions/core';
import * as io from '@actions/io';
import * as fs from 'fs';
import * as path from 'path';
import { getCodeQL } from './codeql';
import * as configUtils from './config-utils';
import * as externalQueries from "./external-queries";
import * as sharedEnv from './shared-... |
<reponame>coreyscherbing/angular<gh_stars>1-10
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {DepGraph} from 'dependency-graph';
import {EntryPoint} from ... |
import { Format, formats as FORMATS } from "./formats.ts";
import { ChooseFormatOptions, Filter, VideoFormat } from "./types.ts";
import * as utils from "./utils.ts";
const audioEncodingRanks = ["mp4a", "mp3", "vorbis", "aac", "opus", "flac"];
const videoEncodingRanks = [
"mp4v",
"avc1",
"<NAME>",
"MP... |
<reponame>rbozan/vscode-lsp-translations<gh_stars>1-10
import * as vscode from "vscode";
import * as originalFetch from "cross-fetch";
const fetch = require("fetch-retry")(originalFetch, {
retries: 3,
retryDelay: 1000,
});
import * as fs from "fs";
import * as os from "os";
import * as path from "path";
import { ... |
<filename>src/lib/librato.ts
/* librato (http://dev.librato.com/v1/post/metrics) source
* If you want to see an example of how to use this source, check: https://gist.github.com/drio/5792680
*/
import { json } from 'd3-fetch';
import { Context } from './context';
import { VERSION } from './version';
import { Metric, ... |
import {
Box,
Button,
Container,
Divider,
Grid,
GridItem,
HStack,
Switch,
Tab,
TabList,
TabPanel,
TabPanels,
Tabs,
Text,
useToast,
VStack,
} from "@chakra-ui/react";
import React, { useEffect, useState } from "react";
import { useAsync } from "react-async"... |
<reponame>AlexNeises/milkdown<gh_stars>0
/* Copyright 2021, Milkdown by Mirone. */
import { css } from '@emotion/css';
import { createNode } from '@milkdown/utils';
import mermaid from 'mermaid';
import { customAlphabet } from 'nanoid';
import { textblockTypeInputRule } from 'prosemirror-inputrules';
import { Node } fr... |
/*
* Copyright 2020 Spotify AB
*
* 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 i... |
import { EventEmitter } from 'events';
import * as net from 'net';
import * as util from 'util';
import { Logger } from '../logger';
import { IRespCommand } from '../resp/command/resp-command';
import { CommandSuite } from '../resp/processor/command-suite';
import { ArrayRedisToken } from '../resp/protocol/array-redis-... |
<reponame>among-the-fence/wigglywoods
import { reloadable } from "./lib/tstl-utils";
const heroSelectionTime = 10;
let GOLD_MODIFIER = 2;
let XP_MODIFIER = 2;
let RESPAWN_MODIFIER = .5;
let command_listener: EventListenerID
let CREEP_SCALE = .15;
declare global {
interface CDOTAGamerules {
Addon: GameMode... |
import { PrismaClient } from '@prisma/client'
import { transformDMMF } from 'prisma-json-schema-generator/dist/generator/transformDMMF'
import { getJSONSchemaProperty } from 'prisma-json-schema-generator/dist/generator/properties'
import { formatSchemaRef } from '../../swagger/utils'
function getJSONSchemaScalar(field... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
<reponame>DanaL/AdventureNotes<gh_stars>0
enum TokenType {
Word,
LineBreak,
BoldMarker,
ItalicMarker,
UnorderedListItem,
NumberedListItem,
LinkDescStart,
LinkDescEnd,
LinkUrlStart,
LinkUrlEnd,
EscapedChar,
Heading1,
Heading2,
Heading3,
Space
}
class Token {
readonly text: string;
readonly type: TokenT... |
<filename>src/schema/v2/me/myBids.ts
import _ from "lodash"
import moment from "moment-timezone"
import { GraphQLFieldConfig, GraphQLList, GraphQLObjectType } from "graphql"
import { ResolverContext } from "types/graphql"
import gql from "lib/gql"
import Sale from "../sale"
import { SaleArtworkType } from "../sale_artw... |
<reponame>geekhall/algorithms
/**
* ID: 01093
* Title: Statistics from a Large Sample
* Difficulty: Medium
* Description: You are given a large sample of integers in the range [0, 255]. Since the sample is so large, it is represented by an array count where count[k] is the number of times that k appears in the s... |
<filename>src/electron-app/web/repositories/project-fs-repository.ts
import { ReferenceTargetUtil } from '@fl-file/reference-target-util';
import { ApplicationConst } from '@fl-three-editor/application/const';
import { ProjectRepository } from '@fl-three-editor/repositories/project-repository';
import { ProjectType } f... |
<reponame>hubble459/weebapi
import express from 'express';
import { getRepository, getManager } from 'typeorm';
import { scrapers } from '../../..';
import { Chapter } from '../../../database/entity/chapter';
import { Manga } from '../../../database/entity/manga';
import { needsRefresh, refreshManga } from '../uti... |
<gh_stars>1-10
import { Component, ComponentResolver, HostListener, Renderer, ViewChild, ViewContainerRef } from '@angular/core';
import { addSelector } from '../../config/bootstrap';
import { Animation } from '../../animations/animation';
import { Backdrop } from '../backdrop/backdrop';
import { Key } from '../../uti... |
import { spawn } from "node:child_process";
import { realpathSync } from "node:fs";
import { writeFile } from "node:fs/promises";
import path from "node:path";
import { useState, useEffect, useRef } from "react";
import onExit from "signal-exit";
import useInspector from "../inspect";
import { DEFAULT_MODULE_RULES } fr... |
<gh_stars>100-1000
import { RendererFactory2 } from '@angular/core';
import { inject, TestBed } from '@angular/core/testing';
import {
BaseSite,
BaseSiteService,
CmsService,
Page,
RoutingService,
ScriptLoader,
} from '@spartacus/core';
import { defaultSmartEditConfig } from 'feature-libs/smartedit/root/conf... |
import 'babel-polyfill';
import 'tailwindcss/tailwind.css';
type Comment = {
user: string;
time_ago: string;
content: string;
comments: Comment[];
};
type Feed = {
read?: boolean;
comments_count: string;
user: string;
points: string;
time_ago: string;
id: number;
title: string;
comments: Commen... |
import { CLIENT_META_DESCRIPTION_MAX_LENGTH } from "./../constants/numbers"
import { NAME_PATH } from "./../constants/names"
import { isDirectoryType, filterIsDirectoryType } from "./dirTree"
import {
isBlogDirectoryInfo,
getBlogPropsFilePath,
getBlogFilePath
} from "./getBlogsInfo"
import readJsonFromFile from "... |
import {
Button,
chakra,
Flex,
Text,
FormControl,
FormLabel,
Input,
Textarea,
Icon,
Stack,
VisuallyHidden,
Image,
} from "@chakra-ui/react";
import { User } from "firebase/auth";
import Head from "next/head";
import React, { useState } from "react";
import { useSelector } from "react-redux";
imp... |
import HorizontalLineWithText from '$/components/atoms/HorizontalLineWithText'
import HeaderLogo from '$/components/molecules/HeaderLogo'
import SocialSignInButtonGroup from '$/components/molecules/SocialSignInButtonGroup'
import { USERS_COLLECTION } from '$/constants/database'
import { RX_VALIDATE_EMAIL } from '$/cons... |
import React from "react";
import {
GridColDef,
GridCellValue,
GridSortCellParams,
GridStateApi,
} from "@material-ui/data-grid";
import _ from "lodash";
import i18n from "../../../utils/i18n";
import { Covid19Info, Structure, ValidationSource } from "../../../domain/entities/Covid19Info";
import { Titl... |
<filename>sdk/nodejs/index.ts
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "./utilities";
// Export members:
export * from "./provider";
/... |
<filename>src/service/reservation.ts<gh_stars>0
/**
* 予約サービス
* 予約の保管先はChevre | COAです
*/
import * as moment from 'moment';
import { credentials } from '../credentials';
import * as chevre from '../chevreapi';
import * as COA from '../coa';
import { factory } from '../factory';
// import { handleChevreError } from ... |
import React from 'react'
import { Menu, MenuItem } from '@material-ui/core'
import { withStyles } from '@material-ui/styles'
import { withRouter } from 'react-router'
import { logoutUrl, helpUrl, CustomerTiers } from 'app/constants'
import { connect } from 'react-redux'
import { sessionStoreKey } from 'core/session/se... |
import vscode from 'vscode'
import type { Client } from 'tangle'
import ExtensionManager from '@vscode-marquee/utils/extension'
import Snippet from './models/Snippet'
import ContentProvider from './provider/ContentProvider'
import SnippetStorageProvider from './provider/SnippetStorageProvider'
import { DEFAULT_STATE,... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
import * as path from 'path';
import * as vscode from 'vscode';
import { getNonce, openExternalLinkFromWebview, webviewCmdLinkHandler } from '../utils';
import { availableReleases, latestCompatibleAsset } from '../utils/ado... |
import {useCallback, useEffect, useMemo, useState} from 'react';
import {useSelector} from 'react-redux';
import {AsyncStatus} from '../../../util/types';
import {CycleEllipsis} from '../../feedback';
import {featureFlags} from '../../../util/features';
import {KYC_BACKEND_URL} from '../../../config';
import {StoreSta... |
import * as React from 'react';
import { Button, Card, Switch, Form, Radio, message } from 'antd';
import { createFormItems } from 'antd-form-mate';
import { Curd, ConfigProvider } from '../../src';
import { InternalCurd } from '../../src/Curd';
import setFormItemsConfig from '../map';
import { data } from '../mock';
... |
import {
Controller,
Get,
Post,
Patch,
Delete,
Body,
Param,
HttpStatus,
NotFoundException,
BadRequestException,
Redirect,
} from '@nestjs/common';
import { ParseIntPipe } from '../common/parse-int.pipe';
import { LocationsService } from './locations.service';
import { Create... |
import { Component, OnInit, ViewChild } from '@angular/core';
import { UserForListDtoModel } from '../../../../model/user/user-for-list-dto.model';
import { UserService } from '../../../../service/user/user.service';
import { DomSanitizer, Title } from '@angular/platform-browser';
import { NgFlashMessageService } from ... |
<gh_stars>0
import axios from "axios";
import dayjs from "dayjs";
import {
AwardsRaw,
AwardsRawItem,
InvoiceAwardCheckResult,
InvoiceAwardInfo,
InvoiceAwardNameType,
InvoiceAwardPeriodType,
} from "invoice-awards.dto";
import { parseStringPromise } from "xml2js";
export {
InvoiceAwardInfo,
InvoiceAward... |
<reponame>jovotech/jovo-cli<gh_stars>10-100
import {
ANSWER_CANCEL,
CliArgs,
CliFlags,
CRYSTAL_BALL,
deleteFolderRecursive,
EventEmitter,
flags,
GlobalCommand,
isJovoCliError,
JovoCli,
JovoCliError,
JovoCliPlugin,
Log,
MarketplacePlugin,
PluginCommand,
PluginContext,
Preset,
printHig... |
import {Flags} from '@oclif/core'
import * as _ from 'lodash'
import * as fs from 'fs'
import {EOL} from 'os'
import {SnapshotCommand, SnapshotEntry} from '../../snapshot-command'
import * as chalk from 'chalk'
interface Change {
name: string;
removed?: boolean;
added?: boolean;
}
type CommandChange = {
plug... |
import cheerio from 'cheerio';
import fs from 'fs';
import request from 'request';
import shell from 'shelljs';
// @ts-ignore
import camelCase from 'lodash.camelcase';
import * as path from 'path';
const macrosDir = path.join(__dirname, '../../../src/Macros');
//region Types
type ScrapeTarget = {
className: string;... |
import { TemplateVariables } from '@/interfaces/TemplateVariables';
import prettyfyRenderedContent from '@/lib/helpers/prettyfyRenderedContent';
import arrayContains from '@/lib/template/helpers/arrayContains';
import consoleLog from '@/lib/template/helpers/consoleLog';
import endsWith from '@/lib/template/helpers/ends... |
import { ShortcutsState, ShortcutActionTypes, ADD_SHORTCUT, DELETE_SHORTCUT, RECEIVE_SHORTCUTS, UPDATE_SHORTCUT, UPDATE_SHURTCUT_SEARCH_CRITERIAS, UPDATE_UNREAD_DOCS_SHORTCUT, REPORT_DOC_READ, SHORTCUT_DOCS_RECEIVED, SHORTCUT_DOCS_ADD, UPDATE_SHURTCUT_DRAFT_SEARCH_CRITERIAS, SHORTCUTS_UPDATE_STAR, SHORTCUTS_UPDATE_LAYO... |
import React, { useState, createRef, useEffect } from 'react';
import { useNavigation, useIsFocused } from '@react-navigation/native';
import AsyncStorage from '@react-native-community/async-storage';
import { RectButton } from 'react-native-gesture-handler';
import { View, ImageBackground, Text, TouchableOpacity, Text... |
import { cloneDeep } from 'lodash';
import estate from './estate.json';
import estatesRecursive from './estates-recursive.json';
import estates from './estates.json';
import schemas from './schemas.json';
export const ENDPOINT = 'https://flowfact-v2.api';
export default (uri: string, options: any) => {
if (uri.incl... |
import {children} from "mojave/dom/traverse";
import {extend} from "mojave/extend";
import {render, createElement} from "preact";
import {AusleseTypes} from "./@types/auslese";
import {Auslese, AusleseProps} from "./Auslese";
import {trigger} from "mojave/dom/events";
import ChangeEvent = AusleseTypes.ChangeEvent;
in... |
import { Platform, StyleSheet, StatusBar } from 'react-native';
import set from 'lodash/set';
import UI from 'stores/UI';
import themes from './themes';
export const getVar = (name: string, fallback: string = undefined) => {
return themes[UI.settings.appearance.theme][name] || fallback;
};
const getStatusBarStyle =... |
<gh_stars>1-10
import { HashedObject } from '../immutable/HashedObject';
import { Context } from '../literals/Context';
import { MutableObject } from './MutableObject';
import { HashedSet } from '../immutable/HashedSet';
import { Hash } from '../hashing/Hashing';
import { HashReference } from '../immutable/HashRefere... |
<filename>src/app/modules/roles/selectors/rolePermissions.ts
import { createSelector } from 'reselect';
import * as rolePermissionRequests from '../requests/rolePermissions';
import mapToArray from '../../../infrastructure/mapToArray';
import { RootState } from '../../../store';
import { func as selectorFunctions } fr... |
<filename>source/SIL.AppBuilder.Portal.Frontend/tests/helpers/request-intercepting/polly.ts
import { Polly } from '@pollyjs/core';
import * as XHRAdapter from '@pollyjs/adapter-xhr';
import * as FetchAdapter from '@pollyjs/adapter-fetch';
import Orbit from '@orbit/data';
import { mockGet, mockPatch, mockPost, mockDele... |
import React, {FC, useEffect, useState} from "react";
import {useTranslation} from "react-i18next";
import {useSelector} from "react-redux";
import {IRootState} from "../../../store/reducers/rootReducer";
import {IAdminState} from "../../../store/reducers/adminReducer";
import useAccess from "../../../hooks/useAccess";... |
import React from 'react';
import { screen, within } from '@testing-library/react';
import { mockMediaQuery, renderWithProviders } from '../../../../testUtils';
import { ILayoutComponent, ILayoutGroup } from 'src/features/form/layout';
import { ILayoutState } from 'src/features/form/layout/formLayoutSlice';
import { IF... |
// Provides transition support for list items.
// supports move transitions using the FLIP technique.
// Because the vdom's children update algorithm is "unstable" - i.e.
// it doesn't guarantee the relative positioning of removed elements,
// we force transition-group to update its children into two passes:
// in the... |
import { RendererPayload } from "./RendererPayload";
import { backgroundRenderer, clearPrevRenderer } from "./Renderers";
import { RenderQueue } from "./RenderQueue";
import { Shader } from "./Shader";
import { TextBox } from "./TextBox";
import { Error } from "./utils/Error";
interface IOptions {
backgroundColor: s... |
<reponame>shang1219178163/vue-project
// const Style = {
// reset: "\x1b[0m",
// bright: "\x1b[1m",
// dim: "\x1b[2m",
// underscore: "\x1b[4m",
// blink: "\x1b[5m",
// reverse: "\x1b[7m",
// hidden: "\x1b[8m",
// // Foreground (text) colors
// fg: {
// black: "\x1b[30m",
// ... |
<reponame>rcsb/molstar-proto<filename>src/mol-geo/representation/structure/visual/util/link.ts<gh_stars>1-10
/**
* Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author <NAME> <<EMAIL>>
*/
import { Vec3 } from 'mol-math/linear-algebra';
import { RuntimeContext } from... |
import React from "react";
import * as MUI from "@material-ui/core";
import * as ICONS from "@material-ui/icons";
import dateFormat from "dateformat";
import * as BLOC from "../bloc";
export class CounterView extends React.PureComponent {
render() {
return (
<React.Fragment>
<BLOC.CounterViewBloc.... |
<reponame>kalexmills/leetware-client
/**
* Section: GUI
*/
import * as Core from "../fwk/core/main";
import * as Yendor from "../fwk/yendor/main";
import * as Umbra from "../fwk/umbra/main";
import * as Gui from "../fwk/gui/main";
import * as Actors from "../fwk/actors/main";
import * as Map from "../fwk/map/main";
i... |
import {assert} from '../deps.ts';
import {getDateFromRFC2822} from './utils.ts';
import {
API_ORIGIN,
APIRoute,
createRequest,
fetchResponse,
type APIResponse,
type APIResponseWithMessage,
} from './core.ts';
export {
type APIResponse,
type APIResponseWithMessage,
};
/**
* Get the API key (token) fo... |
import React, { useState, Fragment, useEffect, useRef } from 'react';
import 'react-grid-layout/css/styles.css';
import 'react-resizable/css/styles.css';
import { Button, Divider, Card, Tooltip, message, Icon } from 'antd';
import { CloseCircleOutlined, EditOutlined, SaveOutlined, PlusOutlined, SyncOutlined } from '@an... |
import React from 'react';
import ReactDOM from 'react-dom';
import { createModel } from 'hox';
import { useMount, useDebounceFn } from 'ahooks';
import dayjs from 'dayjs';
import html2canvas from 'html2canvas';
import fs from 'fs';
import path from 'path';
import { records } from '@shared/db';
import useConnect from ... |
import { LangConfig } from './extension';
export interface Options {
shouldRemoveDuplicates: boolean;
shouldPrependCustomClasses: boolean;
customTailwindPrefix: string;
separator?: RegExp;
replacement?: string;
}
/**
* Sorts a string of CSS classes according to a predefined order.
* @param classString The stri... |
<gh_stars>0
import { Node } from '../dom';
import { ProgramDocument, ProgramElement } from '../programDom';
import { Component } from './component';
import { FlorJsx, FlorJsxAttrs, RefObject, RenderOptions } from './types';
interface ComponentConstructor<P = {}, S = {}> {
new(p: P, s: S): Component
}
function isCom... |
<reponame>Azizganiyu/mooningassetsdashboard<gh_stars>0
import { Component, OnInit } from '@angular/core';
import { AngularFirestore } from '@angular/fire/firestore';
import { FormBuilder, Validators } from '@angular/forms';
import { AuthService } from 'app/services/auth/auth.service';
import { HelperService } from 'app... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.