text stringlengths 3.08k 15.5k |
|---|
<filename>client/src/app/components/historical-chart/historical-chart.component.ts<gh_stars>1-10
import {
Component,
Input,
OnInit,
Output,
EventEmitter,
OnChanges,
} from '@angular/core';
import { EChartsOption, graphic } from 'echarts';
import { StockHistory } from 'src/app/interfaces/stockHistory';
expo... |
import React from 'react'
import clsx from 'clsx'
import PropTypes from 'prop-types'
import Ripple, { RippleRef } from '../Ripple'
import ConfigContext from '../ConfigProvider/ConfigContext'
import useEventCallback from '../commons/hooks/useEventCallback'
import createUseClasses from '../styles/createUseClasses'
expor... |
import React, { PropsWithChildren, useContext, useMemo, useState } from "react";
import { CookiesProvider, useCookies } from 'react-cookie';
import * as replaceAll from 'string.prototype.replaceall';
import CodeBlock from '@theme/CodeBlock';
import Twig from 'twig';
import { useDebouncedChecker } from "./debouncer";
e... |
<reponame>imranbarbhuiya/utilities<gh_stars>1-10
import type { Ctor } from '@sapphire/utilities';
import type { CollectorFilter, EmojiResolvable, Message, MessageReaction, User } from 'discord.js';
import type { MessagePrompterChannelTypes, MessagePrompterMessage } from './constants';
import type {
IMessagePrompterExp... |
/*
* Tencent is pleased to support the open source community by making
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
*
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
*
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
*
* License for 蓝鲸智云... |
<filename>src/csrf.ts
/*
* @adonisjs/shield
*
* (c) <NAME> <<EMAIL>>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/// <reference path="../adonis-typings/index.ts" />
import Tokens from 'csrf'
import { Exception } from '@poppin... |
import React from 'react'
import styled from 'styled-components'
import { margin, MarginProps } from 'styled-system'
import { PolyFCWithRef } from '../helpers/asProps'
import { isIE } from '../helpers/constants'
import { flexItem, FlexItemProps } from '../helpers/flexItem'
import generateId from '../helpers/generateId... |
<reponame>load1n9/vechain-deno-wrapper
import { ethers } from "https://cdn.ethers.io/lib/ethers-5.1.esm.min.js";
import { Buffer } from "https://deno.land/x/node_buffer@1.1.0/mod.ts";
import { keccak256 } from "./keccak.ts";
const {
AbiCoder,
} = ethers.utils;
class Coder extends AbiCoder {
constructor() {
su... |
<filename>src/index.ts
import cors from 'cors';
import { BytesLike, ethers } from 'ethers';
import { Fragment, FunctionFragment, Interface, JsonFragment } from '@ethersproject/abi';
import { concat, hexlify } from '@ethersproject/bytes';
import express from 'express';
import jayson from 'jayson/promise';
import { Trans... |
<reponame>HuangLuGuang/ghkjsdfsd
import { Component, OnInit, Input, ViewChild } from "@angular/core";
import { NbDialogRef } from "@nebular/theme";
import { HttpserviceService } from "../../../../services/http/httpservice.service";
import { PublicmethodService } from "../../../../services/publicmethod/publicmethod.serv... |
<filename>src/utils.ts
import Decimal from "break_infinity.js";
function commaSection(value: string, index: number): string {
if (index === 0) {
return value.slice(-3);
}
return value.slice(
-3 * (index + 1),
-3 * index
);
}
function addCommas(value: string): string {
return Array.f... |
<gh_stars>0
import debugModule from "debug";
const debug = debugModule("decoder:decode:calldata");
import read from "../read";
import * as DecodeUtils from "truffle-decode-utils";
import decodeValue from "./value";
import { CalldataPointer, DataPointer } from "../types/pointer";
import { CalldataMemberAllocation } fro... |
/*
* This implementation is based on <NAME>'s `animationInterval` function.
* https://gist.github.com/jakearchibald/cb03f15670817001b1157e62a076fe95/85fedc4fe005449955cb5207173e33f84dc6c140
*/
import {Globals, getCurrentFrameTime, safeDelayMs} from '../utils'
export type TimerTickCallback = (time: number) => void
... |
const noOp = () => {};
/**
* A representation of an Application state.`ApplicationStore` is the state instance that
* turns each key in its constructor args into a method from updating that state property.
* (e.g. `state.users` = ApplicationStore.users( ... ))
*/
class _ApplicationStore {
[x: string]: any;
/*... |
import { makeStyles, Grid, Box, Paper, Switch, Typography, Toolbar } from "@material-ui/core";
import React from "react";
import ProblemSetsListView from "../../train/ProblemSetsListView";
import SubmissionsListView from "../../train/SubmissionsListView";
import { HeadId, ReportId, SubmissionId, UserId } from "../../..... |
import { Button, Input, Form,Modal,Select,Tabs,List } from 'antd';
import { connect, Dispatch } from 'umi';
import React, { FC } from 'react';
import { AutoCodeProject } from '@/models/autocode/project';
import ProjectSubClassItemModify from './ProjectSubClassItemModify';
import {ProjectSubClassItemModifyProps} from '.... |
import { MidiPitchBendEvent, writeMidi } from "midi-file";
import { MidiControllerEvent, MidiData, MidiEndOfTrackEvent,
MidiInstrumentEvent, MidiKeySignatureEvent, MidiNoteOffEvent,
MidiNoteOnEvent, MidiTempoEvent, MidiTextEvent, MidiTimeSignatureEvent, MidiTrackNameEvent } from "midi-file";
import { ControlChange } ... |
<reponame>manzt/gosling.js
import { GoslingSpec, MultivecData, OverlaidTracks } from '../../core/gosling.schema';
import { EX_TRACK_SEMANTIC_ZOOM } from './semantic-zoom';
export const EX_TRACK_SARS_COV_2_GENES: OverlaidTracks = {
alignment: 'overlay',
title: 'NC_045512.2 Genes',
data: {
type: 'csv... |
<reponame>DanteSingleton/tang<filename>lib/Schema.ts
const Joi = require('joi')
import {Schema as JoiSchema} from 'joi'
import { JSONStringify } from './helpers/JSONStringify';
require('colors')
interface SchemaStatics {
[index: string]: Function
}
interface SchemaComputed {
[index: string]: Function
}
interface IS... |
<gh_stars>0
import { Part } from './parts'
export interface FuelTankInfo {
capacity: number
current: number
mass: number
}
export interface FuelTankOptions {
capacity: number
}
export enum TanksType {
FUEL_TANK = 'Fuel Tank',
}
/**
* A Fuel tank contains and provide fuel.
* A new FuelT... |
import { extent } from "d3-array";
import { nest } from "d3-collection";
import { select, selectAll } from "d3-selection";
import { scaleLinear, scaleOrdinal } from "d3-scale";
import { schemePaired } from "d3-scale-chromatic";
import { hierarchy, treemap, treemapResquarify } from "d3-hierarchy";
import { Basechart, sv... |
/* eslint-disable @typescript-eslint/ban-ts-ignore */
import AggregateError from "aggregate-error"
export async function pFinally<T>(
promise: Promise<T> | (() => Promise<T>),
onFinally: () => void = () => {
// void
}
) {
let value
try {
value = await promise
} catch (error) {
await onFinally(... |
<reponame>pnpm/supi
import {Resolution} from '@pnpm/resolver-base'
import {Dependencies, PackageJson} from '@pnpm/types'
import * as dp from 'dependency-path'
import getNpmTarballUrl from 'get-npm-tarball-url'
import {
DependencyShrinkwrap,
prune as pruneShrinkwrap,
ResolvedDependencies,
Shrinkwrap,
Shrinkwra... |
<filename>interfaces/PA-App/src/app/personal-components/enroll-in-program/enroll-in-program.component.ts
import { Component, Input } from '@angular/core';
import { InstanceInformation } from 'src/app/models/instance.model';
import {
Program,
ProgramAttribute,
ProgramQuestion,
ProgramQuestionOption,
} from 'src/... |
/*
Generic GlkOte implementation
=============================
Copyright (c) 2022 <NAME>
MIT licenced
https://github.com/curiousdannii/asyncglk
*/
import * as Constants from '../../common/constants.js'
import * as protocol from '../../common/protocol.js'
export interface GlkOte {
classname: string,
error(m... |
import React, { ReactNode, Fragment, createElement } from 'react'
// @ts-ignore
import { withContainer, SvgWrapper, bindDefs, useTheme, useDimensions } from '@nivo/core'
import {
// @ts-ignore
useInheritedColor,
InheritedColorProp,
} from '@nivo/colors'
import { PieSlice } from './PieSlice'
import { RadialL... |
<reponame>kullo/chat-web<gh_stars>0
/*
* Copyright 2017–2018 Kullo GmbH
*
* This source code is licensed under the 3-clause BSD license. See LICENSE.txt
* in the root directory of this source tree for details.
*/
import { Component, OnInit, ViewChild, ElementRef, NgZone } from '@angular/core';
import * as awesompl... |
<filename>projects/ngx-particle/src/lib/models/utils.ts
import { IParams, ITmpParams } from "./interfaces";
import { Particle } from "./particle";
export type RGB = {
r: number;
g: number;
b: number;
};
export type HSL = {
h: number;
s: number;
l: number;
};
export const hexToRgb: (hex: string) => RGB =
(... |
<filename>archive/utils/permissions.ts
// For resource types, see https://github.com/project-koku/koku/blob/main/koku/koku/rbac.py#L37-L43
import { paths, routes } from 'routes';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
export const debugUserPermissions = async () => {
// eslint-d... |
enum FiberState {
// in coda
Waiting = "Waiting",
// sto eseguendo i figli
Running = "Running",
// ho terminato i figli e sono in errore/terminati
Resolved = "Resolved",
Rejected = "Rejected",
// ho terminato questo nodo
Committed = "Committed"
}
type IFiber = {
state: FiberStat... |
import { Transition, Dialog, Switch } from "@headlessui/react";
import { Fragment, useContext, useEffect, useState } from "react";
import { Link as LinkType } from "../pages/dashboard";
import Image from "next/image";
import { HiCheck, HiOutlineClipboardCopy, HiX } from "react-icons/hi";
import CopyButton from "./CopyB... |
<filename>src/index.ts<gh_stars>1-10
import { loadRemote } from 'load-remote'
export interface PdfResources {
/** Default: 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.2.228/web/pdf_viewer.css' */
pdfViewerCssUrl?: string
/** Default: 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.2.228/build/pdf.min.js' */
pdfJsUrl... |
import { Document, model, Model, PopulatedDoc, Schema, Types } from "mongoose";
import { IPdfDocument, PdfDocument, PdfDocumentSchema } from "./pdfDocument";
import { Semester } from "../helpers/semesterHelper";
import { imimapAdmin } from "../helpers/imimapAsAdminHelper";
import { User } from "./user";
import { EventS... |
<filename>milo/frontend/resultui/src/services/buildbucket.ts
// Copyright 2020 The LUCI 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/... |
import React, { useEffect, useMemo } from 'react';
import styled from 'styled-components';
import { useWallet } from '@binance-chain/bsc-use-wallet';
import Button from '../../components/Button';
import PageHeader from '../../components/PageHeader';
import Spacer from '../../components/Spacer';
import Harvest from './... |
import { Fragment, ReactNode } from 'react';
import { Disclosure, Menu, Transition } from '@headlessui/react';
import { BellIcon, MenuIcon, XIcon } from '@heroicons/react/outline';
import { DatabaseIcon } from '@heroicons/react/solid';
import { NavLink, Link } from 'remix';
import clsx from 'clsx';
export function Hea... |
<filename>src/app/app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { EsriMapComponent } from './shared/esri-map/esri-map.component';
import { ... |
<gh_stars>1-10
import {
ILabShell,
JupyterFrontEnd,
JupyterFrontEndPlugin
} from '@jupyterlab/application';
import { ICommandPalette } from '@jupyterlab/apputils';
import { INotebookTracker, NotebookPanel } from '@jupyterlab/notebook';
import { CodeMirrorEditor } from '@jupyterlab/codemirror';
import { FileEditor... |
<reponame>sigoden/orgdo
import Task from "Task";
import chalk from "chalk";
import * as os from "os";
import { paddingLeft, shortTimeStr, dateFormat } from "./utits";
const COLORS = {
canceled: chalk.red,
done: chalk.green,
todo: chalk.white,
describe: chalk.gray,
doing: chalk.yellow,
high: chalk.bgRed.bl... |
/// <reference path="../toolbox.ts" />
class DecodableReaderModel implements ITabModel {
restoreSettings(settings: string) {
if (!model) model = new ReaderToolsModel();
initializeDecodableReaderTool();
if (settings['decodableReaderState']) {
var state = libsynphony.dbGet('drt_s... |
<filename>src/lib/TiBuild.ts
import * as vscode from 'vscode';
var path =require('path');
var shell = require('shelljs');
var project_flag = ' --project-dir "' + vscode.workspace.rootPath +'"';
var info;
shell.exec("ti info -o json -t android,ios", function(code, output) {
console.log("activated")
info = JSON.parse... |
import gql from 'graphql-tag';
import React, { useState, useCallback, useEffect } from 'react';
import { useMutation } from 'react-apollo-hooks';
import { Redirect } from 'react-router-dom';
import { chain, tryCatch, rightTask } from 'fp-ts/es6/TaskEither';
import { fold } from 'fp-ts/es6/Either';
import { pipe } from ... |
import {
AlertDialog,
AlertDialogBody,
AlertDialogContent,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogOverlay,
Box,
Breadcrumb,
BreadcrumbItem,
BreadcrumbLink,
Button,
Center,
Flex,
Heading,
HStack,
Icon,
Image,
Input,
InputGroup,
Inp... |
// TODO SOMEDAY: Feature Componetized like CrisisCenter
import 'rxjs/add/operator/switchMap';
import { Observable } from 'rxjs/Observable';
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Router, ActivatedRoute, Params } from '@angular/router';
import { WeatherService } from './weather.service';
... |
<reponame>tumblr/webpack-web-app-manifest-plugin<filename>src/index.ts
import type { Compiler } from 'webpack';
import type { WebAppManifest } from 'web-app-manifest';
/**
* Strips trailing slashes from `path`.
*
* @param path
* @returns `path` without trailing slashes.
*/
function trimSlashRight(path: string): s... |
import fse = require("fs-extra");
import {
DebugView,
InputBox,
Key,
TreeItem,
ViewItem,
ViewSection,
} from "vscode-extension-tester";
import { ViewPageObject } from "./view-po";
import { TextEditorPageObject } from "./text-editor-po";
import path = require("path");
import { PROJECT_FOLDER } from "../scena... |
import React from 'react';
import styles from './Filter.less';
import classNames from 'classnames';
import { Button, Col, Form, Icon, Row } from 'antd';
import { groupByAmount, safeFun } from '@/utils/utils';
import BaseForm, {
BaseFormProps,
FormEventStore,
OnFieldsChange,
OnValuesChange,
renderFormItem,
S... |
import { EventEmitter } from 'events'
import net, { Socket } from 'net'
import BrowserWebSocket from 'isomorphic-ws'
import NodeWebSocket from 'ws'
import { encoder, decoder } from './buffer'
import { Agent } from 'http'
export const relayEvent = Symbol('relay')
export const isNode = BrowserWebSocket === NodeWebSock... |
<reponame>telereso/telereso
import {Asset} from 'expo-asset';
import remoteConfig, {FirebaseRemoteConfigTypes} from '@react-native-firebase/remote-config';
import messaging, {FirebaseMessagingTypes} from '@react-native-firebase/messaging';
import i18n from 'i18n-js';
const TAG = 'Telereso';
const TAG_STRINGS = `${TAG}... |
<filename>src/exceljson.ts
"use strict";
import path = require("path");
import * as XLSX from "xlsx";
import * as sha224 from "crypto-js/sha224";
import * as base64 from "crypto-js/enc-base64";
import { Dict, Spreadsheet } from "./ExceLintTypes";
export class WorksheetOutput {
sheetName: string;
usedRangeAddress:... |
<filename>src/util/pages.ts
import VisitedPage from '../model/VisitedPage'
import {List} from 'immutable'
import {comparePagesByFirstVisited, comparePagesByLastVisited} from './sorting'
import PageVisit, {VisitType} from '../model/PageVisit'
import Page from '../model/Page'
import HistoryStack from '../model/HistorySta... |
<gh_stars>0
import { TranslationMessages } from 'ra-core';
const malayMessages: TranslationMessages = {
ra: {
action: {
add_filter: 'Tambahkan penapis',
add: 'Tambahkan',
back: 'Kembali',
bulk_actions: '1 benda terpilih |||| %{smart_count} benda terpilih',
... |
import React, { useRef } from 'react';
import get from 'lodash/get';
import classNames from 'classnames';
import BaseTable from './BaseTable';
import useColumnController from './hooks/useColumnController';
import useRowExpand from './hooks/useRowExpand';
import useTableHeader, { renderTitle } from './hooks/useTableHead... |
<gh_stars>0
import { Cache, CacheOptions, ICache } from '@wora/cache-persist';
import { NetInfo } from '@wora/netinfo';
const isServer = typeof window === 'undefined';
export type Request<T> = {
payload: T;
backup?: any;
sink?: any;
};
export type OfflineRecordCache<T> = {
id: string;
request: Re... |
<filename>tests/LSP9Vault/LSP9Vault.behaviour.ts<gh_stars>1-10
import { ethers } from "hardhat";
import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers";
import type { BytesLike } from "ethers";
import type { TransactionResponse } from "@ethersproject/abstract-provider";
// types
import {
LSP6KeyManage... |
import * as React from 'react';
import { css } from 'office-ui-fabric-react/lib/Utilities';
//import { Pivot, PivotItem, PivotLinkSize, IPivotStyles, PivotLinkFormat } from 'office-ui-fabric-react/lib/Pivot';
import { Highlight } from '@uifabric/example-app-base';
import './HomePage.scss'
export interface IGettingStar... |
// React Imports
import React, { FC, useState } from "react";
import { Helmet } from "react-helmet";
import { useAnalytics } from "../../Hooks";
import Filters from "../../Components/Custom/Filters";
import BookPreview from "../../Components/Content/Book/Preview";
import HorizontalDivider from "../../Components/Atomic/... |
import * as ts from 'typescript';
// https://github.com/gaearon/react-hot-loader/blob/master/src/babel.dev.js
const PREFIX = '__reactstandin__';
const REGENERATE_METHOD = `${PREFIX}regenerateByEval`;
const placeholderPattern = /([A-Z0-9]+)([A-Z0-9_]+)/g;
const shouldIgnoreFile = file =>
!!file
.split('\\')
.j... |
const uuid = require("uuid/v4.js");
import { TimeEvent } from "./TimeEventType";
/**
* Class representing a Timeline
*/
export default class Timeline {
manifest: Array<TimeEvent>;
timer: {
instance: ReturnType<typeof setInterval>;
duration: number;
onInterval: Function;
};
progress: number;
se... |
// ANCHOR Solid
import {
JSX,
createEffect,
createSignal,
onCleanup,
Show,
Switch,
Match,
} from 'solid-js';
import AspectRatio from 'solid-aspect-ratio';
// ANCHOR Icons
import {
FaSolidMicrophone,
FaSolidMicrophoneSlash,
} from 'solid-icons/fa';
// ANCHOR LiveKit
import {
ConnectionQuality,
Lo... |
import React from 'react';
import {
makeStyles,
Theme,
createStyles,
AppBar,
Button,
IconButton,
Toolbar,
Typography,
} from '@material-ui/core';
import MenuIcon from '@material-ui/icons/Menu';
import { DragDropContext } from 'react-beautiful-dnd';
import { useAuthContext } from '../../../modules/auth/a... |
<filename>capture/fonts.ts
import { val2px, cs, dump_string, is_comment, f2r } from "./util";
// Start of real stuff
function get_font_metrics(font) {
var body = document.body;
var div = document.createElement("CassiusBlock");
var img = document.createElement("img");
div.appendChild(img);
body.app... |
<reponame>Celtian/ngx-cut<gh_stars>1-10
import {
NgxCutBreakpoints,
NgxCutBreakpointsOrPredefinedBreakpoints,
NgxCutOptionsResponsiveSizes,
NgxCutPredefinedBreakpoints,
NgxCutResponsiveSize,
NgxCutResponsiveSizeOrNumber,
NgxCutResponsiveSizes,
NgxCutSizes,
NgxCutSizesOnlyResponsive,
NgxCutStyles,
... |
import { WritableProperty } from "../observable/property/WritableProperty";
import { Disposable } from "../observable/Disposable";
import { property } from "../observable";
import { Property } from "../observable/property/Property";
import { Server } from "../model";
import { Store } from "./Store";
import { disposable... |
import {
default as AnsiUp
} from 'ansi_up';
import * as API from "azure-devops-extension-api";
import { CommonServiceIds, getClient, IProjectPageService } from "azure-devops-extension-api";
import { Build, BuildRestClient, BuildServiceIds, IBuildPageDataService, Timeline } from "azure-devops-extension-api/Build";
... |
// package:
// file: termproxy.proto
import * as jspb from "google-protobuf";
import * as common_pb from "./common_pb";
export class ClientMessage extends jspb.Message {
hasOpenConnection(): boolean;
clearOpenConnection(): void;
getOpenConnection(): OpenConnectionMessage | undefined;
setOpenConnection(value?... |
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { ITelemetryLogger } from "@fluidframework/common-definitions";
import { assert } from "@fluidframework/common-utils";
import { cloneGCData } from "@fluidframework/garbage-collector";
import {
IContextSum... |
#!/usr/bin/env node
import * as ts from "typescript";
import * as glob from "glob";
import * as path from "path";
import * as fs from "fs";
import * as prog from "caporal";
import * as chokidar from "chokidar";
import { ensureDir, readFile, writeFile } from "fs-extra";
import { promisify } from "util";
import * as Debu... |
<reponame>scenario-data/scenario-database
import { EntityDef, EntityRestriction } from "../../definition/entity";
import { DataReference, isDataReference } from "../../definition/references";
import { refColumnName } from "../migrations/execute_migrations";
import { nevah, objectKeys } from "../../misc/typeguards";
imp... |
const COCO_PERSON_SKELETON = [
[16, 14], [14, 12], [17, 15], [15, 13], [12, 13], [6, 12], [7, 13],
[6, 7], [6, 8], [7, 9], [8, 10], [9, 11], [2, 3], [1, 2], [1, 3],
[2, 4], [3, 5], [4, 6], [5, 7]
];
const COLORS = [
'#1f77b4',
'#aec7e8',
'#ff7f0e',
'#ffbb78',
'#2ca02c',
'#98df8a',
... |
import { Menu } from './Menu'
import {Mentor} from "./Mentor";
import {Student} from "./Student";
import {Conference} from "./Conference";
let mentorList: Mentor[] = [];
let studentList: Student[] = [];
let conferenceList: Conference[] = [];
function mentorValidation<T extends string>(mentorList:Mentor[], email:T, p... |
<gh_stars>0
import { OutputAsset, OutputChunk } from 'rollup'
import { ManifestV3Export } from './define'
import {
decodeManifest,
encodeManifest,
htmlFiles,
isString,
structuredClone,
} from './helpers'
import { ManifestV3 } from './manifest'
import { basename } from './path'
import { CrxPlugin, CrxPluginFn ... |
import React, { ReactElement } from 'react';
import {
Text,
View,
Image,
TouchableOpacity,
StatusBar,
Animated,
ImageSourcePropType,
} from 'react-native';
import StickyParallaxHeader, {
StickyParallaxHeaderProps,
} from '../../StickyParallaxHeaderComponent';
import { constants, sizes, colors } from '..... |
import * as t from 'funtypes';
import DataType from './enums/DataType';
const IntegerSchema = t.Number.withConstraint(
(value) =>
value !== Math.floor(value) ||
Number.isNaN(value) ||
value > Number.MAX_SAFE_INTEGER ||
value < Number.MIN_SAFE_INTEGER
? `Expected an integer but got ${value.toStr... |
<reponame>yroffin/jarcam
import * as THREE from 'three';
import * as _ from 'lodash';
import { Area } from 'src/app/services/three/area.class';
import { MathUtils } from 'src/app/services/math-utils';
import { ScanPiecesBean } from 'src/app/stores/parameters.service';
class FacesGroup {
neighbours: THREE.Face3[];
... |
'use babel';
import React from 'preact-compat';
import moment from 'moment';
import AgeSection from './AgeSection';
import BuildStatus from './BuildStatus';
import SearchInLayer from './SearchInLayer';
import * as ConfigManager from '../ConfigManager';
import * as Analytics from '../stepsize/Analytics';
import * as In... |
import React, { FC, useState } from 'react';
import { BigNumber, constants } from 'ethers';
import { FullChannelState } from '@connext/vector-types';
import { getBalanceForAssetId } from '@connext/vector-utils';
import { BrowserNode } from '@connext/vector-browser-node';
import {
ModalContent,
ModalBody,
Text,
... |
/*------------------------------------------------------------------------------
* MIT License
*
* Copyright (c) 2021 IBM
*
* 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 rest... |
import { join, dirname } from 'path';
import fs from 'fs-extra';
import os from 'os';
import { exec, ChildProcess } from 'child_process';
import spawn from 'cross-spawn';
import { Fixture } from './Fixture';
import stripAnsi from 'strip-ansi';
import treeKill from 'tree-kill';
import flatten from '../../../src/utils/ar... |
<reponame>Short-io/rmwc
import React, { useRef, useEffect, useLayoutEffect } from 'react';
import { SliderProps } from '.';
import { useFoundation, emptyClientRect } from '@srmwc/base';
import { EventType, SpecificEventListener } from '@material/base/types';
import { cssClasses, MDCSliderFoundation, Thumb } from '@ma... |
import { Injectable } from '@angular/core'
import {
Http,
RequestOptions,
RequestOptionsArgs,
Headers,
Request,
Response,
RequestMethod,
} from '@angular/http'
import { OAuth2Token } from './oauth2token'
import { Observable } from 'rxjs/Observable'
import 'rxjs/add/observable/fromPromise'
export interf... |
import {RenderLoop, AnimationProps, CubeGeometry, Timeline, KeyFrames, Model} from '@luma.gl/engine';
import {setParameters} from '@luma.gl/webgl';
import {dirlight} from '@luma.gl/shadertools';
import {Matrix4, radians} from '@math.gl/core';
import {getRandom} from '@luma.gl/api';
// Ensure repeatable rendertests
con... |
import React from 'react';
import { createLogger } from 'common/logger';
import { Stats as StatsFunctions, AI as AIFunctions } from 'common/abstractions/functions';
import Firebase from 'common/services/firebase';
import { Page, Container, View } from 'app/common/components';
import TabsComponent from 'app/components/T... |
import loadUserConfig from "../tools/loadUserConfig";
import { cardRealWildModel, cardAliasStandardModel, cardAliasModel } from "../db";
import generateQuiz from "../tools/generateQuiz";
import { Message, MessageActionRow, MessageButton } from "discord.js";
import getRandomHint from "../tools/image_hint";
import giveUs... |
<filename>code.ts
const delay = ms => new Promise(res => setTimeout(res, ms));
var totalTimers = 0;
const secondsSet = [86400, 3600, 60, 1];
var pause = false;
var reset = false;
var userSetSeconds = 0;
const uiWindow = {
minHeight: 60,
maxHeight: 300,
helptextHeight: 200,
width: 220,
}
var timerUIHeight = 50... |
import * as React from 'react';
import { withRouter, RouteComponentProps } from 'react-router-dom';
import Paper from '@material-ui/core/Paper';
import { withStyles } from '@material-ui/core/styles';
import { History } from 'history';
import EditForm from '../EditForm';
import * as domain from '../../../domain';
import... |
<gh_stars>100-1000
// Functions for talking to the Google Drive API
// NOT a generic API as it assumes you want to access
// appDataFolder and want to upload and download a text file.
export const GDRIVE_FILES_URL = "https://www.googleapis.com/drive/v3/files";
export const GDRIVE_UPLOAD_FILES_URL = "https://www.google... |
import { Component, ElementRef, EventEmitter, Input, OnChanges, Output, ViewChild } from '@angular/core';
import { CategoryForm, Datastore, Resource, FieldDocument, Name, Named, Tree } from 'idai-field-core';
import { I18n } from '@ngx-translate/i18n-polyfill';
import { ProjectConfiguration } from 'idai-field-core';
im... |
<gh_stars>0
import {Injectable, Inject} from 'angular2/core';
import {Http, Headers, URLSearchParams, Response, HTTP_PROVIDERS}
from 'angular2/http';
import {Observable} from 'rxjs/Observable';
import {ChatItem} from './chat-item';
// import {List} from 'immutable';
@Injectable()
export class ChatSessionService {
... |
<gh_stars>0
import { GraphQLSchema, GraphQLObjectType } from "graphql"
import Artwork from "./artwork"
import ArtworkAttributionClasses from "./artworkAttributionClasses"
import Artist from "./artist"
import Fair from "./fair"
import Gene from "./gene"
import HomePage from "./home"
import { City } from "./city"
import... |
import { InvalidArgError } from './errors';
import SortedArray from './sorted-array';
type NumberArray = SortedArray<number, string>;
const compareNumbers = (a: number, b: number) => {
if (a === b) return 0;
else if (a < b) return -1;
else return 1;
};
const unsortedSampleData = () => [
{ key: 1, value: 'One... |
import React, { FunctionComponent } from 'React';
import { FixedSizeGrid, GridChildComponentProps } from 'react-window';
import InfiniteLoader from 'react-window-infinite-loader';
import { GridListTile, GridListTileBar, Checkbox } from '@material-ui/core';
import { CloudDownload, CloudDownloadOutlined } from '@material... |
import React, { useState } from "react";
import TooltipComponent from "./TooltipComponent";
import * as Icon from "../lib/icons/index";
type MyPaletteProps = {
myPalette: string[][];
hexValue: string[];
handleHexChange: (colors: string[]) => void;
onDelete: (index: number) => void;
};
export const MyPalettes... |
<reponame>NaridaL/brep.ts
import {
arrayFromFunction,
arrayRange,
assert,
assertVectors,
bisect,
clamp,
eq,
eq0,
int,
M4,
TAU,
Tuple3,
V3,
} from 'ts3dutils'
import { MeshWith, pushQuad } from 'tsgl'
import { Curve, L3, PICurve, Surface } from '../index'
import { ceil, floor, max, min } from '../math'
ex... |
// native
import { promises as fs } from 'fs';
import { basename, dirname, format, parse, resolve } from 'path';
// packages
import babelPresetEnv from '@babel/preset-env';
import babelPluginTransformTypeScript from '@babel/plugin-transform-typescript';
import babelPluginClassProperties from '@babel/plugin-proposal-cl... |
<reponame>paula75/quetienemicomida-web<filename>src/app/data/dulcesgalletas.ts<gh_stars>0
import { Producto } from "../producto";
import { TipoProducto } from "../tipo-producto";
export const TIPOSGALLETAS: Producto[] = [
{
nombre: '<NAME>',
marca: 'Oreo',
tipo: 'Chocolate crema',
... |
import React, { useState, useEffect } from 'react';
import Typography from '@mui/material/Typography';
import Container from '@mui/material/Container';
import Table from '@mui/material/Table';
import TableBody from '@mui/material/TableBody';
import TableCell from '@mui/material/TableCell';
import TableContainer from '... |
import React, { Component } from 'react';
import styles from './InterlockReputation.module.css';
import tabbedpanel from '../StyleModules/TabbedPanel.module.css';
import splitter from '../StyleModules/Splitter.module.css';
import Tabs from '../Common/Tabs';
enum ReputationSections {
About = "About",
Table = "Reputat... |
<reponame>welteki/kuro-connector<gh_stars>1-10
import { EventEmitter } from 'events';
import * as SerialPort from 'serialport';
import * as Debug from 'debug';
import { CommandQueue } from './command-queue';
const Parser = SerialPort.parsers.Delimiter;
const debug = Debug(`kuro:sender`);
const DELIMITER = '\r';
expor... |
import * as _ from 'lodash';
import './style.scss'
import { Color3, Quaternion, Vector3, ArcRotateCamera, Engine, SceneLoader, MeshBuilder, StandardMaterial, CubeTexture, Texture, Mesh, AbstractMesh } from 'babylonjs'
const canvas : HTMLCanvasElement = document.getElementById("canvas") as HTMLCanvasElement;
const engi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.