text stringlengths 10 953k |
|---|
import MappingConstraints from "./mapping-constraints";
import { GameTurnLength } from "./turn-length";
import { TurnFormats } from "@serge/config"
export default interface WargameOverview {
/** title for this wargame */
name: string,
/** high level description of wargame */
gameDescription: string,
/** form... |
class WorkboxSwTask extends BalmJS.BalmTask {
constructor() {
super('workbox-sw');
this.defaultInput = [
BalmJS.config.pwa.workboxSw,
`${BalmJS.config.pwa.workboxSw}.map`
];
this.defaultOutput = BalmJS.config.dest.base;
}
fn = (): any => {
this.init();
return this.src.pipe(g... |
import React, { FC, ReactNode, useState } from 'react';
import { WalletModalContext } from './useWalletModal';
import { WalletModal, WalletModalProps } from './WalletModal';
export interface WalletModalProviderProps extends WalletModalProps {
children: ReactNode;
}
export const WalletModalProvider: FC<WalletModal... |
import { ObjectQueue } from '../src/Queue'
import { hotPotato } from '../examples/Queue/hotPotato'
describe('Queue', () => {
describe('ObjectQueue', () => {
const queue = new ObjectQueue<string>()
test('isEmpty', () => {
expect(queue.isEmpty()).toBeTruthy()
})
test('enqueue', () => {
queu... |
import { ArtifactRarity, ArtifactSetKey, CharacterKey, ElementKey, SetNum, SlotKey } from "./consts";
import { BonusStats, BasicStats } from "./stats";
import { IConditionals } from "./IConditional";
import { DocumentSection } from "./character";
export type IArtifactSheets = StrictDict<ArtifactSetKey, IArtifactSheet>... |
import path from 'path'
import fs from 'fs'
import { execSync } from 'child_process'
const pkgPath = path.resolve(__dirname, '../package.json')
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'))
const gitRef = execSync('git --no-pager log --format="%h" -n 1')
.toString()
.trim()
pkg.name = '@nuxtjs/auth-n... |
export interface AddressTypeInput {
city: string;
cityArea?: string;
companyName?: string;
country: string;
countryArea?: string;
firstName?: string;
lastName?: string;
phone: string;
postalCode: string;
streetAddress1: string;
streetAddress2?: string;
}
export interface AddressType {
id: strin... |
import { createIcon } from '../createIcon/createIcon';
import IconCalculatorSizeM from './IconCalculator_size_m';
export const IconCalculator = createIcon({
m: IconCalculatorSizeM,
s: IconCalculatorSizeM,
xs: IconCalculatorSizeM,
name: 'IconCalculator',
}); |
import { ChartWidget } from '../gui/chart-widget';
import { ensureNotNull } from '../helpers/assertions';
import { DeepPartial } from '../helpers/strict-type-checks';
import { DefaultPriceScaleId, isDefaultPriceScale } from '../model/default-price-scale';
import { PriceScale, PriceScaleOptions } from '../model/price-... |
// *** 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";
/**
* N... |
import {load} from './ObjectSpread';
describe('object spread', () => {
it('executes without crashing', () => {
const users = load({ age: 42 });
expect(users).toEqual([
{id: 1, name: '1', age: 42},
{id: 2, name: '2', age: 42},
{id: 3, name: '3', age: 42},
{id: 4, name: '4', age: 42},
... |
import {gql} from '@apollo/client';
import {ContextMenu2 as ContextMenu} from '@blueprintjs/popover2';
import {
ColorsWIP,
IconWIP,
markdownToPlaintext,
MenuItemWIP,
MenuWIP,
Spinner,
Tooltip,
FontFamily,
MenuLink,
Box,
} from '@dagster-io/ui';
import {isEqual} from 'lodash';
import qs from 'qs';
im... |
import { NgModule } from '@angular/core';
import { ThemeModule } from '../../@theme/theme.module';
import { CommonModule } from '@angular/common';
import { PlanCuentasRoutingModule, routedComponents } from './plan-cuentas-routing.module';
import { SharedModule } from '../../shared/shared.module';
import {
NbTreeGridM... |
import { Knex } from "knex";
export async function up(knex: Knex): Promise<void> {
return knex.schema.createTable("users", (table) => {
table.increments("id").primary();
table.string("name").notNullable();
table.string("avatar").notNullable();
table.string("whatsapp").notNullable();
table.string(... |
type Route = {
path: string;
name: string;
title: string;
children: Route[] | [];
};
// this is testing only variable
const routes: Readonly<Route[]> = [
{
path: "/",
name: "Home",
title: "This is Home",
children: [],
},
{
path: "/some-protected-page",
name: "Some Protected Page",... |
import { Adt, Fun, Optional } from '@ephox/katamari';
import { SugarElement } from '@ephox/sugar';
import { findNextBr, findPreviousBr, isAfterBr, isBeforeBr } from '../caret/CaretBr';
import * as CaretFinder from '../caret/CaretFinder';
import CaretPosition from '../caret/CaretPosition';
import { isAfterContentEditab... |
import * as __aws_sdk_middleware_stack from "@aws-sdk/middleware-stack";
import * as __aws_sdk_types from "@aws-sdk/types";
import * as _stream from "stream";
import { GetPipeline } from "../model/operations/GetPipeline";
import { InputTypesUnion } from "../types/InputTypesUnion";
import { OutputTypesUnion } from "../t... |
import React from 'react';
import {Circle, Marker} from '@googlemap-react/core';
import {useGoogleNamespace} from 'utilities/google';
interface Props {
color?: string;
coords: GeolocationCoordinates;
timestamp: number;
}
export function GpsMarker({color = 'magenta', coords, timestamp}: Props) {
const [google]... |
import { Message } from "discord.js";
import { getActiveGameModes, getModeChosen } from "../../game/gameModes";
import { print, shuffle } from '../../tools/f';
const startMessage = 'Inhouse Temperature Check:\n';
const endMessage = 'React on all timeslots which work for you and then we look for the most suitable tim... |
import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { Listing, ListingSchema } from './listing.schema';
import { ListingController } from './listing.controller';
import { ListingService } from './listing.service';
import { AuthModule } from '../auth/auth.module';
import { ... |
import template from './template'
import { uuid } from '../../../utlis/index'
const Swiper = {
config: {
...template,
id: uuid(6, 10),
data: {
imageSrcs: [],
isAutoplay: false,
},
},
editData: [
{
type: 'dynamicInput',
dataIndex: 'imageSrcs',
title: '轮播图片',
},
{
type: 'switch',
da... |
import { FuzzyTerm } from "./FuzzyTerm";
/**
* Base class for fuzzy sets. This type of sets are defined by a membership function
* which can be any arbitrary shape but are typically triangular or trapezoidal. They define
* a gradual transition from regions completely outside the set to regions completely
* within ... |
import { installable } from '../utils';
import _Pagination from './Pagination';
const Pagination = installable(_Pagination);
export default Pagination;
export { Pagination }; |
import { AbstractPlugin, IMetaData } from '../plugin/AbstractPlugin'
import PluginAPI from '../plugin/PluginAPI'
import Translation from '@util/Translation';
import * as Namespace from '@connection/xmpp/namespace';
import { $iq } from '@vendor/Strophe';
/**
* XEP-0199: XMPP Ping
*
* @version: 0.1
* @see: https://x... |
/*
* 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 { mean } from 'lodash';
import { EventOutcome } from '../../../common/e... |
export class Registry {
server?: string;
Username?: string;
Password?: string;
Token?: string;
} |
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RegistrationComponent } from './registration.component';
import { RegistrationRoutes } from './registration.routing';
import { SharedFormsModule } from '@shared/shared-forms/shared-forms.module';
import { TranslateModule ... |
import { ConfigurationTarget, Uri, version as codeVersion, workspace, WorkspaceConfiguration } from "vscode";
import { createFolderForFile, resolvePaths } from "./utils";
import { NullAsUndefined, nullToUndefined } from "./utils/misc";
import { setupToolEnv } from "./utils/processes";
class Config {
private config: W... |
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/* eslint-disable import/no-extraneous-dependencies */
import { DataObject, DataObjectFactory } from "@fluidframework/aqueduct";
import {
IContainer,
IFluidCodeDetails,
IFluidModule,
ILoader,
IR... |
import { Injectable } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { GlobalMessageService, GlobalMessageType } from '@spartacus/core';
import { DefaultFormValidators } from '@spartacus/dynamicforms';
import { ConsentConnector } from '../../../core/my-account/connecto... |
import { UpvotePost } from "./UpvotePost";
import { memberRepo, postRepo, postVotesRepo } from "../../../repositories";
import { postService } from "../../../domain/services";
import { UpvotePostController } from "./UpvotePostController";
const upvotePost = new UpvotePost(memberRepo, postRepo, postVotesRepo, postServi... |
import { ListPo } from '../pages/list.po';
import { checkElArrIsClickable, checkElementText, checkElementTextValue } from '../../helper/assertion-helper';
import {
compactClass,
borderStyleAttr,
compactAttr,
compactValue,
listTypeAttr,
loadMoreClass,
multiSelect,
navIndicator,
navUrl... |
import { Injectable } from '@angular/core';
import { RegisterTenantOutput } from '@shared/service-proxies/service-proxies';
@Injectable()
export class TenantRegistrationHelperService {
registrationResult: RegisterTenantOutput;
} |
/*
* 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 {
CSV_JOB_TYPE as jobType,
LICENSE_TYPE_BASIC,
LICENSE_TYPE_ENTE... |
<TS language="fil" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Mag-right-klik upang baguhin ang address o label</translation>
</message>
<message>
<source>Create a new address</source>
... |
/*!
* Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
*
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
* Unless required ... |
import Viewport from '@/utils/Viewport';
import Raindrop from 'raindrop-fx';
import RAF from '@/managers/RAF';
export default class Raindrops
{
private raindrops: Raindrop;
private readonly onUpdate = this.update.bind(this);
private readonly onResize = this.resize.bind(this);
public constructor (
private... |
import { JWTToken } from '../auth-helpers/helpers';
import { AmplifyAppSyncSimulatorAuthenticationType } from '../../type-definition';
export type AppSyncGraphQLExecutionContext = {
readonly jwt?: JWTToken;
readonly sourceIp?: string;
headers: Record<string, string | string[]>;
appsyncErrors?: Error[];
reque... |
import {
DEFAULT_API_BASE_URL,
DEFAULT_API_HOST,
DEFAULT_API_PORT,
DEFAULT_GRAPHQL_API_PATH,
IPluginConfig
} from "@gauzy/common";
import { dbConnectionConfig, environment } from "@gauzy/config";
export const devConfig: IPluginConfig = {
apiConfigOptions: {
host: process.env.API_HOST || DEFAULT_... |
import * as React from 'react'
import { mount } from 'enzyme'
import * as sinon from 'sinon'
import { SearchkitManager, QueryString, QueryAccessor } from '../../../../core'
import { Panel } from '../../../ui'
import { InputFilter } from './InputFilter'
describe('InputFilter tests', () => {
beforeEach(() => {
th... |
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import * as Utils from 'utils/utils.jsx';
import AtMentionSuggestion from 'components/suggestion/at_mention_provider/at_mention_suggestion.jsx';
import {mountWithIntl} from 'tests/... |
<TS language="en_GB" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Right-click to edit address or label</translation>
</message>
<message>
<source>Create a new address</source>
<translati... |
import { Button } from "./Button";
interface SideBarProps {
genres: Array<{}>;
selectedGenreId: number;
handleClickButton: Function;
}
export function SideBar({
genres,
handleClickButton,
selectedGenreId,
}: SideBarProps) {
return (
<nav className="sidebar">
<span>
Watch<p>Me</p>
... |
declare var google: any;
export interface ArrowFormatInterface {
base: number;
}
export interface BarFormatInterface {
base?: number;
colorNegative?: string;
colorPositive?: string;
drawZeroLine?: boolean;
max?: number;
min?: number;
showValue?: boolean;
width?: number;
}
export interface RangeInte... |
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ProfileMainComponent } from './profile-main.component';
describe('ProfileMainComponent', () => {
let component: ProfileMainComponent;
let fixture: ComponentFixture<ProfileMainComponent>;
beforeEach(async () => {
await TestBed.confi... |
import { RecursivePartial } from '@kibalabs/core';
import { ThemeType } from '../../util';
import { IBoxTheme } from '../../subatoms';
export interface ILinePagerThemeBase extends ThemeType {
background: IBoxTheme;
}
export interface ILinePagerThemeState extends ThemeType {
default: ILinePagerThemeBase;
hover:... |
/* eslint-disable camelcase */
/**
* 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 Apache License, Vers... |
// <script src="https://unpkg.com/react-jsonschema-form/dist/react-jsonschema-form.js"></script>
import React, { Fragment, Component } from "react";
import { Pane, Textarea } from "evergreen-ui";
import Form from "react-jsonschema-form";
import {
KeyValueComponent,
ArrayField,
CheckboxField,
InputField,
Sele... |
export * from './functions';
export * from './types';
export * from './dom';
export * from './array';
export * from './keydown';
export * from './objects';
export * from './numbers';
export * from './dom-query';
export * from './tabbable';
export * from './assertions';
export * from './react-helpers';
export * from 'cs... |
/*
Copyright 2018 matrix-appservice-discord
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 in writing... |
import { Flex, Skeleton } from '@chakra-ui/react'
import React, { ReactElement } from 'react'
import { useRecoilValue } from 'recoil'
import ConfidenceTag from 'src/components/KeyResult/ConfidenceTag/confidence-tag'
import KeyResultListBodyColumnBase, {
KeyResultListBodyColumnBaseProperties,
} from 'src/components/K... |
import dotenv from 'dotenv';
import { build } from 'electron-builder';
dotenv.config();
build({
config: {
productName: 'LeafView',
artifactName: '${productName}-${version}-${platform}-${arch}.${ext}',
copyright: '© 2020 sprout2000 and other contributors.',
files: ['dist/**/*'],
directories: {
... |
import { AfterViewInit, Component, ViewChild } from "@angular/core";
import { ComboboxV2Component } from "@nova-ui/bits";
import { Subject } from "rxjs";
import { takeUntil, tap } from "rxjs/operators";
@Component({
selector: "nui-combobox-v2-getting-value-example",
templateUrl: "combobox-v2-getting-value.exam... |
import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
import { Burger } from '../models/dtos/burger';
import { BurgerCreateDto } from '../models/dtos/burger-create-dto';
im... |
import { Types, PluginValidateFn, PluginFunction } from '@graphql-codegen/plugin-helpers';
import { visit, GraphQLSchema, concatAST, Kind, FragmentDefinitionNode } from 'graphql';
import { LoadedFragment } from '@graphql-codegen/visitor-plugin-common';
import { CSharpOperationsVisitor } from './visitor';
import { extna... |
import diff from '../src/libs/diff'
const oldEvents = [
{
title: 'First event',
date: 'Samedi 29 Juin 19:00',
img: 'http://media.blizzard.com/wow/assets/calendar/ui-calendar-event-other.png'
}
]
const newEvents = [
{
title: 'First event',
date: 'Samedi 29 Juin 19:00',
img: 'http://media.... |
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 { onlySettled, defer, delay, waterfallMap } from '../../src/util/promises';
import { expect } from 'chai';
describe('Promises', function () {
it('onlySettled() should act like allSettled + filtering out rejections', async () => {
const results = await onlySettled([Promise.resolve(1), Promise.reject(2), Pr... |
#!/usr/bin/env node
import { generate,checkDoubles,checkKFactor } from './generate-impi-db';
const ora = require('ora');
const colors = require('colors/safe');
const winston = require('winston');
import * as fs from 'fs';
import * as path from 'path';
import program = require('commander');
program
.version(requ... |
/**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {customElement} from 'lit/decorators';
import {SecondaryTab} from './lib/secondary-tab';
import {styles as secondaryStyles} from './lib/secondary-tab-styles.css';
import {styles as sharedStyles} from './lib/shared-styles.cs... |
import { Managers } from "./core/Functions.js";
import Core from './core/Core.js';
declare module "discord.js" {
interface EnvVariable {
[envKey: string]: any
}
export interface Client {
PREFIX: string
ROOT_DIR: string
managers: Managers
utils: any,
evns: Env... |
export const FIRST_KEY_INDEX = 1;
export function transformArguments(key: string): Array<string> {
return ['INCR', key];
}
export declare function transformReply(): number; |
import * as _ from "lodash"
import { AttachmentLocation, isItem, Item, Point } from "../../../common/src/domain"
export const origin = { x: 0, y: 0 }
export type Coordinates = { x: number; y: number }
export type Dimensions = { width: number; height: number }
export type Rect = { x: number; y: number; width: number; he... |
/** @jsx jsx */
import { jsx, useTheme } from '@emotion/react';
import React, { useCallback, SyntheticEvent } from 'react';
import Card from '../../card';
import { H3, P } from '../../typography';
import {
customCard,
headerModal,
closeButton,
textContainer,
title,
subtitle,
bodyModal,
i... |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ar" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Watcoin</source>
<translation>عن البلاك كوين</translation>
</message>
<message>
<locati... |
// convert the entire system to Typescript
// create DB using factory function
type genderType = 'M' | 'F'
// or
enum genderEnum { Male, Female }
abstract class Person {
private readonly firstName: string;
private readonly lastName: string;
public age: number;
public gender: genderType;
//TODO: a... |
import * as uuid from 'uuid';
import { APPLICATION_NAME, CLIENT, VERSION } from '../../constant/constant';
import { SearchParams } from './search-params';
export class Header {
requestId = uuid.v4();
requestClient = CLIENT;
requestType: string;
requestSource = APPLICATION_NAME;
requestSourceService... |
import React from 'react';
import { View, ViewStyle } from 'react-native';
interface IMDShadowProps {
style: ViewStyle;
shadowColor: ViewStyle['shadowColor'];
shadowOffset: ViewStyle['shadowOffset'];
shadowOpacity: ViewStyle['shadowOpacity'];
shadowRadius: ViewStyle['shadowOffset'];
}
export class MDBoxShad... |
import React from 'react';
import { Box, IconButton } from '@chakra-ui/react';
import Link from 'next/link';
import { useRouter } from 'next/router';
import {
Drawer,
DrawerBody,
DrawerContent,
DrawerOverlay,
DrawerCloseButton,
useDisclosure,
useColorMode
} from '@chakra-ui/react';
import { BiMenuAltRight... |
import StateMachine from '../../base/StateMachine';
import { IHTMLObjectElementIsolate } from '../../base/interfaces/isolate';
import { ISuperDocument } from '../../base/interfaces/super';
import { IHTMLFormElement } from '../../base/interfaces/official';
import HTMLObjectElementIsolateBase, { IHTMLObjectElementIsolate... |
<TS language="pl" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Kliknij prawy przycisk myszy by edytować adres lub zakładkę</translation>
</message>
<message>
<source>Create a new address</source... |
import fs from 'fs';
import path from 'path';
import matter from 'gray-matter';
import { remark } from 'remark';
import html from 'remark-html';
const postsDirectory = path.join(process.cwd(), 'posts');
export function getSortedPostsData() {
// Get file names under /posts
const fileNames = fs.readdirSync(postsDir... |
import { freeze } from '../util/object-utils.js'
import { ColumnNode } from './column-node.js'
import { ColumnUpdateNode } from './column-update-node.js'
import { IdentifierNode } from './identifier-node.js'
import { FilterExpressionNode } from './operation-node-utils.js'
import { OperationNode } from './operation-node... |
import { Account } from "@cosmwasm/sdk";
import * as React from "react";
import { useError } from "./error";
import { useSdk } from "./wallet";
interface State {
readonly account?: Account;
}
export interface AccountContextType extends State {
readonly refreshAccount: () => void;
}
function dummyRefresh(): void... |
export default function rotateMatrix(matrix: number[][]): number[][] {
let rotatedMatrix: number[][] = [[]];
for (let row of matrix) {
for (let index in row) {
if (!rotatedMatrix[index]) {
rotatedMatrix[index] = [];
}
rotatedMatrix[index].unshift(row[index]);
}
}
return rotatedMatrix;
}
expo... |
import { AppStreamClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppStreamClient";
import { ListAssociatedFleetsRequest, ListAssociatedFleetsResult } from "../models/models_0";
import {
deserializeAws_json1_1ListAssociatedFleetsCommand,
serializeAws_json1_1ListAssociatedFleetsCommand,
} from... |
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.8" tiledversion="1.8.2" name="argent" tilewidth="128" tileheight="31" tilecount="1" columns="1">
<image source="tilesets/HandMade/argent.png" width="128" height="31"/>
</tileset> |
type Fn = (...args: any) => any;
export function ensureFunction(input: any): Fn {
return typeof input === 'function' ? input : () => input;
} |
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { InputSelectComponent } from './input-select.component';
import { MatIconModule } from '@angular/material/icon';
import { MatInputModule } from '@angular/material/input';
import... |
import React from 'react';
import { Container } from './styles';
const Right: React.FC = () => (
<Container>
<p>
Developed by Felipe Menezes
</p>
<span />
</Container>
);
export default Right; |
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { HttpErrorResponse } from '@angular/common/http';
import { Subject } from 'rxjs';
import { JhiEventManager } from 'ng-jhipster';
import { Exercise, ExerciseType } from 'app/entities/exercise.model';
import { TextExerciseService } from 'app/... |
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { PostListComponent } from './posts/post-list/post-list.component';
import { PostCreateComponent } from './posts/post-create/post-create.component';
import { AuthGuard } from './auth/auth.guard';
const routes: Rout... |
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
@Component({
selector: '<%= selector %>',
<% if(inlineTemplate) { %>template: `
<form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
<nz-form-item>
<... |
import { isMac, isChrome, isAppleDevice, isAndroid, isIPad } from '..';
import { cleanup } from '../../../../utils/test-setup';
let platformGetter;
let userAgentGetter;
describe('platform utility tests', () => {
afterEach(() => {
jest.clearAllMocks();
cleanup();
});
beforeEach(() => {
platformGette... |
import extension from 'extensionizer'
import { PORT_CONTENT } from '../constants/ports'
import { ORIGIN_CONTENT, ORIGIN_PAGE } from '../constants/origins'
export const setupPort = () => {
// connect to the extension
const port = extension.runtime.connect({ name: PORT_CONTENT })
// send any messages from the exten... |
import { Injectable } from '@nestjs/common';
import { InjectModel } from '@nestjs/sequelize';
import { CreateUserDto } from './dto/create-user.dto';
import { User } from './users.model';
@Injectable()
export class UsersService {
constructor(@InjectModel(User) private userRepository: typeof User) {
}
asy... |
import {Injectable} from '@angular/core';
import {Router, Routes} from '@angular/router';
@Injectable()
export class BaMenuService {
protected _currentMenuItem = {};
constructor(private _router:Router) {
}
public convertRoutesToMenus(routes:Routes):any[] {
let items = this._convertArrayToItems(routes);
... |
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { PhotoService } from './photo.service';
// import { PhotoController } from './photo.controller';
import { Photo } from './photo.entity';
@Module({
imports: [TypeOrmModule.forFeature([Photo])],
providers: [PhotoService... |
import axios, { Canceler } from '../../src/index'
import Cancel from '../../src/cancel/Cancel'
const CancelToken = axios.CancelToken
const source = CancelToken.source()
axios.get('/cancel/get', {
cancelToken: source.token
}).catch(e => {
if (axios.isCancel(e)) {
console.error('request canceled', e.message)
... |
import Invalid from "../../../src/validatable/invalid";
import IsValidatable from "../../../src/message/boolean/is";
import Error from "../../../src/message/validatable/error";
it("force console log", () => { spyOn(console, 'log').and.callThrough();});
describe("success", function() {
it("class", () => expect(I... |
declare module "tty" {
import * as net from "net";
function isatty(fd: number): boolean;
class ReadStream extends net.Socket {
constructor(fd: number, options?: net.SocketConstructorOpts);
isRaw: boolean;
setRawMode(mode: boolean): void;
isTTY: boolean;
}
class Write... |
declare module "appinfo.json" {
export interface AppInfoJSON {
version: string;
gitCommitHash: string;
}
const value: AppInfoJSON;
export default value;
} |
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class ConfigurationService {
username = 'Anonymous';
volume = 1;
constructor() { }
} |
export class ItemPercentage {
constructor(public name: string,
public percent: number,
public rawCount?: number) {
}
} |
import { makeStyles } from '@material-ui/core/styles';
export const useStyles = () => {
const styles = makeStyles(
(theme) => {
return ({
root: {
overflow: 'hidden',
},
item: {
padding: theme.spacing(2, 0),
color: theme.palette.custom.fonts.fontTwo,
... |
import { Module } from '@nestjs/common';
import { BookService } from './book.service';
import { BookController } from './book.controller';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Book } from './entity/book.entity';
@Module({
imports:[TypeOrmModule.forFeature([Book])],
providers: [BookService],
... |
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { TodoItem } from 'src/app/modules/shared/models/types';
import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
@Injectable({
providedIn: 'root'
})
export class TodoService {
... |
import { Row, Col } from "reactstrap";
import StudentProfileLayout from "~/components/PageLayouts/StudentProfileLayout";
import Panel from "~/components/Panel";
import axios from "axios";
import { securePage } from "~/lib/securePage";
import StudentForm from "~/components/StudentForm";
import prisma from "~/lib/prism... |
import { Test, TestingModule } from '@nestjs/testing';
import { CommentController } from './comment.controller';
import { CommentService } from '../service/comment.service';
import { DatabaseService } from '../../database.service';
describe('Comment Controller', () => {
let controller: CommentController;
beforeEa... |
import {
Breadcrumb,
BreadcrumbItem,
Grid,
GridItem,
PageSection,
Title,
Card,
Bullseye,
Button,
Split,
SplitItem,
OverflowMenu,
OverflowMenuContent,
OverflowMenuGroup,
InjectedOuiaProps,
withOuiaContext
} from '@patternfly/react-core';
import {
ServerErrors,
ouiaPageTypeAndObjectId,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.