text
stringlengths
3.08k
15.5k
<reponame>ilonny/veg-delivery<filename>mobile-app/src/features/User/reducer.tsx //@ts-nocheck import { CommonActions } from '@react-navigation/native'; import { Alert } from 'react-native'; import { API_URL } from '../../lib'; import { USER_SET_ADDRESS_DATA, SET_USER_DATA, USER_SET_USER_INFO, ADD_ORDER, CLEAR...
import "react-circular-progressbar/dist/styles.css"; import { Asset, Chain, Tx } from "@renproject/interfaces"; import { RenNetworkDetails } from "@renproject/contracts"; import { extractError } from "@renproject/utils"; import React from "react"; import { buildStyles, CircularProgressbar } from "react-circular-progre...
<reponame>erichilarysmithsr/gamejolt<gh_stars>0 import View from '!view!./autocomplete.html?style=./autocomplete.styl'; import 'rxjs/add/operator/debounceTime'; import { Subject } from 'rxjs/Subject'; import Vue from 'vue'; import { Component, Watch } from 'vue-property-decorator'; import { State } from 'vuex-class'; i...
<gh_stars>0 /** * @prettier * @hidden */ /** */ import { BigNumber } from 'bignumber.js'; import * as Bluebird from 'bluebird'; import { BitGo } from '../../bitgo'; import { NodeCallback } from '../types'; import { Wallet } from '../wallet'; import { Payload } from './payload'; import { TradingPartners } from './...
export function method(errorObject){ return new jError(errorObject) } export class jError{ types = jErrorTypes errorObject:any stackArray:any[] constructor(errorObject?){ this.errorObject = errorObject; return this; } toObject(){ const keys = Object.getOwnPropertyNames(this.errorObject) ...
import React, { ReactElement, useState, useEffect, useCallback, } from 'react'; import { CanvasData, GlClient } from 'wasm-app'; import style from 'core/main/About/About.module.scss'; import { GameState } from 'types'; import { Status } from './Status'; import { GameOverlay } from './GameOverlay'; /* Constants */ co...
/* Helper Functions */ /* Calculate next execution time, throws error if cron expression is invalid */ export async function nextExecTime(exp: string, afterTime?: Date): Promise<Date> { let expArr: Array<string> = exp.split(' '); // return potential values try { // minute ...
import { LanguageFile } from './types'; const resources: LanguageFile = { translation: { ACTIONS: { FINISH: 'Finish', NEXT: 'Next', BACK: 'Back', CREATE_ACCOUNT: 'Create Account', OKAY: 'Okay', CANCEL: 'Cancel', CONTINUE: '...
export function filterValues(value: string, search: string) { return value.toString().toLowerCase().includes(search.toString().toLowerCase()); } export function filterMulti(value: string, search: string) { const listSearch = search.split(';'); const valCell = value.replace(/ /g, ''); return (listSearch.toStrin...
<filename>src/index.ts interface PEventHandler { onDown: Function onUp?: Function } export class Pointer { /* * Reference: * https://www.w3.org/TR/pointerevents2/ */ static Button = Object.freeze({ LEFT_MOUSE: 0, MIDDLE_MOUSE: 1, RIGHT_MOUSE: 2, PEN_CONTACT: 0, PEN_BARREL: 2, ...
<reponame>bitrockteam/signature import { html, TemplateResult } from 'lit-html'; import { companies } from './companies'; const confidentialITA = () :TemplateResult => html`<div style="line-height: 14px;"><br></div> <p style="font-size: 11px; line-height: 15px; color: #999999; margin-bottom: 0;"><b style="font-...
enum PageListFormat { "1r", "I'1r", "Roman", "Arabic" }; class PageListGeneratorFactory { static createPageListGenerator(format: number): PageListGeneratorBase { switch (format) { case PageListFormat["1r"]: return new RectoVersoPageListGenerator(); c...
import React, { useContext, useEffect, useState } from "react"; import { NavLink } from "react-router-dom"; import { CollectionAPI } from "../../apis/Collection.api"; import { ObjectsAPI } from "../../apis/Objects.api"; import { VersionAPI } from "../../apis/Version.api"; import { DiscoveryDtoContext } from "../../App"...
import { useEffect, useRef, RefObject, useState, useMemo } from 'react'; import useMountedState from 'react-use/lib/useMountedState'; import { Bounds } from './utils'; import usePrevious from 'react-use/lib/usePrevious'; export interface State { isPanning: boolean; position: { x: number; y: number; }; } ...
import React, { forwardRef, FunctionComponent, MutableRefObject, useImperativeHandle, useRef, useState, } from 'react'; import { Animated, ScrollView, StyleSheet, View, Image, Dimensions, ImageSourcePropType, ScrollViewProps, } from 'react-native'; type Props = ScrollViewProps & { childre...
/** * @license * Copyright (c) 2015 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors ma...
<reponame>shikshalokam/SunbirdEd-mobile import {Component, Inject} from '@angular/core'; import {NavParams, Platform, ViewController} from 'ionic-angular'; import {AppRatingService, TelemetryGeneratorService, UtilityService} from '@app/service'; import {SharedPreferences, TelemetryService} from 'sunbird-sdk'; import {A...
import { Action, ActionGroup } from './Actions.js'; import { assert } from './Base.js'; import { TinyDatePicker } from './third_party/tiny-date-picker/DatePicker.js'; import { BACKLOG_PRIORITY_NAME, BOOKMARK_PRIORITY_NAME, MUST_DO_PRIORITY_NAME, PINNED_PRIORITY_NAME, Priority, Thread, URGENT_PRIORITY_NAME...
import React, { ReactNode, useCallback } from 'react'; import { defineMessages, MessageDescriptor, useIntl } from 'react-intl'; import compose from 'recompose/compose'; import classnames from 'classnames'; import { useField } from 'formik'; import { AnyUser } from '~data/index'; import { Address, SimpleMessageValues }...
import 'linkify-plugin-hashtag' import 'linkify-plugin-mention' import Slug from '@components/shared/Slug' import { Button } from '@components/UI/Button' import { ErrorMessage } from '@components/UI/ErrorMessage' import { Modal } from '@components/UI/Modal' import { Tooltip } from '@components/UI/Tooltip' import AppCo...
import React, { useMemo } from "react"; import { View, Text, StyleSheet, Dimensions, ScrollView, TouchableOpacity, Platform, ActivityIndicator, Image, } from "react-native"; import { useNavigation } from "@react-navigation/native"; import { StatusBar } from "expo-status-bar"; import { RectButton } fro...
<reponame>macca67/open-in-github-desktop-vscode import * as vscode from 'vscode'; import * as fs from 'fs'; import * as process from 'process'; import * as vscel from '@wraith13/vscel'; import packageJson from "../package.json"; import localeEn from "../package.nls.json"; import localeJa from "../package.nls.ja.json"; ...
<reponame>zedd3v/hsolve import got, { Agents } from "got"; import * as URL from "url"; import _ from "lodash"; import * as VM from "vm"; import { v4 as uuidv4 } from "uuid"; import { generateUA, generateMouse, sleep, createAgents } from "./functions"; import classifyImages from "./classify"; export interface SolveServ...
import { VALID_GUESSES } from '../constants/validGuesses' export type Wordle = { word: string appearances: ('yellow' | 'green' | 'gray')[] } function read() { let data = VALID_GUESSES return data } export function Solver(input: Wordle[]): string[] { let possibleWords = read() //filter greens input.forEac...
<reponame>AnnotationSro/ng-a-parse<gh_stars>0 /* eslint-disable no-case-declarations */ /** * copy from https://github.com/angular/angular/blob/master/packages/common/src/i18n/format_date.ts */ import { FormatWidth, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleId, getLocaleTimeFormat } from '@angular/common...
import { IModule } from '../../moduleResolver/module'; import { PackageType } from '../../moduleResolver/package'; import { IProductionContext } from '../ProductionContext'; import { ImportType } from '../module/ImportReference'; import { createSplitEntry, ISplitEntry } from '../module/SplitEntries'; /** * Function t...
import * as React from "react"; import clsx from "clsx"; import CreatableSelect from "react-select/creatable"; import {createStyles, Theme, withStyles} from "@material-ui/core"; import {grey} from "@material-ui/core/colors"; import LibrarySource from "../../data/LibrarySource"; import {getSourceType} from "../../data...
import React, { useEffect, useMemo, useRef, useState } from 'react'; import { FlatList, GestureResponderEvent, Image, ImageResizeMode, ImageSourcePropType, ImageStyle, ImageURISource, ListRenderItemInfo, TouchableOpacity, useWindowDimensions, View, ViewStyle, } from 'react-native'; type Indicat...
/** * Creates an upcast converter that will pass all classes from the view element to the model element. */ import { DowncastConversionHelperFunction } from "@ckeditor/ckeditor5-engine/src/conversion/conversionhelpers"; import UpcastDispatcher, { UpcastConversionApi, UpcastEventData, } from "@ckeditor/ckeditor5-e...
<reponame>sunfish-shogi/electron-shogi<filename>src/store/usi.ts import { ImmutablePosition, Move } from "@/shogi"; export enum USIInfoSender { BLACK_PLAYER = "blackPlayer", WHITE_PLAYER = "whitePlayer", RESEARCHER = "researcher", } export function stringifyUSIInfoSender(sender: USIInfoSender): string { switc...
import { EventEmitter, Injectable } from '@angular/core' import { DataService } from './data.service' import { Subject } from 'rxjs' import packageJson from '../../../package.json' import { KnobControlStyle } from '../../../../modules/components/src' export interface UISettings { replaceKnobsWithSliders?: boolean ...
import {parse} from 'path'; import { CancellationToken, CompletionContext, CompletionItem, CompletionItemProvider, Definition, DefinitionProvider, Hover, HoverProvider, Location, MarkdownString, Position, ProviderResult, Range, TextDocument, Uri, } from 'vscode'; import {fileSystem as fs} from '../shared/file-syste...
/// /// Copyright (c) 2021, Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. /// SPDX-License-Identifier: Apache-2.0 /// import { Commercial } from "../../../models/Banks"; import _ from "lodash"; import { ProposePvpModel, ProposeStatusType, PvpStatuses, } from "../../../models/Propos...
<reponame>ignatisD/mongoose-connector<gh_stars>0 import mongoose from "mongoose"; function translateDocs<T>(docs: T | T[], lang: string) { if (!Array.isArray(docs)) { docs = [docs]; } for (let doc of docs) { // @ts-ignore doc?.setLanguage && doc.setLanguage(lang); } } export fu...
// TODO // 1. shadow // 2. Image: sx, sy, sw, sh import {createElement, XLINKNS } from '../svg/core'; import { getMatrixStr, TEXT_ALIGN_TO_ANCHOR, adjustTextY } from '../svg/helper'; import * as matrix from '../core/matrix'; import Path, { PathStyleProps } from '../graphic/Path'; import ZRImage, { ImageStyleProps } fr...
<gh_stars>0 import React, { ReactElement } from 'react'; import Option from './Option'; import { filterOptionType, IILableValueType, ISelectProps, valueType } from './PropTypes'; export function toTitle(title: string): string { if (typeof title === 'string') { return title; } return ''; } export function ge...
<reponame>thomastanck/cadet-frontend<gh_stars>0 import ImageAssets from '../../assets/ImageAssets'; import CommonBackButton from '../../commons/CommonBackButton'; import { screenCenter, screenSize } from '../../commons/CommonConstants'; import CommonRadioButton from '../../commons/CommonRadioButton'; import GameLayerMa...
import AWS from "aws-sdk"; export interface InternalFeatureFlagOpts { region: string; } export interface InternalOptions { [key: string]: any; } export interface InternalFeatureFlag { namespace: string; featureId: string; customerId?: string; enabled: boolean; options: InternalOptions; } export interf...
<filename>milo/frontend/resultui/src/components/pixel_viewer.ts // Copyright 2021 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/licens...
<filename>ng2-admin/src/app/digitalstate/modules/system/components/health.component.ts import { Component, Injector } from '@angular/core'; import { Headers, Http, RequestOptions, Response } from '@angular/http'; import { AuthService } from "../../../../shared/modules/auth/auth.service"; import { DsPageComponent } fro...
import { padding } from "./util" interface Option<T extends string | number | boolean> { name: string description: string typeName: string alias?: string default?: T parse(option: string): T } function parseNumber(option: string): number { return Number(option) } function parseBoolean(opt...
import { Component, ViewChild } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import 'ag-grid-enterprise'; @Component({ selector: 'my-app', templateUrl: 'app.component.html' }) export class AppComponent { @ViewChild('agGrid') agGrid; private gridApi; private gridColumnApi; priv...
import { BigNumber } from "@ethersproject/bignumber"; import { Zero } from "@ethersproject/constants"; import { H_TOKEN_MATURITY_ONE_YEAR, USDC_PRICE_PRECISION_SCALAR } from "@hifi/constants"; import { HifiPoolErrors, YieldSpaceErrors } from "@hifi/errors"; import { USDC, getNow, hUSDC } from "@hifi/helpers"; import ty...
import * as React from 'react' import {Grid, Cell, BEHAVIOR} from 'baseui/layout-grid' import {SizeMeProps, withSize} from 'react-sizeme' import * as Web3 from 'web3' import {OpenSeaPort, Network} from 'opensea-js' import {OpenSeaAsset} from 'opensea-js/lib/types' import Page from '../../../containers/page' import {Hea...
import { SnapshotIn, types } from "mobx-state-tree"; import { debounce } from "lodash"; import { AppConfigModelType } from "./app-config-model"; import { kDividerMax, kDividerMin, UIDialogTypeEnum } from "./ui-types"; import { WorkspaceModel } from "./workspace"; import { DocumentModelType } from "../document/document"...
import type { NextPage } from "next"; import Image from "next/image"; import Link from "next/link"; import { useAuth0, withAuthenticationRequired } from "@auth0/auth0-react"; import styled from "styled-components"; import { Button, LotGridItem } from "@components"; import { config, images, strings } from "@constants";...
import { Action, FetchOptions, GetLiveChatResponse, LiveChatMembershipItemRenderer, LiveChatPaidMessageRenderer, LiveChatPaidStickerRenderer, LiveChatTextMessageRenderer, MessageRun, Thumbnail, } from "./types/yt-response" import { ChatItem, ImageItem, MessageItem } from "./types/data" export functio...
import constants from "./constants"; export const uiUserFromNotification = (notification: any) => notification && uiUserFromUser({ username: notification.updated_by_username || notification.sender_username, full_name: notification.sender_full_name || notification.updated_by_full_name }); export co...
import React, { useRef, useEffect, useState } from 'react' import { Select, DatePicker, Button } from 'antd' import { useValues, useActions } from 'kea' import moment from 'moment' import { dateFilterLogic } from './dateFilterLogic' import { dateMapping, isDate, dateFilterToText } from 'lib/utils' interface Props { ...
<filename>projects/ngx-surveys/src/lib/dialogs/dialog-item-edit/dialog-item-edit.ts import { Component, Inject, ViewChild } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { NgxSurveyComponent } from '../../ngx-survey.component' import { FormItem, FormItemOptionIt...
<reponame>pagopa/io-functions-onboarding<gh_stars>1-10 /* tslint:disable:no-let */ import { none, some } from "fp-ts/lib/Option"; import { SpidLevelEnum } from "io-spid-commons"; import { EmailString, FiscalCode, NonEmptyString } from "italia-ts-commons/lib/strings"; import { getRequiredEnvVar } from "../../../...
import fs from "fs" import { Readable } from "stream" import nodes from "./nodes.json" import { SingleNode } from "./singleNode" const jsoncsv = require("json-csv") const now = Date.now() const requests = nodes.map(async node => { const url = node.url const cuttingLine = `--------------------- Requesting $...
const packageJSON = require('../package.json'); import Table = require('easy-table'); import * as os from 'os'; const vorpal: Vorpal = require('./vorpal-init'); import { CommandError } from './Command'; import * as url from 'url'; export default class Utils { public static escapeXml(s: any | undefined) { if (!s)...
import WebSocket from 'ws'; import net from 'net'; import aedes from 'aedes'; import { API, DynamicPlatformPlugin, Logger, PlatformAccessory, PlatformConfig, Service, Characteristic } from 'homebridge'; import { PLATFORM_NAME, PLUGIN_NAME } from './settings'; import { DeviceSchema } from './device.schema'; import { Gat...
import chalk from "chalk"; import got, { Headers } from "got"; import { config } from 'dotenv'; import parsems from "parse-ms"; import * as fs from "fs"; config({ path: "./.env"}) export function LogLogin (version?: string): void { const color = (text: string, color: string): string => { return !color ? ch...
<filename>packages/core/src/looping.ts interface LoopingEvents { onPause?(this: Looping): void onResume?(this: Looping): void onStats?(this: Looping, stats?: LoopingStats): void onError?(this: Looping, error?: Error): void } interface LoopingConfig { /** amount of ticks used to calculate the frame rate */ ...
<filename>projects/expression/src/eval.ts import { _evaluateAstAsync } from './eval_async'; import { _parse, _parseCached } from './parser'; import { type_Body, op_LogicalOr, op_LogicalAnd, op_Minus, op_Plus, op_Divide, op_Multip, op_Modulo, op_BitOr, op_BitXOr, op_BitAnd, op_LogicalNotEqual, op_LogicalNotEqual_Strict,...
import {asISODate} from "../utils/date-utils" import {writeHtml} from "../utils/file-utils" import {lowerTriangular} from "../utils/func-utils" import {externalAnchor} from "../utils/html-utils" import { country2CodeTo3Code, countryCode2DisplayName, flagEmoji } from "../refData/country-utils" import {vaccin...
import * as _ from "lodash"; import * as Q from "q"; import {Lineup, Player, SlateDetails, Fixture} from "./models"; class LineupSearch { searchIndex : { [key:string] : number; }; currentLineup : Lineup; constructor(searchIndex : { [key:string] : number; }, currentLineup : Lineup){ this.searchIndex...
/* eslint-disable */ import { ASN1ConstructionError as _ConstructionError, ASN1Element as _Element, ASN1TagClass as _TagClass, } from "asn1-ts"; import * as $ from "asn1-ts/dist/node/functional"; import { CertRsp_result, _decode_CertRsp_result, _encode_CertRsp_result, } from "../AVL-m...
<reponame>ingeniasoftware/phan-for-vs-code /** * Phan for VS Code Extension * * Provides a simple integration with Phan static analyzer to Visual * Studio Code. * * NOTE: Phan must be installed (globally) with Composer. * * @author <NAME> <<EMAIL>> * @license MIT * * @todo Allow non-composer Phan instal...
import { Component, OnInit } from "@angular/core"; import {SearchService} from "../../services/search/search.service"; import * as L from 'leaflet'; import 'leaflet.markercluster'; import {MonumentInterface} from "../../model/quick-search"; import Monuments = MonumentInterface.Monuments; import {DataSource} from "@an...
import React, { useState, useRef, useEffect, useCallback } from "react"; import { makeStyles } from "@material-ui/core"; import classnames from "classnames"; import { Terminal } from 'xterm'; import "xterm/css/xterm.css"; import { AttachAddon } from 'xterm-addon-attach'; import { FitAddon } from './FitAddon'; import ...
import { MessageReadOptions, MessageRow, RawMessage, RawMessageIterator, SqliteDb, TopicDefinition, parseQosProfiles, } from "@foxglove/rosbag2"; import { Time, fromNanoSec, toNanoSec } from "@foxglove/rostime"; import initSqlJs, { Database, SqlJsStatic, Statement } from "@foxglove/sql.js"; export type L...
<filename>src/sdk/core/entities.ts import Editor from "./main"; declare var editor: any; declare var Observer: any; export function setEntityModelOutline( this: Editor, entity: any, state: boolean, color?: number ) { if (state) { this.selectionOutline[entity._guid] = { entity: entity, color:...
<reponame>woutermont/solid-client-authn-js /* * Copyright 2021 Inrupt Inc. * * 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 ...
import * as coda from "@codahq/packs-sdk"; import type * as types from "./types"; const PULL_REQUEST_URL_REGEX = /^https:\/\/github\.com\/([^\/]+)\/([^\/]+)\/pull\/(\d+)/; const REPO_URL_REGEX = /^https:\/\/github\.com\/([^\/]+)\/([^\/]+)$/; const DEFAULT_PAGE_SIZE = 100; // This is a simple wrapper that takes a r...
import { Color, ITheme } from '../utils/.'; export const defaultTheme: ITheme = { colors: { primary: '#5755d9', secondary: Color('#5755d9') .lighten(37.5) .hex(), success: '#32b643', warning: '#ffb700', error: '#e85600', dark: '#303742', light: '#fff', code: '#d73e48', ...
<gh_stars>0 import { formatNumber, hasOwner } from '../../../utils/Utils'; import { LocationId, QueuedArrival, Planet, } from '../../../_types/global/GlobalTypes'; import CanvasRenderer from '../CanvasRenderer'; import { engineConsts } from '../utils/EngineConsts'; import { RenderZIndex, TextAlign, TextAnchor } f...
<filename>src/esbuild-helpers.ts import { build, BuildInvalidate, BuildOptions } from "esbuild"; import chokidar from "chokidar"; import isr from "./isr"; import { appPath, getDotEnvObject, getFuegoConfig, INTERMEDIATE_DIR, promiseRimraf, } from "./common"; import fs from "fs"; import path from "path"; const...
/* * Copyright 2017 <NAME>, <NAME> and <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-2.0 * * Unless required by applicable l...
<filename>src/avc.ts import axios from "axios"; import Bottleneck from "bottleneck" import * as dotenv from "dotenv"; dotenv.config(); const avApiKey = process.env.ALPHA_VANTAGE_API_KEY; const avRateS = process.env.ALPHA_VANTAGE_RATE; const avRate = avRateS?parseInt(avRateS,10):5 const avMinTime = 60000/avRate +5; ...
<gh_stars>0 import Registry from './registry'; const registry = new Registry((stat: Stat) => stat.name); export enum StatUnit { Percent, Seconds, Units } export enum StatCategory { Military = 'Military', SettlementDefense = 'Settlement Defense', Development = 'Development', Resources = 'R...
export { DefaultPalette as Palette, skeColor, skePalette, } from './utils/palette'; export type { PaletteProps, SkeColorProp } from './utils/palette'; export { Fonts, FontSizes, LineHeightSizes, FontWeights, IconFontSizes, createFont, } from './utils/fonts'; export { omstrukturerFlatJSON, t } from './...
/* eslint-disable @typescript-eslint/no-explicit-any, id-denylist */ import { Selection, arc as arcD3, extent, geoOrthographic, interpolate, interpolateNumber, max, pie as pieD3, range, scaleLinear, scaleOrdinal, scaleQuantile, scaleQuantize, schemePastel2, select, } from "d3" import QUnit...
import React, { useEffect, useRef, useState } from 'react'; import { Animated, Dimensions, Image, StyleSheet, Text, TouchableOpacity, View } from 'react-native'; import api from '../services/api'; import LoaderSpinner from '../components/loaderSpinner'; import { TypeCha...
/** * Calculate topocentric solar position, i.e. the location of the sun on the sky for a certain point in time on a * certain point of the Earth's surface. * * This follows the no. 3 algorithm described in Grena, 'Five new algorithms for the computation of sun position * from 2010 to 2110', Solar Energy 86 (2012)...
/** Input stream returns one character at a time */ export class InputStream { private _pos: number = 0; private _col: number = 0; private _line: number = 0; constructor(private _input: string) {} /** Returns the next character and removes it from the stream */ next(): string | null { ...
import { Octokit, RestEndpointMethodTypes } from "@octokit/rest"; import Table from "cli-table3"; import open from "open"; import spinner from "ora"; import { ApplicationProperties } from "../interfaces/types"; import Git from "./git"; import { getTimeFromNow } from "./utils"; interface Options { base?: string; o...
<filename>src/parser/user.ts import { Character, Collection, GearLevel, Guild, Profile, User, UserInfo, UserStats } from "../interface"; import * as path from 'path'; import { assetUrl } from "../util"; export function parseCollection($: CheerioStatic): Collection { return <any>$("body > div.container.p-t-md > di...
var { Intents, MessageEmbed } = require('discord.js'); var prefix:any = process.env.PREFIX; var axios:any = require('axios'); module.exports = class Reactions implements IReactions { interact(client):void { client.on('interactionCreate', async interaction => { try { if (...
<reponame>contributeless/mongo-oplog-viewer import { NextFunction, Request, Response } from 'express'; import { CollectionAggregationOptions, ObjectID, Timestamp } from 'mongodb'; import { ChildOplogEntryEntity, OplogEntryEntity, OplogEntryEntityBase, OplogEntryOperation, OplogEntryTransactionOperation } from '../Entit...
<reponame>kaikai2/midihub<filename>src/modules/webmidiio.ts<gh_stars>0 import {keys} from 'lodash' import WebMidi, { Input, Output, InputEventBase, InputEventNoteon, InputEventNoteoff, WebMidiEventConnected, WebMidiEventDisconnected } from 'webmidi' WebMidi.enable(function (err) { if (e...
// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service) import { DetailQueryConfig, FildDescriptorType } from '../_base/types'; import { instanceQueryParamsBaseParse } from '../../common/utils'; import _ from 'lodash'; const namespace = 'QCE/CLS'; const queryEditorName = 'clsQuery'; const CLSInvalidDemensions = ...
#!/usr/bin/env node import got from 'got'; import Jimp from 'jimp'; import PromisePool from '@supercharge/promise-pool'; import yargs, { number } from 'yargs'; yargs .usage('Usage: -o outfile minlat minlon maxlat maxlon zoom http://whatever/{z}/{x}/{y}.png') .option('o', { alias: 'output', describe: 'Outpu...
<filename>src/declarative/translators/AttributeTranslator.ts<gh_stars>0 import { Attribute } from 'libxmljs'; import { IMemberNames, IImportsTracker } from './DocumentTranslator'; const expressionRegex: RegExp = /^\{(.+)\}$/; const bindingKeyRegex: RegExp = /^this(\.[a-zA-Z_][a-zA-Z0-9_]*)+$/; const objectParsers: { ...
<filename>HttpTrigger/alert.ts import { TranslateAlert, APIEndpoint } from "./translator" // 共通アラートスキーマに合わせた型定義 // Ref: https://docs.microsoft.com/ja-jp/azure/azure-monitor/platform/alerts-common-schema-definitions export type CommonAlert = { data: { essentials: { alertId: string, a...
import React from 'react'; import { EditorPlugin } from '../../types/editor-plugin'; import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next'; import { SelectItemMode } from '@atlaskit/editor-common/type-ahead'; import type { EditorView } from 'prosemirror-view'; import type { TypeAheadHandler, PopupMountP...
import * as React from 'react'; import { Schedule, ScheduleReport, ScheduleType } from '../../types/Schedule'; import { match, Link } from 'react-router-dom'; import { URLParams } from '../../services/Params'; import { PageLoading } from '../../components/Loading'; import { HostType } from '../../types/Host'; import { ...
import moment from "moment"; import { v4 } from "uuid"; import { formatDate } from "./format"; import { isAllDay } from "./helper"; import { Config, iCalEvent, IKalenderEvent } from "./interfaces"; export function convertEvents(events: any, config: Config): IKalenderEvent[] { let retEntries: IKalenderEvent[] = [];...
<reponame>pureprofile/pg-schema-dump import * as fs from 'fs-extra'; import * as path from 'path'; import assert from 'assert'; import autoBind from 'auto-bind'; import { log } from './utils'; import { normalizedSrc, unquoted, quotedIfUnsafe, sortedAttributes } from './fs-schema-helpers'; import { sortBy } from 'lodash...
<reponame>AesisGit/saas-vuejs-tailwindcss import { FileType } from "./master/common/ResourceDto"; import store from "../../store"; import { SubscriptionBillingPeriod } from "../enum/master/SubscriptionBillingPeriod"; import { SubscriptionPriceType } from "../enum/master/SubscriptionPriceType"; import { TenantUserRole }...
import * as core from '@actions/core' import * as github from '@actions/github' import {graphql} from '@octokit/graphql' export interface PullRequestOptions { ignoreTitle: boolean ignoreDescription: boolean checkAllCommitMessages: boolean // requires github token latestCommitMessage: boolean accessToken: str...
import React from 'react'; import { InjectedIntlProps } from 'react-intl'; import memoize from 'lodash/memoize'; import memoizeOne from 'memoize-one'; import { Schema } from 'prosemirror-model'; import { EmojiProvider } from '@atlaskit/emoji/resource'; import { messages } from './messages'; import { messages as block...
import type { AnyState, GeneralAction, GeneralActionCreator, ParentState, Reducer, ReducerMap, Selector, SliceActionCreator, SliceSelector, } from './internalTypes'; const slice = Array.prototype.slice; /** * Apply the `error: true` property to the action passed if the `payload` is * an instance o...
<filename>src/engine/journal/JournalClerk.ts<gh_stars>10-100 import { EntryIndex, Journal, JournalEntry } from './index'; import { concatMap, debounceTime, endWith, map, share, take, takeUntil, tap } from 'rxjs/operators'; import { EMPTY, merge, Observable, of, race, Subject, timer } from 'rxjs'; import { idling } from...
<filename>src/sdk/Contract.ts import { BITBOX } from 'bitbox-sdk'; import { ECPair } from 'bitcoincashjs-lib'; import { AddressUtxoResult, AddressDetailsResult, TxnDetailsResult } from 'bitcoin-com-rest'; import delay from 'delay'; import { AbiFunction, Abi } from './ABI'; import { Script } from '../compiler/generation...
// @ts-nocheck import { top, left, right, bottom, start } from '../enums'; import { Placement, Boundary, RootBoundary } from '../enums'; import { Rect, ModifierArguments, Modifier, Padding } from '../types'; import getBasePlacement from '../utils/getBasePlacement'; import getMainAxisFromPlacement from '../utils/getMain...
import axios from 'axios'; import { Magic } from 'magic-sdk'; import { Subject, BehaviorSubject, Observable } from 'rxjs'; import { AppMetadata } from '../../shared/AuthMetadata'; import { CreatePublicRecordKeyResult, PublicRecordKeyPolicy } from '@casual-simulation/aux-records'; import { isStringValid, RegexRule } fro...
import { DialogContent, Fab, Fade, Typography } from "@material-ui/core"; import { makeStyles, styled } from "@material-ui/core/styles"; import { Feedback } from "@material-ui/icons"; import React, { FunctionComponent, useCallback } from "react"; import { useTranslation } from "react-i18next"; import { useDispatch, use...