text stringlengths 3.08k 15.5k |
|---|
import React, { useEffect, useState } from 'react';
import Link from 'next/link';
import DropDown from 'components/Menu/SideDrawerDrop';
import { Spacer } from '@nextui-org/react';
import {
Filter,
CloseSquare,
Home,
User,
Image,
Play,
Buy,
TwoUsers,
Logout,
} from 'react-iconly';
impor... |
import React from 'react';
import { AxiosError } from 'axios';
// State, routing and localization
import { connect, ConnectedProps } from 'react-redux';
import { RouteComponentProps } from 'react-router-dom';
import { FormattedMessage, FormattedTime, injectIntl, IntlShape } from 'react-intl';
// Material UI
import { ... |
import seedrandom from "seedrandom"
const MOO_QUOTES: string[] = [
"Great is the editor that autocompletes on it's own",
"The bigger the beast, the greater the glory",
"A singular strike!",
"Ringing ears, blurred vision, no datadog - the end approaches...",
"A brilliant confluence of skill and purp... |
<gh_stars>1-10
import { getGUID, isArray, isFunc } from "./util.js";
export type ValidProxyMethods = "apply" | "get" | "has" | "set";
export type ExtensionDelegateType<T extends Record<string, unknown>> = { (op: string, target: T, ...rest: any[]): void };
// eslint-disable-next-line @typescript-eslint/ban-types
expo... |
// CanvasInputHandler.ts
// author : <NAME>
// purpose : handle all input events.
import { Vector2 } from "../math/Vector2";
enum Key {
A,
B,
C,
D,
E,
F,
G,
H,
I,
J,
K,
L,
M,
N,
O,
P,
Q,
R,
S,
T,
U,
V,
W,
X,
Y,
Z,
... |
import castArray from 'lodash/castArray';
import React from 'react';
import { JSONSchema7 as JSONSchema } from 'json-schema';
import { CollectionLenses } from './Lenses';
import { Dictionary } from '../../../common-types';
import {
Format,
UiSchema,
Value,
JsonTypes,
} from '../../../components/Renderer/types';
imp... |
#!/usr/bin/env node
import * as child_process from "child_process";
import * as fs from "fs";
import { performance } from "perf_hooks";
import * as rpc from "vscode-jsonrpc";
import * as lsp from "vscode-languageserver-protocol";
import { LineTable } from "./line_table";
interface Options {
jumpToDef: boolean;
}
... |
import { map, uniq } from "lodash";
import { all, call, fork, put, select, take } from "redux-saga/effects";
import { AppState } from "store";
import { ActionType } from "typesafe-actions";
import {
ADD_UNIQUE_LIST_TO_PLAY,
DELETE_LIST_TO_PLAY_ITEM_BY_ID,
DELETE_LIST_TO_PLAY_ITEMS,
SYNC_PLAYLIST_FROM_YT_BY_ID_S... |
import { Item } from '@interfaces/item/item';
import { Component } from '@angular/core';
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
import { NavParams, ViewController, ToastController } from 'ionic-angular';
import { FileChooser } from '@ionic-native/file-chooser';
import { File as NativeFile ... |
import _ from 'lodash';
import qs from 'qs';
import parse from 'url-parse';
import fetch, { Response, Headers } from 'node-fetch';
import contentTypeParser from 'content-type';
import contentDispositionParser from 'content-disposition';
import {
JSONParse, sortedJSONStringify,
} from './util';
import { ApiError } fr... |
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license.
//
// Microsoft Bot Framework: http://botframework.com
//
// Bot Framework Emulator Github:
// https://github.com/Microsoft/BotFramwork-Emulator
//
// Copyright (c) Microsoft Corporation
// All rights reserved.
//
// MIT License:
// ... |
import React, { useState, useEffect, useCallback } from 'react';
import { Container, Row, Col } from 'react-bootstrap';
import { useSearchParams } from 'react-router-dom';
import ManifestJson from '../serialization/ManifestJson';
import SearchResultsJson from '../serialization/SearchResultsJson';
import CopyToClipboa... |
<gh_stars>1-10
// Stellar types from stellar-sdk
// https://github.com/stellar/js-stellar-base
import type { StellarAssetType, StellarSignerType, StellarMemoType } from '../trezor/protobuf';
export interface StellarAsset {
type: StellarAssetType;
code?: string;
issuer?: string;
}
export interface Stellar... |
<filename>src/bazx.ts
const RUN = Symbol();
export interface ExecutionResult {
success: boolean;
code: number;
}
export interface BazxContext {
log(cmd: OpaqueCommand, streams: CommandStreamConfig): void;
exec(cmd: [string, ...string[]], streams: CommandStreamConfig): PromiseLike<ExecutionResult>;
throw: bo... |
/**
*
* @returns 生成36位id
*/
export function uuid() :string{
const s:(string|number)[] = []
const hexDigits = "0123456789abcdef";
for (let i = 0; i < 36; i++) {
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
}
s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 00... |
import { Field, Form, Formik } from 'formik'
import Link from 'next/link'
import React, { ReactElement, useEffect, useState } from 'react'
import TimeAgo from 'react-timeago'
import { CLUB_EDIT_ROUTE } from '../../constants'
import {
Club,
ClubFair,
DynamicQuestion,
MembershipRank,
UserMembership,
} from '..... |
<gh_stars>1-10
import { EventEmitter } from "events"
import extend from "extend"
import url from "url"
import WS from "ws"
/**
*
* @param remote
* @param opts
* @constructor
*/
class Server extends EventEmitter {
public static domainRE = /^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|[-_]){0,61}[0-9A-Za-z])?(?:\.[... |
<gh_stars>0
import dayjs from 'dayjs';
import { BetRoundStats } from '@streamdota/shared-types';
import { DraftState } from '../../pages/live/Draft/Draft';
import { PlayerState } from '../../pages/live/Game/Game';
enum ACTIONS {
NEW_MESSAGE = 'NEW_MESSAGE',
}
export enum MessageType {
chat = 'chat',
games... |
<filename>src/Ework.ts
import {
numCpus,
makeWorkerCode,
spawnWorker,
addWorkerListener,
terminateWorker,
} from './worker';
import {
IWorkerMessage,
IWorker,
IWorkerJob,
WorkerResolveFn,
WorkerRejectFn,
} from './types';
export type Eworker<Input, Output> = (value: Input) => Output | Promise<Outpu... |
import {Component, OnInit, ViewChild} from '@angular/core';
import {MatTableDataSource} from '@angular/material';
import {ExplorerService} from '../explorer.service';
import {LoggerService, UserManagerService} from 'dds-angular8';
import {ActivatedRoute} from "@angular/router";
import {FormControl} from "@angular/forms... |
<filename>src/metrics_loop.ts
import Redis from 'ioredis';
import * as promClient from 'prom-client';
import InstanceGroupManager, { InstanceGroup } from './instance_group';
import { Context } from './context';
import { InstanceState, InstanceTracker } from './instance_tracker';
import { CloudInstance } from './cloud_m... |
import {Construct, CfnOutput, Environment} from '@aws-cdk/core';
import {CfnApplication, CfnEnvironment, CfnApplicationVersion} from '@aws-cdk/aws-elasticbeanstalk';
import {IBucket } from '@aws-cdk/aws-s3';
import {Asset} ... |
// =============================================================================
// Core.ts | Array Functions
// (c) Mathigon
// =============================================================================
/** Creates an array of size `n`, containing `value` at every entry. */
export function repeat<T>(value: T, n: ... |
import React, { ReactElement, Component } from "react";
import {
View,
Animated,
Dimensions,
TouchableOpacity,
GestureResponderEvent,
PanResponderGestureState,
} from "react-native";
import {
siblingStyles,
scrollPickerStyles,
PickerGroupItemHeight,
} from "./styles";
import {
ScrollPickerProps,
... |
/*
Copyright (c) Walmart Inc.
This source code is licensed under the Apache 2.0 license found in the
LICENSE file in the root directory of this source tree.
*/
import _ from 'lodash'
import JsonUtil from './jsonUtil';
export const isGlobalFqdn = (host) => host && host === "*"
|| host ===... |
import 'whatwg-fetch'
import {
BaseKey,
CommandService,
Completed,
ComponentId,
CurrentState,
intArrayKey,
intKey,
Key,
Units,
Parameter,
Prefix,
Result,
Setup,
SubmitResponse
} from '../../src'
import { setAppName } from '../../src/config/AppName'
import { startServices, stopServices } from... |
import { HouseModel } from './house-model.class';
import { Response, Request, NextFunction } from 'express';
import { ErrorHandler } from '../../middleware/error-handler';
import { getPagination, getPagingData } from '../../shared/pagination';
import { Value } from '../value/value.class';
import { OptionConf } from '..... |
<reponame>jaishilbhavsar/lets_meet_app
import { EditeventPage } from './../pages/editevent/editevent';
import { EditcommunityPage } from './../pages/editcommunity/editcommunity';
import { MyeventPage } from './../pages/myevent/myevent';
import { MycommunityPage } from './../pages/mycommunity/mycommunity';
import { Soci... |
import { Client, Room } from 'colyseus';
import { GameState } from '../src/state/gameState';
import { Board } from '../src/state/board';
import { queryByRowAndColumn } from '../src/state/mutations';
import { Tetrolyso } from '../src/state/Tetrolyso';
import { Position } from '../src/state/Position';
import { DOWN, LEFT... |
import React from 'react';
import {connect} from 'react-redux';
import {Link, RouteComponentProps} from 'react-router-dom';
import {Button, Col, Row, Table} from 'reactstrap';
import {AvForm, AvField} from 'availity-reactstrap-validation';
import {
openFile,
byteSize,
ICrudGetAllAction,
getSortState,
IPaginat... |
<gh_stars>10-100
import commander from "commander";
import { join } from "path";
import { Bedrock, Config } from "../../config";
import {
build as buildCmd,
exit as exitCmd,
populateInheritValueFromConfig,
validateForRequiredValues,
} from "../../lib/commandBuilder";
import { createPullRequest } from "../../lib... |
import React from 'react';
import Form, { RadioField } from '../../form/Form';
import { SortOrder } from '../../table/Table';
import classNames from 'classnames';
import { SortColumn } from '../_common';
export interface ChartSettingsData {
sortField: SortColumn,
sortOrder: SortOrder,
secondInterval: numbe... |
import { uniq } from 'lodash';
import { PubSub } from 'graphql-subscriptions';
import { passOrThrow, isArray, isFunction, mapOverProperties } from '../util';
import { Entity } from '../entity/Entity';
export const pubsub = new PubSub();
export const SUBSCRIPTION_TYPE_CREATE = 'onCreate';
export const SUBSCRIPTION_TY... |
<filename>lib/virtual-reality/addon/utils/vr-helpers/detail-info-composer.ts
import { Package } from 'explorviz-frontend/utils/landscape-schemes/structure-data';
import { getSubPackagesOfPackage, getClassesInPackage } from 'explorviz-frontend/utils/package-helpers';
import ClazzCommunicationMesh from 'explorviz-fronten... |
import { gt as semverGt, lt as semverLt, eq as semverEq } from 'semver';
import { Context } from '../context';
import { resolveContextValue } from '../helpers';
export interface StrategyTransportInterface {
name: string;
parameters: any;
constraints: Constraint[];
}
export interface Constraint {
contextName: ... |
import * as React from 'react';
import { connect } from 'react-redux';
import * as classNames from 'classnames';
import { View } from '../../../type';
import * as Conn from '../../../connection';
import * as Action from '../../actions';
import { Core } from '../../../core';
import MiniEditor from '../MiniEditor';
typ... |
/*
* This file is part of the drip-table project.
* @link : https://ace.jd.com/
* @author : <NAME> (<EMAIL>)
* @modifier : <NAME> (<EMAIL>)
* @copyright: Copyright (c) 2020 JD Network Technology Co., Ltd.
*/
import React, { CSSProperties } from 'react';
import cheerio from 'cheerio';
import ViewerJS from '... |
<gh_stars>0
import { AfterViewInit, Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { ResourceCreate } from 'src/app/models/resourceCreate';
import { ResourceService } from 'src/app/services/resource.service';
import { AlertifyService } from 'src/app/services/alertify.servic... |
import React from "react";
import {Checkbox, Dropdown, Menu, Popconfirm, Tag, Tooltip} from "antd";
import {MenuInfo} from "rc-menu/lib/interface";
import {DeleteOutlined, EditTwoTone, QuestionCircleOutlined} from "@ant-design/icons";
import ModelAPI, {TaskInfo} from "../Model & Util/ModelAPI";
import {CheckboxChangeEv... |
import { TransformOptions } from "@babel/core";
import { makeCli } from "@hark/cli";
import { HarkMonorepoBaseCommand, makeHarkMonorepoCommands } from "@hark/clipanion";
import { copyPackageJson, opinionatedFactory, OpinionatedProjectTaskContext, OpinionatedProjectTasks } from "@hark/opinionated";
import { plugin } fro... |
<gh_stars>10-100
import {ErrorCode, ValidityError} from "./validation/ErrorCode";
export enum VertexMissing {CreateVertex, IgnoreEdge, AddEdge, Error}
export interface EdgeNode {
id: string,
type?: string
}
export interface Edge {
source: EdgeNode,
destination: EdgeNode,
isValid?: boolean,
is... |
<gh_stars>100-1000
import * as vscode from 'vscode';
import { ChildProcess, spawn } from 'child_process'
import { EventEmitter } from 'events'
import * as fs from 'fs';
import * as path from 'path';
import { fstat } from 'fs';
import { ErlangSettings } from './erlangSettings';
//inspired from https://github.com/WebFre... |
import { BaseService, BaseModel, WhereInput, LimitOffset, addQueryBuilderWhereItem } from 'warthog';
import { Brackets, SelectQueryBuilder } from 'typeorm';
type WhereExpression = {
AND?: WhereExpression[];
OR?: WhereExpression[];
} & WhereFilterAttributes;
interface WhereFilterAttributes {
[key: string]: strin... |
import { container } from 'tsyringe';
import { Button, makeStyles } from '@material-ui/core';
import { T, useTranslate } from '@tolgee/react';
import { useHistory } from 'react-router';
import { LINKS, PARAMS } from 'tg.constants/links';
import { confirmation } from 'tg.hooks/confirmation';
import { useProject } from '... |
import * as React from 'react';
import { observer } from 'mobx-react-lite';
import { Ripple } from '@rmwc/ripple';
import { Button } from '@rmwc/button';
import { TextField } from '@rmwc/textfield';
import Clipboard from 'react-clipboard.js';
import * as G from '../game';
import { useStore } from './context';
import { ... |
import React from 'react';
import { Helmet } from "react-helmet";
import { Intro } from 'components/intro/Intro';
import { Container } from 'components/container/Container';
import 'styles/fonts.css';
import styled from 'styled-components';
import mePhoto from "assets/images/about-photo.svg";
// tslint:disable no-defa... |
import React, {useEffect, FC, useRef, useContext} from 'react';
import {useTheme} from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import mapboxgl from 'mapbox-gl';
import MapboxGl from '../common/MapboxGl';
import {queryContext} from '../../contexts/QueryContext';
import {mapUpdateConfigHa... |
/*****
License
--------------
Copyright © 2020 Mojaloop Foundation
The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at
http://www.apache.... |
import { ValidationError } from '../backend/errors';
import { labSkills, equipment, advices, qualification } from "./selectLists";
import './optional'
import { UserRoles } from './userRoles';
import { IUserCommon } from '../backend/database/schemas/IUserCommon';
export class ValidationResult {
valid: boolean;
... |
import _ from 'lodash'
import { Range } from './location'
import * as u from './util'
import bigInt from 'big-integer'
export type Provenance =
{ kind: 'prov', value: number } |
{ kind: 'iota', value: number, iota: number[] } |
{ kind: 'empty' }
export type Byte = {
prov: Provenance
offset: number | null
... |
<filename>src/index.ts<gh_stars>0
import * as board2d from 'board2d';
export {
Board,
BoardMutable,
Pos,
Direction,
X,
Y
} from 'board2d';
/**
* Reversi game class
*
* entry point
*/
export class Game {
/**
*
* Use `Game.init ()` instead of the constructor to start the game.
*
* @para... |
import { log, lookupMimeType, parseYaml, sortBy } from "./deps.ts";
import { Marked } from "./marked.ts";
import { genResponseArgs, getH1, toTitle } from "./utils.ts";
import { renderPage } from "./render.ts";
export const defaultConfig = {
sourceDir: "docs",
rootFile: "index",
lang: "en",
siteName: "Built by ... |
import * as fs from 'fs';
import * as vscode from 'vscode';
import cp = require('child_process');
const player = require('node-wav-player');
import { INDICES_SUFFIX } from '../constants';
import { getContext } from '../context';
import { INotification, INotificationInputState } from '../types';
import { fetchQuote } fr... |
<reponame>sundersc/cloudform<filename>packages/cloudform-types/types/acmpca/certificateAuthority.ts
/* Generated from:
* ap-northeast-1 (https://d33vqc0rt9ld30.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json), version 39.2.0,
* ap-northeast-2 (https://d1ane3fvebulky.cloudfront.net/latest/gzip/Clo... |
import * as _ from 'lodash';
import * as moment from 'moment';
import * as React from 'react';
import { withTranslation, WithTranslation } from 'react-i18next';
import { connect } from 'react-redux';
import { Dispatch } from 'redux';
import { Form } from 'semantic-ui-react';
import { AppAction } from '../../actions';
... |
<reponame>fbchen/fire-ant
/**
* @license
* Copyright 厦门乾元盛世科技有限公司 All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file.
*/
import {
Component, Input, Output, EventEmitter, ElementRef, Renderer2, ViewEncapsulation,
OnInit, Inject, Op... |
<filename>modules/libDomain/src/messages.ts<gh_stars>1-10
/*****
License
--------------
Copyright © 2017 Bill & Melinda Gates Foundation
The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compli... |
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
// See LICENSE in the project root for license information.
import * as argparse from 'argparse';
import colors from 'colors';
import { CommandLineAction } from './CommandLineAction';
import { CommandLineParameterProvi... |
<reponame>elaraai/edk-examples
// © Copyright 2018- 2021 - Elara AI Pty Ltd ACN 627 124 903
import * as ELARA from '@elaraai/edk/lib';
import {
Add,
DictType,
Get,
GetField,
GetProperties,
GetProperty,
Hour,
IfElse,
Insert,
Keys,
LessEqual,
Max,
MLFunction,
Multiply,
NewDict,
NewSet,
N... |
import { Layout } from "../../../components/Layout";
import { withApollo } from "../../../utils/withApollo";
import { NextPage } from "next";
import styles from "../../../styles/OrderList.module.scss";
import { useGetOrderQuery } from "../../../generated/graphql";
import { Button } from "@material-ui/core";
import { us... |
import * as React from 'react';
import { style } from 'typestyle';
// let index = 0;
const css = style({
$nest: {
'& .vs .lineHighlight': {
background: 'lightblue'
},
'& .vs-dark .lineHighlight': {
background: 'darkblue'
}
}
});
export type Editor = monaco.editor.IStandaloneDiffEditor;... |
import * as PropTypes from 'prop-types';
import * as React from 'react';
import { Context } from '../Context';
import { EDGE_LENGTH, NODE_RADIUS } from './constants';
interface Props {
x1: number;
y1: number;
x2: number;
y2: number;
directed?: boolean;
variant?: number;
label?: string;
hovered?: boolea... |
import {
interpret,
spawn,
send,
EventObject,
ActorRef,
State,
StateMachine
} from "xstate";
import { createModel } from "xstate/lib/model";
import { inspect } from "@xstate/inspect";
import {
AppUpdateRequestEventType,
RequestAppUpdateActionName,
RequestUiUpdateActionName,
UiUpdateRequestEventTy... |
class Body{
oid : string;
}
class BasicAttr {
//strength
str_base : number;
str_max : number;
str_bonus: number;
str : number;
//vitality
vit_base : number;
vit_max : number;
vit_bonus:number;
vit : number;
//focus
focus_base : number;
focus_max : number;
fo... |
<reponame>VEuPathDB/plot-components
import { useMemo } from 'react';
import { PlotParams } from 'react-plotly.js';
import {
BarLayoutAddon,
BarplotData,
OpacityAddon,
OpacityDefault,
OrientationAddon,
OrientationDefault,
DependentAxisLogScaleAddon,
DependentAxisLogScaleDefault,
} from '../types/plots';
... |
import ExtensionManager, { Extension } from "./extension.js";
import { existsSync, readFile, writeFile } from "fs";
import { join, isAbsolute } from "path";
import SettingsManager, { ExtensionSettings } from "./settings.js";
export declare interface Theme extends Extension<string[]> {
settingsProps: string[];
... |
import { ReactInstance } from 'react';
import AppBarVisual from './AppBarVisual';
import AvatarVisual from './AvatarVisual';
import BackdropVisual from './BackdropVisual';
import BadgeVisual from './BadgeVisual';
import BottomNavigationActionVisual from './BottomNavigationActionVisual';
import BottomNavigationVisual f... |
import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { OrdenesService } from '../ordenes.service';
import { FormControl, FormGroup, FormBuilder } from '@angular/forms';
import { LocalDataSource } from 'ng2-smart-table';
import ... |
import { useEffect } from '@storybook/client-api';
import { html } from 'lit-html';
import { decorateStoryWithClass } from '../utils';
import './ino-input.scss';
export default {
title: 'Input/ino-input',
component: 'ino-input',
decorators: [
(story) => decorateStoryWithClass(story, 'story-ino-input'),
(... |
import { PencilAltIcon, SaveIcon, XIcon } from '@heroicons/react/outline';
import React, { ComponentType, ReactNode, useEffect, useState } from 'react';
import { Color } from '../types';
import {
BaseBitwiseCheckbox,
BaseColorInput,
BaseDropdown,
BaseInput,
BaseSlider,
BaseTimeInput,
Toggle,
} from './fo... |
import {
createConnection,
TextDocuments,
Diagnostic,
DiagnosticSeverity,
ProposedFeatures,
InitializeParams,
DidChangeConfigurationNotification,
CompletionItem,
CompletionItemKind,
TextDocumentPositionParams,
TextDocumentSyncKind,
InitializeResult,
CompletionParams
} from 'vscode-languageserv... |
import { async, fakeAsync, flush, TestBed } from '@angular/core/testing';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { Router } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { ApplicationUser } from '@core/application-user';
imp... |
<reponame>jpalardy/elm-language-server
import "reflect-metadata";
import { container } from "tsyringe";
import { URI } from "vscode-uri";
import { Program } from "../src/compiler/program";
import * as path from "path";
import { Settings } from "../src/util/settings";
import Parser from "web-tree-sitter";
import { spawn... |
// Copyright (c) 2021-2022 <NAME>
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
import { constant, flow, id, Kind } from '@fp4ts/core';
import { Eq } from '@fp4ts/cats-kernel';
import { Applicative } from '../../applicative';
import { ... |
import { blue, green } from '../../utils/colors';
export enum ProjectOption {
USER = 'user',
USER_AUTH = 'user auth',
USER_ROLE = 'user role',
USER_ME_MIDDLEWARE = 'user me middleware',
USER_OWNERSHIP_MIDDLEWARE = 'user ownership middleware',
SESSION = 'session',
REDIS_SESSION = 'redis session',
DOCK... |
<reponame>mvaldesdeleon/funtasy
import fl = require('fantasy-land');
interface ILeft<A> {
_: 'Left';
value: A;
}
interface IRight<B> {
_: 'Right';
value: B;
}
export type Either<A, B> = ILeft<A> | IRight<B>;
export const Left = <A>(value: A): ILeft<A> => ({ _: 'Left', value });
export const Right =... |
<filename>src/use/store/getters.ts<gh_stars>1-10
import Certificate from "@/api/api_models/certificate_management/Certificate";
import Configuration from "@/api/api_models/configuration_management/Configuration";
import Admin from "@/api/api_models/user_management/Admin";
import Lecturer from "@/api/api_models/user_man... |
import { html, LitElement, PropertyValues, svg, unsafeCSS } from 'lit';
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
import { customElement, property, state } from 'lit/decorators.js';
import { TestFileModel, TestModel, TestStatus } from 'mutation-testing-metrics';
import style from './test-file.scss';
... |
<filename>app/src/datasources/base.datasource.ts
import BigNumber from "bignumber.js";
import { CoingeckoClient, getCoingeckoClient } from "../clients/coingecko.client";
import { getVitexClient, VitexClient } from "../clients/vitex.client";
import { TypeNames, UnknownToken } from "../common/constants";
import { CoinUti... |
<reponame>geometryzen/symbolic-math<filename>src/env/ExtensionEnv.ts<gh_stars>0
import { Pattern } from "../patterns/Pattern";
import { Sym } from "../tree/sym/Sym";
import { U } from "../tree/tree";
import { CostTable } from "./CostTable";
export type Sign = -1 | 0 | 1;
export const SIGN_LT = -1;
export const SIGN_EQ... |
import assert from 'assert';
import { mapDictionaryInformationToWeightMap, SuggestionResult, WeightMap } from '..';
import { readRawDictionaryFile, readSampleTrie } from '../../test/dictionaries.test.helper';
import { DictionaryInformation } from '../models/DictionaryInformation';
import { clean } from '../utils/util';... |
import React, { FC, useEffect, useState } from 'react';
import { yupResolver } from '@hookform/resolvers/yup';
import * as yup from 'yup';
import I18n from '@iobroker/adapter-react/i18n';
import { FormProvider, useForm } from 'react-hook-form';
import { Box, Button, CheckBox, FormField, Text } from 'grommet';
import Te... |
/**
* Copyright 2020 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 required by applicable law or agreed to... |
import { Logger } from '@nestjs/common/services/logger.service';
import { isNil } from '@nestjs/common/utils/shared.utils';
import { Observable } from 'rxjs';
import {
KAFKA_DEFAULT_BROKER,
KAFKA_DEFAULT_CLIENT,
KAFKA_DEFAULT_GROUP,
NO_MESSAGE_HANDLER,
} from '../constants';
import { KafkaContext } from '../ctx... |
<filename>src/extension/background-script/actions/lnurl/index.ts<gh_stars>0
import axios from "axios";
import PubSub from "pubsub-js";
import { parsePaymentRequest } from "invoices";
import sha256 from "crypto-js/sha256";
import hmacSHA256 from "crypto-js/hmac-sha256";
import Hex from "crypto-js/enc-hex";
import type... |
// Create screenshot using dbus interface
import * as Gio from '@imports/Gio-2.0';
import * as GLib from '@imports/GLib-2.0';
const System = imports.system;
let debug = false;
const logDebug = (msg) => {
if (debug) {
log(msg);
}
};
// https://gitlab.gnome.org/GNOME/gnome-shell/blob/master/data/org.gnome.Sh... |
import { LoadingSpinner } from '@sourcegraph/react-loading-spinner'
import * as React from 'react'
import { Link, Redirect } from 'react-router-dom'
import { concat, Observable, Subject, Subscription } from 'rxjs'
import { catchError, concatMap, distinctUntilKeyChanged, map, tap, withLatestFrom } from 'rxjs/operators'
... |
<reponame>Hemario/Ovale
import { l } from "./Localization";
import LibDataBroker from "@wowts/lib_data_broker-1.1";
import LibDBIcon from "@wowts/lib_d_b_icon-1.0";
import { OvaleOptionsClass } from "./Options";
import { defaultScriptName, OvaleScriptsClass } from "../engine/scripts";
import { OvaleFrameModuleClass } f... |
<reponame>GeotrekCE/Geotrek-rando-v3
import { css, FlattenSimpleInterpolation } from 'styled-components';
import tailwindConfig from '../tailwind.config';
/**
* This file is here to ensure UI consistency
* You **MUST** sync with your designer at the start of the project to check
* what colors/typos/grid unit you ar... |
<gh_stars>0
import {UserSettings, DEFAULT_SETTINGS, Character} from '../types';
import {domAction} from './dom';
const cachedWords = new Map<string, string>();
let observer: MutationObserver = null;
let Character: Character = null;
let chKeys: Character[] = null;
let newWords: string[] = [];
let oldWords: string[] = [... |
import { useEffect, useState } from "react";
import {
createVideo,
getVideoInfo,
putVideoChunk,
putVideoPic,
getProfileVideos,
shareVideo,
getProfileAlbums,
addVideo2Album,
createAlbum,
} from "./canister";
import { VideoInfo, VideoInit, AlbumInfo } from "../dfx/CanCand";
import { MAX_CHUNK_SIZE, encodeArr... |
<filename>ext/cfx-ui/src/app/servers/servers.service.ts
import { Injectable, NgZone, Inject, PLATFORM_ID } from '@angular/core';
import { Http, ResponseContentType } from '@angular/http';
import { HttpClient } from '@angular/common/http';
import { DomSanitizer } from '@angular/platform-browser';
import { Observable } ... |
import React, { useState } from "react";
import "./App.css";
//TODO: Better styling with Tailwind
//DONE: Simplify Transforms, Formatters and Selectors into a continuous chain of function calls.
//TODO: Introduce the concept of a selector, and integrate it into the mix
//TODO: Delete operation
//TODO: Make it possible ... |
<filename>src/server_manager/web_app/shadowbox_server.ts
// Copyright 2018 The Outline Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LI... |
import * as util from './core/util';
import env from './core/env';
import Group from './graphic/Group';
import Element from './Element';
// Use timsort because in most case elements are partially sorted
// https://jsfiddle.net/pissang/jr4x7mdm/8/
import timsort from './core/timsort';
import Displayable from './graphic... |
import React from "react";
import Section from "../../components/_StyledComponents/Section";
import styled from "styled-components";
import Avatar from "../../assets/images/avatar.jpg";
import Button from "../../components/_StyledComponents/Button";
import theme from "../../config/theme";
const MessagesView = styled.... |
import { h, defineComponent, inject, VNodeChild, Fragment } from 'vue'
import { happensIn, pxfy } from 'seemly'
import { formatLength } from '../../../_utils'
import { NCheckbox } from '../../../checkbox'
import { NEllipsis } from '../../../ellipsis'
import SortButton from '../HeaderButton/SortButton'
import FilterButt... |
<reponame>OpenXeggo/near_money_stream
/**
* @fileoverview Definitions for asc.
* @license Apache-2.0
*/
import { OptionDescription } from "./util/options";
export { OptionDescription };
/** Ready promise resolved once/if the compiler is ready. */
export const ready: Promise<void>;
/** Whether this is a webpack bu... |
<reponame>DontBaguMe/iog-randomizer-client
import romStore from '../stores/rom'
import Patch from '../models/rom/patch'
import RomPatchStep from '../models/rom/patch-step'
import GenerateSeedRequest from '../models/http/generate-seed-request'
import GenerateSeedResponse from '../models/http/generate-seed-response'
imp... |
import { core, flags, SfdxCommand } from "@salesforce/command";
import { AnyJson } from "@salesforce/ts-types";
import fs = require("fs-extra");
import path from "path";
import { SFPowerkit } from "../../../../sfpowerkit";
import xmlUtil from "../../../../utils/xmlUtil";
// Initialize Messages with the current plugin d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.