text stringlengths 3.3k 33k |
|---|
<filename>src/lib.ts
import * as assert from 'assert'
import * as fs from 'fs'
import { safeLoad } from 'js-yaml'
import BN = require('bn.js')
let mem: WebAssembly.Memory
let res: Buffer
export const setMemory = (m: WebAssembly.Memory) => {
mem = m
}
export const getRes = () => res
const memset = (mem: WebAssembl... |
import {
Dispatch,
ReactElement,
SetStateAction,
useEffect,
useState,
} from 'react'
import GridLayout from 'react-grid-layout'
import Checkbox from 'react-three-state-checkbox'
import cn from 'classnames'
import { clone, get } from 'lodash'
import { observer } from 'mobx-react-lite'
import Tooltip from 'rc-t... |
import { Injectable, NgZone } from '@angular/core';
import { of, combineLatest, ReplaySubject } from 'rxjs';
import { take, switchMap } from 'rxjs/operators';
import { TranslocoService } from '@ngneat/transloco';
import { LocalstorageService } from '../localstorage/localstorage.service';
import { UserService } from '.... |
import { ApplicationRef, ChangeDetectorRef, Component, OnInit, Input, Output, EventEmitter } from "@angular/core";
import { GlobalVarsService } from "../../global-vars.service";
import { BackendApiService, BackendRoutes } from "../../backend-api.service";
import { sprintf } from "sprintf-js";
import { Router, Activated... |
/**
* Container for ScrollView/FlatList, providing custom pull-to-refresh Header support
*/
import React, {Component, ComponentType, RefAttributes} from 'react';
import {
View,
ViewStyle,
Animated,
PanResponder,
PanResponderInstance,
GestureResponderEvent,
PanResponderGestureState,
Na... |
import { Layer } from './Layer'
import { FunctionList, GPU, KernelOutput } from 'gpu.js';
import ActivationFunctions from './ActivationFunctions'
function relu(x: number): number { if(x > 0) return x; return x*0.000001; } //1
function sigmoid(x: number): number { return 1/(1+Math.E**-x); } //2
function tanhi(x:... |
<reponame>dreamsxin/cocos-huarongdao<gh_stars>0
import { GameState } from "./game";
import { Grids } from "./types";
const { ccclass, property } = cc._decorator;
@ccclass
export default class CustomGame extends cc.Component {
@property(cc.SpriteFrame)
private gridSF: cc.SpriteFrame = null;
@property(cc... |
<gh_stars>0
import {Injectable} from '@nestjs/common';
import {PersonnelService} from '../personnel/personnel.service';
import {PrintT2Builder} from './print-t2.class';
import {IPdfSchema} from '../../../shared/interfaces/pdf-shema.interface';
import * as fs from 'fs-extra';
import {PrintLaborContractDynamicBuilder} fr... |
import * as React from 'react';
import * as Immutable from 'immutable';
import * as persistence from 'data/persistence';
import * as contentTypes from 'data/contentTypes';
import { EditedDocument } from 'types/document';
import { courseChanged, updateCourseResources } from 'actions/course';
import { Resource } from 'da... |
// tslint:disable-line
/**
* Highcharts extension that zero-aligns the scales of primary and secondary y-axes.
* Author: <NAME>
* Page: https://www.highcharts.com/products/plugin-registry/single/42/Zero-align%20y-axes
* Github: https://github.com/chriskmnds/highcharts-zero-align-y-axes
*
* Modified by <EMAIL... |
import React from 'react';
import { EntityLink, EntityLinkField, EntityQuery, ERModel, ScalarAttribute } from 'gdmn-orm';
import { Checkbox, ICheckbox, IToggle, Toggle } from 'office-ui-fabric-react';
import { DefaultButton, PrimaryButton } from 'office-ui-fabric-react/lib/components/Button';
import { ITextField, TextF... |
import { classToPlain, plainToClass } from "class-transformer";
import { isBoolean, isObject, validateSync } from "class-validator";
import { arraySortStrings } from "@corefunc/corefunc/array/sort/strings";
import { checkIsObjectLike } from "@corefunc/corefunc/check/is-object-like";
import { isString } from "@corefunc... |
// Type definitions for react-map-gl 3.2
// Project: https://github.com/uber/react-map-gl#readme
// Definitions by: <NAME> <https://github.com/rimig>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
import * as React from "react";
import * as MapboxGL from "mapbox-gl";
impo... |
<reponame>TheRakeshPurohit/component-to-page
//
// GLOBAL VARS //////////
//
const selection = figma.currentPage.selection, componentSpacing = 24;
var componentsPage, componentName, toSelect = [], multipleComponents = false;
//
// COMMANDS //////////
//
if (figma.command === 'collect') {
// this command will collect... |
import { L10N } from '.'
const italian: L10N = {
// Home
new_game: 'Nuova Partita',
continue_game: 'Continua',
credits: 'Crediti',
// Game
map: 'Mappa',
inventory: 'Inventario',
help: 'Aiuto',
menu: 'Menu',
continue_hint_keyboard: 'Premi spazio per continuare',
continue_hin... |
import { Button, Icon, message, Tabs, Tooltip } from 'antd';
import { CSSProperties } from 'react';
import { WithTranslation, withTranslation } from 'react-i18next';
import { RouteComponentProps, withRouter } from 'react-router';
import React, { Component } from 'reactn';
import { ContainerPage } from '../';
import { L... |
<reponame>pot0rpan/screeps<filename>src/creeps/BuilderCreep.ts<gh_stars>0
import { isDamaged } from 'utils/structure';
import { targetResourceAmount } from 'utils/room';
import { recycle } from 'actions/recycle';
import { excuse } from 'actions/excuse';
import { toggleWorking } from 'actions/toggleWorking';
import { Ta... |
<filename>src/expandEvent/expandEvents.ts
/**
* external exports can be found at the bottom of the file,
* all other exports are for testing purposes
*/
import { unescape, cloneDeep } from 'lodash';
const NUMBER_OF_WEEKDAYS = 7;
const MONTH_OFFSET = 1;
const DEFAULT_RECURRENCE_TOTAL = 0;
const FIRST_DAY_OF... |
import { EntitySystem, EntityEngine, Entity } from "./ecs";
import { AgentComponent } from "./agent";
import { PlayerSystem } from "./player";
import { ColisionSystem } from "./colision";
import { Vector2 } from "../vector";
import { Gun, GUNS, GunType } from "../weapons";
import { difficulty } from "../difficulty";
i... |
import type { OdFileObject } from '../../types'
import { FC, useEffect, useState } from 'react'
import { useRouter } from 'next/router'
import { useTranslation } from 'next-i18next'
import axios from 'axios'
import toast from 'react-hot-toast'
import Plyr from 'plyr-react'
import subsrt from '@openfun/subsrt'
import ... |
/**
* Copyright © 2021 <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <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 ... |
<reponame>bvanhou/infrastructure-components
import middleware from "../middleware/middleware-component";
const path = require ("path");
const fs = require("fs");
const LOCAL_ENDPOINT = 'http://localhost:3002';
export const STORAGE_ACTION = {
UPLOAD: "UPLOAD",
LIST: "LIST"
};
const getBucket = () => process... |
import { emailREx, urlREx, vatcodeREx } from '../_stuff/regex-collection'
import { valOf, checkedOf } from '../_stuff/dom'
type NameIsEmpty = { kind: 'NameIsEmpty' }
type NameIsTooShort = { kind: 'NameIsTooShort', name: string }
type VatCodeIsEmpty = { kind: 'VatCodeIsEmpty' }
type VatCodeNotValid = { kind: 'VatCodeNo... |
export type Vector = [number, number];
/**
* Used by the valuesLookup function to set axis, tension etc.
*/
interface LookupOptions {
axis?: number;
tension?: number;
margin?: number;
max?: number;
processXY?: boolean;
}
const EPS = Math.pow(2, -42);
/**
* Cubic curve interpolator
*/
export function Cu... |
// types & interfaces
interface SpeechProfileProps {
[key: string]: string | SpeechSynthesisVoice | number;
voice: SpeechSynthesisVoice;
lang: string;
rate: number;
volume: number;
pitch: number;
}
type speechProfilePropNames = keyof SpeechProfileProps;
type speechProfileType = "default" | "n... |
import {
EndpointsInputConfig,
EndpointsResolvedConfig,
RegionInputConfig,
RegionResolvedConfig,
resolveEndpointsConfig,
resolveRegionConfig,
} from "@aws-sdk/config-resolver";
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
import {
getHostHeaderPlugin,
HostHeaderInputConfi... |
<filename>src/utils/utils.ts<gh_stars>0
import { parse } from 'querystring';
import { pathToRegexp } from 'path-to-regexp';
import { Route } from '@/models/connect';
import { notification } from 'antd';
import { routers } from '../../config/routers';
/* eslint no-useless-escape:0 import/prefer-default-export:0 */
const... |
/**
* Created by pc on 27/01/2016.
*/
import Fact from './Fact';
import * as Logics from './Logics';
import * as Utils from '../Utils';
/**
* Core solver used to evaluate rules against facts
* using pattern matching mechanisms.
* /
/**
* Evaluates a set of rules over a set of facts.
* @param rs
* @param facts
* @r... |
import { InvItemPartial, IResolverContext, WarehouseItemPartial } from '../types';
import {
Maybe,
MutationAddItemsToWarehouseArgs,
MutationAddWarehouseArgs,
MutationRemoveItemsFromWarehouseArgs,
MutationRemoveWarehouseArgs,
MutationUpdateItemsInWarehouseArgs,
MutationUpdateWarehouseArgs,
QueryWarehouse... |
import React from "react";
import {Route} from "react-router-dom";
import API from "../../utils/api";
import Helpers from "../../utils/helpers";
import Const from "../../const";
import TvShow from "../../types/tvshow";
import Episode from "../../types/episode";
import {MediaMiniatureFilter} from "../../types/media_min... |
<filename>src/Soup.ts
import { Client, ClientUser, Guild, GuildChannel, GuildMember, Intents, Interaction, Permissions, TextChannel } from 'discord.js'
import { Command } from './Command'
import * as cmdList from './commands'
import Logger from '@bwatton/logger'
import { Manager, NodeOptions } from 'erela.js'
import Sp... |
<filename>src/voice/modules/googleAssistant.ts
// This component is purely made for fun and will be probably limited
// in the future.
import * as AudioMixer from 'audio-mixer';
import { spawn, ChildProcessWithoutNullStreams } from 'child_process';
import dbg from 'debug';
import { Message } from 'detritus-client/lib/... |
<filename>js/collide.ts
// The code in this file is adapted
// from https://github.com/d3/d3-force/blob/master/src/collide.js, which carries
// the following license (BSD 3-Clause "New" or "Revised" License):
// Copyright 2010-2016 <NAME>
// All rights reserved.
// Redistribution and use in source and binary forms, w... |
<reponame>williamchai/scrypted<filename>plugins/snapshot/src/main.ts
import sdk, { Camera, MediaObject, MixinProvider, PictureOptions, RequestMediaStreamOptions, RequestPictureOptions, ScryptedDevice, ScryptedDeviceBase, ScryptedDeviceType, ScryptedInterface, Setting, SettingValue, VideoCamera } from "@scrypted/sdk";
i... |
import { Injectable } from '@angular/core';
import { HttpHeaders, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import { map, catchError } from 'rxjs/operators';
import {
mixinHttp,
TdGET,
TdPOST,
TdPUT,
TdDELETE,
TdBody,
TdParam,
TdResponse,
TdQueryParams,
} from '... |
import React, { UIEventHandler, HTMLAttributes } from 'react';
import ReactTable, { ReactTableDefaults, GlobalColumn, Column, CellInfo, RowInfo, Filter } from 'react-table';
import Menu from './../../components/Menu';
import { clipboardInsert } from '@sqltools/ui/lib/utils';
import getVscode from '../../lib/vscode';
c... |
<reponame>bloerwald/lba2remake
import {planet, island, section, iso} from './functions';
import { getParams } from '../../../../../../params';
const TwinsunLBA2 = planet('Twinsun', 'twinsun', [
island(-1, 'Citadel island', 'CITABAU', [
section(49, 'Twinsen\'s House Area', [
iso(0, 'Twinsen\'s H... |
<reponame>snowyu/pouchdb-transform.js
import immediate from 'immediate';
import wrappers from 'pouchdb-wrappers';
/**
* the key whether not an internal key.
* @param key the id string.
* @returns true if it's not an internal key.
*/
function isntInternalKey(key: string): boolean {
return key[0] !== '_';
}
/**
... |
export class TransitionC{
/***
The constructor is kept simple to limit the overhead until we actually need to initialise the animation
@class TransitionC
@constructor
@param {Phaser.Game} game - current game instance
**/
game: Phaser.Game;
events:any;
spacing:number;
grou... |
import './DropdownMenu.css';
import * as React from 'react';
import classnames from 'classnames';
import autobind from 'autobind-decorator';
import { RenderableContent } from '../../util';
import { Divider, MenuHeader, MenuItem, Submenu } from './components';
import { Button } from '../Buttons';
export const DROPDO... |
<reponame>jqxismygit/umi-plugin-qiankun-development
// ref:
// - https://umijs.org/plugins/api
import { IApi, IConfig } from '@umijs/types';
const { join } = require('path');
const fse = require('fs-extra');
const fs = require('fs');
const chalk = require('chalk');
export default function(api: IApi) {
api.logger.inf... |
<reponame>bpbuch/salesforcedx-vscode
/*
* Copyright (c) 2019, salesforce.com, inc.
* All rights reserved.
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import { AuthInfo, Org } from '@salesforce/core';
i... |
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';
import {TaskService} from '../task.service';
import {GroupService} from '../../groups/group.service';
import {NgbDateStruct, NgbTimeStruct} from '@ng-bootstrap/ng... |
function findCircleIntersectionX(
y: number,
cx: number,
cy: number,
r: number,
resultArray: [number, number][],
) {
const d = Math.abs(y - cy)
if (d > r) return
if (d === r) {
resultArray.push([cx, y])
}
const solution = Math.sqrt(r * r - d * d)
resultArray.push([cx - solution, y])
resultAr... |
import { Config, Delay } from "../config/config"
import * as NativeUI from "./nativeui/nativeui"
// Set up QBCore
let QBCore: any = null
emit("QBCore:GetObject", (o: any) => QBCore = o)
// Vars
const Menu: any = new NativeUI.Menu("Firehouse Garage", "", new NativeUI.Point(50,50))
let pJob: any = QBCore.Functions.GetP... |
<reponame>lil-kira/MikaelaBot
import {
AudioPlayer,
AudioPlayerStatus,
AudioResource,
createAudioPlayer,
createAudioResource,
DiscordGatewayAdapterCreator,
entersState,
getVoiceConnection,
joinVoiceChannel,
VoiceConnectionStatus
} from '@discordjs/voice';
import { Client, Guild, Message, V... |
<reponame>mohkale/puddle
import configureStore from 'redux-mock-store';
import thunk from 'redux-thunk'
import { generateTorrent } from '@tests/utils';
import fetchMock from 'jest-fetch-mock'
fetchMock.enableMocks()
import { TorrentClasses } from '@client/models';
import reducer from '../index';
import * as thunks f... |
<reponame>Em1tt/ametrine.host
/**
* API for Users on Ametrine.host
*/
import express from 'express';
import { auth } from './auth';
import { otp } from '../otp';
import { utils } from '../utils';
import { permissions } from '../permissions'
import {... |
import axios from 'axios';
import { Message, MessageEmbed } from 'discord.js';
import { COLORS } from '../config.js';
// Anime List
const list: Array<string> = [
'1.Naruto+Shippuuden ',
'2.Zero no tsukaima ',
'3.Akame Ga Kill ',
'4.The seven deadly sins',
'5.Sword Art Online+2 ',
'6.Tokyo Raven... |
<filename>src/client/html/index.ts
// import { INDEX_JS } from '../static/js/index.js'
import { BundleSpec } from '../../system/platform/method/process/BundleSpec'
import { FONT_DATA_URI } from '../static/font/dataURI'
const INDEX_JS = 'console.log("TODO")'
export function makeHTML(bundle: BundleSpec, opt: {}): strin... |
import React, { useContext } from "react"
import SEO from "../../../../components/layout/seo"
import { ImageAsLandscape } from "../../../../components/images/layout"
import {
HowLong,
Introduction,
SectionContent,
Visit,
WhatTimeOfYear,
WhereToStay,
} from "../../../../components/core/section"
import { Conc... |
import combatModel from './../../../../models/combat'
import userWordModel from './../../../../models/userWord'
import userModel from './../../../../models/user'
import { store, events } from './../../../../app'
import { throttle, playAudio, sleep, playPronunciation } from './../../../../utils/util'
import { getCombatS... |
import * as ts from "typescript";
import { AssignedTypesByName, AssignedTypeValue, joinAssignedTypesByName } from "../../../../mutations/assignments";
import { getCallExpressionType } from "../../../../shared/calls";
import { getStaticNameOfProperty } from "../../../../shared/names";
import { isNodeAssigningBinaryExpr... |
import account = require('services/Account');
import app = require('Application');
import site = require('Site');
import shopping = require('services/Shopping');
import shoppingCart = require('services/ShoppingCart');
import coupon = require('services/Coupon');
import ko_val = require('knockout.validation');
import m... |
/**
* @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 {PartialEvaluator} from '@angular/compiler-cli/src/ngtsc/partial_evaluator';
import {reflectObjectLiteral, Typ... |
/* eslint-disable @typescript-eslint/no-namespace */
import React, { useState } from 'react';
import classNames from 'classnames';
import {
Typography,
Grid,
Button,
Divider,
Backdrop,
CircularProgress,
} from '@material-ui/core';
import { useFormik, FormikProvider } from 'formik';
import {
... |
<gh_stars>0
const MaterialTypes = {
// to see supported materials: print superclasses[27].classes, and m = VRayMtl(); showProperties m;
VRayMtl: {
diffuse: "RGB color",
diffuse_roughness: "float",
selfIllumination: "RGB color",
selfIllumination_gi: "boolean",
sel... |
// Copyright 2018-2020 @paritytech/Nomidot authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import {
DeriveBalancesAll,
DeriveStakingQuery,
} from '@polkadot/api-derive/types';
import {
InjectedAccountWithMeta,... |
/// <reference path="../typings/com.ibm.domino.d.ts" />
/// <reference path="../typings/apache-commons-codec.d.ts" />
/// "use amd"
import * as std from "std";
import * as json from "json";
import * as util from "util";
import * as log from "log";
function serializeDocColumns(doc:NotesDocument, cols?: any[]) {
try ... |
import JSZip from 'jszip'
import { BoundaryModel, RelationshipModel, SheetModel, SummaryModel, TopicModel, TopicType } from '../types'
export type XMindMarkContent = string
type Identifier = { readonly identifier: string }
type Boundary = BoundaryModel & Identifier
type Summary = SummaryModel & Identifier & {
title... |
import iexcloud from "../iexcloud";
import {
AdvancedStats, BalanceSheet, Book, CashFlowStatement, CeoCompensation,
Company, DelayedQuote, Dividends, Earnings, EarningsExtended, EarningsToday,
EndOfDay, Estimates, Financials, IncomeStatement, Intraday, KeyStats, Logo,
NewsItem, OHLC, PreviousDay, PriceTarget,... |
<reponame>james-wallis/blockchain-vscode-extension
/*
* 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... |
import PropTypes from 'prop-types';
import { Dispatch, SetStateAction, useEffect, useState } from 'react';
import AddTwoToneIcon from '@mui/icons-material/AddTwoTone';
import TextField from '@mui/material/TextField';
import CheckIcon from '@mui/icons-material/Check';
import AttachEmailOutlinedIcon from '@mui/icons-mate... |
import later from 'later';
import * as _ from 'underscore';
import { isAnyTest, onStartup } from '../../../lib/executionEnvironment';
import { MongoCollection } from '../../../lib/mongoCollection';
// A package for running jobs synchronized across multiple processes
export const SyncedCron: any = {
_entries: {},
r... |
import React = require("react");
import {
default as Editor,
createEditorStateWithText
} from "draft-js-plugins-editor";
import {
EditorState,
ContentState,
ContentBlock,
getDefaultKeyBinding,
convertToRaw,
RawDraftContentState,
RichUtils,
Modifier,
genKey,
BlockMapBuilder,
CharacterMetadata,
... |
<reponame>mikolalysenko/mudb<filename>src/server.ts<gh_stars>100-1000
import { MuSocket, MuSocketServer } from './socket/socket';
import { MuMessageInterface, MuAnyMessageTable, MuAnyProtocolSchema, MuProtocolFactory, MuProtocolBandwidth } from './protocol';
import { MuLogger, MuDefaultLogger } from './logger';
export... |
import React, { useEffect } from "react";
import { Item, Section } from "@react-stately/collections";
import { useListData } from "@react-stately/data";
import { Node } from "@react-types/shared";
import {
ListItem,
TreeItem,
VerticalPaddingType,
IntentColor,
ForegroundOpacityType,
CursorType,
FlexGridG... |
import aws from 'aws-sdk';
import { Context } from 'koa';
import { assign, last, merge, pick } from 'lodash';
import moment from 'moment';
import { parse as parseUrl, UrlWithStringQuery } from 'url';
import { buildMetric, Metric } from '../metrics';
import { getPresetOptions } from '../presets';
import { Config, Gener... |
import Chart from 'chart.js';
import { createContext, useEffect, useState } from 'react';
import { ChartData } from 'react-chartjs-2';
import { CHART_COLORS, CHART_COLORS_SIZE, IKammusuSetting } from '../constant';
import { calcHeavyDamageProb } from './simulation';
type ApplicationMode = '仮想敵モード' | '大破率比較モード';
type ... |
import React, { useMemo, useRef, useState } from 'react';
import _ from 'lodash';
import dynamic from "next/dynamic";
import { QueryStoreProvider, useQueryStore } from '@deepcase/store/query';
import { wrap } from '../imports/wrap';
import { Dash, DashStage } from '../imports/dash/components/dash';
import { gql } fr... |
import {
Button,
Checkbox,
FormControlLabel,
Grid,
makeStyles,
Slider,
TextField,
Typography,
} from "@material-ui/core";
import { saveAs } from "file-saver";
import { autorun, observable } from "mobx";
import { observer } from "mobx-react-lite";
import pako from "pako";
import React, { useCallback, use... |
<reponame>PaaS-TA/openPaasPaastaPortalWebUser
import {Component, Input, OnInit} from '@angular/core';
import {LangChangeEvent, TranslateService} from '@ngx-translate/core';
import {NGXLogger} from "ngx-logger";
import {CommonService} from "../../common/common.service";
import {Router} from "@angular/router";
import {Ca... |
<gh_stars>1-10
/*
Copyright (c) 2016 <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, distr... |
<reponame>xStrato/decker-card-game<filename>src/components/GambleBoard.ts
import { GameObjects, Scene } from "phaser";
import Coin from "../objects/Coin";
import { BinaryEntity, Players } from "../shared/Types";
const { Rectangle, Text } = GameObjects
export default class GambleBoard extends GameObjects.Container
{
... |
<filename>contract/src/lib/utils/client-identity.spec.ts
/*
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... |
<filename>lib/utils/jsolines.ts
/**
* Compute an isoline as a GeoJSON feature from a regular grid
* Uses the Marching Squares algorithm, with code ported from
* https://github.com/conveyal/r5/blob/master/src/main/java/com/conveyal/r5/analyst/IsochroneFeature.java
* @author mattwigway
*/
import {multiPolygon, poin... |
<gh_stars>1-10
import fs = require('fs');
import path = require('path');
let anyErrors = false;
const validNamespace = /^([a-zA-Z_][a-zA-Z_0-9]*)(?:\.([a-zA-Z_][a-zA-Z_0-9]*))*$/;
const jstExt = /\.js$/;
const watchPollRateMs = 1000;
const watchDebounceMs = 500;
interface Arguments {
input: {
fileJs: ... |
import * as React from 'react'
import { useEffect, useCallback, useState, useContext } from 'react'
import ExtendedTextField from './ExtendedTextField'
import { Button, IconButton, Box, makeStyles, Theme } from '@material-ui/core'
import tokenListJSON from '../../../../blockchain/behodlerUI/baseTokens.json'
import { Wa... |
// https://www.terraform.io/docs/providers/dbt-cloud/r/dbt_cloud_environment.html
// generated from terraform resource schema
import { Construct } from 'constructs';
import * as cdktf from 'cdktf';
// Configuration
export interface DbtCloudEnvironmentConfig extends cdktf.TerraformMetaArguments {
/**
* Credential... |
// tslint:disable:no-any
import Crdp from 'chrome-remote-debug-protocol';
import * as esprima from 'esprima'
import * as estree from 'estree';
import {Client, LikeSocket} from 'noice-json-rpc';
import {Bag, expect, getNodeChildren, MetropolJSNode, MetropolJSRootNode} from '../common';
import {EventBus} from '../Event... |
import * as utils from "../utils";
import * as control from "./control";
import {HistoryElement, RhsFn, Stepper} from "../types";
// Heaps of constants!
const C2 = 0.2;
const C3 = 0.3;
const C4 = 0.8;
const C5 = 8.0 / 9.0;
const A21 = 0.2;
const A31 = 3.0 / 40.0;
const A32 = 9.0 / 40.0;
const A41 = 44.0 / 45.0;
const... |
<reponame>tylim88/firelord
import {
PartialNoImplicitUndefinedAndNoExtraMember,
FirelordUtils,
} from './firelordUtils'
import { FirelordFirestore } from './firelordFirestore'
import { createTime } from './utils'
import { docSnapshotCreator, DocSnapshotCreator } from './docSnapshotCreator'
export const docCreator: <... |
import { OpenSeaPort } from '../../pacific-js/index'
// import { WyvernProtocol } from '../../lib/wyvern-js'
import { Network, Order, OrderSide, OrderJSON } from '../../pacific-js/types'
import { orderToJSON, orderFromJSON } from '../../pacific-js'
import { mainApi, rinkebyApi, apiToTest, ALEX_ADDRESS, ALEX_ADDRESS_2... |
<reponame>duytrantlu/stl-test<gh_stars>0
/**
* @module util
* @author DuyTM
* @description string util service
*/
import * as crypto from 'crypto';
import * as numeral from 'numeral';
import {StateModel} from '../models';
const btoa = require('btoa');
const atob = require('atob');
const toCamelCase = require('ca... |
import createDebug from 'debug';
import { Readable } from 'stream';
import { VK } from '../vk';
import { UsersUserFull, GroupsGroupFull } from '../api/schemas/objects';
import { CollectError, APIErrorCode, CollectErrorCode } from '../errors';
import { APIRequest } from '../api/request';
import { getExecuteCode } fro... |
<reponame>darfichraus/darfichraus-frontend
import {AfterViewInit, Component, Input, OnInit} from '@angular/core';
import * as L from 'leaflet';
import * as statesData from 'src/json-assets/bundeslaender_simplify200.json';
import {FeedService} from '../feed/feed.service';
import {Areal} from '../../../../models/areal.e... |
/**
* @license
* Copyright 2017 Google Inc. 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 a... |
import * as React from "react";
import BindToChainState from "../Utility/BindToChainState";
import AccountStore from "stores/AccountStore";
import { connect } from "alt-react";
import ChainTypes from "../Utility/ChainTypes";
import Translate from "react-translate-component";
import counterpart from "counterpart";
impor... |
import {
ConditionalTransferCreatedPayload,
ConditionalTransferResolvedPayload,
Result,
NodeResponses,
Values,
VectorError,
RouterSchemas,
NodeParams,
TRANSFER_DECREMENT,
INodeService,
NodeError,
} from "@connext/vector-types";
import { getBalanceForAssetId } from "@connext/vector-utils";
import {... |
import { NS, SourceFileLvl } from "Bitburner"
import Logger from "lib/Logger"
const logger = new Logger("hack.js")
export const BASIC = "basic_hack.js"
export const HACK = "/forever/hack.js"
export const GROW = "/forever/grow.js"
export const WEAKEN = "/forever/weaken.js"
export class Distributor {
/**
* how lo... |
import { addMilliseconds } from 'date-fns';
import { MapFunction, isConsideredUtcTimezoneString, isSameNonNullValue, Maybe, Milliseconds, TimezoneString, UTC_TIMEZONE_STRING } from '@dereekb/util';
import { getTimezoneOffset } from 'date-fns-tz';
import { minutesToMs } from './date';
/**
* Inherited from the RRule li... |
<reponame>shrinktofit/engine
/*
Copyright (c) 2013-2016 Chukong Technologies Inc.
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
http://www.cocos.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limite... |
import React from 'react';
import { css, cx } from 'emotion';
import * as d3 from 'd3';
import { VizLegend, LegendDisplayMode, VizLegendItem } from '@grafana/ui';
import { getValueFormat, PanelProps } from '@grafana/data';
import { CanvasOptions, CurvePoints, MergedFieldsProps, TimeXYDatumProps } from './types';
import... |
import querystring from "querystring";
import Request = require("request");
import { API } from "./api";
export interface IDefaultParameters {
headers?: { [key: string]: string};
params?: { [key: string]: string};
}
interface IRequestParams {
method: string;
headers?: { [key: string]: string};
path: string;... |
import React, { useEffect, useReducer, useRef, useState } from 'react';
import AceEditor from 'react-ace';
import {
Box,
Button,
Flex,
HStack,
Select,
Spinner,
Tooltip,
useToast,
} from '@chakra-ui/react';
import axios from 'axios';
import { FaPlay } from 'react-icons/fa';
import { FiDownloadCloud, FiUp... |
<reponame>noam987/archon-arena<filename>src/game/Card.ts
import Phaser from "phaser"
import { CardInGame } from "../shared/gamestate/CardInGame"
import { cardScripts } from "../card-scripts/CardScripts"
export const CARD_WIDTH = 100
export const CARD_HEIGHT = CARD_WIDTH / .716612378
class Card extends Phaser.GameObje... |
import React from 'react';
import { withRouter } from 'react-router-dom';
import { fade, makeStyles, Theme, createStyles } from '@material-ui/core/styles';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import IconButton from '@material-ui/core/IconButton';
import Typogr... |
<reponame>Bricktheworld/rhombus-api-examples-javascript<gh_stars>0
/**********************************************************************************/
/* Copyright (c) 2021 Rhombus Systems */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining a copy */
/* of this softw... |
import {
Connector,
ModelFieldName,
PageVisibility,
} from "../../backend-integration";
import { BaseSelectorData } from "../../standalone";
import {
ForwardedRef,
useCallback,
useEffect,
useImperativeHandle,
useState,
} from "react";
import { shallowCompare } from "../../utils";
export interface UseCrudSelect... |
import React, { useCallback, useEffect, useRef, useState } from 'react'
import { List as VirtualizedList, ListRowRenderer } from 'react-virtualized'
import styled, { css } from 'styled-components'
import { MULTI_CHANNEL } from '../../common/flags'
import Avatar from '../avatars/avatar'
import WindowListener from '../do... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.