text
stringlengths
10
953k
import { IsString } from "class-validator"; import { CommentRO } from "src/comment/dto/comment.dto"; import { UserRO } from "src/user/dto/user.dto"; export class IdeaDTO { @IsString() idea: string; @IsString() description: string; } export interface IdeaRO { id: string; idea: string; desc...
import {InjectDefineSymbol} from "../decorators/decorators"; import {Define} from "../define/define"; export class Util { public static getClassName(fn: Function): string { return fn.name.charAt(0).toLowerCase() + fn.name.slice(1) } public static isUndefined(value: any): boolean { return t...
/** * @file GitHub1s Token Related Commands * @author netcon */ import * as vscode from 'vscode'; import { getExtensionContext } from '@/helpers/context'; import { validateToken } from '@/interfaces/github-api-rest'; export const commandValidateToken = (silent: boolean = false) => { const context = getExtensionCo...
import { RailCardModel } from './railcard.model'; export class SearchRequestModel { locfrom: any; locto: any; PathConstraintType:string; PathConstraintLocation:any; DepartureLocationName: String; ArrivalLocationName: String; openreturn: string; isseasonticket: string; oneway: string...
function test_add() { $("p").add("div").addClass("widget"); var pdiv = $("p").add("div"); $('li').add('p').css('background-color', 'red'); $('li').add(document.getElementsByTagName('p')[0]) .css('background-coailor', 'red'); $('li').add('<p id="new">new paragraph</p>') .css('background-...
import { CodedError, ErrorCode } from './CodedError'; type StatusCode = 400 | 403 | 404 | 500 | 503; export class HTTPError extends CodedError { public readonly expose: boolean; public readonly status: number; public readonly statusCode: number; public constructor(statusCode: StatusCode, errorCode: keyof type...
import React from 'react'; import classNames from 'classnames'; import isNumber from 'lodash/isNumber'; import isString from 'lodash/isString'; import { useLocale } from '@gio-design/utils'; import defaultLocaleTextObject from './locales/zh-CN'; import { FormLabelAlign, RequiredMark } from './context'; export interfac...
import { BOOLEAN, DROPDOWN, NUMBER, STRING, EXAMPLE_DROPDOWN, POLY_POSITION, } from '../../variables/valueTypes'; /** * The value-type of a FisaAttribute */ export type ValueType = boolean | number | string | PolygonI; export type PolygonI = PointI[]; export type PointI = [number, number]; /** * The d...
import { TestBed } from '@angular/core/testing'; import { ImageService } from './image.service'; describe('ImageService', () => { let service: ImageService; beforeEach(() => { TestBed.configureTestingModule({}); service = TestBed.inject(ImageService); }); it('should be created', () => { expect(s...
import { createContext } from 'react' interface BedTokenMarketDataValues { prices?: number[][] hourlyPrices?: number[][] marketcaps?: number[][] volumes?: number[][] latestPrice?: number latestMarketCap?: number latestVolume?: number } const BedMarketData = createContext<BedTokenMarketDataValues>({}) e...
export * from './lib/action-type-cache'; export * from './lib/incremantal-http-retry';
import * as THREE from 'three'; import Curtain from './curtain'; import { CallbackSet } from './helpers'; import { Coordinate } from './inputs/definitions'; import { KeyboardMouseInputs } from './inputs/keyboard-mouse-inputs'; import { TouchInputs } from './inputs/touch-inputs'; export const LayerDefinitions = { d...
import { CronJob } from 'cron' export class TaskScheduler { private readonly jobs: CronJob[] = [] private errorHandler: (error: Error) => void = () => {} public schedule ( cronPattern: string, functionToSchedule: Function, isAsyncFunction: boolean ): void { const job = new CronJob( cronP...
export interface ICryptoCurrencyDto { id: string; name: string; symbol: string; price: number; icon?: string; lastUpdated: number; }
import React, { useState } from 'react'; import PageTitle from '../../components/vendors/Typography/PageTitle'; import CTA from '../../components/vendors/CTA'; import { Modal, ModalHeader, ModalBody, ModalFooter, Button } from '@windmill/react-ui'; function Modals() { const [isModalOpen, setIsModalOpen] = useState(fa...
import { GetSavedShowsResponse } from '../../types/SpotifyResponses'; export const getSavedShowsFixture: GetSavedShowsResponse = { href: 'https://api.spotify.com/v1/me/shows?offset=0&limit=2', items: [ { added_at: '2020-04-20T02:13:04Z', show: { available_markets: [ 'AR', ...
import { TestCase, HttpResult } from '../../../../../test_runners/models' import s1 from '../setups/s01' const setups = [s1] const c: TestCase = { description: '1. Set key with key too long', setups, config: function (this: TestCase) { const result = s1.result as HttpResult const data = result.data ...
import type { DIconProps } from '../Icon'; import { FileDoneOutlined as AntIcon } from '@ant-design/icons-svg'; import { DIcon } from '../Icon'; export function FileDoneOutlined(props: Omit<DIconProps, 'dIcon'>) { return <DIcon {...props} dIcon={AntIcon} />; }
import React from 'react'; interface IProps { condition: boolean; children: React.ReactElement; else?: React.ReactElement | null | undefined; } function If({ children, condition, else: elseElement = null }: IProps): JSX.Element | null { if (condition) { return children; } return elseElement; } expor...
import { forwardRef } from 'react'; import tw from 'twin.macro'; import { DivHTMLAttributes } from '../../types'; /** * Card Content */ export const CardContent = forwardRef<HTMLDivElement, DivHTMLAttributes>(function CardContent( props, forwardedRef ) { return <div {...props} css={tw`py-3 px-4`} ref={forward...
/** * This file includes polyfills needed by Angular and is loaded before the app. * You can add your own extra polyfills to this file. * * This file is divided into 2 sections: * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. * 2. Application imports. Files imported...
import { AppPage } from './app.po'; describe('workspace-project App', () => { let page: AppPage; beforeEach(() => { page = new AppPage(); }); it('should display welcome message', () => { page.navigateTo(); expect(page.getParagraphText()).toEqual('Welcome to stores-project!'); }); });
import { Match, Template } from '@aws-cdk/assertions'; import * as cloudwatch from '@aws-cdk/aws-cloudwatch'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; import * as kinesis from '@aws-cdk/aws-kinesis'; import * as kms from '@aws-cdk/aws-kms'; import * as cdk from '@aws-cdk/core'; ...
import { FC } from 'react' import Link from 'next/link' import type { Product } from '@commerce/types' import { Grid } from '@components/ui' import { ProductCard } from '@components/product' import s from './HomeAllProductsGrid.module.css' import { getCategoryPath, getDesignerPath } from '@lib/search' interface Props ...
import React, { Fragment } from 'react'; import SVG from 'react-inlinesvg'; import { useStaticQuery, graphql } from "gatsby"; import Icon1 from '../../../assets/undraw_tabs.svg'; import Icon2 from '../../../assets/together.svg'; import { ExpandedFeatureSection, ExpandedFeatureSectionWhite, GenericContainer, ExpandedIn...
import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { HttpClient } from '@angular/common/http'; import { Router } from '@angular/router'; import { StoryAlertService } from 'src/app/alert.service'; import { map } from 'rxjs/operators'; import {...
/** Component exports */ export { Button, ButtonGroup } from './Button' export type { ButtonGroupProps } from './Button' export { Alert, AlertLink } from './Alert' export { Container } from './Container' export { Checkbox, FlexTextArea, Input, RadioButton, Select, MultiSelect, TextArea } from './Form' export { Grid } f...
import {lockUi, PmDispatch, usrError} from "pm-ui/store" const onJsonResponse = <T>(response: Response, d: PmDispatch): Promise<T> => { return response.json().then((jData) => { if (!response.ok) { throw jData } return jData as T }).catch((err) => { d(usrError(err)) throw err }).finally(() => d(lo...
import { EmailService } from './email.service'; describe('EmailService', () => { let emailsService: EmailService; beforeEach(() => { emailsService = new EmailService(); }); it('isValid returns true (email is valid)', () => { expect(emailsService.isValid('test@test.com')).toBe(true); ...
import { storiesOf } from '@storybook/angular'; import { boolean, text, number } from '@storybook/addon-knobs'; import { McTextareaModule, McFormFieldModule } from '@ptsecurity/mosaic'; import { FormsModule } from '@angular/forms'; storiesOf('Form Controls|Textarea', module) .add('textarea', () => ({ templ...
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { UIDependModule } from '../../uidepend.module'; import { TranslateModule, TranslateLoader, TranslateService } from '@ngx-translate/core'; import { HttpClient } from '@angular/common/http'; import { HttpClientTestingModule, HttpTestingCont...
/* tslint:disable */ export { ApiResponse } from './api-response.model'; export { Category } from './category.model'; export { Order } from './order.model'; export { Pet } from './pet.model'; export { Tag } from './tag.model'; export { User } from './user.model';
// Auto-generated. Do not edit. declare const enum Pins { P0 = 3, P1 = 2, P2 = 1, P3 = 4, P4 = 5, P5 = 17, P6 = 12, P7 = 11, P8 = 18, P9 = 10, P10 = 6, P11 = 26, P12 = 20, P13 = 23, P14 = 22, P15 = 21, P16 = 16, P19 = 0, P20 = 30, } ...
import { Component, Element, h, Host, Prop } from '@stencil/core'; import { TextCursor as LucideTextCursor, createElement } from 'lucide'; import { attributesToObject } from '../utils/utils'; @Component({ tag: 'icon-text-cursor' }) export class IconTextCursor { @Element() el: any; @Prop({ attribute: 'alignment-...
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { ProgressBarService } from './shared'; import { ProgressBarComponent } from './progress-bar.component'; export { ProgressBarService } from './shared'; @NgModule({ imports: [ CommonModule ], exports: [ Prog...
import PageTitle, { Paragraph } from '@/components/layout/elements' import type { NextPage } from 'next' import { useSession } from "next-auth/react" const Dashboard: NextPage = () => { const { data: session } = useSession() if(session) { return ( <> <PageTitle>Dashboard</PageTitle> <Par...
export * from './validation-error';
import React, {Component, ReactNode} from 'react'; export interface IOpenLocalFileProps { readonly accept?: string; openFile?(file: File): void; } export class OpenLocalFile extends Component<IOpenLocalFileProps> { render(): ReactNode { const {children, accept, openFile} = this.props; ...
import { CollectionCache, CollectionKey } from "../../../common"; export namespace FirstPersonEngines { export const KEY = new CollectionKey("first_person_engines"); export class Entry { private readonly collectionCache: CollectionCache; readonly key: string; readonly reloadTime: number; readonl...
export const environment = { production: false, applicationContextName: "tournamentBracketApp", baseUrl: "", useUrlRouting: true };
/* eslint-disable */ import { ObjectIdentifier as _OID, OBJECT_IDENTIFIER } from "asn1-ts"; import { pkcs_9 } from "../PKCS-9/pkcs-9.va"; export { pkcs_9 } from "../PKCS-9/pkcs-9.va"; /* START_OF_SYMBOL_DEFINITION crlTypes */ /** * @summary crlTypes * @description * * ### ASN.1 Definition: * * ```asn1 * crlType...
// Copyright 2020 The Nakama 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 required by applicable law or agreed to ...
import { Injectable } from '@angular/core'; import { Http, Headers, RequestOptions, XHRBackend, Response, ResponseContentType } from '@angular/http'; import { Observable } from 'rxjs/Rx'; import 'rxjs/add/operator/map'; import { CookieService } from 'angular2-cookie/core'; import { environment } from '../../environment...
import React, { useContext } from 'react'; import styled, { ThemeContext } from 'styled-components'; interface SpacerProps { size?: 'sm' | 'md' | 'lg'; } export const Spacer: React.FC<SpacerProps> = React.memo(({ size = 'md' }) => { const { spacing } = useContext(ThemeContext); let s: number; switch (size) {...
import { Request, Response, NextFunction } from 'express'; export function createDefaultGetAuthorizedUser() { return (req: Request, res: Response, next: NextFunction) => { req.getAuthorizedUser = () => { throw new Error( 'Default getAuthorizedUser() request method should not be called! Did you forg...
import { CloudDirectoryClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudDirectoryClient"; import { ListDirectoriesRequest, ListDirectoriesResponse } from "../models/models_0"; import { deserializeAws_restJson1ListDirectoriesCommand, serializeAws_restJson1ListDirectoriesCommand, } from ".....
interface AlertProps { title: string description?: string alternative1?: string alternative1Function?: () => void alternative2?: string alternative2Function?: () => void } export default AlertProps
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; /** * Use this data source to get the HostedZoneId of the AWS Elastic Load Balancing HostedZoneId * in ...
version https://git-lfs.github.com/spec/v1 oid sha256:e8c5f3a4a1356032e85b6a0835ccf6e002c46e6e8f87949c402f117d2a486d05 size 862
import axios from 'axios' const api = axios.create({ baseURL: 'http://192.168.1.9:3333' }) export default api
import { Helper } from 'dojo-cli/interfaces'; import { Yargs } from 'yargs'; export default function(helper: Helper): Yargs { helper.yargs.option('d', { alias: 'directory', describe: 'typings directory', default: '.' }); return helper.yargs; }
import React from "react"; import Link from "next/link"; import styled from "styled-components"; import SvgButton from "../button/SvgButton"; import HamburgerIcon from "../svg/icon/HamburgerIcon"; import LymphedemaCenterLogo from "../svg/brand/LymphedemaCenterLogo"; import { scrollToTop } from "../helpers"; const Cont...
import {AXIS_COMPONENT_PROPERTIES} from '../src/compile/axis/component'; describe('axis', () => { describe('VG_AXIS_PROPERTIES', () => { it('should have disable, gridScale, scale, and orient as the first items', () => { expect(AXIS_COMPONENT_PROPERTIES[0]).toBe('disable'); expect(AXIS_COMPONENT_PROPE...
/** * TODO * * node-forge AES encrypt/decrypt has a bug with UTF8 (it seems) * so for the moment we use AES implementation by crypto-js.... * * also payloads are way too much JSON parsed and stringified, so performance is very bad */ let hash = require('hash.js') let cryptojs = require('crypto-js') import * a...
import { botDetector, RequestWithBotDetector } from '../../packages/bot-detector/src' import { makeFetch } from 'supertest-fetch' import { Response } from '../../packages/app/src' import http from 'http' function createServer() { const _detector = botDetector() return http.createServer((req: RequestWithBotDetector...
import { StyleSheet, YellowBox } from 'react-native'; const styles = StyleSheet.create({ cardContainer: { flexDirection: 'row', justifyContent: "center", marginBottom: 15 }, topBar: { height: 30, width: 5000, }, month:{ flexDirection: 'row', ...
import RelativeTimeFormat from './'; import {shouldPolyfill} from './should-polyfill'; if (shouldPolyfill()) { Object.defineProperty(Intl, 'RelativeTimeFormat', { value: RelativeTimeFormat, writable: true, enumerable: false, configurable: true, }); }
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs, enums } from "../../types"; import * as utilities from "../../utilities"; /*...
// This file should be used to add new config variables or overwrite defaults from config-default.ts import { AppConfigCustom } from './config-types'; const configCustom: AppConfigCustom = { browse: { curatedTags: [], showAllTags: true, }, google: { enabled: false, key: 'default-key', sample...
// tslint:disable:nx-enforce-module-boundaries /* eslint-disable nx-enforce-module-boundaries */ import { coerceObservableWith } from '@rx-angular/cdk/coercing'; import { jestMatcher, mockConsole } from '@test-helpers'; import { of } from 'rxjs'; import { TestScheduler } from 'rxjs/testing'; describe('coerceObservable...
/** * Team Validator * Pokemon Showdown - http://pokemonshowdown.com/ * * Handles team validation, and specifically learnset checking. * * @license MIT */ import {Dex, toID} from './dex'; import {Utils} from '../lib'; /** * Describes a possible way to get a pokemon. Is not exhaustive! * sourcesBefore covers ...
import { StoreReducer } from '@mydiem/diem-forms'; import { SiteStore } from '../../site/site.store'; export const MainReducers: any = { coverage: StoreReducer, siteStore: SiteStore, };
/* * Copyright 2015 Palantir Technologies, Inc. All rights reserved. * Licensed under the terms of the LICENSE file distributed with this project. */ import "@blueprintjs/test-commons/bootstrap"; import "./alert/alertTests"; import "./breadcrumbs/breadcrumbTests"; import "./buttons/buttonTests"; import "./callout/...
import * as React from 'react'; import { useTranslation } from 'react-i18next'; import { SectionHeading, ResourceSummary } from '@console/internal/components/utils'; import { TaskModel } from '../../models'; import { TaskKind } from '../../types'; import WorkspaceDefinitionList from '../shared/workspaces/WorkspaceDefin...
import { useEffect, useReducer } from 'react'; import assert from 'assert'; const pageLoadTime = new Date(); const globalCache: Map<any, any> = new Map(); class FetchLoopListener<T = any> { cacheKey: any; fn: () => Promise<T>; refreshInterval: number; refreshIntervalOnError: number | null; callback: () =>...
import { Component, Prop, h } from '@stencil/core' import svgIcon from '../../../icons/local-hospital.svg' /** * WARNING: This is an autogenerated component. * Do not make any changes to this file or they will be overwritten on build. * The template for this file is located in the generate-icons.js util...
import { Component, ContentChild, ContentChildren, forwardRef, Host, HostBinding, Input, Optional, QueryList, Self, SkipSelf, ViewEncapsulation, ElementRef, Renderer2, } from '@angular/core'; import { ControlValueAccessor, FormGroupDirective, NgControl } from '@angular/forms'; import { LgDo...
export * from './useIsoMorphicLayoutEffect' export * from './useOutsideClick' export * from './useResponsive'
import {ThymeleafLibrary} from "enonic-types/lib/thymeleaf"; import {pipe} from "fp-ts/lib/pipeable"; import {getContent} from "enonic-fp/lib/portal"; import { fold, map, chain } from "fp-ts/lib/IOEither"; import {errorResponse, ok} from "enonic-wizardry/lib/controller"; import {Content} from "enonic-types/lib/content"...
import { MediaSchema } from 'aejo' import { Schema } from '../../../models/scan_logs' export const scanLogResponse: MediaSchema = { description: 'OK', content: { 'application/json': { schema: { type: 'object', properties: Schema, }, }, }, }
import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { ErrorHandler, NgModule, Provider } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { LayoutModule } from '@angular/cdk/layou...
import React, { useState } from 'react' import { Meta, Story } from '@storybook/react/types-6-0' import { createGlobalStyle, ThemeProvider } from 'styled-components' import { Button } from '../components/Button' import { Dialog } from '../components/Dialog' import { DefaultTheme } from '../theme' export default { ti...
import React, { RefObject } from "react"; import { createPopper } from "@popperjs/core"; const NotificationDropdown = () => { // dropdown props const [dropdownPopoverShow, setDropdownPopoverShow] = React.useState(false); const btnDropdownRef = React.createRef() as RefObject<HTMLAnchorElement>; const popoverDro...
import React from 'react'; import { Col } from 'antd'; import styled from 'styled-components'; import { device, size } from '@src/breakpoints'; import { MarketText } from '@styledComponents'; interface Props { imgURL: string; alt: string; } export const Wrapper = styled.div` background-color: #181e26; justify...
import { IQueueItem } from './interfaces'; type MaybeError = Error | undefined; const NUMBER = /\d+/; const enum QueueItemPosition { target, method, args, stack } export const TIMERS_OFFSET = 6; export function isCoercableNumber(suspect) { let type = typeof suspect; return type === 'number' && suspect ...
/** * Generated bundle index. Do not edit. */ export * from './public-api'; export { AutocompleteAutoActiveFirstOptionExample as ɵa } from './autocomplete-auto-active-first-option/autocomplete-auto-active-first-option-example'; export { AutocompleteDisplayExample as ɵb } from './autocomplete-display/autocomplete-disp...
import express = require("express"); import _ = require("lodash"); import * as React from "react"; import {AbstractSkeletosState, UrlUtils} from "../../core"; import {AbstractReactExpressRenderAction} from "../../react-express"; import {AbstractRootRouteState} from "../../web-router"; import {HammerpackWebserviceUtil} ...
import { cleanup } from '@testing-library/react'; import { renderHook } from '@testing-library/react-hooks'; import { useAPIRequest } from './useAPIRequest'; const mockError = [{ reason: 'An error occurred.' }]; const mockRequestSuccess = (): Promise<number> => new Promise(resolve => resolve(1)); const mockRequest...
// TODO: Very hard to fix this file without making massive changes /* eslint-disable complexity */ import { Component, ElementRef, EventEmitter, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { combineLatest, concat, forkJoin, from, iif, noop, Observable, of,...
import { directions } from "@/plugin/utils/types.interface"; export type dropdown_theme = | "auto" | "light" | "dark" | "invert" | "transparent"; export interface dropdown_config { contain: boolean; flow: directions; outline: boolean; theme: dropdown_theme; }
import { getSerdePlugin } from "@aws-sdk/middleware-serde"; import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { FinalizeHandlerArguments, Handler, HandlerExecutionContext, HttpHandlerOptions...
import React, { useState, FormEvent } from 'react'; import {useHistory} from 'react-router-dom'; import api from '../../services/api'; import Header from '../../components/Header'; import Input from '../../components/Input'; import warningIcon from '../../assets/images/icons/warning.svg'; import Textarea from '../../c...
import * as getCommitInfo from '../git/getCommitAndBranch'; import * as git from '../git/git'; import { setGitInfo } from './gitInfo'; jest.mock('../git/getCommitAndBranch'); jest.mock('../git/git'); const getCommitAndBranch = <jest.MockedFunction<typeof getCommitInfo.default>>getCommitInfo.default; const getBaseline...
import 'typeface-alegreya' import 'typeface-fira-mono' import 'typeface-nunito' import _ from 'lodash' import fp from 'lodash/fp' import Typography from 'typography' import { colors } from '../styles/Theme' const sansSerifFontFamilies = [ 'Nunito', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto'...
/// <reference path="../../references.d.ts" /> /// <reference path="./platforms/ios/typings/objc!GoogleMapsBase.d.ts" /> /// <reference path="./platforms/ios/typings/objc!GoogleMaps.d.ts" /> /// <reference path="./platforms/android/typings/GoogleMaps.d.ts" />
import { GraphQLSchema, getOperationRootType, getOperationAST, Kind, GraphQLObjectType, FieldNode, GraphQLOutputType, isListType, getNullableType, isAbstractType, isObjectType, OperationDefinitionNode, GraphQLError, TypeNameMetaFieldDef, } from 'graphql'; import { Request, GraphQLExecutionC...
export { default as SharpRepeatOne } from './Icon';
import { mocked } from 'jest-mock'; import RedisShim from '../../../lib/redis/redis-shim'; import Client from '../../../lib/client'; jest.mock('../../../lib/redis/redis-shim'); beforeEach(() => mocked(RedisShim).mockReset()); describe("Client", () => { let client: Client; let result: { [key: string]: string }...
import React from 'react'; import { LinearGradient } from 'expo-linear-gradient'; import { View, Text } from 'react-native'; import { styles } from './styles'; import { theme } from '../../global/styles/theme'; interface BackgroundProps { children: React.ReactNode; } function Background({ children }: BackgroundPr...
import React, { ChangeEventHandler, useCallback, useContext, useRef, useState } from "react"; import styled from "styled-components"; import TileEditor from "../../molecules/TileEditor"; import { ReactComponent as PenTool } from "../../atoms/PenTool.svg"; import { ReactComponent as EraseTool } from "../../atoms/EraseT...
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm'; import { FotoEntity } from '../Fotos/foto.entity'; @Entity('web_ramos_usuario') export class UsuarioEntity { @PrimaryGeneratedColumn() id: number; @Column({length: 50}) nombre: string; @OneToMany(type => FotoEntity, fotoEntity => fo...
/* .. : . . . . . . . . .. . . * * . .. . . . . : . . . . ...
import { browser, element, by } from 'protractor/globals'; export class Angular2MasterClassAppPage { navigateTo() { return browser.get('/'); } getParagraphText() { return element(by.css('app-root h1')).getText(); } }
import type { DependencySource } from '../policy/variant-policy/variant-policy'; export type DependencyLifecycleType = 'runtime' | 'dev' | 'peer'; export interface SerializedDependency { id: string; version: string; __type: string; lifecycle: string; source?: DependencySource; } /** * Allowed values are v...
import { Injectable } from '@angular/core'; import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router'; import { Observable, of } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; import { UsersService } from './users.service'; @Injectable({ providedIn: 'root' }) ...
import React from 'react'; import Link from 'next/link'; import Layout from '../components/Layout'; export default () => ( <Layout title='Home | Next.js + TypeScript Example'> <h1>Hello Next.js 👋</h1> <p><Link href='/about' as='/!/about'><a>About</a></Link></p> </Layout> );
import fetch from 'isomorphic-fetch'; import { ThunkAction as ReduxThunkAction } from 'redux-thunk'; import url from 'url'; import { getCrateType, isAutoBuildSelector, runAsTest } from './selectors'; import State from './state'; import { AssemblyFlavor, Backtrace, Channel, DemangleAssembly, Edition, Editor...
import { Comments, CommentsSchema } from './schemas/comment.schemas'; import { Module } from '@nestjs/common'; import { CommentsService } from './comments.service'; import { CommentsController } from './comments.controller'; import { MongooseModule } from '@nestjs/mongoose'; @Module({ imports: [ MongooseModule.f...
import "./App.scss"; import { ethers } from "ethers"; import React, { useEffect, useState } from "react"; import Web3 from "web3"; import Web3Modal from "web3modal"; import NFT from "./artifacts/contracts/NFT.sol/NFT.json"; const TWITTER_HANDLE = "_buildspace"; const TWITTER_LINK = `https://twitter.com/${TWITTER_HANDL...
import { test, readInput } from "../utils/index" const prepareInput = (rawInput: string) => rawInput const input = prepareInput(readInput()) interface Position { x: number; y: number; } const countOfOneBits = (binary: string): number => { let count = 0 for (let i = 0; i < binary.length; i++) { if (bina...