text
stringlengths
10
953k
/* tslint:disable */ import { Injectable, Inject, Optional } from '@angular/core'; import { HttpClient, HttpResponse } from '@angular/common/http'; import { SDKModels } from './SDKModels'; import { BaseLoopBackApi } from '../core/base.service'; import { LoopBackConfig } from '../../lb.config'; import { LoopBackAuth } f...
import React, {useEffect} from 'react'; import PropTypes from 'prop-types'; import {ThemeProvider} from '@material-ui/core/styles'; import CssBaseline from '@material-ui/core/CssBaseline'; import {Provider} from "overmind-react"; import {theme} from '../src/Others/Theme'; import {config} from '../src/Overmind/OvermindH...
import * as React from 'react'; import styles from './styles.module.scss'; interface Props { value?: string; onChange?(event: React.FormEvent<HTMLInputElement>): void; className?: string; } const Input: React.FC<Props> = props => { const [val, setVal] = React.useState(props.value); const handleO...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import TabSection from 'containers/TabSection'; import translate from 'translations'; import { signLocalTransactionSucceeded, TSignLocalTransactionSucceeded, signTransactionFailed, TSignTransactionFailed } from 'actions/transaction...
import { DataSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataSyncClient"; import { CancelTaskExecutionRequest, CancelTaskExecutionResponse } from "../models/models_0"; import { deserializeAws_json1_1CancelTaskExecutionCommand, serializeAws_json1_1CancelTaskExecutionCommand, } from ".....
import { Module } from '@nestjs/common'; import { ConfModule } from '../conf.module'; import { EsClientModule } from '../esClient.module'; import CircleciInsightsResolvers from './circleciInsights.resolvers'; import ConfigResolver from './config/config.resolvers'; import DataResolver from './data/data.resolvers'; imp...
import TabScrollButton from './TabScrollButton'; // eslint-disable-next-line import/prefer-default-export export { TabScrollButton };
import { FC, Children, cloneElement, isValidElement } from 'react'; import * as s from './Grid.styles'; export const Grid: FC = ({ children }) => ( <s.Wrapper> {Children.map(children, child => { if (!isValidElement(child)) return null; return ( <s.Cell> {cloneElement(child)} ...
// THIS FILE IS AUTO GENERATED import { IconTree, IconType } from '../lib' export declare const CgBorderStyleDotted: IconType;
import type { Options, Source } from './type' export function hyphenate(str: string): string { return str.replace(/\B([A-Z])/g, '-$1').toLowerCase() } export function checkArray<T extends Array<unknown>>(item: T): T | undefined { return item && item.length ? item : undefined } // eslint-disable-next-line @typesc...
import '@ag-grid-enterprise/row-grouping'; import 'ag-grid-enterprise'; import {SimpleGrid} from "./grid/SimpleGrid"; new SimpleGrid('#myGrid');
import test, { Test } from "tape"; import { PluginHtlcEthBesu } from "../../../main/typescript/public-api"; test("Library can be loaded", (t: Test) => { t.plan(2); t.ok(PluginHtlcEthBesu); t.pass("Test file can be executed"); });
export default function splitByWhiteSpace(value: string): string[] { return value .split(/(\s+)/) .map((s) => s.trim()) .filter((s) => s); }
import { JSONSchema7Type } from "json-schema"; import { z } from "zod"; import { parseArrayDef } from "../../src/parsers/array"; import { References } from "../../src/References"; const deref = require('json-schema-deref-sync') describe("Arrays and array validations", () => { it("should be possible to describe a sim...
export enum KEY_CODE { SPACE = 32, E = 69, ONE = 49, TWO = 50, THREE = 51, FOUR = 52, FIVE = 53 }
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ import { FIELD_ORIGIN } from '../../../common/constants'; import { IVectorSou...
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ import React, { useEffect, useState } from 'react'; import ReactDOM from 'reac...
import React from "react" import { motion, AnimatePresence } from "framer-motion" import useInterval from "../../utils/useInterval" export const AnimateWords = () => { const words = [ " remote freelancer", " digital product designer", " React developer", " frontend developer", " fullstack JavaScri...
import { NgModule } from '@angular/core'; import { ColumnSortModule } from './column-sort/column-sort.module'; import { PagerModule } from './pagination/pager.module'; import { ProgressModule } from './progress/progress.module'; import { ColumnChooserModule } from './colum-chooser/column-chooser.module'; import { Popup...
/* eslint-disable no-plusplus */ /* eslint-disable class-methods-use-this */ class CommonData { public RequestMethod = [ 'get', 'post', 'head', 'put', 'delete', 'connect', 'options', 'trace', ]; public parametersType = { formData: 'formData', body: 'body', header: 'hea...
import { HttpClient } from '@angular/common/http'; import { Component, Input, OnInit } from '@angular/core'; @Component({ selector: 'app-include-content', template: ` <pre><code>{{templateContent}}</code></pre>` }) export class IncludeContentComponent implements OnInit { @Input('src') templateUrl: string;...
import { Extension } from "./Extension"; import { Element } from "./Element"; /** * A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types. */ export interface StructureDefin...
import { zhCN } from "./zh-cn"; import { ILang } from "./interface"; import { enUS } from "./en-us"; // default locale is Chinese export let lang: ILang = zhCN; export function mesonUseZh() { lang = zhCN; } export function mesonUseEn() { lang = enUS; } export function formatString(template: string, data: { [k: ...
export function noNull(s? : string) { return !s ? '' : s; }
export interface JsonStackFrame { columnNumber: number; lineNumber: number; fileName: string; fileContents: string; functionName?: string; args?: any[]; } export interface JsonError { type: string; message: string; stack: JsonStackFrame[]; }
import {Component, Input, ViewChild, NgZone, Inject} from '@angular/core'; import * as moment from 'moment'; import {ModalDirective} from 'ngx-bootstrap'; import {MspImage, MspImageError} from '../../model/msp-image'; import { environment } from '../../../../../environments/environment'; @Component({ selector: 'msp-...
import {AccountInterface} from "./account.interface"; import {Currency} from "../../../../types/currency.type"; export interface UserInterface { "id": number, "fio": string, "name"?: string, "isActive"?: boolean, "isDemo"?: boolean, "cash"?: number, "cash_type"?: Currency, "created_at"?: Date, "upda...
import { addTeaShopSucceeded, addTeaShopFailed, getAllTeaShops, addTeaShopReturn } from "../../actions/teaShopActions"; import { call, put, take } from "redux-saga/effects"; import axios from 'axios'; import { TeaShopActionTypes } from "../../types"; import { endpoint, ITeaShop } from "../../../entities"; export func...
export declare function ensureReduced(item: any): any;
/*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *-------------------------------------------------------------------------...
import createSvgIcon from "@material-ui/icons/utils/createSvgIcon"; import React from "react"; const AccountCircle = createSvgIcon( <> <rect width="24" height="24" fillOpacity="0" /> <rect width="20" height="20" fillOpacity="0" transform="translate(2 2)" /> <rect width="20" height="20" ...
import { Test, TestingModule } from '@nestjs/testing'; import { CoursesController } from '../courses.controller'; import { CoursesService } from '../courses.service'; jest.mock('../courses.service'); describe('Courses Controller', () => { let controller: CoursesController; let service: CoursesService; const use...
import Vue from 'vue'; import Vuex from 'vuex'; import { State, Mutations, Actions } from '@/store/modules/alert'; import faker from 'faker'; import { inject } from 'vuex-smart-module'; Vue.use(Vuex); describe('Alert Vuex Module', () => { let state: State; const build = () => { state = { ...
<?xml version="1.0" ?><!DOCTYPE TS><TS language="el_GR" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About AcesPro</source> <translation type="unfinished"/> </message> <message> <location lin...
import { CommonListOfSpeakersSlideModule } from './common-list-of-speakers-slide.module'; describe(`CommonListOfSpeakersSlideModule`, () => { let commonListOfSpeakersSlideModule: CommonListOfSpeakersSlideModule; beforeEach(() => { commonListOfSpeakersSlideModule = new CommonListOfSpeakersSlideModule()...
import { Typography } from "@material-ui/core"; import AppHeader from "@saleor/components/AppHeader"; import CardSpacer from "@saleor/components/CardSpacer"; import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Container from "@saleor/components/Container"; import Form from "@saleor/c...
import { useEffect, useState } from 'react' import { useDebounce } from 'use-debounce' import { EmptySearch, InfiniteScroll, Spinner, toDigestTag, usePublicLazyQuery, } from '~/components' import { INPUT_DEBOUNCE } from '~/common/enums' import { analytics, mergeConnections } from '~/common/utils' import Se...
import React from 'react'; import NoImage from '../../../../images/no-image.png'; import './Result.css'; type Props = { business: { _id: string; name: string; phone: string; fax: string; streetAddress: string; suburb: string; state: string; postCode: string; reviews: Array<{ ...
import { genPhyllotaxis } from '../src'; describe('generators/genPhyllotaxis', () => { test('it should be defined', () => { expect(genPhyllotaxis).toBeDefined(); }); test('it should return a function', () => { const pointFn = genPhyllotaxis({ radius: 10, width: 200, height: 200, })...
import { Rhum } from "https://deno.land/x/rhum@v1.1.10/mod.ts"; import { hasFileExtension } from "../utils.ts"; Rhum.testPlan("utils.test.ts", () => { Rhum.testSuite("hasFileExtension()", () => { Rhum.testCase("should validate a filename correctly", () => { Rhum.asserts.assertEquals(hasFileExtension("mod.t...
// Welcome to the FourSlash syntax guide! // A line in the source text is indicated by four slashes (////) // Tip: Hit Ctrl-K Ctrl-C Ctrl-K Ctrl-C to prefix-slash any selected block of text in Visual Studio //// This is a line in the source text! // Files are terminated by any entirely blank line (e.g. // interspersed...
/** * @license * Copyright 2019 Dynatrace 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 ag...
import { User } from './user.type'; /** A comment about an entry, submitted by a user */ export interface Comment { id: number /** The SQL ID of this entry */; postedBy: User /** The GitHub user who posted the comment */; createdAt: number /** A timestamp of when the comment was posted */; content: string /** T...
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; const routes: Routes = [ // Static Loading { path: '', redirectTo: '/user', pathMatch: 'full' }, // Lazy Loading { path: 'user', loadChildren: () => import('./user-module/user.module').then(m => m.UserModu...
export const ChevronDoubleLeft = `<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" fill="currentColor" class="bi bi-chevron-double-left" viewBox="0 0 16 16"> <path fill-rule="evenodd" d="M8.354 1.646a.5.5 0 0 1 0 .708L2.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708...
import { useRouter } from 'next/router'; import { useEffect } from 'react'; export default function ScrollToTop() { const { pathname } = useRouter(); useEffect(() => { window.scrollTo(0, 0); }, [pathname]); return null; }
import * as fs from 'fs-extra' import * as path from 'path' import * as CopyWebpackPlugin from 'copy-webpack-plugin' import CssoWebpackPlugin from 'csso-webpack-plugin' import * as MiniCssExtractPlugin from 'mini-css-extract-plugin' import * as sass from 'node-sass' import { partial } from 'lodash' import { mapKeys, p...
import { GridCellMode, GridCellValue } from '../gridCell'; import { GridEditCellProps } from '../gridEditRowModel'; import { GridRowId } from '../gridRows'; export interface GridEditCellPropsParams { id: GridRowId; field: string; props: GridEditCellProps; } export interface GridEditCellValueParams { id: GridR...
/** * This file will automatically be loaded by webpack and run in the "renderer" context. * To learn more about the differences between the "main" and the "renderer" context in * Electron, visit: * * https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes * * By default, Node.j...
/* * Copyright (C) 2015 The Gravitee team (http://gravitee.io) * * 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 requi...
// @module: commonjs // @declaration: true // @filename: server.ts export var a = 10; // @filename: client.ts export import "server";
export const IconSoccerField = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <circle cx="12" cy="12" r="3" /> <path d="M3 9h3v6h-3z" /> <path d="M18 9h3v6h-3z" /> <rect x="3" y="5" width="18" height="14" rx="2" /> <line x1="12" y1="5" x2="1...
import {Directive, ElementRef, Input} from '@angular/core'; import {coerceBooleanProperty} from '../core/coercion/boolean-property'; /** * Used in the `md-tab-group` view to display tab labels. * @docs-private */ @Directive({ selector: '[md-tab-label-wrapper], [mat-tab-label-wrapper]', host: { '[class.mat-...
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ComptabiliteReglementFournisseurComponent } from './comptabilite-reglement-fournisseur.component'; describe('ComptabiliteReglementFournisseurComponent', () => { let component: ComptabiliteReglementFournisseurComponent; let fixture:...
import path from 'path'; import fs from 'fs-extra'; import { esmpack } from '../src'; import { preparePackage } from './npm'; import { getTempDir } from './paths'; // jest.setTimeout(60000); it('should work with xlsx', async done => { const workDir = getTempDir(); await preparePackage(workDir, 'xlsx', '0.14.5'); ...
<TS language="uk" version="2.1"> <context> <name>AddressBookPage</name> <message> <source>Right-click to edit address or label</source> <translation>Клікніть правою кнопкою для редагування адреси чи мітки</translation> </message> <message> <source>Create a new address</source> ...
import Account from "@/account"; import LanguageManager from "@/configurations/language/LanguageManager"; import ScriptAction, { ScriptActionResults } from "@/scripts/actions/ScriptAction"; export default class SaveZaapAction extends ScriptAction { public _name: string = "SaveZaapAction"; public async process(acc...
import io = require('@actions/io'); import exec = require('@actions/exec'); import fs = require('fs'); import path = require('path'); import nock = require('nock'); const toolDir = path.join(__dirname, 'runner', 'tools'); const tempDir = path.join(__dirname, 'runner', 'temp'); const dataDir = path.join(__dirname, 'dat...
GOCAD TSurf 1 HEADER { name: SAFS-SAFZ-SBMT-San_Andreas_fault-CFM4_1000m visible: true *solid*color: 0.650980 0.184314 0.894118 1 name_in_model_list: SAFS-SAFZ-SBMT-San_Andreas_fault-CFM4 } GOCAD_ORIGINAL_COORDINATE_SYSTEM NAME " gocad Local" PROJECTION Unknown DATUM Unknown AXIS_NAME X Y Z AXIS_UNIT m m m ZPOSITIVE ...
#!/usr/bin/env node /** * @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 */ // Must be imported first, because Angular decorators throw on load. import 'reflect-metadata'; ...
import { Connection } from 'jsforce'; import logger from 'logger'; import ContactNotFoundError from 'errors/contact-not-found.error'; import { SFContact, SFDataImportRecord } from 'services/salesforce.interfaces'; import { connect } from './salesforce-connection.service'; import InsertFailedError from '../errors/inse...
import { SIDH, keys, Sha3 } from 'node-sidh'; import { randomFillSync } from 'crypto'; export interface keyPair extends keys{}; export class SikeSig { sidh: SIDH; sha3: Sha3; constructor() { this.sidh = new SIDH(); this.sha3 = new Sha3(); } async createKeyPairB(): Promise<keyPa...
import React from 'react'; import {NextPage} from 'next'; import Link from 'next/link'; import {useSelector, useDispatch} from 'react-redux'; import {State} from '../components/reducer'; import {wrapper} from '../components/store'; export const getStaticProps = wrapper.getStaticProps(async ({store, previewData}) => { ...
import { Injectable } from '@angular/core'; @Injectable() export class PaginationService { // Pagination object pagination: any = {}; // Paged items pagedItems: any[]; constructor() { } calculatePagination(items: any[], page: number): object { if (page < 1 || page > this.pagination.totalPages) { ...
import { Injectable } from '@nestjs/common' import { AES, enc } from 'crypto-js' @Injectable() export class CryptographyService { async encrypt(plainText: string, secret: string) { return AES.encrypt(plainText, secret).toString() } decrypt(encryptedText: string, secret: string) { return AES.decrypt(encr...
import { EMRClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EMRClient"; import { SetVisibleToAllUsersInput } from "../models/models_0"; import { deserializeAws_json1_1SetVisibleToAllUsersCommand, serializeAws_json1_1SetVisibleToAllUsersCommand, } from "../protocols/Aws_json1_1"; import { getS...
import ModelViewerElementBase from '../model-viewer-base.js'; import { Constructor } from '../utilities.js'; /** * Takes a URL to a USDZ file and sets the appropriate fields so that Safari * iOS can intent to their AR Quick Look. */ export declare const openIOSARQuickLook: (usdzSrc: string) => void; /** * Takes a U...
import { Vector3 } from '@math.gl/core'; import { ViewportFrustumPlanes } from '../../../../src/lib/interactivity/viewport-features/geometry/types'; import * as tiles from './tiles.json'; export { name, tiles, viewportFeaturesColumns, viewportFeaturesResult, frustumPlanes }; const name = 'Polygons'; const ...
import { Injectable } from '@angular/core'; import { CanActivate, Router, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; import { LoginService } from './login.service'; @Injectable() export class AuthGuard implements CanActivate { private isLogin: boolean = false; constructor( pr...
/** * Perun RPC API * Perun Remote Procedure Calls Application Programming Interface * * The version of the OpenAPI document: 3.14.0 * Contact: perun@cesnet.cz * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class ...
import { Options } from './options'; import * as request from 'request'; import { DateType } from './dateType'; export class SunnyPortalService { readonly logger: ioBroker.Logger; readonly url: string; readonly username: string; readonly password: string; private plantOID = ''; private jar: re...
describe('hash router', { baseUrl: 'http://localhost:10001' }, () => { it('should render initial route', () => { cy.visit('#/') cy.get('h2').contains('Home').should('exist') }) it('should change hash on route change', () => { cy.visit('#/') cy.get('a').contains('Null').click() cy.hash().shoul...
type ItemsType<V> = Record<string, V | undefined>; export class Registry<V extends string> { private async getItems(): Promise<ItemsType<V>> { return new Promise<Record<string, V>>((resolve, _reject) => { chrome.runtime.sendMessage({ type: "get-registry-items" }, (items) => { resolve(items); ...
import { IComponent } from '@writeaway/core'; import { WriteAwayImageData } from 'types'; import WriteAwayMediumEditor from './WriteAwayMedium'; import ImageTag from './ImageTagEditor'; import BackgroundImageEditor from './BackgroundImageEditor'; import { BlockBackgroundReact } from './BlockBackgroundReact'; import { I...
import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; @Injectable({ providedIn: 'root' }) export class MeasurementFileService { private actionUrl = 'backend/measurements'; constructor(public http: HttpClient) { } private fileToBase64(file: File): Promise<string> { ...
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; import {Hero} from '../hero'; @Component({ selector: 'app-hero-detail', templateUrl: './hero-detail.component.html', styleUrls: ['./hero-detail.component.css'], // inputs: ['hero'], // outputs: ['deleteRequest'] }) export class Her...
import { Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { TypeOrmModule } from '@nestjs/typeorm'; import authConfig from './config/auth.config'; import { TypeOrmConfigService } from './config/typeorm.config'; import { AuthModule } from './auth/auth.module'; import { HabitsModule }...
export class CreateUserDto { name: string; email: string; phone: string; password: string; }
import { withTests } from '@storybook/addon-jest'; import { AppComponent } from '../app/app.component'; import * as results from '../../addon-jest.testresults.json'; export default { title: 'Addon|Jest', decorators: [ withTests({ results, filesExt: '((\\.specs?)|(\\.tests?))?(\\.ts)?$', }), ...
import { FC, memo } from 'react'; import { Icon } from '@mdi/react'; import { mdiMapMarkerOutline } from '@mdi/js'; import { GitHub } from './GitHub'; import '../../../styles/about.css'; export const About: FC = memo(() => ( <> <div className="wrapper text"> <div className="cv-header color-pr...
export { DataSourceProvider, TransformerDataSourceManagerProvider, AppSyncDataSourceType, DataSourceInstance } from './transformer-datasource-provider'; export { TransformerContextOutputProvider } from './transformer-context-output-provider'; export { TransformerProviderRegistry } from './transformer-provider-registry'...
import { Component, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { MenuController, IonSlides } from '@ionic/angular'; import { Storage } from '@ionic/storage'; @Component({ selector: 'page-tutorial', templateUrl: 'tutorial.html', styleUrls: ['./tutorial.scss'], }) export c...
import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { DefaultComponent } from '../../components/default/default.component'; export const DefaultRouter: Routes = [ { path: 'default', component: DefaultComponent }, ]; @NgModule({ imports: [ RouterModul...
import React from 'react'; import { ComponentStory, ComponentMeta } from '@storybook/react'; import ModalPatient, { GET_PATIENT_CURRENT_PATHWAY_QUERY, LOCK_ON_PATHWAY_MUTATION } from 'components/ModalPatient'; import { MockAuthProvider, MockPathwayProvider } from 'test/mocks/mockContext'; import { Default as PreviousDe...
/* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ import { ethers, EventFilter, Signer, BigNumber, BigNumberish, PopulatedTransaction, BaseContract, ContractTransaction, CallOverrides, } from 'ethers' import { BytesLike } from '@ethersproject/bytes' import { Li...
import { defineStore } from 'pinia' import type { Idiom } from './idioms' import { useIdiomsStore } from './idioms' import type { IdiomPinyin } from '@/pinyin' import { charEqual, splitIdiomPinyin, splitTone } from '@/pinyin' export enum GuessResult { NotExists = 0, Exists = 1, CorrectPosition = 2, } export type...
declare module 'quill-markdown-shortcuts'; declare module 'remark'; declare module 'remark-html'; declare module 'remark-highlight.js'; declare module 'remark-breaks'; declare module 'remark-slug'; declare module 'remark-math'; declare module 'remark-rehype'; declare module 'rehype-katex'; declare module 'remark-parse'...
import { OutputChannel, Uri, workspace } from 'vscode' import * as cp from 'child_process'; export interface FileStatus { status: string; uri: Uri; } export interface NodeLogEntry { author: string; message: string; revision: number; date: Date; path: string; } export class Svn { priv...
const sleep = (ms: number): Promise<void> => new Promise(resolve => setTimeout(resolve, ms)); export default sleep;
import React from "react"; import { View } from "react-native"; import { styles } from './styles'; type Props = { isCentered?: boolean; } export function ListDivider({ isCentered }: Props) { return( <View style={[ styles.container, isCentered ? { ...
import './env'; import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; async function bootstrap(): Promise<void> { const app = await NestFactory.create(AppModule, { logger: process.env.NODE_LOG_LEVEL === 'production' ? ['error', 'warn', 'log'] : undefined })...
import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { HomeComponent } from './components/home/home.component'; import { DashboardComponent } from './components/dashboard/dashboard.component'; import { SettingsComponent } from './components/settings/settings.componen...
import {App} from './src/App' const TabView = App export default TabView
import React, { memo, useContext } from 'react'; import { useStoreActions, useStoreState } from '../../store/hooks'; import BaseHandle from './BaseHandle'; import NodeIdContext from '../../contexts/NodeIdContext'; import { HandleType, ElementId, Position, Connection, OnConnectFunc, } from '../../types'; in...
import { Schema } from "mongoose"; export const OpSchema = new Schema({ descripcion: { type: String, require: true }, monto: { type: Number, require: true}, fechaGeneracion: { type: Date, require: true}, saldo: { type: Number, require: true}, idAlumnoxServicioGen: { type: Schema.Types.ObjectId,...
import { isNumber, isValidTelephone } from '../validators' describe('isNumber', () => { it('should run correctly', () => { expect(isNumber('12345')).toBe(true) expect(isNumber('12345a')).toBe(false) }) }) describe('isValidTelephone', () => { it('should return true with valid telephone', () => { cons...
import {Injectable} from '@angular/core'; import {UserDTO, UserRoles} from '../../../../common/entities/UserDTO'; import {BehaviorSubject} from 'rxjs'; import {UserService} from './user.service'; import {LoginCredential} from '../../../../common/entities/LoginCredential'; import {Cookie} from 'ng2-cookies'; import {Con...
import {Router} from 'express'; import {loginController} from '../controller/login.controller'; class LoginRoute{ router : Router; constructor(){ this.router = Router(); this._config(); } _config() : void { this.router.post('/',loginController.login); } } const loginRoute...
import type { Character, Dictionary } from './types'; interface FontDefinition { defs: string[]; codes: number[]; } // calc the valid width of characters const calcCharacterWidth = function (lines: string[]): number { let minLeft = Infinity; let maxRight = -Infinity; lines.forEach(l => { ...
import React, { useState } from "react"; import { Grid, CircularProgress, Typography, Button, TextField } from "@material-ui/core"; import { withRouter, RouteComponentProps } from "react-router-dom"; import useStyles from "./styles"; import loginLogo from "../../images/companyLogo.png"; import { useUserDispatch, loginU...