text
stringlengths
3.3k
33k
<gh_stars>0 import { HttpClient } from '@angular/common/http'; import { Component, NgZone, OnDestroy, OnInit } from '@angular/core'; import { SafeResourceUrl } from '@angular/platform-browser'; import { Store } from '@ngrx/store'; import { combineLatest, interval, Observable, Subscription } from 'rxjs'; import { map, s...
import type { File } from "@babel/core"; import type { NodePath, Visitor } from "@babel/traverse"; import traverse from "@babel/traverse"; import { assignmentExpression, cloneNode, expressionStatement, file as t_file, identifier, variableDeclaration, variableDeclarator, } from "@babel/types"; import type ...
import * as React from 'react'; import { Dom7 } from 'dom7'; import Framework7 from 'framework7'; import { Framework7Plugin } from 'framework7/components/app/app-class'; import { Router } from 'framework7/modules/router/router'; import { Device } from 'framework7/utils/device'; import { Request } from 'framework7/utils...
import SolarSystem from "../main/objects/system"; import Vessel from "../main/objects/vessel"; import { radToDeg } from "../main/libs/math"; import RequiredNumberField from "./NumberField"; import React, {useEffect, useState } from "react"; import Box from "@mui/material/Box"; import InputLabel from '@mui/material/In...
import { maskBr, fakerBr, validateBr } from '../index'; import { expect } from 'chai'; const testGeneric = (key) => { let val = fakerBr[key](); val = val.replace(/[^\d\w]+/g, ''); const valMask = maskBr[key](val); expect(validateBr[key](valMask)).to.be.true; } const testGenericIPTU = (estado, cidade) => { ...
import { and, each, is, isClass, mixins, not, or, validate } from "../index"; class IdClass { @validate(each( is.int(), not.in([3]), is.required(), )) public id: number[]; } class Id2Class { @validate(each( each(is.int(), is.required(), not.doubleEquals(2)), )) public id: number[][]; } cl...
import { Adapter, CallDirection, CallEvent, Channel, Config, Contact, ContactTemplate, ContactUpdate, ServerError, start, } from "@clinq/bridge"; import { AxiosInstance, AxiosResponse } from "axios"; import * as moment from "moment"; import { IPipelinerAccountsGet, IPipelinerAccountsPost, IPip...
<gh_stars>0 /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/ import { logger} from 'vscode-debugadapter'; import { EventEmitter } from 'events'; import { EventMessage, EventMessageType, ...
<reponame>andaag/jupyterlab-lsp import { VirtualDocument } from './document'; import { IOverridesRegistry } from '../magics/overrides'; import { IForeignCodeExtractorsRegistry } from '../extractors/types'; import * as CodeMirror from 'codemirror'; import { IEditorPosition, IRootPosition, ISourcePosition, IVirtu...
import { $TSAny, $TSContext, JSONUtilities, pathManager, SecretFileMode } from 'amplify-cli-core'; const aws = require('aws-sdk'); const fs = require('fs-extra'); const path = require('path'); const ini = require('ini'); const inquirer = require('inquirer'); const constants = require('./constants'); const proxyAgent =...
/* * Deepkit Framework * Copyright (C) 2021 Deepkit UG, <NAME> * * This program is free software: you can redistribute it and/or modify * it under the terms of the MIT License. * * You should have received a copy of the MIT License along with this program. */ import { AfterViewInit, ApplicationRef, ...
import { Component, OnInit } from '@angular/core'; import { AfterViewInit, ViewChild } from '@angular/core'; import { FixasrView, AsrSegment } from '../../models/fixasr-view'; import { FixasrService } from './fixasr.service'; import { VideoComponent } from '../../common/video/video'; import { FixasrUtilities } from './...
/** * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
<reponame>UnumID/acme-demo-verifier-server import { Params } from '@feathersjs/feathers'; import { NoPresentation, Presentation, EncryptedPresentation as EncryptedPresentationDeprecated, PresentationReceiptInfo } from '@unumid/types-deprecated-v1'; import { Service as MikroOrmService } from 'feathers-mikro-orm'; impor...
<reponame>Flouse/hardhat-godwoken-polyjuice import '@babel/polyfill'; import { Script, Hash, utils, HexNumber, HexString } from "@ckb-lumos/base"; import { GodwokenUtils, RawL2Transaction, L2Transaction } from "./godwoken"; import { SerializeL2Transaction, Uint32 } from "./godwoken/schemas"; import { NormalizeL2Trans...
import { EventEmitter2 } from 'eventemitter2'; /** * Represents a generic callback which receives a single TreeNode argument. */ export interface NodeIteratee { (node: TreeNode): any; } /** * Represents a processor for nodes matched during search. */ export interface MatchProcessor { (matches: TreeNodes):...
<filename>src/app/money/storage.service.ts import { HttpClient, HttpErrorResponse } from "@angular/common/http"; import { Injectable } from "@angular/core"; import { gzip, ungzip } from "pako"; import { Observable, of, throwError } from "rxjs"; import { catchError, map, mergeMap, switchMap } from "rxjs/operators"; impo...
import mime from "mime-types"; import React, { useState, useEffect, useRef } from "react"; import ReactDOM from "react-dom"; import styled from "styled-components"; import { useRecoilState, useRecoilValue } from "recoil"; import { Warning } from "@material-ui/icons"; import { animated, useSpring } from "react-spring"; ...
import React, { Dispatch, SetStateAction, useContext, useState } from 'react'; import { uploadImage } from '../../firebase'; import { renameImage } from '../../scripts'; import { fileType, tipsType, userType } from '../../types'; import { UserContext } from '../../UserProvider'; import LoadingIcon from '../icons/Loadin...
import Constants from "expo-constants"; import React from "react"; import { Animated, Easing, StyleSheet, Text, TouchableWithoutFeedback, View, Platform, } from "react-native"; import { connect } from "react-redux"; import { dispatch } from "../rematch/store"; import { useSafeArea } from "react-native-saf...
<gh_stars>10-100 import _ from 'lodash'; import { ChannelConstants, StateVariables, SignedState, Participant, ChannelStoredData, SignedStateWithHash, SignedStateVarsWithHash, StateVariablesWithHash, Funding, SignatureEntry, hashState, calculateChannelId, createSignatureEntry, outcomesEqual }...
<filename>src/MerkleMountainRange.ts import Base from './Base' import SHA256 from 'crypto-js/sha256' // @credit: https://github.com/wanseob/solidity-mmr /** * @desc The index of this MMR implementation starts from 1 not 0. */ export class MerkleMountainRange extends Base { root: Buffer = Buffer.alloc(0) size: nu...
<gh_stars>0 import { preprocess as parse, traverse, AST, WalkerPath } from '../..'; const { test } = QUnit; function traversalEqual(node: AST.Node, expectedTraversal: Array<[string, AST.BaseNode]>) { let actualTraversal: Array<[string, AST.BaseNode]> = []; traverse(node, { All: { enter(node) { ...
/* * Copyright 2022 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 required by applicable ...
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---------------------------------------------------------------...
import { Button, Empty, Layout, Modal, Table } from "antd"; import { TableRowSelection } from "antd/lib/table/interface"; import * as _ from "lodash"; import { observer } from "mobx-react"; import * as React from "react"; import { RouteComponentProps } from "react-router"; import { APIUtils } from "../../api/v1/APIUtil...
import React, { FunctionComponent, ReactNode } from 'react'; import { connect } from 'react-redux'; import { Column, Row } from 'nav-frontend-grid'; import { injectIntl, FormattedMessage, WrappedComponentProps } from 'react-intl'; import { FieldArrayFieldsProps, FieldArrayMetaProps, formValueSelector } from 'redux-form...
<reponame>KMurphs/countdown-timer import model, { getDefaultSprint, Task, TaskStatus, getInvalidSprint } from './model/model' export type TProject = { index: number|null, name: string, key: string } const addProject = (newProject: string): TProject => { let nProjects = Object.keys(model) let projec...
<gh_stars>0 /* eslint-disable @typescript-eslint/no-explicit-any */ import { KeyboardEvent, ReactNode } from 'react'; import { List } from 'immutable'; import { HeaderRowType, UpdateActions } from './enums'; export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>; export type SelectedRow<TRow> = TRow & ...
/** * This file is part of OpenTSDB. * Copyright (C) 2021 Yahoo. * * 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 require...
<filename>addons/xterm-addon-webgl/src/RectangleRenderer.ts /** * Copyright (c) 2018 The xterm.js authors. All rights reserved. * @license MIT */ import { createProgram, expandFloat32Array, PROJECTION_MATRIX, throwIfFalsy } from './WebglUtils'; import { IRenderModel, IWebGLVertexArrayObject, IWebGL2RenderingContext...
<gh_stars>0 import { throwInternalError } from "./common/err.js"; import { JspmError } from "./common/err.js"; import { importedFrom } from "./common/url.js"; import { LatestPackageTarget } from "./install/package.js"; import { pkgToStr } from "./install/package.js"; import { ExactPackage } from "./install/package.js";...
<filename>node_modules/escaya/dist/ast/token.d.ts export declare const enum Token { Type = 255, PrecStart = 8, Precedence = 3840, IsLogical = 16, IsStatementStart = 4096, IsExpressionStart = 8192, IsAutomaticSemicolon = 16384, IsPatternStart = 32768, IsIdentifier = 65536, IsAssig...
import WrapperMessage from '.' import * as Constants from '../../../../constants/chat2' import * as TeamConstants from '../../../../constants/teams' import * as MessageConstants from '../../../../constants/chat2/message' import * as Chat2Gen from '../../../../actions/chat2-gen' import * as ProfileGen from '../../../../...
import { CancellationToken, commands, CompletionContext, CompletionItem, CompletionItemKind, CompletionItemProvider, DocumentSelector, ExtensionContext, extensions, InsertTextFormat, LanguageClient, LanguageClientOptions, languages, NodeModule, Position, ProvideCompletionItemsSignature, ...
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /* eslint-disable no-constant-condition */ /* eslint-disable @typescript-eslint/no-explicit-any */ import XRegExp from 'xregexp'; let _json: string let _pos: number function peekRegex(regex: RegExp) { return XRegExp.exec(_json, regex, _pos, tr...
<filename>core/frontend/src/render/webgl/glsl/Animation.ts /*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *-----------...
/*! otorp (C) 2013-present SheetJS -- http://sheetjs.com */ import { parse_shallow, varint_to_i32, mappa } from "../../../modules/src/proto"; import { u8str, indent } from "../../../modules/src/util"; var TYPES = [ "error", "double", "float", "int64", "uint64", "int32", "fixed64", "fixed32", "bool", "string...
import { AfterViewInit, ChangeDetectorRef, Component, EventEmitter, Output, ViewChild } from '@angular/core'; import { IActionMapping, TreeComponent, TreeNode } from '@circlon/angular-tree-component'; import { take, tap } from 'rxjs/operators'; import { ModelNode } from '~common/_index'; import { setC...
import {t} from '@lingui/macro' import {Trans} from '@lingui/react' import {ActionLink} from 'components/ui/DbLink' import ACTIONS from 'data/ACTIONS' import {CastEvent} from 'fflogs' import Module, {dependency} from 'parser/core/Module' import Checklist, {Requirement, Rule} from 'parser/core/modules/Checklist' import ...
<gh_stars>0 /*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *-------------------------------------------------------------...
<reponame>c4milo/vscode-go /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------*/ import vscode ...
import { AntVSpec } from '@antv/antv-spec'; import { CustomizedCKBJSON, CKBConfig } from '../src/advisor/ckb-config'; import { Advisor } from '../src/advisor'; import { Linter } from '../src/linter'; import { BasicDataPropertyForAdvice, RuleConfig, RuleModule } from '../src/ruler'; import { ChartAdvisor } from '../src/...
import * as ts from "ts-morph"; import { HasParameters } from "."; import { CompilerState } from "../CompilerState"; import { CompilerError, CompilerErrorType } from "../errors/CompilerError"; import { ScriptContext } from "../utility/general"; import { bold, yellow } from "../utility/text"; import { getType, isAnyType...
<reponame>Maxim-Mazurok/cspell<filename>packages/cspell-glob/src/globHelper.ts import * as Path from 'path'; import { GlobPattern, GlobPatternNormalized, GlobPatternWithOptionalRoot, GlobPatternWithRoot, PathInterface, } from './GlobMatcherTypes'; const { posix } = Path; const relRegExp = /^\.[\\/]...
import { Subject, Observable } from 'rxjs'; import { IPC } from '../services/service.electron.ipc'; import { Session } from './session/session'; import { CancelablePromise } from 'chipmunk.client.toolkit'; import SessionsService from '../services/service.sessions.tabs'; import EventsHubService from '../services/standa...
// This expands on overlay-content to allow for the arrows // internally it adds some additional anchors to allow positioning // the arrows on the top or vertical corners, above the content (like tm/bm) // // the "nudge" is generally import { LitElement, svg, html, css, customElement, property } from "lit-element"; im...
<filename>src/vs/editor/contrib/snippet/common/snippet.ts /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *-----...
// Copyright 2015-2021 Swim.inc // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
import { View, ViewProps } from 'react-native'; /** * VideoEncoderConfig details * @property width: number | The encoder video's width * @property height: number | The encoder video's height * @property bitrate: number | The encoder video's bitrate * @property frameRate: number | The frameRate of encoder video ...
<gh_stars>0 import { code as ctWrapperScript } from 'code ./browser/contentScriptWrapper.ts' import { cosmiconfigSync } from 'cosmiconfig' import fs from 'fs-extra' import { JSONPath } from 'jsonpath-plus' import memoize from 'mem' import path, { basename, relative } from 'path' import { EmittedAsset, OutputChunk } fro...
import React, { Component } from 'react'; import { Animated, LayoutChangeEvent, StyleProp, StyleSheet, Text, TouchableOpacity, View, ViewStyle } from 'react-native'; export const shadowStyle = { shadowOpacity: 0.35, shadowOffset: { width: 0, height: 5 }, shadowColor: '#000', shadowRadius: 3, elevat...
import type { ExportNamedDeclaration } from 'estree'; import type { Node } from 'unist'; import type { Processor } from 'unified'; import type { TransformOptions, MdsvexOptions, MdsvexCompileOptions, Layout, Preprocessor, PreprocessorReturn, UnifiedPlugins, LayoutMode, } from './types'; import { join } from '...
import { HttpClient } from '@angular/common/http'; import { tap, catchError, take } from 'rxjs/operators'; import { throwError, Observable } from 'rxjs'; import { applyTransaction, StoreConfigOptions, Store, Query } from '@datorama/akita'; export interface StoreConfig extends Partial<StoreConfigOptions> { /** The un...
<reponame>mykolavorobiov/fundamental-ngx import { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, HostBinding, Input, OnChanges, OnDestroy, OnInit, Optional, Renderer2, SimpleChanges, TemplateRef, ViewChild, ViewContainerR...
/* Copyright 2021 Merck & Co., Inc. Kenilworth, NJ, USA. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the A...
<gh_stars>0 import * as m from 'mithril'; import * as cssauron from 'cssauron'; export const language = cssauron({ tag: (node: any) => { return node.instance ? node.instance.tag : node.tag; }, contents: (node) => { return node.dom.textContent || ''; }, id: (node) => { return...
/* * Copyright (C) 2017-2019 HERE Europe B.V. * Licensed under Apache 2.0, see full license in LICENSE * SPDX-License-Identifier: Apache-2.0 */ import { PoiStackMode, PoiTableDef, PoiTableEntryDef, PoiTableRef, Theme } from "@here/harp-datasource-protocol"; import { composeUrlResolvers, ...
<reponame>LouManglass/mockttp /** * @module Mockttp */ /// <reference path="../../custom-typings/asynciterator.d.ts" /> import * as path from 'path'; import * as fs from '../util/fs'; import * as _ from 'lodash'; import * as express from 'express'; import * as cors from 'cors'; import corsGate = require('cors-gate'...
<filename>src/forms/create_ticket.ts import {Users} from 'node-zendesk'; import Client4 from 'mattermost-redux/client/client4.js'; import {AppField, AppForm, AppCallRequest} from 'mattermost-redux/types/apps'; import {AppFieldTypes} from 'mattermost-redux/constants/apps'; import {makeOptions, makeFormOptions, tryPro...
const DEFAULT_WIDTH = 1280; const DEFAULT_HEIGHT = 800; export default class noteModeMain extends Phaser.Scene { TITLE: Phaser.GameObjects.Text; background: Phaser.GameObjects.TileSprite; esc: Phaser.Input.Keyboard.Key; lvl1: Phaser.GameObjects.Sprite; lvl2: Phaser.GameObjects.Sprite; lvl3: Phaser.GameObj...
<reponame>debugworkbench/hydragon // Copyright (c) 2016 <NAME> // MIT License, see LICENSE file for full terms. import { ipcMain, BrowserWindow } from 'electron'; import * as url from 'url'; import * as path from 'path'; import * as Mocha from 'mocha'; import * as walkDir from 'walkdir'; import { encodeToUriComponent,...
<reponame>jaxmanybs/iieg-mapas-admin-development-iieg-sej-escuela-2021 import { Component, OnInit, OnChanges, Input, SimpleChanges, ViewChild } from '@angular/core'; // import { ChartOptions, ChartType, ChartDataSets } from 'chart.js'; import { Label } from 'ng2-charts'; import { formatDate } from '@angular/common'; im...
import React, {useState, useEffect, useCallback, FC} from 'react'; import {Text, StyleSheet, View, Platform} from 'react-native'; import * as SecureStore from 'expo-secure-store'; import {useTranslation} from 'react-i18next'; import {NavigationProp, RouteProp} from '@react-navigation/native'; import {useExposure} from ...
<gh_stars>0 import { Citation } from 'howsmydriving-utils'; import { CompareNumericStrings } from 'howsmydriving-utils'; import { ICitation } from 'howsmydriving-utils'; import { ICollision, Collision } from 'howsmydriving-utils'; import { CitationIds } from 'howsmydriving-utils'; import { formatPlate } from 'howsmydri...
import { createElement, compile as templateComplier, remove } from '@syncfusion/ej2-base'; import { Smithchart } from '../../smithchart/smithchart'; import { SvgRenderer } from '@syncfusion/ej2-svg-base'; import {SmithchartFontModel, SmithchartBorderModel} from '../../smithchart/utils/utils-model'; import { Animation,...
<filename>desktop/SmesherManager.ts import fs from 'fs'; import path from 'path'; import * as R from 'ramda'; import { app, ipcMain, dialog, BrowserWindow } from 'electron'; import { ipcConsts } from '../app/vars'; import { IPCSmesherStartupData, PostSetupOpts, PostSetupState, PostSetupStatus } from '../shared/types'; ...
<reponame>Jacke/foy import { CliLoading } from './cli-loading' import { Task } from './task' import chalk from 'chalk' import { hashAny, defaults, Is, DefaultLogFile, formatDuration } from './utils' import { Writable, Stream } from 'stream' import { fs } from './fs' import { ShellContext } from './exec' import { logger...
import * as commander from "commander"; import { FaastError, faast, Statistics } from "faastjs"; import * as m from "./map-buckets-module"; import { listAllObjects, f1, GB } from "./util"; // https mode: // Extracted 1223514 files with 8 errors // functionCallDuration $0.00004896/second 30015.6 seconds $1.4...
// all库的声明文件 import './extend'; // draw declare type DrawType = 'normal' | 'animation' | 'stroke' | 'test'; declare type TestStatusType = 'mistake' | 'correct' | 'complete'; declare class Writer { constructor(); option: object; el: HTMLElement; type: DrawType; text: Array<string>; writer: Array...
<gh_stars>0 import { App, Tags, Stack, StackProps, Duration } from 'aws-cdk-lib'; import { AutoScalingGroup } from '@aws-cdk/aws-autoscaling'; import { Construct } from 'constructs'; import cdk = require('@aws-cdk/core'); import * as ec2 from 'aws-cdk-lib/aws-ec2'; import * as ecr from 'aws-cdk-lib/aws-ecr'; import * ...
// Copyright 2019-2022 @polkadot/extension-koni-ui authors & contributors // SPDX-License-Identifier: Apache-2.0 // We _could_ reformat, but just keep it as-is, since this is actually // externally generated and not really user-editable /* eslint-disable react/jsx-sort-props */ /* eslint-disable react/jsx-max-props-p...
/** * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
<filename>utils/util.ts<gh_stars>1-10 import * as Long from "long"; import * as ByteBuffer from "bytebuffer"; import {IComponent} from "../ecs/default_component"; export class CountTimer { public lastTime: number constructor() { this.lastTime = Date.now(); } time(): number { let timeN...
import { LuaArray, tonumber, pairs, LuaObj } from "@wowts/lua"; import { GetTime, TalentId, SpellId } from "@wowts/wow-mock"; import { find } from "@wowts/string"; import { pow } from "@wowts/math"; import { OvaleClass } from "../Ovale"; import { StateModule } from "../engine/state"; import { OvaleAuraClass } from "./A...
const _ = require('underscore') import { property } from 'underscore'; import { deleteCommonAttribute } from '../util/attributeUtil' import { getLookupFields, getMasterDetailObjects, isLookup, isMasterDetail, parseFieldType } from './objectManager' const ROLLBACK_MSG = 'Record rolled back because not all records were...
import WebSocket from 'isomorphic-ws' import { XrpError, XrpErrorType } from '../shared' import { WebSocketReadyState, RippledMethod, WebSocketRequest, SubscribeRequest, AccountLinesRequest, GatewayBalancesRequest, AccountOffersRequest, RipplePathFindRequest, WebSocketResponse, WebSocketFailureRespo...
<reponame>iAziz786/outline-server // Copyright 2018 The Outline Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless ...
import execa, { ExecaSyncReturnValue } from "execa"; import * as path from "../../util/path"; import { Connection, CompletionItemKind } from "vscode-languageserver"; import { URI } from "vscode-uri"; import { IElmPackageCache } from "../elmPackageCache"; import { IClientSettings } from "../../util/settings"; import { E...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for details. import * as nls from "vscode-nls"; import { InternalErrorCode } from "./internalErrorCode"; nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.Bu...
import { HomieDevice, HomieProperty, PropertyDataType } from "@chrispyduck/homie-device"; import { ISensor, ITemperatureAndHumidity } from "@chrispyduck/homie-sensors"; import { promise as GPIO, DIR_OUT } from "rpi-gpio"; import { Sensors } from "../../Sensors"; import { Behavior } from "../Behavior"; import { IBehavio...
<filename>packages/browser-router/src/route.spec.ts import { getSimpluxRouter, SimpluxRoute, SIMPLUX_ROUTE } from '@simplux/router' import { clearAllSimpluxMocks, mockEffect, mockModuleState, mockMutation, mockSelector, } from '@simplux/testing' import { _module } from './module.js' import { _routeEf...
/* eslint-disable @typescript-eslint/ban-ts-comment */ import { HEAP } from "./Global"; import { FS } from "./FS"; import type { FSNode } from "./FSNode"; import type { FSStream } from "./FSStream"; import { abort, logger } from "./utils"; const STACK_ALIGN = 16; function alignMemory(size: number, factor: number) { ...
// Adapted from https://github.com/gorillamania/package.json-validator const PACKAGE_FORMAT = /^[a-zA-Z0-9@/][a-zA-Z0-9@/._-]*$/; const VERSION_FORMAT = /^[0-9]+\.[0-9]+[0-9+a-zA-Z.-]+$/; const URL_FORMAT = /^https*:\/\/[a-z.0-9-]+/; const EMAIL_FORMAT = /\S+@\S+/; function validateType(name:any, field:any, value:any...
import { h, Component, ComponentType } from 'preact' import { BrowserClient, EventHint, Hub, Severity } from '@sentry/browser' import { cleanFalsy, wrapArray } from '~utils/array' import WoopraTracker from './safeWoopra' import { map as mapObject } from '~utils/object' import { isOnfidoHostname } from '~utils/string' ...
<filename>src/typings.d.ts export type CountryName = string; export type Region = | "america" | "europe" | "asia" | "oceania" | "africa" | "north-america" | "south-america" | "central-america" | "caribbean" | "eu-union" | "ex-ussr" | "ex-yugos" | "baltic" | "middle-east" | "north-africa"; /** A 2-lette...
<filename>src/Wrapper.ts import React from 'react'; import PropTypes from 'prop-types'; import utils from './utils'; import { Validations, WrappedComponentClass, RequiredValidation, Value } from './interfaces'; /* eslint-disable react/default-props-match-prop-types */ const convertValidationsToObject = (validations:...
// NITRO System Binary Texture Animation import ArrayBufferSlice from "../ArrayBufferSlice"; import { assert, readString } from "../util"; import { parseResDictGeneric, parseResDict, fx16, fx32, calcTexMtx, TexMtxMode } from "./nsbmd"; import { mat2d, vec2 } from "gl-matrix"; import AnimationController from "../Anima...
/* * The coLAB project * Copyright (C) 2021 AlbaSim, MEI, HEIG-VD, HES-SO * * Licensed under the MIT License */ import { css } from '@emotion/css'; import { faCheck, faEraser, faHourglassStart, faPaperPlane, faPen, faPlus, faSave, faTimes, } from '@fortawesome/free-solid-svg-icons'; import { FontAw...
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow * @emails oncall+draft_js * * This file is a fork of DraftEditorBlock.react.js and DraftEditorContents.react....
<reponame>Brilliant-Labs/bl-bboard-ide enum IRSensor { //% block="left" LEFT = 7, //% block="middle" MIDDLE = 8, //% block="right" RIGHT = 9 } enum IRColour { //% block="black" BLACK, //% block="white" WHITE } enum Motor { //% block="left" LEFT = 0, //% block="right...
<filename>electron/src/setup.ts import type { CapacitorElectronConfig } from '@capacitor-community/electron'; import { CapElectronEventEmitter, CapacitorSplashScreen, setupCapacitorElectronPlugins, } from '@capacitor-community/electron'; import chokidar from 'chokidar'; import type { MenuItemConstructorOptions } ...
import { listenStylesheetChange } from '../../Api/app'; import Storage from '../../Api/storage'; import { CustomTheme, Theme } from '../../Typings/theme'; /** * Detect system theme * @returns {string} */ const detectDefaultTheme = (): string => { if (window.matchMedia && window.matchMedia('(prefers-color-scheme: da...
<filename>packages/client/src/services/calculate-stats.ts import BigNumber from 'bignumber.js'; import { format } from 'date-fns'; import { IUniswapPair, UniswapDailyData, UniswapHourlyData, ILiquidityData, PoolStats, StatsOverTime, TimeWindowStats, LPStats, } from '@sommelier/shared-ty...
import { ceilPow2, MASKS } from "@thi.ng/binary"; import { illegalArgs } from "@thi.ng/errors"; import { fit, fit01, inRange } from "@thi.ng/math"; const MIN = [0, 0, 0]; const MAX = [1, 1, 1]; export const encode5 = (x: number) => { x &= 0x0000001f; x = (x * 0x01041041) & 0x10204081; x = (x * 0x00108421)...
import { Injectable, OnDestroy } from '@angular/core'; import { XmSessionService } from '@xm-ngx/core'; import { XmUserService } from '@xm-ngx/core/user'; import { OnInitialize } from '@xm-ngx/shared/interfaces'; import { takeUntilOnDestroy, takeUntilOnDestroyDestroy } from '@xm-ngx/shared/operators'; import { XmToaste...
import { botState, PixelToPlace } from '../store/botState'; import { overlayStore } from '../store/overlayStore'; import logger from '../handlers/logger'; import { gameStore } from '../store/gameStore'; import { updateMetadata, loadChunkData } from './pixelData'; import { pixelToChunk, chunkToIndex, pixelInChunkOffset,...
<reponame>Ayub-Begimkulov/react-transition import React, { Children, cloneElement, useCallback, useContext, useLayoutEffect, useRef, useState, } from "react"; import { __DEV__ } from "./constants"; import { TransitionGroupContext } from "./context"; import { useIsMounted, useLatest, usePrevious } from "./...
<reponame>Xunnamius/next-test-endpoint /* eslint-disable jest/no-conditional-in-test, jest/no-conditional-expect */ import debugFactory from 'debug'; import stripAnsi from 'strip-ansi'; import { satisfies as satisfiesRange } from 'semver'; import { name as pkgName, version as pkgVersion, main as pkgMain } from 'packag...
<filename>js-core/src/core/ThreshApp.ts<gh_stars>1-10 /** * MIT License * * Copyright (c) 2020 ManBang Group * 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, includi...