text stringlengths 3.08k 15.5k |
|---|
import React, {
useState,
useEffect,
Dispatch,
SetStateAction,
FC,
useContext,
} from "react";
import { RouteComponentProps } from "react-router-dom";
import { compiler } from "markdown-to-jsx";
import Page from "../components/Page";
import Section from "../components/Section";
import TextBlock from "../com... |
<filename>src/activities/article/activity.ts
import * as marked from "marked";
import {
managedChild,
ManagedList,
PageViewActivity,
service,
UITextField,
ViewActivity,
ManagedRecord,
component,
ActionEvent,
AppActivationContext,
} from "typescene";
import {
Article,
ArticlesService,
Comment,
... |
<gh_stars>1-10
/* eslint-disable @typescript-eslint/triple-slash-reference */
///<reference path="webpack.d.ts" />
import path from "path";
import TerserPlugin from "terser-webpack-plugin";
import {
Configuration,
WebpackPluginInstance,
optimize,
RuleSetRule,
} from "webpack";
import { CleanWebpackPlugin } fro... |
import { Vec3 } from "../color"
import { Histogram } from "./histogram"
export interface Dimension {
r1: number
r2: number
g1: number
g2: number
b1: number
b2: number
[d: string]: number
}
const SIGBITS = 5
const RSHIFT = 8 - SIGBITS
export class VBox {
static build(pixels: Uint8Array): VBox {
co... |
import * as fs from 'fs'
import stringify from 'json-stable-stringify'
import * as path from 'path'
import { Config } from './config'
import * as parser from './parser'
const PARAM_INDENT = ' '
const RES_INDENT = ' '
const BODY_INDENT = ' '
const JSON_INDENT_LEN = 2
/**
* Replace koa and express style ur... |
<reponame>cbmd/graphql-let
import generator from '@babel/generator';
import { getOptions } from 'loader-utils';
import logUpdate from 'log-update';
import { relative } from 'path';
import { validate } from 'schema-utils';
import type { Schema as JsonSchema } from 'schema-utils/declarations/validate';
import { loader } ... |
<gh_stars>0
import path from 'path';
import semver from 'semver';
import chalk from 'chalk';
import ora from 'ora';
import { PluginManager } from 'live-plugin-manager';
import merge from 'lodash/merge';
// @ts-ignore Run transform(s) on path https://github.com/facebook/jscodeshift/issues/398
import * as jscodeshift fro... |
<filename>src/roles/transporter.ts<gh_stars>1-10
import actions = require("../lib/actions")
import u = require("../lib/utils")
import sq = require("../lib/spawnQueue")
import motion = require("../lib/motion")
import roomU = require("../lib/roomUtils")
import { cN, BodyType } from "../lib/creepNames"
const rT = {
n... |
import * as React from 'react';
import { SelectOptionObject } from './SelectOption';
import { SelectPosition } from './selectConstants';
import { ChipGroupProps } from '../ChipGroup';
import { OUIAProps, PickOptional } from '../../helpers';
import { ToggleMenuBaseProps } from '../../helpers/Popper/Popper';
export inter... |
// Copyright 2015-2021 Nkisi inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to... |
// UUID stuff adapted from https://github.com/kelektiv/node-uuid which is itself adapted from
// https://github.com/LiosK/UUID.js and http://docs.python.org/library/uuid.html
import {Base62} from "./basex"
const mkUUID = () => new Uint8Array(new ArrayBuffer(16))
/** A UUID stored in a length 16 native array of 8-bit... |
import React, {
useState,
forwardRef,
useEffect,
useCallback,
useMemo,
useLayoutEffect,
useRef,
} from 'react'
import { Container, Layer } from './Container'
import {
PlaybackArea,
AXIS_MEDIA_AMP,
AXIS_IMAGE_CGI,
VapixParameters,
VideoProperties,
} from './PlaybackArea'
import { Controls } from... |
import * as ex from 'excalibur';
import { Promise } from 'es6-promise';
import { SequenceCatalog, SequenceAction } from './SequenceData';
import {TextWindow} from '../TextWindow';
import { UserCommandRegistry } from '../../include/UserCommandRegistry';
// Import all commands.
import '../../user_commands/Index';
funct... |
import React, { useEffect, useState } from 'react';
import { useHistory } from 'react-router-dom';
import css from '@emotion/css';
import styled from '@emotion/styled';
import gql from 'graphql-tag';
import { useMutation, useQuery } from '@apollo/react-hooks';
import DimiCard from '../../components/dimiru/DimiCard';
i... |
import { Component, Input, OnInit, EventEmitter, Output } from '@angular/core';
import { Pairs } from '../pairs';
import { Piece, PairsService } from '../pairs.service';
@Component({
selector: 'game',
template: `
<div *ngIf="activePlayer">
<div class="player" *ngFor="let player of players"... |
import { graphql } from 'gatsby';
import React from 'react';
import styled from '@emotion/styled'
import { css } from 'emotion'
import Footer from '../components/Footer';
import SiteNav from '../components/header/SiteNav';
import ProjectCard from '../components/ProjectCard';
import Wrapper from '../components/Wrapper'... |
import React, { useEffect, useState } from 'react';
import MailMerge from './MailMerge';
import { FormControl, DropdownButton, MenuItem } from 'react-bootstrap';
import { getStudyQuery, getSearchQuery } from './MailMergeUtils';
import { commonIslands } from 'containers/Islands/CommonIslands';
import { useFragment ... |
<reponame>travishaby/d3-dag
/**
* Utility types for sugiyama layout
*
* This module should only really matter for those looking to develop custom
* {@link CoordOperator}s, {@link DecrossOperator}s, or in the rare case
* advanced {@link SugiNodeSizeAccessor}s.
*
* @module
*/
import { Dag, DagLink, DagNode } from... |
import { useState } from 'react';
import useWeb3 from 'src/hooks/useWeb3';
import { useAppDispatch, useAppSelector } from 'src/states/hooks';
import useTransferProposalContract from 'src/states/proposal/hooks/useTransferProposalContract';
import { TransferProposal } from 'src/types/TransferProposal';
import { TreasureB... |
<gh_stars>10-100
import { Injectable, Logger } from '@nestjs/common';
import { User } from '.prisma/client';
import { PrismaService } from '../../modules/prisma/prisma.service';
import { OpmlOutline, OpmlParser } from './opml-parser';
import { FeedService } from '../feed/feed.service';
interface BucketRef {
title: s... |
/*
* 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 ... |
/*
* Copyright 2019 ThoughtWorks, 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 agr... |
<filename>source/Test/TestScene.ts
import {Scene, DirectionalLight, Color, SpotLight, Game, KEY_CODE,
KEY_ACTION, StaticMeshActor, Renderer, RenderTarget, Easing, ScaleType, SphereMesh} from "../XEngine";
import { TestActor } from "./TestActor";
import { CanvasComponent } from "../core/Components/UI/CanvasCompone... |
/*
* Copyright (c) 2020-2021 <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... |
import { ArrowForwardIcon } from "@chakra-ui/icons";
import { Box, GridItem, SimpleGrid, useDisclosure } from "@chakra-ui/react";
import OTPModal from "@components/auth/otp-modal";
import { PhoneNumberInputField } from "@components/form/phone-number";
import { RadioInputField } from "@components/form/radio";
import { R... |
<gh_stars>10-100
// @ts-expect-error
import isJSON from 'is-json';
import {Attributes, NodeText, NodeTag} from 'posthtml-parser';
export enum quoteStyleEnum {
Smart,
Single,
Double,
}
export enum closingSingleTagOptionEnum {
tag = 'tag',
slash = 'slash',
default = 'default',
closeAs = 'closeAs',
}
expo... |
import express from "express";
import passport from "passport";
import bodyparser from "body-parser";
import express_session from "express-session";
import csurf from "csurf";
import { ensureLoggedIn } from "connect-ensure-login";
import { Strategy as LocalStrategy } from "passport-local";
import { unlink as fsunlink }... |
<reponame>Hamza-IT/Ionic-App
import { ImagePickerService } from './../../../shared/pickers/image-picker/image-picker.service';
import { PlaceLocation } from 'src/app/shared/location.model';
import { LocationService } from './../../../shared/location.service';
import { MapModalComponent } from './../../../shared/map-mod... |
<gh_stars>1-10
import { Injectable } from '@angular/core';
import { of } from 'rxjs';
import { Product, ProductDetail } from '../models';
import { delay } from 'rxjs/operators';
import { sortData } from 'ngrx-traits/traits';
@Injectable({ providedIn: 'root' })
export class ProductService {
getProducts(options?: {
... |
<filename>lib/index.ts<gh_stars>1-10
export * from './utils';
export * from './decorator';
export * from './runtime';
export * from './http';
export * from './db';
export * from './component';
export const { FastifyReply, FastifyRequest, FastifyInstance } = require('fastify');
import { HttpFilter } from './http';
impo... |
<reponame>vipstar-dev/vipsinfo
import { BufferReader, IChain, sha256d } from '@/lib'
import messageList, {
CommandNames,
Commands,
MessageOptionsType,
} from '@/p2p/commands/commands'
import AddrMessage from '@/p2p/commands/commands/addr'
import BlockMessage from '@/p2p/commands/commands/block'
import FeeFilterMe... |
<reponame>PAIR-code/cococo
/* Copyright 2019 Google LLC. All Rights Reserved.
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 appl... |
import { fillArray } from '../util'
import * as math from './math'
/** @constructor */
function QR(matrix) {
var vec = math._vec;
this.matrix = matrix;
var nR = this.matrix.length;
var nC = nR == 0 ? 0 : this.matrix[0].length;
this.qrRankingThreshold = 1e-30; //??
this.solvedCols = Math.min(nR, nC);
thi... |
interface Party {
partyCode: string;
showAs: string;
}
interface PartyWrapper {
party: Party;
}
interface Membership {
parties: PartyWrapper[];
house: {
houseNo: string;
};
}
interface MembershipWrapper {
membership: Membership;
}
export interface Member {
uri: string;
fullName: string;
memb... |
import React, { useEffect, useRef, useState } from 'react'
import Router from 'next/router'
import { Cookies } from 'react-cookie'
import { Button, notification, Spin, Modal } from 'antd'
import { ArrowRightOutlined } from '@ant-design/icons'
import Card from './Card'
import SideBar from './SideBar'
import { startNewGa... |
<reponame>BasixKOR/linaria<filename>packages/testkit/src/collectExportsAndImports.test.ts
/* eslint-env jest */
import { join } from 'path';
import * as babel from '@babel/core';
import type { NodePath } from '@babel/traverse';
import traverse from '@babel/traverse';
import type { Program } from '@babel/types';
import... |
/* eslint-disable camelcase */
/**
*
* LoginSocialGoogle
*
*/
import React, {
forwardRef,
memo,
useCallback,
useEffect,
useImperativeHandle,
useState
} from 'react'
import { objectType, IResolveParams, TypeCrossFunction } from '../'
interface Props {
scope?: string
prompt?: string
ux_mode?: strin... |
<gh_stars>0
import * as PIXI from 'pixi.js';
import { Bitmap } from '.';
import { TilemapRenderer } from '.';
export const MAX_GL_TEXTURES = 3;
export const VERTEX_STRIDE = 9 * 4;
export class TilemapLayer extends PIXI.Container {
static readonly MAX_GL_TEXTURES = MAX_GL_TEXTURES
static readonly VERTEX_STRIDE = V... |
<gh_stars>100-1000
export type Point = { x: number, y: number };
export type BBox = {
tag?: string,
x: number,
y: number,
width: number,
height: number
}
export type Stream<A> = (index: number) => A
export type Renderer = (measures: Measures, bboxes: Stream<BBox>) => [BBox[], RenderNode[]]
expor... |
<gh_stars>1-10
import {Component, OnInit, ViewChild} from '@angular/core';
import 'rxjs/add/operator/startWith';
import 'rxjs/add/observable/merge';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/debounceTime';
import 'rxjs/add/operator/distinctUntilChanged';
import 'rxjs/add/observable/fromEvent';
import {T... |
/*
* Copyright © 2019 Lisk Foundation
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, including this file, may be copied, modified,
* propagated... |
<reponame>nordicenergy/CoinSwap
import { constants } from '0x.js/lib/src/utils/constants'
import { localConfig, localConfigUseToFill, web3ProviderUrl } from '../__mock__/config'
import { sntWethPairData } from '../__mock__/pair'
import { createTokenlon } from '../../src/index'
import Tokenlon from '../../src/tokenlon'
... |
import {DefaultOptions, IOptions, SetStateDefaults, SetStateOptions} from "./IOptions";
import {EventDispatcher} from "@appolo/events";
import {Client} from "./client";
import {IEventOptions} from "@appolo/events";
import {Util} from "./util";
import * as _ from "lodash";
import {Promises} from "@appolo/utils";
import ... |
<filename>test/lib/BookBuilderTest.ts<gh_stars>1-10
/***************************************************************************************************************************
* @license *
* Copyright 2017 ... |
import { t, plural } from '@lingui/macro'
import {
RuleContext,
RuleFunction,
FileFormat,
SketchFileObject,
} from '@sketch-hq/sketch-assistant-types'
import { CreateRuleFunction } from '../..'
import { isDefined } from '../../guards'
/**
* Option value type guard.
*/
function assertMaxIdentical(val: unknow... |
import { FC, useCallback, useMemo, useState, useRef } from 'react';
import Map from 'components/map';
import ZoomControls from 'components/map/controls/zoom';
import { useTooltip, Tooltip, defaultStyles } from '@visx/tooltip';
import PluginMapboxGl from '@vizzuality/layer-manager-plugin-mapboxgl';
import { LayerMana... |
<filename>src/handlers/brancher.ts
import * as fs from 'fs';
import * as path from 'path';
// eslint-disable-next-line import/no-extraneous-dependencies
import * as AWS from 'aws-sdk';
import simpleGit, { SimpleGit, SimpleGitOptions } from 'simple-git';
// eslint-disable-next-line @typescript-eslint/no-require-imports... |
import React, { FC, useState, useEffect } from 'react'
import cx from 'classnames'
import NextLink from 'next/link'
import Image from 'next/image'
import Grid from '@material-ui/core/Grid'
import Link from '@material-ui/core/Link'
import IconButton from '@material-ui/core/IconButton'
import CircularProgress from '@mate... |
<filename>src/devices/sisyfosAPI.ts
import * as osc from 'osc'
import {
SisyfosState,
SisyfosCommand,
Commands,
ToggleCommand,
FaderCommand,
SisyfosAPIState
} from '../types/src/sisyfos'
import { EventEmitter } from 'events'
/** How often to check connection status */
const CONNECTIVITY_INTERVAL = 3000 // ms
con... |
import * as pc from 'playcanvas/build/playcanvas.js';
import Example from '../../app/example';
class LightsBakedAOExample extends Example {
static CATEGORY = 'Graphics';
static NAME = 'Lights Baked AO';
static HIDDEN = true;
// @ts-ignore: override class function
example(canvas: HTMLCanvasElement)... |
import React, { Children, cloneElement, useEffect, useState } from 'react';
import Image from 'next/image';
import ReactTooltip from 'react-tooltip';
// import iconArrowLeft from '~/assets/icons/arrow-left.svg';
// import iconShare from '~/assets/icons/workspace/share-orange.svg';
import iconFolderAdd from '~/assets/i... |
<filename>typescript-4-in-depth/app.ts
import {Category} from "./enum";
import {Book, DamageLogger, Author, Librarian, Magazine} from './interfaces';
import {Encyclopedia, ReferenceItem, UniversityLibrarian} from "./classes";
import {CalculateLateFee as CalcFee, MaxBooksAllowed, Purge} from "./lib/utilityFunctions";
im... |
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2020 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the ... |
/**
* Datart
*
* Copyright 2021
*
* 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 t... |
<gh_stars>0
import axios, { AxiosInstance } from 'axios';
import azurekey from '../../azurekey.json';
type options = { baseUrl: string; instanceId: string; accessKey: string };
export class VisualSearchRequest {
uri: string;
client: AxiosInstance;
options: options;
constructor(options: options = undefined) {... |
import React from 'react'
import { Table, Button, Dropdown, Menu, Tooltip, Modal } from 'antd'
import { useValues, useActions } from 'kea'
import { MINIMUM_IMPLICIT_ACCESS_LEVEL, teamMembersLogic } from './teamMembersLogic'
import {
DownOutlined,
CrownFilled,
UpOutlined,
CloseCircleOutlined,
LogoutO... |
<filename>src/index.tsx
import Header from './chat/components/header';
import Footer from './chat/components/footer/footer';
import SuccessModal from './common/modals/success-modal';
import TextBox from './chat/components/text-box';
import VoiceNote from './chat/components/audio-box';
import ImageBox from './chat/compo... |
<gh_stars>0
import path from "path";
import ts from "typescript";
import { getStrMd5Hash } from "../../src.node.common/crypto/crypto.js";
import {
GetDirEntryOpts,
mkdirAsync,
writeFileAsync,
rmdirAsync,
renameAsync,
readdirAsync,
} from "../../src.node.common/fileSystem/types.js";
import {
readFileIfE... |
<filename>src/services/applications/applicantService.ts
import { provide } from 'inversify-binding-decorators';
import { Applicant } from '../../models/db/applicant';
import { ObjectID, DeleteResult, Repository } from 'typeorm';
import { validateOrReject } from 'class-validator';
import { Review } from '../../models/db... |
<filename>src/core.ts
declare global {
interface Window {
plausible: (s: string, p?: { props: any }) => void
}
}
export interface Row {
operandA?: number
operator?: Operator
operandB?: number
result?: number
}
export type Equation = Required<Row>
export type Answer = Required<Row>
export enum PlayState ... |
<reponame>jorroll/rx-controls<filename>projects/rx-controls-angular/src/lib/accessors/radio-input.accessor.ts
import {
Directive,
ElementRef,
forwardRef,
Injectable,
Injector,
Input,
OnChanges,
OnDestroy,
OnInit,
Renderer2,
SimpleChange,
SimpleChanges,
} from '@angular/core';
import { BehaviorSu... |
<gh_stars>100-1000
import { NotionEndpoints } from '@nishans/endpoints';
import { NotionFabricator } from '@nishans/fabricator';
import { NotionIdz } from '@nishans/idz';
import { NotionInit } from '@nishans/init';
import { NotionLineage } from '@nishans/lineage';
import { NotionLogger } from '@nishans/logger';
import ... |
<gh_stars>0
import * as path from 'path';
import * as fs from 'fs-extra';
import { ts } from 'ts-simple-ast';
import * as _ from 'lodash';
import { LinkParser } from './link-parser';
import { AngularLifecycleHooks } from './angular-lifecycles-hooks';
import { kindToType } from './kind-to-type';
const getCurrentDirec... |
<gh_stars>1-10
import { mode, transparentize } from "@chakra-ui/theme-tools"
type Dict = Record<string, any>
const baseStyle = {
lineHeight: "1.5",
borderRadius: "base",
fontWeight: "bold",
textTransform: "uppercase",
letterSpacing: "wider",
_focus: {
boxShadow: "outline",
},
_disabled: {
opac... |
/**
* @module ecs
*/
import ECS from "./ecs";
import System from "./system";
import {UIDGenerator, DefaultUIDGenerator} from "./uid";
import {fastSplice} from "./utils";
import {
ComponentProperties as Components,
ComponentIDs,
components as allComponents,
} from "../../components";
type DeepPartial<T> = Par... |
import { useState, useEffect, useCallback, useContext } from 'react';
import { ApolloError } from '@apollo/client';
import { Filters } from 'react-table';
import { useTranslation } from 'react-i18next';
import {
LoadingIndicator,
ErrorDisplay,
PageLoadingIndicator,
SearchInput,
} from '@neinteractiveliterature/... |
<gh_stars>100-1000
import { getConfig } from '@/config/configuration';
import { getEntityAccessControlCache } from '@/config/services';
import ClusterAclsNotLoadedError from '@/model/errors/ClusterAclsNotLoadedError';
import ClusterNotAuthorizedError from '@/model/errors/ClusterNotAuthorizedError';
import EntityNotAuth... |
<filename>projects/ngx-ui-components/src/lib/dialog/dialog-container.component.ts
import {
Component,
ComponentRef,
ElementRef,
EventEmitter,
HostBinding,
HostListener,
Inject,
OnDestroy,
OnInit,
ViewChild
} from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { CdkPortalOutlet, ... |
<reponame>Ju99ernaut/grapesjs<filename>src/navigator/index.ts
import { isString, bindAll } from 'underscore';
import { Model } from '../abstract';
import Module from '../abstract/Module';
import Component from '../dom_components/model/Component';
import EditorModel from '../editor/model/Editor';
import { hasWin, isComp... |
<filename>packages/nornj/src/utils/tools.ts
import nj from '../core';
const nativeArrayPush = Array.prototype.push,
nativeArraySlice = Array.prototype.slice,
hasOwnProperty = Object.prototype.hasOwnProperty,
toString = Object.prototype.toString;
const { errorTitle } = nj;
export const defineProp = Object.defineP... |
import { useState, useEffect } from "react"
import { useDispatch, useSelector } from "react-redux"
import { useHistory } from "react-router-dom"
import { Button, FormGroup, FormSection, TextInput } from "@patternfly/react-core"
import { Access, defaultTeamSelector, useTester } from "../../auth"
import { noop } from "... |
import React, { useEffect, useState, useMemo } from "react";
import { useSelector, useDispatch } from "react-redux";
import { Course, Appointment } from "../../services/api.types";
import { api } from "../../services/api";
import { selectTutorData } from "../../store/TutorData/selectors";
import { actions as tutorDataA... |
import {Middleware, Collection, Database, Cursor, DocumentError} from '@ziqquratu/database';
import {Pipe, PipeHook, PipeConfig, PipeFactory, identityPipe} from './interfaces';
import {allSettled} from './allSettled';
async function filterResults<T>(
promises: Iterable<Promise<T>>, error: (err: DocumentError) => voi... |
import { Component, HostListener, OnInit } from '@angular/core';
import { WordsService } from 'src/app/infra';
import { ActivatedRoute } from '@angular/router';
import { decrypt } from 'src/app/util/aes-util';
import { WordGridViewModel } from 'src/app/models/word-grid.view.model';
import { MatDialog } from '@angular/m... |
import { readFileSync, readdirSync, writeFileSync } from 'fs';
import path from 'path';
import type { ICategory, IRule } from './rules';
import { categories } from './rules';
const collator = new Intl.Collator('en', { numeric: true });
const extractCategoryId = (filePath: string): string => {
const basename = path... |
/**
* @internal-all
*/
import ns, { IBox, IWay } from './index'
import { makeRune } from './utils'
import { A } from 'alak'
import { decorate } from './decor'
const systemFields = {
_start: true as any,
_decay: true as any,
then: true,
// _private: true as any,
// _holistic: true as any,
_: true
// bo... |
/**
* FF Typescript Foundation Library
* Copyright 2019 <NAME>, Frame Factory GmbH
*
* License: MIT
*/
import { WebGLRenderer, Scene, Camera } from "three";
import { ITypedEvent } from "@ff/core/Publisher";
import { Node, types } from "@ff/graph/Component";
import { IChildEvent, IHierarchyEvent } from "@ff/grap... |
<filename>app/components/form.component.ts
import { Component, Input, Output, EventEmitter, AfterViewInit } from '@angular/core';
import { CourseModel } from '../models/course.model';
import { UserModel } from '../models/user.model';
import { Http, Response } from '@angular/http';
import { UserService } from '../servic... |
<filename>src/packets/PacketFactory.ts
import { Packet, PacketData, Side } from "./Packet";
import { PacketType } from "./PacketType";
import msgpack from "msgpack-lite";
interface Mapping {
value: string;
side: Side;
}
type ReverseMapping = { value: string, type: PacketType, side: Side };
interface PacketTypeM... |
import * as React from 'react';
import { TreeView, Tabs, Tab, TabTitleText, TextContent, Text } from '@patternfly/react-core';
import spacing from '@patternfly/react-styles/css/utilities/Spacing/spacing';
import { useSelectionState } from '@konveyor/lib-ui';
import { useInventoryTreeQuery, useSourceVMsQuery } from '@ap... |
import childProcess from 'child_process';
import path from 'path';
import fs from 'fs-extra';
import cloneDeep from 'lodash/cloneDeep';
import * as Local from '@getflywheel/local';
import * as LocalMain from '@getflywheel/local/main';
import {
SiteData,
Store,
RuntimeStore,
ImageData,
} from '../types';
import { BA... |
<reponame>mtsmfm/vscode-jscad-preview
import { Settings } from "../preview";
function getSettings(): Settings {
const element = document.getElementById("settings");
if (element) {
const data = element.getAttribute("data-settings");
if (data) {
return JSON.parse(data);
}
}
throw new Error("Co... |
/*! PostgreSQL information_schema types. Some of these comments are taken
verbatim from the PostgreSQL documentation:
http://www.postgresql.org/docs/current/static/infoschema-datatypes.html
Every column in the information schema has one of these five types:
cardinal_number, character_data, sql_identifier, time_stamp... |
import React from 'react';
import {rand, defaultViewBox} from '../utils/helper';
import { getTypeTable, QRPointType } from '../utils/qrcodeHandler';
import {RendererWrapper, RendererProps, SFC} from './RendererWrapper';
enum Type {
Rect = 'rect',
Round = 'round',
}
enum PosType {
Rect = 'rect',
Round ... |
<filename>src/Voice.ts
import { Score } from './Score.js';
import { Note } from "./Note.js";
import { Analyzer } from "./Analyzer.js";
import { Layout } from "./Layout.js";
import { Pitch } from "./Pitch.js";
export class Voice {
/**
*
* @returns true iff the voice contains notes
*/
isEmpty():... |
<filename>stronghold/src/workerPool/pool.ts
import * as worker from './worker'
import { Worker } from 'worker_threads'
import type {
CreateTransactionRequest,
CreateMinersFeeRequest,
OmitRequestId,
TransactionFeeRequest,
VerifyTransactionRequest,
WorkerRequest,
WorkerResponse,
WorkerRequestMessage,
W... |
import React, { useEffect, useState } from "react";
import clsx from "clsx";
import SortableTreeLib, {
removeNodeAtPath,
getTreeFromFlatData,
ExtendedNodeData,
TreeItem,
changeNodeAtPath,
getFlatDataFromTree,
NodeData,
FullTree,
OnMovePreviousAndNextLocation,
} from "react-sortable-tree";
import Butto... |
import { zipChunks } from "@effect/core/stream/Stream/operations/_internal/zipChunks"
type State<A, A2> = DrainLeft | DrainRight | PullBoth | PullLeft<A2> | PullRight<A>
class DrainLeft {
readonly _tag = "DrainLeft"
}
class DrainRight {
readonly _tag = "DrainRight"
}
class PullBoth {
readonly _tag = "PullBoth... |
import React, { createContext, useContext } from 'react';
import unionBy from 'lodash/unionBy';
import property from 'lodash/property';
import BigNumber from 'bignumber.js';
import unionWith from 'ramda/src/unionWith';
import isEmpty from 'ramda/src/isEmpty';
import eqBy from 'ramda/src/eqBy';
import prop from 'ramda/s... |
<reponame>higurashit/knowledge-management-rss<filename>src/feed/generate-feed-command-by-tech.ts<gh_stars>0
import { FEED_INFO_LIST, TECHS, Tech } from '../resources/feed-info-list';
import { FeedCrawler, CustomRssParserFeed, CustomRssParserItem } from './utils/feed-crawler';
import { FeedGenerator } from './utils/feed... |
/**
* Shared API interfaces between the frontend and backend
*/
export interface BasicAuth {
userName: string;
password: string;
}
export interface Config {
hostname: string;
port: number;
logLevel: "DEBUG" | "INFO" | "WARNING" | "ERROR" | "CRITICAL";
rootPath: string;
servers: Array<{
type?: "ple... |
/*
* Copyright 2017-2019 <NAME>
* https://github.com/Marus/cortex-debug
*
* 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... |
import uuidv4 from 'uuid/v4';
import { EventEmitter } from 'events';
import { AgoraEduApi } from '../core/services/edu-api';
import { EduLogger } from '../core/logger';
class SyncRoomTask {
apiService: AgoraEduApi
id: number = -1
args: any[] = []
constructor(apiService: AgoraEduApi) {
this.apiService = ... |
<reponame>serafin-labs/api
import { OpenAPIObject, ParameterObject, SchemaObject, ReferenceObject } from "@serafin/open-api"
import * as _ from "lodash"
import * as jsonpointer from "jsonpointer"
import { throughJsonSchema } from "./throughJsonSchema"
import { JSONSchema } from "@serafin/schema-builder"
/**
* Go thr... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import type {TreeGeneration} from './Models';
import {
FlexColumn,
FlexRow,
Component,
Tooltip,
Glyph,
... |
import moment from 'moment';
import { chineseType, type } from './type';
export const replaceBr = (str: string) => {
if (!str.includes('<br/>')) {
return str;
}
const reg = /\<br\/\>/g;
return str.replace(reg, '\n');
};
export const removeLineNum = (str: string) => {
const reg = /\d+#/g;
return str.rep... |
import { CredentialManager } from "@takomo/aws-clients"
import { IamRoleArn } from "@takomo/aws-model"
import { CommandContext } from "@takomo/core"
import { HookRegistry } from "@takomo/stacks-hooks"
import {
CommandPath,
createStackGroup,
InternalStack,
isWithinCommandPath,
normalizeStackPath,
ROOT_STACK_... |
import React, {
FC,
ReactElement,
useEffect,
useMemo,
useRef,
useState,
useLayoutEffect,
} from 'react'
import FormItem from './FormItem'
import Map from '../Maps/Map'
import Fab from '@material-ui/core/Fab'
import AddIcon from '@material-ui/icons/AddOutlined'
import GridItem from '../../components/Gri... |
<reponame>status-im/dappconnect-sdks
/* eslint-disable */
import Long from "long";
import _m0 from "protobufjs/minimal";
export const protobufPackage = "communities.v1";
/**
* Specs:
* :AUTOMATIC
* To Send - "AUTOMATIC" status ping every 5 minutes
* Display - Online for up to 5 minutes from the last clock, after ... |
<filename>navigator/frontend/src/ui-core/src/api/DamlLfType.ts<gh_stars>0
// Copyright (c) 2019, Digital Asset (Switzerland) GmbH and/or its affiliates.
// All rights reserved.
import { NonExhaustiveMatch } from '../util'
// ---------------------------------------------------------------------------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.