text stringlengths 3.08k 15.5k |
|---|
import validateIntervalName from './validators/interval';
import {splitStringByPattern} from './regex';
function piaCompare(a,b) {
var qualities = ['d','m','P','M','A'];
if (a.size < b.size) {
return -1;
} else if (a.size > b.size) {
return 1;
} else {
if (qualities.indexOf(a.quality) < qualities.... |
import React, { ReactElement, MutableRefObject } from 'react';
import {
SafeAreaView,
StyleSheet,
StatusBar,
TextInput,
Pressable,
View,
Dimensions,
ActivityIndicator,
FlatList,
Text,
} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import strings from '..... |
import { Component, OnInit, ViewChild, OnDestroy } from '@angular/core';
import { AdminAPIsService } from 'app/services/admin-apis.service';
import { NgxSpinnerService } from 'ngx-spinner';
import { Router } from '@angular/router';
import { ToastrService, IndividualConfig } from 'ngx-toastr';
import { MatPaginator, Mat... |
<filename>ontimize/components/input/text-input/o-text-input.component.ts
import {Component, Inject, Injector, forwardRef, ElementRef, OnInit, EventEmitter,
NgZone, ChangeDetectorRef,
NgModule,
ModuleWithProviders,
ViewEncapsulation} from '@angular/core';
import {CommonModule } from '@angular/common';
import {Fo... |
import {ExtensionLogMessage} from "./ExtensionLogMessage";
import {observable, action, computed, transaction} from "mobx";
import {ExtensionCategory} from "./ExtensionCategory";
import {
SimpleMap, LinkedList, ExtensionMessageContentJSON,
ExtensionRequestChangeLogLevelJSON, ExtensionMessageJSON
} from "typescript-l... |
import { Component, OnDestroy, OnInit, ViewEncapsulation, ViewChild ,ElementRef} from '@angular/core';
import { AbstractControl, FormBuilder, FormGroup, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/internal/operators';
import { FuseC... |
import React from "react";
import ReactDOM from "react-dom";
import {
BrowserRouter,
Switch,
Route,
Link,
useHistory,
useLocation,
} from "react-router-dom";
import MonacoEditor, {
MonacoEditorProps,
EditorDidMount,
} from "react-monaco-editor";
import { Range, editor } from "monaco-editor";
import { Fragment... |
<filename>src/configure.ts
import { join } from "https://deno.land/std/path/mod.ts"
const nginxTemplate = (
port: number,
serverName: string,
sortitionPort: number
) => `server
{
listen ${port};
server_name ${serverName};
gzip on;
gzip_... |
// tslint:disable align no-any max-line-length
import { ActionTypes as AutentiseringsinfoActionTypes } from '../ducks/autentiseringsinfo';
import { ActionTypes as RegistrerbrukerActionTypes } from '../ducks/registrerbruker';
import {
ActionTypes as RegistreringStatusActionTypes,
Data as RegStatus,
Registrer... |
/* eslint-disable @typescript-eslint/ban-types,@typescript-eslint/no-explicit-any */
import type { Query, QueryResult, Column, Filter } from '@technote-space/material-table';
import type { MaybeUndefined } from '@frourio-demo/types';
import type { AdditionalWhere, TypeKey, DateConstraint, Where, OrderBy } from '$/packa... |
<reponame>opendigitaleducation/entcore
import { $, appPrefix, ng } from 'entcore';
import { Subject } from 'rxjs';
//TODO move to infrafront? with i18n
function StickyDelegate(scope, element, attributes) {
if (!attributes.stickyBloc) {
return;
}
let original = null;
let initialOffset = null;
... |
import moment from 'moment';
import { tap } from 'rxjs/operators';
import { Observable, Subject, timer } from 'rxjs';
import { Router, ActivatedRoute } from '@angular/router';
import { Component, OnInit, OnDestroy } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
... |
import { EmbedField, MessageEmbedOptions } from "discord.js";
export default class DoggoEmbed {
embed: MessageEmbedOptions;
/**
* @param colour The Colour of the embed
* @constructor
*/
constructor(colour: colourResolveable) {
this.embed = { color: this.resolveColor(colour) };
}
/**
* @method setTitle S... |
<gh_stars>0
import * as fs from "fs";
import * as path from "path";
import { Diagnostic, DiagnosticSeverity, IConnection, PublishDiagnosticsParams, Range, TextDocument } from "vscode-languageserver";
import * as xml2js from "xml2js";
import * as xmlChecker from "xmlchecker";
import { Log, LogLevel } from "../Log";
impo... |
import React, {
useState, useContext, useRef,
} from 'react';
import { Link, Redirect } from 'react-router-dom';
import styled from 'styled-components/macro';
import BigButton from 'components/common/BigButton';
import ScrollDownButton from 'components/common/ScrollDownButton';
import CommContext from 'components/roo... |
<filename>src/field/view/input/tel/TelDropdownView.ts
import { ListenableEntity } from "../../../../lib/ListenableEntity";
import { CountryHelper, ICountry } from "./CountryHelper";
import { ICountryFilter } from "./IntlTelInputView";
import { ITelOptionListListener, ITelOptionListView, TelOptionListView } from "./TelO... |
<reponame>FlechaMaker/sharedb-monaco
/**
* @fileOverview
* @name bindings.ts
* @author <NAME> <<EMAIL>>
* @license MIT
*/
import { editor } from "monaco-editor";
import { Range } from "./Range";
import sharedb from "sharedb/lib/client";
import { BindingsOptions } from "./types";
class Bindings {
... |
import * as React from 'react';
import {inject, observer} from "mobx-react";
import {InstanceStore} from "../../stores/InstanceStore";
import {Link} from 'react-router-dom';
import {withRouter} from "react-router";
import {
Area, AreaChart, Brush, CartesianGrid, ComposedChart, Legend, Line, LineChart, ReferenceLine... |
import classNames from "classnames";
import React from "react";
import { useControll } from "utils-hooks";
import { PickerCombobox } from "xy-time-picker";
import "xy-time-picker/assets/index.css";
import CalendarPicker from "./CalendarPicker";
import { formatDate, setMonth, setYear, timeParse } from "utils-dom";
impor... |
<gh_stars>0
import { Selector, t } from "testcafe";
import FetchPage from "./page-models/FetchPage";
import { loginGluu, loginNss, loginCognito } from "./helpers/login";
import ITestConfig from "./ITestConfig";
import IPodServerConfig from "./IPodServerConfig";
import { authorizeEss, authorizeNss } from "./helpers/aut... |
<reponame>esp32m/ui
import debounce from 'lodash/debounce';
import WebSocket from 'reconnecting-websocket';
import { Action, AnyAction, Dispatch, Middleware } from 'redux';
import { Plugins } from './plugins';
export const Name = 'backend';
interface IEsp32m {
backend?: {
host?: string;
};
}
declare global ... |
<reponame>gach/oldschoolbot
import { Time } from 'e';
import { KlasaUser } from 'klasa';
import { ApplicationCommandOptionType, CommandRunOptions } from 'mahoji';
import { Bank } from 'oldschooljs';
import { Item } from 'oldschooljs/dist/meta/types';
import { ClientSettings } from '../../lib/settings/types/ClientSetti... |
/// <reference path="../typings/JavaScript.d.ts"/>
/// <reference path="../typings/PlugPlugExternalObject.d.ts"/>
/// <reference path="../typings/PremierePro.14.0.d.ts"/>
/// <reference path="../typings/XMPScript.d.ts"/>
/// <reference path="../typings/extendscript.d.ts"/>
/// <reference path="../typings/global.d.ts"/>... |
<filename>src/lib/payment-gateway/paypal.ts
import { BadRequestException } from '@nestjs/common';
import paypal from '@paypal/checkout-server-sdk';
import got from 'got';
import { round } from 'lodash';
import {
PAYMENT_STATUS,
PAYPAL_API_URL,
PAYPAL_CLIENT_ID,
PAYPAL_CLIENT_SECRET,
PAYPAL_PARTNER_ATTRIBUTION... |
import { TagData } from '@celluloid/types';
import {
createStyles,
MenuItem,
Paper,
TextField,
Theme,
WithStyles,
withStyles,
InputAdornment
} from '@material-ui/core';
import SearchIcon from '@material-ui/icons/Search';
import * as React from 'react';
import * as Autosuggest from 'react-autosuggest';
i... |
import React from 'react';
import { connect } from 'react-redux';
import { Popper } from '@material-ui/core';
import { ReduxCombinedState } from 'redux/reducers';
import sprite from "assets/img/icons-sprite.svg";
import { Notification, notificationTypeColors, NotificationType } from 'model/notifications';
import moment... |
import * as React from 'react';
import { inject, observer } from 'mobx-react';
import AppComponentBase from '../../components/AppComponentBase';
import { FormComponentProps } from 'antd/lib/form';
/*import { CreatorEditEbookDto } from '../../services/ebook/dto/CreatorEditEbookDto';*/
import EbookStore from '../../store... |
import * as vscode from 'vscode';
import * as esprima from 'esprima';
import * as estree from 'estree';
import { supportedLanguageList } from './extension';
import ast from './ast';
import Config from './config';
import { getBaseOptions, getOptionDesc } from './store';
/** 自动补全 */
export function provideCompletionItem... |
<reponame>nw55/js-common
import { MultiKeyMap, MultiKeySet } from '../collections';
import { Log } from '../logging';
import { ConstructorLike } from '../utils';
import { OperationFilter, OperationFilterContextTypeMap, operationFilterHostSymbol, OperationFilteringObject, OperationFilterProvider } from './common';
func... |
<filename>packages/api/src/models/selection.ts<gh_stars>1-10
import { ResolveTree } from "graphql-parse-resolve-info";
import {
Attribute,
Criteria,
CriteriaFilter,
Model,
QueryModel,
Relation
} from "../types";
/**
* Converts graphql arguments criteria and criteria filter
*
* 1. { where: { and : [ { na... |
import { SourceType, SourceChain, Source, Source_linkURLPattern } from 'Store/firebase/contentNodes/@SourceChain';
import { BaseComponent, GetDOM, BaseComponentPlus } from 'react-vextensions';
import { Button, Column, Row, TextInput, Select } from 'react-vcomponents';
import { GetErrorMessagesUnderElement, GetEntries... |
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
// @ts-ignore
import { solid } from "@fortawesome/fontawesome-svg-core/import.macro";
import React, { useEffect, useRef } from "react";
import { Button, Card } from "react-bootstrap";
import { Link, Route, Routes } from "react-router-dom";
import "../sc... |
import {
constructorName,
getTag,
isArrayLikeLength,
isGeneratorFunction,
isGeneratorObj,
isObjectLike,
} from './internals';
export const isError = (value: any) => {
return (
value instanceof Error ||
(typeof value?.message === 'string' &&
value?.constructor &&
typeof value?.construc... |
import { GraphQLClient } from 'graphql-request';
import * as Dom from 'graphql-request/dist/types.dom';
import gql from 'graphql-tag';
export type Maybe<T> = T | null;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [Sub... |
require('module-alias/register')
import express = require('express');
import { createServer } from "http";
import { Server, Socket } from "socket.io";
import { v4 as uuidv4 } from 'uuid';
// import sqlite3 = require('sqlite3');
import Rogue = require('./src/Rogue');
// Local port the server will listen to connections... |
// Copyright 2021 The Oppia Authors. 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 ap... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
// based on https://github.com/redhat-developer/vscode-java/blob/c4cdbed1190fc705c364179dab525645acf03898/src/requirements.ts
import * as fse from "fs-extra";
import { findRuntimes, getRuntime, getSources, IJavaRuntime, JA... |
<reponame>litert/rache.js
// tslint:disable:no-console
import {
IDriver,
AsyncNullable,
CacheBody,
Nullable
} from "../libs";
import { createHub } from "../libs";
class Item {
public _data: Buffer;
public _expiredAt: number;
public constructor(data: Buffer | string, ttl: number) {
... |
<filename>packages/mimir/src/rules/no-uninferred-type-parameter.ts
import { TypedRule, excludeDeclarationFiles } from '@fimbul/ymir';
import * as ts from 'typescript';
const unknownType: CheckType = {
display: 'unknown',
predicate(type) {
return type.kind === ts.SyntaxKind.UnknownKeyword;
},
};
con... |
<reponame>marqu3s/vanhack-interview-practice<filename>src/server/server.ts
/// <reference path="../../typings/index.d.ts" />
/**
* Tutorials used:
* http://www.tamas.io/advanced-chat-using-node-js-and-socket-io-episode-1/
* http://danielnill.com/nodejs-tutorial-with-socketio/
*/
// Functions
var sendFile = funct... |
<reponame>valflorez/taxinomitis
// external dependencies
import syllable = require('syllable');
import nlp = require('compromise');
import nlpnum = require('compromise-numbers');
// local dependencies
import * as store from '../db/store';
import * as Objects from '../db/db-types';
import * as random from '../utils/rand... |
<gh_stars>1-10
main(true);
figma.on('selectionchange', () => {
main();
});
figma.ui.onmessage = message => {
if (message.type === 'anchorPosition') {
figma.root.setPluginData('frameResizerAnchorPosition', message.data.anchor);
}
if (message.type === 'resizeFrame') {
for (const node o... |
import { exchange, masterchefv2 } from 'apollo/client'
import { getAverageBlockTime, getOneDayBlock } from 'apollo/getAverageBlockTime'
import {
liquidityPositionSubsetQuery,
masterchefv2PoolsQuery,
pairSubsetQuery,
pairTimeTravelQuery,
tokenQuery
} from 'apollo/queries'
import { useCallback, useEff... |
import { FieldArrayRenderProps, move, useFormikContext } from 'formik';
import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useDispatch } from 'react-redux';
import styled from 'styled-components';
import { Button, ThemeProvider, Typography } from '@mui/material';
import Ad... |
<filename>src/compat/json_style.ts<gh_stars>0
import { PolygonSymbolizer, LineSymbolizer, LineLabelSymbolizer, TextSymbolizer, exp } from './../symbolizer'
export function filterFn(arr) {
// hack around "$type"
if (arr.includes("$type")) {
return f => true
} else if (arr[0] == "==") {
retu... |
import create, { GetState, SetState } from 'zustand'
import {
deepCompareIntersection,
Display,
DisplayInfoUpdateMessage,
MouseInfoUpdateMessage,
loggerWithPrefix,
SystemInfoUpdateMessage,
WindowFrameName,
WindowInfoRequestMessage,
WindowInfoSetMessage,
WindowInfoUpdateMessage,
WindowIpcTopic,
} ... |
<gh_stars>0
/**
* The goal of this "action runner" is to allow running "locally"
* or in a github action.
*
* Local running writes to stdout
* Github running creates a github check.
*
* And we distinguish between the two by the presence or absence of
* the GITHUB_TOKEN env variable.
*/
const { GITHUB_TOKEN, G... |
<gh_stars>1-10
import { Vec2 } from "../vector";
const { min, max } = Math;
export interface IBoundsOptions {
/** Top left x position */
x?: number;
/** Top left y position */
y?: number;
/** Width covered */
width?: number;
/** height covered */
height?: number;
/** Specify the left */
left?: nu... |
import {
chain,
keyBy,
reject,
partition,
flatten,
map,
property,
} from 'lodash';
import faq from './learn-faq.json';
import caseStudies from './learn-case-studies.json';
import metricExplainers from './metric-explainers.json';
import footer from './footer.json';
import aboutAlerts from './about-our-aler... |
<gh_stars>10-100
import { Matrix, Point, TextureUvs } from "pixi.js";
import { EShapeStrokeStyle } from "../e-shape-stroke-style";
import { toDash } from "./to-dash";
import { toScaleInvariant } from "./to-scale-invariant";
export const BAR_VERTEX_COUNT = 4;
export const BAR_INDEX_COUNT = 2;
const BAR_FMIN: number = 0... |
<gh_stars>0
/**
* An enum containing all the possible reject reasons that can be
* received from a node as a response to a transaction submission.
*
* This should be kept in sync with the list of reject reasons
* found here: https://github.com/Concordium/concordium-base/blob/main/haskell-src/Concordium/Types/Execu... |
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { IExtInfo, SqlService, runTime, BarChartData } from "../../services/sql-service";
import { ActivatedRoute, Router } from '@angular/router';
import { Observable } from 'rxjs';
import {FormControl} from '@angular/forms';
import {MatChipInputEven... |
import { Injectable } from '@angular/core';
import { JsonApiService } from './json-api.service';
import { Observable, of } from 'rxjs';
import { task } from '../models/task.model';
import { ApiService } from './api.service';
import { OfflineService } from './offline.services';
import { switchMap } from 'rxjs/operators'... |
import {Request, Response} from 'express';
import {
GetReservationsCalendarResponse, PostReservationsBody,
PostReservationsResponse, UserReservationsResponse,
DeleteReservationsResponse,
ReservationsResponse
} from '../interfaces/parking-reservation.interfaces';
import {
fetchCalendar, fetchReservations, fetc... |
import { createReducer, on } from '@ngrx/store';
import { NavigationEnd } from '@angular/router';
import BigNumber from 'bignumber.js';
import * as moment from 'moment';
import * as actions from './app.actions';
import { Block } from '@tezblock/interfaces/Block';
import { CurrencyInfo } from '@tezblock/services/crypto... |
/**
* Copyright 2018 <NAME> & Informatica
*
* 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 agre... |
/*
* Copyright (c) 2020 <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, dis... |
import { Graph } from './Class/Graph'
import { Component } from './client/component'
import { Context } from './client/context'
import { IOPointerEvent } from './client/event/pointer'
import { Gamepad } from './client/gamepad'
import { IOElement } from './client/IOElement'
import { Keyboard } from './client/keyboard'
i... |
import atea from "../content/images/logos/atea.svg";
import avo from "../content/images/logos/avo.png";
import bekk from "../content/images/logos/bekk.svg";
import bouvet from "../content/images/logos/bouvet.png";
import capgemini from "../content/images/logos/capgemini.png";
import deloitte from "../content/images/log... |
<reponame>zoulamZero/vis-three
import { BaseEvent, Camera, OrthographicCamera, PerspectiveCamera, WebGLRenderer } from "three";
import { ModelingEngine } from "../../main";
import { RenderEvent, RenderManager } from "../../manager/RenderManager";
import { Compiler, CompilerTarget } from "../../middleware/Compiler";
imp... |
<reponame>dev2alert/node-samp-streamer
import * as amx from "@sa-mp/amx";
import {Group, Player, Position} from "@sa-mp/core";
import {StreamerTypes, DynamicObject, DynamicCP, DynamicRaceCP, DynamicArea, StreamerItem, DynamicActor} from "..";
export interface StreamerUpdateExOptions extends Position {
world?: numb... |
import { Directive, EventEmitter, Input, Output, Pipe, PipeTransform } from "@angular/core";
import { select, Store, createSelector } from "@ngrx/store";
import { uiStateOpenSidePanel, uiStateExpandSidePanel, uiActionShowSidePanelConnectivity } from 'src/services/state/uiState.store.helper'
import { map, tap } from "rx... |
<reponame>ihack2712/texa<filename>src/middleware/static.ts
// Imports
import type { NextFn } from "../deps.ts";
import type { Request } from "../structure/Request.ts";
import type { Response } from "../structure/Response.ts";
import { resolve, join, contentType, extname, Status } from "../deps.ts";
export type Directo... |
import {
common,
Contract,
crypto,
InvalidFormatError,
IOHelper,
Op,
ScriptBuilder,
TriggerType,
UInt160,
VMState,
} from '@neo-one/client-common';
import {
ApplicationEngine,
BlockBase,
BlockchainStorage,
CallFlags,
ECDsaVerifyPrice,
getOpCodePrice,
Notification,
Transaction,
util... |
import React, { useState } from 'react';
import { StyleSheet, View, StatusBar, TouchableOpacity, Text, AsyncStorage, ScrollView, Alert} from 'react-native';
import { useNavigation, useFocusEffect } from 'react-navigation-hooks';
import { MaterialIcons } from '@expo/vector-icons';
import { path } from '../../App';
cons... |
<gh_stars>0
/*
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership.
*
* 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
*
* htt... |
<gh_stars>0
import { db } from './base';
import { firestore } from 'firebase';
import { getSessionStore } from './session';
import { DEFAULT_QUESTION_COLOR, ICarouselGame, ICategory, IQuestion } from 'types/CarouselGame';
let _game: ICarouselGame;
let _baseSubscription: any;
const _subscriptions: { [key: string]: any ... |
import { useCallback, useState } from 'react'
import { useAppSelector, useAppDispatch } from '../../app/hooks'
import {
AvailableRequests,
makePaymentTxn,
requestAuth,
requestCancel,
requestConfirm,
requestLSigs,
requestPrepare,
RequestType,
selectAvailableRequests,
selectCurrentRequest,
selectPa... |
import strip from 'strip-color';
import regEsc from 'escape-string-regexp';
import { logger } from './logger';
// Create/run and remove a Docker container.
import { Container } from './container';
import {
Spec,
isFailStep,
isPassStep,
FailStep,
PassStep,
OutputStep,
PassOrFailStep,
MatchType,
} from '... |
import GulpClient, { series, parallel, src, dest, watch } from 'gulp'
import fs from 'fs'
import babel from 'gulp-babel'
import changed from 'gulp-changed'
import concat from 'gulp-concat'
import sourcemap from 'gulp-sourcemaps'
import imagemin from 'gulp-imagemin'
import postcss from 'gulp-postcss'
import plumber from... |
<filename>test/commands/simple/audit.test.ts
import { stoyle, theme } from '../../../src/dependencies/stoyle.ts';
import { detect as detectEol } from '../../../src/dependencies/fs.ts';
import { assertEquals } from '../../utils/assert.ts';
import {
initializeRepository, deleteRepositories, startTestLogs, endTestLogs,... |
import React, {useEffect, useState} from 'react';
import {useHistory, useParams} from 'react-router-dom';
import {Avatar, Button, Card, Layout, Modal, Skeleton} from 'antd';
import {SettingOutlined, CloseOutlined, RollbackOutlined, ExclamationCircleOutlined} from '@ant-design/icons';
import { getAllAdmins, getUserCityA... |
import { workspace, window, QuickPickItem, DebugConfiguration, WorkspaceFolder } from 'vscode';
import * as cp from 'child_process';
import * as fs from 'fs';
import * as path from 'path';
import { inspect } from 'util';
import * as util from './util';
import { output, Dict } from './extension';
export interface Cargo... |
<filename>src/components/menu.ts
import { HASSDomEvent, HomeAssistant, handleAction, hasAction } from 'custom-card-helpers';
import { CSSResultGroup, LitElement, TemplateResult, html, unsafeCSS } from 'lit';
import { customElement, property, state } from 'lit/decorators.js';
import { classMap } from 'lit/directives/cla... |
<filename>widget/scale.ts
import {
scaleLinear,
ScaleLinear,
scaleLog,
ScaleLogarithmic,
scaleOrdinal,
ScaleOrdinal,
scalePow,
ScalePower,
scaleQuantize,
ScaleQuantize,
ScaleThreshold,
scaleThreshold,
} from "d3-scale";
import type { PickInfo, AccessorFn } from "@deck.gl/core";
import type { Fea... |
import React, { useContext, useState, useEffect, Dispatch, SetStateAction } from 'react';
import Table from 'html-components/Table';
import styled from 'styled-components';
import { $setDownloadError } from 'dispatchers/requestDispatcher';
import { Button, NumberedContents } from '@bcgov-sso/common-react-components';
i... |
import * as React from 'react';
import JqxChart, { IChartProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxchart';
import JqxTabs from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtabs';
export interface IState extends IChartProps {
source2: IChartProps["source"];
xAxis2: IChartProps["xAxis"];
se... |
import { Card } from 'antd'
import axios from 'axios'
import { useEffect, useState } from 'react'
import { useNavigate } from 'react-router'
import HeartIcon from 'src/components/icons/heart.svg'
import { Box } from 'src/components/layout/Box'
import { ScreenContentFrame } from 'src/components/layout/ScreenContentFrame... |
import { APIGatewayEvent, Context, Callback } from 'aws-lambda';
import { MongoClient } from 'mongodb';
import { connectToDB } from './mongo';
import {
DB_NAME,
DB_COLLECTION_DICTIONARY_ENTRIES,
DB_MAX_DOCUMENTS_PER_CALL,
DB_COLLATION_LOCALE_DEFAULT_FOR_INSENSITIVITY,
DB_COLLATION_STRENGTH_FOR_CASE_INSENSITIV... |
<gh_stars>1-10
import {
ParserContext,
OsisXmlNode,
NoteType,
BibleVersion,
Phrase,
PhraseMorphology,
StrongsNumber,
StrongsPhrase,
Footnote,
CrossReference,
LineBreak,
ParagraphBreak,
Highlighting,
OsisXmlTag,
Indentation,
} from './types';
const sax = require('sax');
const DEBUG_OUTPUT... |
import { EventEmitter } from 'events';
export interface Options {
automaticOpen: boolean;
binaryType: BinaryType;
debug: boolean;
maxReconnectInterval: number;
reconnectDecay: number;
reconnectInterval: number;
timeoutInterval: number;
maxReconnectAttempts?: number;
}
const DEFAULT_OPTIONS: Options =... |
<gh_stars>1-10
/*
* Copyright (C) 2019 Toshiba Corporation
* SPDX-License-Identifier: Apache-2.0
*/
import { DAnimation } from "../d-animation";
import { DAnimationBase } from "../d-animation-base";
import { DAnimationTimings } from "../d-animation-timings";
import { isNumber } from "./is-number";
import { UtilDrag... |
import * as React from 'react'
import { TasksFlowChart } from '../src/container'
import { COLOR_ERROR, COLOR_SUCCESS, ITaskGroupType } from '../src/types'
const startTasks: ITaskGroupType = [{
title: 'Task A',
id: 'taskA',
points: 20,
status: 'finished',
dependencies: [],
}, {
title: 'Task B',
id: 'taskB... |
<filename>frontend/src/helpers/util.ts
import { Dayjs } from 'dayjs'
import { NODE_ENV, DATE_FORMAT_API, ERROR } from '../constants'
export const waitForState = (callback, timeout = 500) => {
setTimeout(() => {
callback()
}, timeout)
}
export const routeIsActive = (path: string): boolean => {
cons... |
<filename>lib/audio/WaveAudio.ts<gh_stars>10-100
import { AssetBase } from '../library/AssetBase';
import { AudioManager } from '../managers/AudioManager';
import { ByteArray } from '../utils/ByteArray';
import { BaseAudioChannel } from '../managers/BaseAudioChannel';
import { EventBase } from '../events/EventBase';
/... |
import {ClassComponent, Vnode, VnodeDOM} from 'mithril';
import app from 'flarum/forum/app';
import BrushState from '../states/BrushState';
interface PumpkinCanvasAttrs {
mode: 'color' | 'carve'
brush?: BrushState
image?: string
onchange?: (value: string) => void
}
const IMAGE_WIDTH = 426;
const IMAGE... |
/**
* @license
* Copyright Google Inc. 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 {ParseSourceSpan, ParseSpan, Position} from '@angular/compiler';
import * as ts from 'typescript';
import {Cl... |
import { Component } from '@angular/core';
import * as _ from 'lodash';
import { BSModalContext } from 'single-angular-modal/plugins/bootstrap';
import { DialogRef, ModalComponent, overlayConfigFactory } from 'single-angular-modal';
import { Modal } from 'single-angular-modal/plugins/bootstrap';
import { Observable } ... |
/*
* Copyright (c) 2021-2021.
* Author <NAME> (tada5hi)
* For the full copyright and license information,
* view the LICENSE file that was distributed with this source code.
*/
import {AuthStoreToken} from "@/store/auth";
import {Context} from "@nuxt/types";
import {APIType, useAPI} from "@personalhealthtrain/ui-... |
<reponame>guykr/salto-1
/*
* Copyright 2020 Salto Labs Ltd.
*
* 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... |
<reponame>jupegarnica/faker
import { delay as wait } from "https://deno.land/std@0.130.0/async/mod.ts";
import { serve } from "https://deno.land/std@0.130.0/http/server.ts";
import { CSS, render } from "https://deno.land/x/gfm@0.1.20/mod.ts";
import "https://esm.sh/prismjs@1.27.0/components/prism-http?no-check";
// imp... |
<gh_stars>0
import {
Component,
ElementRef,
HostListener,
OnDestroy,
OnInit,
ViewChild,
} from "@angular/core";
import { Location } from "@angular/common";
import { isNil, reverse } from "lodash";
import { TreeviewItem, TreeviewConfig, TreeviewComponent } from "ngx-treeview";
import { FormBuilder, FormGroup... |
import * as React from 'react'
import { BoldIcon, ItalicIcon, LinkIcon, ListIcon } from '@/components/icons'
import { browserEnv } from '@/env/browser'
import { classNames } from '@/lib/classnames'
import { getSuggestionData, handleUploadFiles } from '@/lib/editor'
import { Switch } from '@headlessui/react'
import Text... |
import React from 'react';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { selectWeatherWeek } from '../../redux/weather/weather.selectors';
import WeatherSmall from '../weather-small/weather-small.component';
import { Weather } from '../../redux/weather/weather.ty... |
import { util } from "../Util/util";
export class MapCollection<K, V> extends Map<K, V> {
private _array!: V[] | null;
private _keyArray!: K[] | null;
public set(key: K, value: V): this {
this._array = null;
this._keyArray = null;
return super.set(key, value);
}
public dele... |
import React, { useMemo } from 'react'
import { View, ViewProps, ViewStyle } from 'react-native'
import { AlignItem, JustifyContent, Spacing, Size, Corner, Direction } from '../types'
import { createStyles } from '../utils/createStyle'
import { isNumber, isString } from '../utils/is'
export type BaseLayoutProps = {
... |
import escapeStringRegexp from "escape-string-regexp";
interface Language {
name: string;
mode: string[];
fileExtensions: string[];
fileNames?: string[];
}
const registeredLanguages: { [simpleName: string]: Language } = {
groovy: {
name: "Groovy",
mode: ["groovy"],
fileExtensions: ["groovy", "gr... |
<filename>src/engine.ts
import { System, TEntityRequirements} from "./system";
import { ENGINE, IEntity, getEntity, IEntityProjection, DELETED_PROPS, TPropKey, ENTITY_ID } from "./entity";
import { SimplifiedSystem, TSystemUpdateMethod } from './simplified-system';
interface IEngineOptions {
// Postpones entity... |
<reponame>christyfernandes/Paathshala
import { ConfigService } from '../../../config/config.service';
import { TelemetryService } from '../../../telemetry/telemetry.service';
import { Component, ElementRef, OnInit, Renderer2, ViewChild, Input, EventEmitter, Output } from '@angular/core';
import { UUID } from 'angular2-... |
<filename>packages/amplify-ui-components/src/common/audio-control/recorder.ts<gh_stars>1-10
import { exportBuffer } from './helper';
import { browserOrNode, Logger } from '@aws-amplify/core';
import {
DEFAULT_EXPORT_SAMPLE_RATE,
FFT_MAX_DECIBELS,
FFT_MIN_DECIBELS,
FFT_SIZE,
FFT_SMOOTHING_TIME_CONSTANT,
} from... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.