text stringlengths 3.08k 15.5k |
|---|
<filename>distribution2.ts
interface Vote {
voter: string,
amount: number,
proposalId: string,
}
const votes: Vote[] = [
{
voter: 'voter_0',
amount: 1000,
proposalId: 'proposal_0',
},
{
voter: 'voter_1',
amount: 9000,
proposalId: 'proposal_0',
},
{
voter: 'voter_2',
amou... |
import React, { useContext, useEffect } from 'react';
import { Form, Button, Card, message, Row, Col, Input } from 'antd';
import Title from '../../../../../components/Title';
import { AjaxResponse } from '../../../../../../interfaces/common';
import Context from '../../../Context';
import PathMenuAction from '../../Pa... |
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####... |
import chroma from 'chroma-js';
import { CSSProperties } from 'react';
import { IDENTIFIERS } from 'react-polymorph/lib/components';
import SimpleButton from 'react-polymorph/lib/themes/simple/SimpleButton.scss';
import SimpleFormField from 'react-polymorph/lib/themes/simple/SimpleFormField.scss';
import SimpleInput fr... |
<filename>src/parts/Ble/linking/index.ts
/**
* @packageDocumentation
* @module Parts.Linking
*/
/* ------------------------------------------------------------------
* node-linking - linking.js
*
* Copyright (c) 2017-2019, <NAME>, All rights reserved.
* Released under the MIT license
* Date: 2019-10-24
* ----... |
import { createParticle } from "./particles";
import { audioCool, PlaySound, SoundEffect } from "./audio";
import { height, width } from "./constants";
import { AddText } from "./text";
import {
GameState,
LoadLevel,
Planet,
PlanetType,
state,
vector2,
} from "./state";
const G = 3; // 6.674e-11;
const bal... |
import classnames from "classnames";
import React from "react";
import { MdError } from "react-icons/md";
import { connect } from "react-redux";
import { dial } from "../actions/CallActions";
import {
AudioConstraint,
enumerateDevices,
getMediaStream,
MediaDevice,
play,
setAudioConstraint,
setVideoConstra... |
import { TxStatus } from '@oasisdex/transactions'
import { Box, Grid } from '@theme-ui/components'
import BigNumber from 'bignumber.js'
import { IlkData } from 'blockchain/ilks'
import { RetryableLoadingButtonProps } from 'components/dumb/RetryableLoadingButton'
import { TxStatusSection } from 'components/dumb/TxStatus... |
const NAMESPACE = 'http://www.w3.org/2000/svg';
const polarToCartesian = (centerX: number, centerY: number, radius: number, angleInDegrees: number) => {
const angleInRadians = (angleInDegrees - 90) * Math.PI / 180;
const x = centerX + (radius * Math.cos(angleInRadians));
const y = cente... |
const TILE_SIZE = 30;
const FPS = 30;
const SLEEP = 1000 / FPS;
enum Tile {
AIR,
FLUX,
UNBREAKABLE,
PLAYER,
STONE, FALLING_STONE,
BOX, FALLING_BOX,
KEY1, LOCK1,
KEY2, LOCK2
}
enum Input {
UP, DOWN, LEFT, RIGHT
}
let playerx = 1;
let playery = 1;
let map: Tile[][] = [
[2, 2, 2, 2, 2, 2, 2, 2],
... |
import Taro, { Component, Config } from "@tarojs/taro";
import {
View,
Text,
Image,
Input,
} from "@tarojs/components";
import {
nearbyStore,
} from "./service";
import scan from "../../img/scan.png";
import "./index.less";
import "../home/index.less";
// 引入moment
import moment from "moment";
moment.locale(... |
<filename>samples/COVID/covid-spfx/src/webparts/covidAdmin/CovidAdminWebPart.ts
import * as React from 'react';
import * as ReactDom from 'react-dom';
import { sp } from "@pnp/sp";
import { graph } from "@pnp/graph";
import { Logger, LogLevel, ConsoleListener } from "@pnp/logging";
import {
ThemeProvider,
ThemeCha... |
<filename>packages/settingeditor-extension/src/tableeditor.ts
/*-----------------------------------------------------------------------------
| Copyright (c) Jupyter Development Team.
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------... |
/*
* @Author: guanlanluditie
* @Date: 2021-01-22 22:36:26
* @Last Modified by: guanlanluditie
* @Last Modified time: 2021-03-22 22:41:29
*/
import React, { FC, useEffect, useReducer, useMemo, useState } from 'react';
import { runInAction, toJS } from 'mobx';
import { useHistory } from 'react-router-dom';
import ... |
export interface StatusCode {
readonly code: StatusCodes
readonly message: string
}
function StatusCode(code: StatusCodes, message: string): StatusCode {
return { code, message }
}
/* eslint @0x706b/align-assignments/align-assignments: ["error", { "maxColumns": 26 }] */
export const Continue ... |
import { DataType } from '../types/data_type';
import { EntityAttrKind } from '../types/entity_attr_kind';
import { MetaEntityDTO, MetaEntityAttrDTO } from './dto/meta_entity_dto';
import { MetaData } from './meta_data';
import { ValueEditor } from './value_editor';
import { utils } from '../utils/utils'
/**
... |
import { IPaymentTx } from '@algosigner/common/interfaces/pay';
import { IAssetConfigTx } from '@algosigner/common/interfaces/acfg';
import { IAssetCreateTx } from '@algosigner/common/interfaces/acfg_create';
import { IAssetDestroyTx } from '@algosigner/common/interfaces/acfg_destroy';
import { IAssetFreezeTx } from '@... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
import {SVG_NS, uuidv4} from '../components/Component';
import {IBlend} from '../components/filters/Blend';
import {IBlur} from '../components/filters/Blur';
import {IColor} from '../components/filters/C... |
<reponame>jfseb/abot_parser
'use strict'
import * as chevrotain from 'chevrotain';
var createToken = chevrotain.createToken;
var TACategory = createToken({name: "ACategory", pattern: /CAT/i });
var TADomain = createToken({name: "ADomain", pattern: /DOM/i });
var TAFact = createToken({name: "AFact", patte... |
import * as firestore from "firebase/firestore/lite";
import * as firebase from 'firebase/app';
import tags from '../../config/tag.json';
class FirebaseService {
app: any;
db: any
constructor() {
let app;
const firebaseConfig: any = {
FIREBASE_API_KEY: process.env.FIREBASE_API_... |
/* eslint-disable jsx-a11y/anchor-is-valid */
/* eslint-disable no-script-url */
import React, { FC, useState, useEffect } from "react";
import Select from "react-select";
import { CLEAN_DATE_TIME } from "../../../../context/App";
import SmallImage from "../../partials/SmallImage";
import { IImageProp } from "../../../... |
<gh_stars>0
import {Inject, Injectable} from '@angular/core';
import {HttpClient, HttpHeaders, HttpRequest, HttpResponse} from '@angular/common/http';
import {LocalStorageService} from 'ngx-webstorage';
import {
AUTHMODULE_CONFIG,
IAuthenticationModuleConfig,
IDecodedToken,
ISsoToken,
ISsoUser
} fro... |
import React, { useState } from 'react';
import { ScrollView, StyleSheet } from 'react-native';
import {
getGeneralOpeningHours,
getMapMarkers,
getScheduleData,
} from '../services/DataService';
import { ScheduleData } from '../models/ScheduleData';
import * as Animatable from 'react-native-animatable';
import Co... |
/**
* (C) 2017-2019 <NAME>
*/
import { Mutator } from "@alterior/annotations";
import { ConsoleColors, indentConsole, coalesce } from '@alterior/common';
import { LoggingOptionsRef, DEFAULT_LISTENERS, Logger } from "./logger";
let ENABLED : boolean = false;
export function getTracingEnabled() {
return ENABLED;... |
/* tslint:disable:ordered-imports*/
import "jest-extended";
import "../mocks/core-container";
import { Utils, Identities, Managers } from "@arkecosystem/crypto";
import { DiscloseExplicitTransactionHandler, Errors } from "@uns/uns-transactions";
import { IDiscloseDemandPayload, DIDTypes, UNSDiscloseExplicitBuilder } fr... |
import history from "history";
import update from "immutability-helper";
import * as React from "react";
import ReactMarkdown from "react-markdown";
import ReactModal = require("react-modal");
import { withRouter } from "react-router";
import { Route } from "react-router-dom";
import * as ArtFinder from "../cards/artFi... |
<filename>index.d.ts
export class DocFormatError extends Error {
constructor(message: any, ...rest: any[]);
}
export function a(content: any, url: string): any;
export function b(content: any): any;
export function blockquote(...content: any[]): any;
export function br(): any;
export function bulletList(...i... |
<reponame>plimerence/react-native-wechat-1<gh_stars>10-100
import { MiniProgramType } from "./apiMiniProgram";
import { Errors } from "./error";
import { invokeWrapper, resolveImage, throwError } from "./helper";
import { Result, RNWModule } from "./module";
export enum MessageType {
Text = 0,
Image = 1,
M... |
import { Writable } from 'stream';
export interface PromiseStream extends Writable {
/**
* The current read position in the buffer. This number will only increment
* upon the completion of the data requested by `read()` or `skip()`.
*/
offset: number;
/**
* Read the specifi... |
/* eslint-disable @typescript-eslint/no-use-before-define */
import {
map,
React,
ReactDOM,
rxComponent,
switchMap,
timer,
state
} from '../_utils/globalScope'
import styled from 'styled-components'
import bezier from 'bezier-easing'
//@endimport
const BALL_SIZE = 30
const BOX_SIZE = 300
const MAX_TOP =... |
/*
* Copyright 2021 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
import fs from 'fs';
import path from 'path';
import log from 'electron-log-daedalus';
import rimraf from 'rimraf';
import ensureDirectoryExists from './ensureDirectoryExists';
import { pubLogsFolderPath, appLogsFolderPath } from '../config';
import {
constructMessageBody,
formatMessage,
stringifyData,
} from '..... |
/* eslint-disable prefer-const */
import type { DashTokens, StyleObject, Styles } from "@dash-ui/styles";
function transition<
TransitionNames extends string,
Tokens extends DashTokens = DashTokens
>(
styles: Styles<Tokens>,
transitions: TransitionMap<TransitionNames, Tokens>
): Transitioner<TransitionNames, T... |
import streamx = require('streamx');
import { Writable as NodeJSWritable, Readable as NodeJSReadable } from 'stream';
const { Readable, Writable, Duplex, Transform, PassThrough, Stream, isStream, isStreamx } = streamx;
// All instances can be done without arguments
new Readable();
new Writable();
new Duplex();
new Tr... |
import * as React from 'react';
import TreeView from '@material-ui/lab/TreeView';
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
import ChevronRightIcon from '@material-ui/icons/ChevronRight';
import TreeItem from '@material-ui/lab/TreeItem';
import Checkbox from '@material-ui/core/Checkbox';
import { Butt... |
<reponame>liujingbreak/dr-comp-package
import * as http from 'http';
import * as https from 'https';
import * as fs from 'fs';
import * as Path from 'path';
import api from '__api';
import {getLanIPv4} from '@wfh/plink/wfh/dist/utils/network-util';
import {log4File} from '@wfh/plink';
const log = log4File(__filename);... |
/**
* WebComponents
*/
interface LuminusWorldElement extends HTMLElement
{
readonly complete: boolean;
readonly program: LuminusProgram;
// screen
width: number; height: number;
// camera
top: number; bottom: number; left: number; right: number; near: number; far: number;
view: 'volume' | 'frustum';
eyex: nu... |
<gh_stars>100-1000
// Library
import { assign, EventObject } from 'xstate';
import { isEqual, omit } from 'lodash';
// Helpers
import removeEmptyObjects, { isEmptyValues } from '../../../remove-empty-values';
import updateFormData, { setUISchemaData } from '../../../update-form-data';
import { flattenSchemaPropFromDe... |
<filename>src/actions/rogerthat.actions.ts
import { Action } from '@ngrx/store';
import {
CameraType,
CreateKeyPairResult,
CryptoAddress,
KeyPair,
PublicKey,
QrCodeScannedContent,
RogerthatError,
SupportedAlgorithms,
} from 'rogerthat-plugin';
import { ApiRequestStatus, CreateKeyPair, CreateTransactionT... |
/**
* @author <NAME> <<EMAIL>>
* @version 0.1.0
* @license "please refer to <http://unlicense.org>"
*/
import React from "react";
import { Container, Row, Col } from "react-bootstrap";
import styled from "styled-components";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { ThunkD... |
import m, { Vnode } from 'mithril'
import { uuidv4 } from '../util'
import { proxyTypes } from '../constants'
import { SettingsToTest, testProxySettings, TestResult } from './testProxySettings'
import { CheckboxInput, PasswordInput, TrimmedTextInput } from '../ui-components/inputs'
import PortNumberInput from './PortIn... |
import Button from "@material-ui/core/Button";
import Card from "@material-ui/core/Card";
import { ProductErrorFragment } from "@temp/sections/products/types/ProductErrorFragment";
import AppHeader from "@temp/components/AppHeader";
import { CardSpacer } from "@temp/components/CardSpacer";
import CardTitle from "@temp/... |
/*
* @描述: 搜索表单组件
* @Author: /songzi
* @Date: 2019-07-10 16:16:16
* @Last Modified by: songzi
* @Last Modified time: 2019-12-23 11:34:52
*/
import * as React from 'react';
import { Form, Button, Icon, Row, Col } from 'antd';
import classNames from 'classnames';
import { batchDataFormat, getFormatFromConfig } fro... |
import * as fs from 'fs';
import * as https from 'https';
import * as cheerio from 'cheerio';
import { runChildProcessAsync } from './helpers';
import { ArgumentParser } from 'argparse';
const fsAsync = fs.promises;
const inputPath = './src/web/assets/input/';
const solutionPath = './src/solutions/';
const testPath = ... |
import {fetchEnumAndParents} from '@/services/data/tuples/enum';
import {Enum, EnumItem} from '@/services/data/tuples/enum-types';
import {Dropdown} from '@/widgets/basic/dropdown';
import {DropdownOption} from '@/widgets/basic/types';
import {useForceUpdate} from '@/widgets/basic/utils';
import React, {useEffect, useS... |
import ListItemIcon from '@material-ui/core/ListItemIcon';
import MenuItem from '@material-ui/core/MenuItem';
import MenuList from '@material-ui/core/MenuList';
import { makeStyles } from '@material-ui/core/styles';
import GetAppIcon from '@material-ui/icons/GetApp';
import HomeIcon from '@material-ui/icons/Home';
impo... |
import { Command, flags } from '@oclif/command';
import { readFileSync } from 'fs';
import interpret from '@glossa-glo/glo';
import interpretPseudo from '@glossa-glo/ps';
import GLOError, { DebugInfoProvider } from '@glossa-glo/error';
import chalk from 'chalk';
import cli from 'cli-ux';
import { basename } from 'path'... |
import LoginDetails from "../models/LoginDetails";
import PersonDetails from "../models/PersonDetails";
import ServiceInvolvementDetailsSummary from "../models/ServiceInvolvementDetailsSummary";
import ServiceDetail from "../models/ServiceDetail";
import SearchDetails from "../models/SearchDetails";
import PersonRelati... |
<reponame>fbchen/fire-ant<filename>src/app/fire-ant/layout/sider.ts
/**
* @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.
*/
// matchMedia polyfill for
// https://github.com/WickyNilliams/enquire.js/i... |
<filename>src/logger.ts
import { isBrowser } from "./browser_or_node";
export type { OrdaLogger };
export { OrdaLoggerFactory };
interface OrdaLogger {
trace: logFunction;
debug: logFunction;
info: logFunction;
warn: logFunction;
error: logFunction;
log: logFunction;
}
type logFunction = (mes... |
/**
* Copyright 2018-2021 BOTLabs GmbH.
*
* This source code is licensed under the BSD 4-Clause "Original" license
* found in the LICENSE file in the root directory of this source tree.
*/
/**
* @packageDocumentation
* @module RequestForAttestationUtils
*/
import type {
ICredential,
CompressedCredential,
... |
import React, { Component } from 'react'
// antd
import {
Card,
Table,
Form,
Button,
Popconfirm,
Modal,
Row,
Col,
Tooltip,
Input,
message
} from 'antd'
// router
import { RouteComponentProps } from 'react-router-dom'
// base
import BaseComponent, { IBreadcrumb } from '../../base/base'
import { IM... |
import { TextRun } from "scribing";
import { getNextDomNode } from "../utils/dom-traversal";
import { isMappedTemplateNode } from "./dom-node";
import { getMappedFlowAxis, NestedFlowPosition } from "./flow-axis";
import { isMappedEditingHost } from "./flow-editing-host";
import {
getFlowOffsetFromPreviousSib... |
/// <reference types="node" />
import { CancellationToken } from 'vscode';
import { CancellationTokenSource } from 'vscode';
import { ExtensionContext } from 'vscode';
import { FileStat } from 'vscode';
import { FileSystem } from 'vscode';
import { FileType } from 'vscode';
import { inspect } from 'util';
import { Mem... |
/**
* Dynamically locate, load & register all Editor Blocks & Plugins.
* Supports HOT Module Reloading.
*
* Given a path and a entry point's file name, this will automatically
* load the module and support HMR within Gutenberg.
*
* Your module's entry point must export a `name` and a `settings` constant
* which... |
import * as database from '../handlers/database';
import * as error from '../handlers/error';
import * as score from '../handlers/score';
import * as argument from '../handlers/argument';
import * as beatmap from '../handlers/beatmap';
import { Message, Emoji } from 'discord.js';
const axios = require('axios');
const... |
import * as child_process from "child_process";
import { showMsg, MsgType } from "./ui";
import { window, ProgressLocation, Terminal } from 'vscode';
import { Manager } from "../core";
export const exec = async function (manager: Manager, command: string, willLoad: Function, didLoad: Function) {
willLoad();
c... |
<gh_stars>0
let alreadyInit = 0
const PWM_ADD = 0x01
const MOTOR = 0x02
const RGB = 0x01
//% weight=10 color=#006400 icon="\uf1b9" block="Tinybit"
//% groups='["Motors", "Distance Sensor", "Line Reader","Headlights"]'
namespace Tinybit {
export enum Motors {
//% blockId="LeftMotor" block="LeftMotor"
... |
// tslint:disable:readonly-array
import { Session, roomEvents } from '@closerplatform/closer-sdk';
import { makeChatContainer, makeInputWithBtn, makeDiv, makeMessageEntry,
makeChatWrapper, makeChatLegend, makeChatInfoText, makeChatEventInfoContainer } from'../view';
import { Page } from '../page';
import { Conversat... |
<filename>lib/Model.d.ts<gh_stars>1-10
import Document from './Document';
import { DocumentQuery } from './Query';
import Schema from './Schema';
import Connection from './Connection';
export declare type QuerySelector = {
/** equal */
$eq?: any;
/** not equal */
$ne?: any;
/** greater than */
$... |
import { ApiPromise } from "@polkadot/api";
import { AddressOrPair } from "@polkadot/api/submittable/types";
import { Signer } from "@polkadot/api/types";
import { KeyringPair } from "@polkadot/keyring/types";
import { BitcoinUnit, Currency } from "@interlay/monetary-js";
import { ElectrsAPI, DefaultElectrsAPI } from ... |
<reponame>technizor/twitter-media-exporter
import got from 'got';
import pLimit from 'p-limit';
import cliProgress from 'cli-progress';
import { likesRequest, generateOauthToken } from './api-helper';
import { bsearch, descendingOrder } from './array-helper';
import { FileStatus, ensureDir, getFileStatus, readJsonFile... |
import {Map} from "../../../../../Store/firebase/maps/@Map";
import {Connect} from "Frame/Database/FirebaseConnect";
import {BaseComponent} from "react-vextensions";
import {GetUserID} from "Store/firebase/users";
import {IsUserCreatorOrMod} from "../../../../../Store/firebase/userExtras";
import {DropDown, DropDownTri... |
import { Community } from '@models/ubi/community';
import UserService from '@services/app/user';
import axios from 'axios';
import BigNumber from 'bignumber.js';
import { Expo, ExpoPushMessage, ExpoPushTicket } from 'expo-server-sdk';
import config from '../config';
import { Logger } from './logger';
BigNumber.config... |
import duplexify from 'duplexify';
import mergeStream from 'merge2';
import stream from 'stream';
import through2 from 'through2';
import { isUndefined } from '@upradata/util';
import { ConcatOptionsType, concatStreams } from '../concat';
import { ReadableStream, Stream, WritableStream } from '../types';
import { terna... |
<filename>packages/label-sync/src/label-sync.ts
// Copyright 2019 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
//
// Un... |
<filename>src/lib/controllers.ts<gh_stars>1-10
//Copyright © alejandro0619 <EMAIL>
//Code under MIT license.
import TlgBot from 'node-telegram-bot-api';
import axios, { AxiosResponse } from 'axios';
import { dirname, join, resolve } from 'path';
import { URL } from 'url';
import fs, { existsSync } from 'fs';
import qs... |
// From: https://gist.github.com/msteen/e4828fbf25d6efef73576fc43ac479d2/
import { Text } from "@codemirror/state"
import { Input, NodeType, SyntaxNode, Tree, TreeCursor } from "@lezer/common"
class StringInput implements Input {
constructor(private readonly input: string) {}
get length() {
return this.input... |
import React, {
ReactElement,
KeyboardEvent,
createContext,
Children,
useRef,
useReducer,
useEffect,
} from 'react';
import classnames from 'classnames';
import { useStyles } from 'sku/treat';
import { Box } from '../Box/Box';
import { normalizeKey } from '../private/normalizeKey';
import { OverflowButton... |
import classNames from 'classnames';
import React from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { ConnectedPageHeader, HelmetWithTitle } from 'app/components';
import { SettingMenu, SettingMenuItem } from 'app/components/Settings/SettingMenu';
import { ConnectedSu... |
<gh_stars>10-100
import { BadRequestException } from '@nestjs/common';
import { traverse } from 'object-traversal';
import { getNestedProperty } from './utils';
/**
* Converts raw object structures into prisma's nested .create/.update syntax
* Turns {name: 'hello', friends: [{name: 'rick'}]}
* into {name: 'hello... |
import { Component, OnInit, Input, Output, EventEmitter, Injectable, Pipe } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { HttpService } from '../../http.service';
import { StorageService } from '../../storage.service';
import { Router } from '@angular/router';
import { DomSanitizer }... |
import { useEffect, useState, useRef } from 'react';
import { Spring } from 'react-spring';
import { Container } from '@inlet/react-pixi/animated';
import { GameCard } from 'common/lib/Cards';
import Rectangle from '../common/Rectangle';
import Card from './Card';
const cardToString = (card: GameCard) => [
card.num... |
<filename>src/services/team.ts
import {
InadequateBudget,
PlayerAlreadyContracted,
MaxTeamsLimitReached,
TeamNotFound,
} from '../lib/exceptions';
import { maxTeamsLimit } from '../constants';
import { playerService } from '../services';
import { teamModel, playerModel, userModel, transferModel } from '../mode... |
<gh_stars>0
import {
IfIocComponent,
IfIocContainer,
stringifyIdentity,
Maybe,
isDefined,
notEmpty,
COMPONENT_META_DATA,
StringToAny,
} from 'bind-di';
import HTTPMethod from 'http-method-enum';
import { IBindRestContext, IControllerDetails, IControllerParamMeta } from '../interfaces';
import {
CONTRO... |
<reponame>srg-kostyrko/qspider
import Jimp from 'jimp/browser/lib/jimp';
// http://fileformats.wikia.com/wiki/Icon
// the correct sizes are 256x256, 48x48, 32x32, 16x16
const sizeList = [48, 32, 16];
export async function reagPng(path: string): Promise<ArrayBuffer> {
const image = await Jimp.read(path);
return im... |
<gh_stars>1-10
/**
* @author WMXPY
* @namespace Evaluate
* @description Variable
*/
import * as EST from "estree";
import { ERROR_CODE } from "../declare/error";
import { Evaluator } from "../declare/evaluate";
import { Sandbox } from "../marked/sandbox";
import { declareVariableStack } from "../util/declaration";... |
<filename>__tests__/hivejs.interceptor.spec.ts
// tslint:disable-next-line:interface-name
interface Window {
activateXHRInterceptor: any;
deactivateXHRInterceptor: any;
HiveOriginalXMLHttpRequest: any;
jQuery: any;
}
declare var window: Window;
declare var sinon: any;
chai.should();
function xhrGenAndSend(res... |
import { readFileSync, writeFileSync } from 'fs';
import { join } from 'path';
import { inspect } from 'util';
import debug from 'debug';
import { diff_match_patch as DiffMatchPatch } from 'diff-match-patch';
import yaml from 'js-yaml';
import { lazy, number, object, string } from 'yup';
import { getDbPath, hashStr }... |
<reponame>sudhir-pradhan/react-hook-mighty-mouse
import { useEffect, useState } from 'react';
import { Mouse, EventType } from './types';
const initMouse: Mouse = {
position: {
client: { x: null, y: null },
screen: { x: null, y: null },
page: { x: null, y: null },
},
buttons: {
left: null,
mi... |
import fs from 'fs-extra';
import path from 'path';
import { spawn, SpawnOptions, SpawnResult } from './cp.js';
import { readDir } from './fs.js';
import {
envNpmCreds,
getNpmConfig,
NpmConfig,
NpmCreds,
npmGetVersions,
npmWriteRc,
} from './npm.js';
import { getPkg, getPkgName } from './pkg.js';
import { ... |
import { log } from 'common/log';
import { getCacheKey } from 'components/Cache';
import { APIContextValue, useAPIContext } from 'components/data/apiContext';
import {
fetchNodeExecutions,
fetchTaskExecutionChildren
} from 'components/hooks';
import {
extractAndIdentifyNodes,
extractTaskTemplates
} from... |
import { Fun } from "../Lesson3/practicum3"
type Fun_n<a> = Fun<number, a>
let map_Fun_n = function<a, b>(f: Fun<a, b>): Fun<Fun_n<a>, Fun_n<b>> {
return Fun<Fun_n<a>, Fun_n<b>>((g: Fun_n<a>): Fun_n<b> =>
g.then(f))
}
let unit_Fun_n = function<a>(): Fun<a, Fun_n<a>> {
return Fun<a, Fun_n<a>>((x: a) => {
... |
import * as evaluators from "../../business/auth/user-evaluators.js"
import {mixinStyles} from "../framework/mixin-styles.js"
import {MetalshopComponent, html, property, css} from "../framework/metalshop-component.js"
import {select} from "../toolbox/selects.js"
import {formatDate} from "../toolbox/dates.js"
import ... |
<reponame>geethanga/angular-modal-gallery<gh_stars>0
/*
* Copyright (C) 2015-2017 <NAME>
*
* 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... |
<reponame>stile1201/HadoukenIO-core
/*
Copyright 2017 OpenFin 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 a... |
import {
IQEntityInternal,
IEntityIdProperties,
IEntityCascadeGraph,
IEntityUpdateColumns,
IEntityUpdateProperties,
IEntitySelectProperties,
IEntityDatabaseFacade,
IEntityFind,
IEntityFindOne,
IEntitySearch,
IEntitySearchOne,
IQBooleanField,
IQDateField,
IQNumberField,
IQOneToManyRelation,
IQStringField... |
import Image = Phaser.GameObjects.Image;
import Sprite = Phaser.GameObjects.Sprite;
import Circle = Phaser.Geom.Circle;
import Point = Phaser.Geom.Point;
import Rectagle = Phaser.Geom.Rectangle;
import Graphics = Phaser.GameObjects.Graphics;
import Food from '@game/food'
const distanceAngle = 60
const tableSize = 360... |
<reponame>comp500/syncweb-frontend
let id: (elementId: string) => HTMLElement = document.getElementById.bind(document);
if (!window.addEventListener) {
id("compat-errors").innerHTML =
"Your browser does not support features (addEventListener) required for SyncWeb. Please update to a newer browser.";
}
if (!WebSock... |
import { FC } from "react";
import cn from "classnames";
import Link from "next/link";
import { useRouter } from "next/router";
import type { Page } from "@framework/common/get-all-pages";
import getSlug from "@lib/get-slug";
import { Github } from "@components/icons";
import { Logo, Container } from "@components/ui";
... |
import * as crypto from 'crypto';
import type { FileDescriptor, FileEntryCache } from 'file-entry-cache';
import * as fileEntryCache from 'file-entry-cache';
import * as fs from 'fs';
import { resolve as resolvePath } from 'path';
import type { FileResult } from '../../util/fileHelper';
import { readFileInfo } from '..... |
import * as React from "react";
import * as styles from "./index.scss";
import { createWebSocket } from './utils/commonUtils'
import * as hangup from '../../assets/images/hangup.png';
const nativeRTCIceCandidate = (window.RTCIceCandidate);
interface createConfigInte {
wsServer: string
}
const iceServer = {
... |
/* eslint-env shared-node-browser */
import { table } from "table";
import { plot } from "asciichart";
import { largestTriangleThreeBuckets } from "./downsample";
export interface BenchedFunction {
(done: () => void): void;
}
export type PunchBenchResult = {
results: Required<BenchResult>[];
};
export type Punc... |
import AMQP, { Connection } from 'amqplib';
import * as minio from 'minio';
import roarr from 'roarr';
import { createConnection, Connection as TypeormConnection } from 'typeorm';
import { makeGrpc } from './grpc';
import addListeners from './addListeners';
import * as ImportReport from './import-report/import-report';... |
import React, { useCallback, useMemo, useRef } from "react";
import {
Animated,
NativeScrollEvent,
NativeSyntheticEvent,
Pressable,
StyleProp,
StyleSheet,
View,
ViewStyle,
} from "react-native";
import { ScrollView } from "react-native-gesture-handler";
import { SafeAreaView } from "react-native-safe-ar... |
import {NodeProp, Subtree, Tree} from "lezer-tree"
import {EditorState, Syntax, IndentContext} from "@codemirror/next/state"
/// A syntax tree node prop used to associate indentation strategies
/// with node types. Such a strategy is a function from an indentation
/// context to a number. That number may be -1, to ind... |
// Copyright (c) 2020-2021 <NAME>
// Released under the term specified in file LICENSE.txt
// SPDX short identifier: MIT
import * as cache from '@actions/cache';
import * as core from '@actions/core';
import * as tools from '@actions/tool-cache';
import * as path from 'path';
interface PackageInfo {
url: string;
... |
import dateTime from 'date-time';
import fs from 'fs';
import ms from 'pretty-ms';
import * as rollup from 'rollup';
import onExit from 'signal-exit';
import tc from 'turbocolor';
import {
InputOption,
RollupBuild,
RollupError,
RollupWatchOptions,
WarningHandler,
WatcherOptions
} from '../../../src/rollup/types';... |
<reponame>John-Cassidy/angular
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {parseDurationToMs} from './duration';
import {Filesystem} from './filesystem';... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.