text stringlengths 3.08k 15.5k |
|---|
<reponame>Sqwabman/ex-ng2-home-automation
import * as fs from 'fs';
import {Http} from "../utility/http";
import {PhilipsHueInfo} from "./philips-hue-info.interface";
import {HueResponse} from "./hue-response.interface";
import {HueBridge} from "./hue-bridge.interface";
import {isUndefined} from "util";
import {HueLigh... |
<filename>src/convertNumber.ts
const base = [
"không",
"một",
"hai",
"ba",
"bốn",
"năm",
"sáu",
"bảy",
"tám",
"chín",
];
const base_ten = [
"mười",
"hai mươi",
"ba mươi",
"bốn mươi",
"năm mươi",
"sáu mươi",
"bảy mươi",
"tám mươi",
"chín mươi",
];
const base_hundred = [
"không t... |
<filename>packages/plugin-table/src/table/table-item.ts
import { Block, findCutBefore, SylApi, SylController, SylPlugin } from '@syllepsis/adapter';
import { DOMOutputSpec } from 'prosemirror-model';
import { EditorState, NodeSelection, TextSelection } from 'prosemirror-state';
import { EditorView } from 'prosemirror-v... |
import { default as App } from "koa";
import * as Koa from "koa";
import {
createAjv,
AjvErrorObject,
Operation,
createReqValiateFn,
} from "use-openapi";
import Router from "@koa/router";
export type State = any;
export type Context<S = State> = Koa.ParameterizedContext<S> & {
request: { body: any };
};
... |
import { StatusBar } from 'expo-status-bar';
import React, { useContext, useEffect, useRef, useState } from 'react';
import { StyleSheet, View, Text, Pressable } from 'react-native';
import { userContext } from '../../util/Context';
import { Level1slider, Level2slider } from '../VerticalSlider';
import Victory from '..... |
import { combine } from '@/Core/combine';
import { defaultValue } from '@/Core/defaultValue';
import { defined } from '@/Core/defined';
import { Ellipsoid } from '@/Core/Ellipsoid';
import { FeatureDetection } from '@/Core/FeatureDetection';
import { ScreenSpaceEventHandler } from '@/Core/ScreenSpaceEventHandler';
impo... |
<filename>_sources/sources/propMappers.ts<gh_stars>10-100
import {
AccountErrorState,
AccountInfoState,
EventFeedElementState,
FeedState,
IPFSContentState,
IPFSErrorState,
State
} from "./stateInterface";
import {FeedType, FeedFilter} from "./feed/feed.selectors";
import {Vortex} from './vor... |
import React, { useEffect, useState, useRef } from 'react';
import { ButtonLoading } from '../ButtonLoading';
import './style.scss'
const currentYear = new Date().getFullYear();
const monthsArr = Array.from({ length: 12 }, (x, i) => {
const month = i + 1;
return month <= 9 ? '0' + month : month;
});
const yearsAr... |
import Img from 'gatsby-image';
import MDXRenderer from 'gatsby-mdx/mdx-renderer';
import React, { useEffect, useRef } from 'react';
import styled from 'styled-components';
import { DiscussionEmbed } from 'disqus-react';
import { graphql } from 'gatsby';
import Layout from '../components/Layout';
import Link from '../... |
import * as Ajv from 'ajv';
import { compile, parse } from 'json-pointer';
import { PathValidationParamsTypes, PathValidationError } from './errors';
type PathSegment = {
segId: number;
prefix: string;
formalName?: string;
normalizedName?: string;
};
function createError(
dataPath: string,
type: PathVali... |
<filename>pdbparser/tsimport.ts
import { tsw } from "./tswriter";
import path = require('path');
const modulePathes = new Set<string>();
class ImportName {
public value:tsw.Name|null = null;
public type:tsw.TypeName|null = null;
constructor(
public readonly name:string) {
}
import(kind:t... |
<gh_stars>1-10
// Important Note:
// import * as Tabulator from 'tabulator-tables'
// fails with error
// TS2306: File '.../node_modules/@types/tabulator-tables/index.d.ts' is not a module.
// We have to do a bit of contrivances to make it work.
// In global.d.ts, there is
// declare module "tabulator-tables" { export ... |
import { writeCookies } from "./cookies.ts";
import parsePath from "./pathparser.ts";
/**
* The standard request type used througout Reno, which
* is passed to user-defined route handler functions.
* Mostly identical to std/http's ServerRequest, except the
* inclusion of Reno-specific props for ease of use.
*/
ex... |
import axios from 'axios';
import { Modal, notification, message } from 'antd';
import db from './localstorage';
import proxy from '../../config/proxy';
// const server: AxiosInstance = axios.create();
// server.interceptors.request.use((config: AxiosRequestConfig) => {
// //请求拦截
// return config;
// });
// server... |
/**
* Элемент прайс листа
*/
export class PriceItem {
code: string;
folder_id: string;
group_c: string;
group_p: string;
id: number;
name: string;
order_addon_pack_id: string;
price: string;
price_id: string;
unit: string;
}
/**
* Структура прайс листа
*/
export class TreeA... |
<gh_stars>1-10
import {
CancellationTokenSource,
DocumentSymbol,
events,
window,
ExtensionContext,
languages,
workspace,
commands,
Disposable,
} from 'coc.nvim';
import { positionInRange } from './util/pos';
import { convertSymbols, SymbolInfo } from './util/symbol';
import { registerRuntimepath } fro... |
import React, { useState, useEffect } from 'react';
import { useAppDispatch, useAppSelector } from '../../app/hooks';
import { deleteUser, fetchUsers } from './userAPI';
import { userState, User } from './userSlice';
import {
Alert,
AlertColor,
Button,
CircularProgress,
Container,
Dialog,
DialogActions,
... |
import {
ignoredCallExpression,
ignoredArrayExpression,
getLastOperationTrackingResultCall,
isInLeftPartOfAssignmentExpression,
getBabelTypes
} from "../babelPluginHelpers";
import { ExecContext } from "../helperFunctions/ExecContext";
import { nullOnError, safelyReadProperty } from "../util";
import {
getE... |
<filename>util.ts
export function clone(source: any, target: any = {}): any {
for (const key in source) {
if (source.hasOwnProperty(key)) {
if (source[key] === null || source[key] === undefined) {
target[key] = source[key];
}
else if (source[key].clone) {
target[key] = source[key... |
<reponame>k0shk0sh/ShapeShifter
import * as _ from 'lodash';
import { VectorLayer, GroupLayer, PathLayer, ClipPathLayer } from '../layers';
import { newPath, SubPath, Command } from '../paths';
import { ColorUtil, Matrix } from '../common';
import { Svgo } from '../svgo';
// This ID is reserved for the active path lay... |
const brand = Symbol();
interface Brand<B extends object> {
readonly [brand]: B
}
/**
* Branded object type
*/
export type Branded<T, B extends object> = [T & Brand<B>][0]; // from: https://github.com/microsoft/TypeScript/pull/33290#issuecomment-529116445
type BrandedObject<B extends object, X extends object>... |
import {
EthereumJSTransactionFields,
EthereumTransaction,
LogValidationFields,
Receipt,
ReceiptValidationFields,
TransactionLog,
TransactionValidationFields,
} from '../types'
import { BigNumber } from 'bignumber.js'
const Trie = require('merkle-patricia-tree')
const ethereumBlocks = require('ethereumj... |
import Namespace from './Namespace';
import {
DestinationRule,
DestinationRules,
Gateway,
IstioAdapter,
IstioRule,
IstioTemplate,
ObjectValidation,
QuotaSpec,
QuotaSpecBinding,
ServiceEntry,
VirtualService,
VirtualServices
} from './IstioObjects';
import { ResourcePermissions } from './Permissio... |
import {EventEmitter} from "events";
const WebSocket = require('ws');
const ip = require('ip');
import { cert } from './RobokitClientCertificate';
import AsyncToken from './AsyncToken';
import Transaction, { TransactionMessageData } from '../romulus/Transaction';
import TransactionFactory from '../romulus/TransactionFa... |
import {INestApplication, ValidationPipe} from "@nestjs/common";
import {Test} from "@nestjs/testing";
import {TypeOrmModule} from "@nestjs/typeorm";
import * as request from 'supertest';
let app: INestApplication;
let repository: Repository<FriendRequestEntity>;
import 'dotenv/config';
import {FriendRequestEntity} fro... |
import account = require('services/Account');
import shopping = require('services/Shopping');
import mapping = require('knockout.mapping');
import app = require('Application');
class PageModel {
status = ko.observable('none');
receipt = {};
receipts = ko.observableArray<any>();
selectedItemId = ko.ob... |
import { DeCipher, VirtualStoredSerializer, DeCipherOptions } from '@webdav-server/virtual-stored'
import { ServiceReferenceExtended, ServiceReferenceInput, Service } from 'octopod'
import { ServiceInput, ServiceInputResponse } from './Types'
import { checkNewInputFiles } from './actions/checkNewInputFiles'
import { ca... |
<reponame>taoqf/node-openstack-wrapper
import { IMetricLogger } from './os-request';
import * as Request from './os-request';
import { default_timeout } from './utils';
// Class to handle all Heat methdology
// NOTE: This class was created after v2.1.10
// and so mangling is no longer supported or required to be progr... |
<gh_stars>1-10
/**
* Services that does actual stuff
*/
import { Promisify } from './util';
import * as fs from "fs";
import * as path from "path";
import { IncomingMessage, ServerResponse } from "http";
import { DirItem, IndexParam } from './types';
import { renderIndex } from './server-rendering';
export namespac... |
<filename>src/extension.ts
'use strict';
import * as vscode from 'vscode';
import { workspace, ExtensionContext } from 'vscode';
import { LanguageClient, LanguageClientOptions, ServerOptions, Executable } from 'vscode-languageclient';
import * as fs from 'fs';
import { registerCommands } from './features/commands';
i... |
import { mix, easeInQuad } from "./util";
import { HEAD_RATIO } from "./components/head";
import { sum, tail, zipWith } from "lodash";
import { COLUMN_COUNT } from "./store";
// This calculates the layout of the pieces of Machine
// and RatingSquare. This is done JavaScript and in
// one central location, since that m... |
import type { Range } from 'vscode-languageserver';
import type { Identifier, Token } from '../lexer/Token';
import { TokenKind } from '../lexer/TokenKind';
import type { Expression, NamespacedVariableNameExpression } from '../parser/Expression';
import { LiteralExpression, CallExpression, DottedGetExpression, Variable... |
import { expect } from "chai";
import hre from "hardhat";
import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/dist/src/signer-with-address";
import { BigNumber } from "ethers";
import { AssetWrapper, PunkRouter, CryptoPunksMarket, WrappedPunk } from "../typechain";
import { deploy } from "./utils/contracts";
... |
import React, { useState, useCallback, useEffect } from "react";
import { connect, useSelector } from "react-redux";
import { Button } from "semantic-ui-react";
import Draggable from "react-draggable";
import { useDropzone } from "react-dropzone";
import { v4 as uuidv4 } from "uuid";
import randomColor from "randomcolo... |
<reponame>rumax/react-native-PixelsCatcher
/**
* Copyright (c) <NAME> 2018 - present
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import * as formidable from 'formidable';
import * as fs from 'fs';
import * as http from 'http';
import *... |
import aktivitetStatus from '@fpsak-frontend/kodeverk/src/aktivitetStatus';
import { lagNaturalytelseTabelldata } from './NaturalytelsePanel';
const lagBGPeriode = (fom, tom, andeler) => ({
beregningsgrunnlagPeriodeFom: fom,
beregningsgrunnlagPeriodeTom: tom,
beregningsgrunnlagPrStatusOgAndel: andeler,
});
cons... |
import React from 'react';
import type { Entity } from './types';
import { encodeObjectSets, getBankParam1 } from './util';
import { ANY_SPRITE_GRAPHIC_SET } from './constants';
import { ResizableRect } from '../components/ResizableRect';
import { TILE_SIZE } from '../tiles/constants';
const RECT_CLASSES = [
[
'Col... |
import React, { useState } from 'react';
import {
Box, Stepper, Step, StepLabel, Button, Backdrop, CircularProgress, Collapse, Alert, IconButton,
} from '@mui/material';
import CloseIcon from '@mui/icons-material/Close';
import styled from 'styled-components';
import Logo from 'src/assets/img/logo.png';
import { isE... |
<reponame>rmoubayed/angular-upload-files
import { UploadService } from './upload.service';
import { HttpClient, HttpHeaders, HttpParams, HttpEventType } from '@angular/common/http';
import { Component, OnInit, Input, Output, EventEmitter, OnDestroy, AfterViewInit } from '@angular/core';
import { Subscription } from 'rx... |
import { h, JSX } from "preact";
import { useCallback, useEffect, useMemo, useState } from "preact/hooks";
import noop from "lodash/noop";
import classNames from "classnames";
import { Duration } from "luxon";
import usePrevious from "react-use/lib/usePrevious";
import { AttemptCellStatus, isComplete, Problem } from "m... |
<reponame>chromoskein/chromoskein
import { Actions, Model, TabNode } from "flexlayout-react";
import { Dispatch, useEffect, useState, useCallback } from "react";
import { useFreshTick } from "rooks";
import { ChromatinViewportConfiguration, ConfigurationAction, ConfigurationActionKind, ConfigurationState, dataIndex, Di... |
<reponame>d3v53c/umbrella<gh_stars>0
import type { IDeref } from "@thi.ng/api";
import { assert } from "@thi.ng/api";
import { isString } from "@thi.ng/checks";
import { illegalArgs, unsupported } from "@thi.ng/errors";
import { clamp01, TAU } from "@thi.ng/math";
import { maybeParseInt } from "@thi.ng/strings";
import... |
<filename>src/components/pages/Editor/convertStylesheet.ts
import * as valueParser from 'postcss-value-parser';
// cannot use alias because they aren't recognized by Jest
import * as utils from '../../../utils';
const pxRegex = /(([-]{0,1}[0-9]*)(\.[0-9]+)?)(px;?)/;
interface IValueParserNode {
type:
'word' |
'... |
<reponame>CandleLibrary/JS<filename>source/typescript/parser/env.ts
//import { ParserEnvironment } from "@candlelib/hydrocarbon";
import { Lexer } from "@candlelib/wind";
import { JSNodeClass } from "../types/node_class_type.js";
import { JSNodeType } from "../types/node_type.js";
import { JSNode } from "../types/JSNo... |
import Loader from '@/components/loader'
import { getApiBase } from '@/helpers/url'
import { Locale } from '@/locale/model'
import { State } from '@/store/reducers'
import { listed } from '@/styles/ts/common'
import { Collapse, List, ListItem, ListItemIcon, ListItemText, Typography } from '@material-ui/core'
import Loc... |
<reponame>adamfuhrer/glitch-art<filename>src/app/app.component.ts<gh_stars>10-100
import {ChangeDetectorRef, Component, HostBinding, HostListener, OnInit} from '@angular/core';
import {MatSliderChange} from '@angular/material/slider';
import {MatRadioChange} from '@angular/material/radio';
import html2canvas from 'html... |
import { BrowserWindow, ipcMain } from 'electron';
import * as fs from 'fs';
import * as request from 'request';
import * as tempfile from 'tempfile';
import { IPCUtil } from './util/ipc-utils';
import { electronEnvironment } from './environment';
import { IpfsServiceInstance } from './ipfs.service';
import { StorageSe... |
/*
* MIT License
*
* Copyright (c) 2022 Staatsbibliothek zu Berlin - Preußischer Kulturbesitz
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without l... |
/*******************************************************************************
* Copyright (c) 2008-2019 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and/or associated documentation files (the
* "Materials"), to deal in the Materials w... |
import { discordClient, robloxClient, robloxGroup } from '../../main';
import { TextChannel } from 'discord.js';
import { GetGroupRoles } from 'bloxy/src/client/apis/GroupsAPI';
import { CommandContext } from '../../structures/addons/CommandAddons';
import { Command } from '../../structures/Command';
import { MessageEm... |
<filename>packages/react/src/index.ts
import ts from 'typescript';
import fs from 'fs';
type Raw = {
raw: true;
};
type NotRaw = {
raw?: false;
};
export type Config = {
from?: string[];
ignoreSubComponents?: boolean;
expressionLength?: number;
};
export type Props = {
value: string | boolean | number;
... |
import { h, appendToElement } from "./typed-dom";
import { IntraclinicPost } from "./model/intraclinic-post";
import { IntraclinicComment } from "./model/intraclinic-comment";
import { IntraclinicTag } from "./model/intraclinic-tag";
import * as kanjidate from "kanjidate";
import * as moment from "moment";
function fo... |
<filename>src/lib/HeapPriorityQueue.ts
interface IItem<K, V> {
key: K;
value: V;
compareTo(other: Item<K, V>): number;
}
/**
* Lightweight composite to store items in PriorityQueue
*/
export class Item<K, V> implements IItem<K, V> {
public key: K;
public value: V;
constructor(key: K, value:... |
<filename>src/core/pdf-parser/parseStream.ts
import {
PDFArray,
PDFDictionary,
PDFIndirectReference,
PDFName,
PDFNumber,
PDFObject,
PDFRawStream,
} from 'core/pdf-objects';
import { PDFObjectStream } from 'core/pdf-structures';
import {
arrayIndexOf,
arrayIndexOneOf,
arrayToString,
error,
trimAr... |
import { PARAM_TYPE } from "./fx-param-common";
import { getAxeFxInstance } from "../midi";
import { bypassModeLimited, inputSelect, filterSlope } from "./fx-param-select";
function getCabName(cab: number): string {
const axeFx = getAxeFxInstance();
return axeFx.cabNames[cab];
}
function getCabRange(): [numbe... |
<reponame>hmrsmart/reactgrid
import { Direction, GridColumn, GridRow, PointerLocation } from '../Model/InternalModel';
import { getScrollOfScrollableElement } from './scrollHelpers';
import { getReactGridOffsets, getSizeOfElement, getStickyOffset, getVisibleSizeOfReactGrid } from './elementSizeHelpers';
import { State ... |
import {
CdkConnectedOverlay,
CdkOverlayOrigin,
ConnectedOverlayPositionChange,
ConnectionPositionPair
} from '@angular/cdk/overlay';
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ElementRef,
EventEmitter,
Input,
OnInit,
Output,
ViewChild
} from '@angular/cor... |
<reponame>ctodesco/ng-keyboard-shortcuts
import {
TemplateRef,
ViewContainerRef,
ElementRef,
ComponentRef,
EmbeddedViewRef,
Injector,
ComponentFactoryResolver,
} from '@angular/core';
/**
* @ignore
* Interface that can be used to generically type a class.
*/
export interface ComponentTyp... |
<reponame>pulumi/pulumi-awsguard
// Copyright 2016-2019, Pulumi 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
//
// Unl... |
<filename>packages/core/src/job-queue/polling-job-queue-strategy.ts<gh_stars>0
import { JobState } from '@vendure/common/lib/generated-types';
import { ID } from '@vendure/common/lib/shared-types';
import { isObject } from '@vendure/common/lib/shared-utils';
import { interval, race, Subject, Subscription } from 'rxjs';... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*----------------------------------------------------------------------... |
import { LoggifyClass } from '../decorators/Loggify';
import logger from '../logger';
import { StorageService } from '../services/storage';
import { SpentHeightIndicators } from '../types/Coin';
import { BitcoinBlockType, BitcoinHeaderObj } from '../types/namespaces/Bitcoin';
import { TransformOptions } from '../types/... |
import cxapi = require('@aws-cdk/cx-api');
import aws = require('aws-sdk');
import colors = require('colors/safe');
import uuid = require('uuid');
import YAML = require('yamljs');
import { prepareAssets } from '../assets';
import { debug, error } from '../logging';
import { Mode } from './aws-auth/credentials';
import ... |
//
// Copyright (c) 2022 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, dis... |
/*
Copyright (C) 2017 Red Hat, 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 ... |
<reponame>Strangehill/evermonkey
import * as cheerio from "cheerio";
import * as hljs from "highlight.js";
import * as inlineCss from "inline-css";
import * as MarkdownIt from "markdown-it";
import * as mdSub from "markdown-it-sub";
import * as mdSup from "markdown-it-sup";
import * as mdEmoji from "markdown-it-emoji";... |
import Airtable from 'airtable'
// TODO: Understand why this import works with '../' and not with '~/'
import {
CommunityEvent,
CommunityEventType,
WorldRegion,
COMMUNITY_EVENT_TYPES,
COMMUNITY_EVENT_TYPE_OPTIONS,
WORLD_REGIONS
} from '../store/events'
import {
getImageUrl,
findImageAttachment
} from ... |
import {
Box,
Button,
Container,
fade,
Grid,
Paper,
Typography,
withStyles,
withWidth
} from "@material-ui/core";
import dayjs from "dayjs";
import React, { Component } from "react";
import { getSubById, getSubPosts } from "../../APIs";
import { WHITE } from "../../Common/colors";
import {
AddPost,
... |
import React, { useContext, useEffect, useState } from 'react';
import { Spin, Typography } from 'antd'
const { Title } = Typography
import { FormattedMessage } from 'gatsby-plugin-intl'
import { arrayify, isHexString, zeroPad } from "ethers/lib/utils";
import { Bech32, toHex } from "@cosmjs/encoding"
import { Explore... |
<filename>extensions/ql-vscode/src/queryserver-client.ts
import * as cp from 'child_process';
import * as path from 'path';
// Import from the specific module within `semmle-vscode-utils`, rather than via `index.ts`, because
// we avoid taking an accidental runtime dependency on `vscode` this way.
import { DisposableOb... |
<reponame>eyasliu/movue
import VueClass from 'vue'
import * as mobxMethods from 'mobx'
import ChangeDetector from './change-detector'
import { createStore, get, getParent, arrayOptionToObj } from './helpers'
import { Getter, Setter, VueComputed, FromMobxEntry, FromMobxAction, IMobxMethods, mapOption } from './types'
im... |
<reponame>yojiwatanabe/kibana
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (th... |
import { BlazorDotnetObject, closest, EventHandler, select, selectAll, createElement, getUniqueID } from '@syncfusion/ej2-base';
import { isNullOrUndefined, getComponent, BlazorDragEventArgs } from '@syncfusion/ej2-base';
import { Sortable } from '@syncfusion/ej2-lists';
import { getZindexPartial } from '@syncfusion/ej... |
import React from 'react';
import { Grid } from '@material-ui/core';
import { StoreState } from '../../../Store';
import { connect } from 'react-redux';
import { loadAgreement, loadAgreementSalesOffice } from '../../../actions/AgreementEditorActions';
import { PurchaseAgreement } from '../../../../objects/purchaseagree... |
import * as net from 'net';
import * as xml2js from 'xml2js';
import { Buffer } from 'buffer';
import { EventEmitter2 } from 'eventemitter2';
import { Event } from './Event';
export enum HeaderNames
{
ContentLength = 'Content-Length',
ContentType = 'Content-Type',
ReplyText = 'Reply-Text',
EventName = ... |
<reponame>hmcts/adoption-web
import languageAssertions from '../../../../test/unit/utils/languageAssertions';
import { CaseDate } from '../../../app/case/case';
import {
FormContent,
FormFields,
FormInput,
FormOptions,
LanguageLookup,
ValidationCheck,
} from '../../../app/form/Form';
import { CommonContent,... |
import React, { useState, useCallback, useRef, MutableRefObject } from 'react'
import cn from 'classnames'
import { ReactComponent as IconKebabHorizontal } from 'assets/img/iconKebabHorizontal.svg'
import { Name } from 'common/models/Analytics'
import { ID } from 'common/models/Identifiers'
import { Track } from 'com... |
import * as React from 'react';
import { useState, useEffect, useRef } from 'react';
import ReactDOM from 'react-dom';
import namespace from '@namespace';
import classnames from 'classnames';
import Button, { ButtonProps } from '@components/button';
import Transition from '@components/transition';
import Icon from '@co... |
<filename>src/utils/Function.ts
/**
* @license
* MIT License
*
* Copyright (c) 2019 <NAME>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limita... |
/*
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 applicable law or agre... |
<reponame>t-botz/golangci-lint-action
import * as core from "@actions/core"
import * as github from "@actions/github"
import { exec, ExecOptions } from "child_process"
import * as fs from "fs"
import * as path from "path"
import { dir } from "tmp"
import { promisify } from "util"
import { restoreCache, saveCache } fro... |
import { isAssignableToSimpleTypeKind, SimpleTypeKind, toTypeString } from "ts-simple-type";
import { Program, TypeChecker } from "typescript";
import { AnalyzeComponentsResult } from "../../../analyze/analyze-components";
import { ComponentCSSProperty } from "../../../analyze/types/component-css-property";
import { Co... |
import {AfterContentInit, Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import {DiagramMessageType, GDiagram, GDiagramService, GLayoutTypes} from '../../services/diagram.service';
import * as go from 'gojs';
const gomk = go.GraphObject.make;
const DEFAULT_GRID_LAYOUT_COLUMNS = 50;
export function ... |
/* eslint-disable consistent-return */
import { TYSdk } from 'tuya-panel-kit';
import { of } from 'rxjs';
import _isUndefined from 'lodash/isUndefined';
import _isFunction from 'lodash/isFunction';
import CustomError from '../CustomError';
import logger from '../LoggerUtils';
/**
* 按顺序执行Promise,等待前一个Promise完成,再执行下一个... |
/** @jsx jsx */
import { jsx } from "@emotion/core";
import * as React from "react";
import { ButtonProps } from "./Button";
import { IconButtonProps } from "./IconButton";
import { Layer } from "./Layer";
import { Positioner, Placements } from "./Positions";
import { ReferenceChildrenProps } from "react-popper";
impor... |
import { SvelteComponentTyped } from 'svelte/internal'
import { Component } from '../../component'
import type { Size } from 'src/variations'
interface EmojiProps extends Component {
name: Emojies
disabled?: boolean
loading?: boolean
size?: Size
link?: boolean
}
/**
* Vomantic Emoji
*/
export default class ... |
<gh_stars>0
/**
* SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
* SPDX-License-Identifier: BSD-3-Clause
*/
import React from 'react';
const TAB_KEY_CODE = 9;
// https://github.com/facebook/react/blob/master/packages/shared/ReactWorkTags.js#L39
const HostComponent = 5;
export function useFocu... |
<reponame>edrlab/r2-lcp-js
// ==LICENSE-BEGIN==
// Copyright 2017 European Digital Reading Lab. All rights reserved.
// Licensed to the Readium Foundation under one or more contributor license agreements.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file exposed on G... |
import styled from "@emotion/styled/macro"
import { useDispatch, useSelector } from "react-redux"
import {
selectSelectedFlow,
selectSelectedFlowId,
} from "../redux/flows/flows.selectors"
import React from "react"
import { ModalParams } from "../redux/global/global.types"
import ReactModal, { Styles } from "react-... |
// tslint:disable
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*-------------------------------------------... |
/* eslint-disable jsx-a11y/no-static-element-interactions */
/* eslint-disable jsx-a11y/click-events-have-key-events */
import {
faList,
faPlay,
faSearch,
faUser,
} from '@fortawesome/pro-regular-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import dayjs from 'dayjs';
import { ip... |
<gh_stars>0
import fs from 'fs'
import path from 'path'
import express from 'express'
import { createServer as createViteServer } from 'vite'
import cookiesMiddleware from 'universal-cookie-express'
const development = process.env.NODE_ENV === 'development'
const selfDestroyingServiceWorker = `self.addEventListener('... |
import React, { useCallback, useEffect, useState } from 'react'
import { Controller, useForm } from 'react-hook-form'
import {
FormControl,
Button,
FormLabel,
FormErrorMessage,
Stack,
Input,
Select,
Textarea,
FormHelperText,
useDisclosure
} from '@chakra-ui/react'
import { Field, ResourceSchema } fr... |
import React, { Component } from 'react';
import cx from 'classnames';
import get from 'lodash/get';
import isEmpty from 'lodash/isEmpty';
import pluralize from 'pluralize';
import {
withStyles,
Button,
Dropdown,
SectionHeader,
ErrorBoundary,
withRouterProps,
withStylesProps,
Loading,
ScrollObserver,
... |
// (C) Copyright 2015 Moodle Pty Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
const HEART = 13;
const SPADE = 14;
const CLUB = 15;
const DIAMOND = 16;
const AS = 0;
const TWO = 1;
const THREE = 2;
const FOUR = 3;
const FIVE = 4;
const SIX = 5;
const SEVEN = 6;
const EIGHT = 7;
const NINE = 8;
const TEN = 9;
const JACK = 10;
const QUEEN = 11;
const KING = 12;
const listCards = [
{name: AS, ... |
<gh_stars>1-10
/*
* Copyright (C) 2019 Toshiba Corporation
* SPDX-License-Identifier: Apache-2.0
*/
import { utils } from "pixi.js";
import { DCommand } from "./d-command";
import { DCommandClear } from "./d-command-clear";
import { DCommandFlag } from "./d-command-flag";
import { DCommandRedo } from "./d-command-r... |
<filename>packages/foam-vscode/src/features/wikilink-reference-generation.ts<gh_stars>1-10
import { uniq } from 'lodash';
import {
CancellationToken,
CodeLens,
CodeLensProvider,
commands,
ExtensionContext,
languages,
Range,
TextDocument,
window,
workspace,
Position,
} from 'vscode';
import {
cr... |
import React, { useEffect } from 'react'
import * as dagreD3 from 'dagre-d3'
import * as d3 from 'd3'
import type { Scenario } from '~/store/modules/lostModule'
// Font Awesome のfont-weightのルール
const faWeight = { solid: '900', regular: '400', brands: '400', light: '300' }
const textDom = (text) => {
// const dom = do... |
<reponame>shivanshkc/ledgerkeep-web-client
import { Component, Inject, OnInit } from '@angular/core';
import { AbstractControl, FormBuilder, FormGroup, FormGroupDirective, NgForm, Validators } from '@angular/forms';
import { MAT_BOTTOM_SHEET_DATA, MatBottomSheetRef } from '@angular/material/bottom-sheet';
import { Erro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.