text stringlengths 10 953k |
|---|
/*
* Copyright 2017 TWO SIGMA OPEN SOURCE, 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 appl... |
import * as React from "react";
import helmIcon from "../../icons/helm.svg";
import placeholder from "../../placeholder.png";
import { IAppOverview } from "../../shared/types";
import * as url from "../../shared/url";
import InfoCard from "../InfoCard/InfoCard";
import Tooltip from "components/js/Tooltip";
import "./A... |
import * as React from 'react';
import {FormProps} from './types';
//===----=---=-=--=--===--=-===----=---=-=--=--===--=-===----=---=-=--=--===--=-//
export default function Index(props: FormProps) {
const classNames = getClassNames(props);
return (
<form className={classNames}
style... |
import {Reducer} from './Reducer';
import {Action} from './Action';
export function combineReducers<State extends object>(reducers: {[K in keyof State]: Reducer<State[K]>}): Reducer<State> {
return (action: Action<any>, state?: State): State => {
const newState = {} as State;
let changed = false;
if(sta... |
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
import './image-editor.less';
import type {
ImageEditorActionBox,
IJodit,
ImageEditorOptions,
... |
import { SoundcloudSearchV2 } from "./index";
export interface SoundcloudUserFilter {
q?: string;
}
export interface SoundcloudUserMini {
avatar_url: string;
id: number;
kind: string;
permalink_url: string;
uri: string;
username: string;
permalink: string;
last_modified: string;
}
ex... |
import { FitTextLineResult, TextSizeMeasurer, FitTextResult } from '../types/textWrap'
const overflowText = (
text: string,
maxWidth: number,
measureText: TextSizeMeasurer,
trimText: string = '...',
): FitTextLineResult => {
let shortenedText = ''
let charIndex = 0
let shortenedTextWidth = measureText(sh... |
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs/Subject';
import { Observable } from 'rxjs/Observable';
@Injectable()
export class AlertService {
private subject = new Subject<any>();
info(message: string) {
this.subject.next({ type: 'info', text: message });
}
danger(message: s... |
/**
* Core Services API
* Use the Core Services API to manage resources such as virtual cloud networks (VCNs),
compute instances, and block storage volumes. For more information, see the console
documentation for the [Networking](/iaas/Content/Network/Concepts/overview.htm),
[Compute](/iaas/Content/Compute/Concepts/c... |
import { Solution } from '../../utils/solution';
enum ActionType {
TURN_ON,
TURN_OFF,
TOGGLE
}
interface Action {
type: ActionType,
from: [ number, number ],
to: [ number, number ]
}
export class Solution2015Day6 extends Solution {
constructor() {
super(2015, 6);
}
priva... |
import AppError from '@shared/errors/AppErrors'
import FakeUsersRepository from '../repositories/fakes/FakeUsersRepository';
import FakeHashProvider from '../providers/HashProviders/fakes/FakeHashProvider';
import AuthenticateUserService from './AuthenticateUserService';
let fakeUsersRepository: FakeUsersRepository;
... |
const isDefaultAvatar = (url: string): boolean => {
return url === '/img/avatar-male.jpg' || url === '/img/avatar-female.jpg' || url === null;
};
export { isDefaultAvatar }; |
declare namespace javax {
namespace swing {
namespace plaf {
namespace basic {
class BasicSliderUI extends javax.swing.plaf.SliderUI {
public static readonly POSITIVE_SCROLL: int
public static readonly NEGATIVE_SCROLL: int
public static readonly MIN_SCROLL: int
... |
import {Pointer, refType, types} from "../napi";
import {GPCodes} from "../types";
import {PointerCameraFile, RefCameraFile} from "./GPCameraModule";
export const GP_FILE_MODULE_ASYNC_KEYS: string[] = ["gp_file_save"];
// tslint:disable-next-line
export const GPFileModuleDescription = {
gp_file_new: ["int", [refTyp... |
export enum Role {
AUTHOR,
USER,
} |
/* tslint:disable */
// This file was automatically generated and should not be edited.
import { CategoryInput } from "./../../types/globalTypes";
// ====================================================
// GraphQL mutation operation: CategoryUpdate
// ====================================================
export inter... |
import React from 'react';
import clsx from 'clsx';
import { Link } from 'react-router-dom';
import {
AppBar,
Box,
Drawer,
IconButton,
Toolbar,
Typography,
useMediaQuery,
List,
ListItem,
ListItemText,
Divider,
} from '@material-ui/core';
import ListItemLink from '../ListItemLink';
import MenuIco... |
import { createEmitter } from '../'
describe('createEmitter', () => {
it('returns an emitter', () => {
const emitter = createEmitter()
expect(typeof emitter).toBe('object')
expect(typeof emitter.on).toBe('function')
expect(typeof emitter.off).toBe('function')
expect(typeof emitter.emit).toBe('fu... |
<TS language="id_ID" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Klik-kanan untuk mengubah alamat atau label</translation>
</message>
<message>
<source>Create a new address</source>
<tr... |
import * as React from 'react';
import {
PageSection,
Card,
CardBody,
Grid,
GridItem,
Title,
DescriptionList,
DescriptionListTerm,
DescriptionListGroup,
DescriptionListDescription,
DataList,
DataListItem,
DataListItemRow,
DataListItemCells,
DataListCell
} from '@patternfly/react-core';
imp... |
export * from './account';
export * from './action';
export * from './backup';
export * from './block-storage';
export * from './cdn';
export * from './certificate';
export * from './domain';
export * from './domain-record';
export * from './droplet';
export * from './firewall';
export * from './floating-ip';
export * ... |
import {
ChangeDetectorRef,
Component,
forwardRef,
Input,
OnChanges,
SimpleChanges,
ViewEncapsulation
} from '@angular/core';
import {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';
import {isInteger, isNumber, padNumber, toInteger} from '../util/util';
import {NgbTime} from './ngb-time';... |
import * as React from "react"
import CodeArea from "../../components/CodeArea"
import useFieldArrayArgument from "../../components/codeExamples/useFieldArrayArgument"
import generic from "../generic"
import { Link } from "gatsby"
import * as typographyStyles from "../../styles/typography.module.css"
import * as button... |
export interface ArticlesProps {
location: Location
data: ArticlesData
}
export interface ArticlesData {
site: ArticlesSite
}
export interface ArticlesSite {
siteMetaData: ArticlesSiteMetaData
}
export interface ArticlesSiteMetaData {
title: string
}
export interface AllContentfulArticle {
edges: Articl... |
import * as ts from 'typescript';
import * as Lint from 'tslint';
import * as tsutils from 'tsutils';
import { AstUtils } from './utils/AstUtils';
import { Utils } from './utils/Utils';
import { ExtendedMetadata } from './utils/ExtendedMetadata';
const FAILURE_STRING: string = 'A stateless class was found. This indic... |
import { Command } from 'packages/common/types/util/domain';
import { ApiV1Request } from './types';
export enum ApiV1CommandTypes {
SEND_API_V1_REQUEST = 'SEND_API_V1_REQUEST-47406dac-1dc9-4831-a20a-ac917a944ddb',
}
export type SendApiV1Request = Command<ApiV1CommandTypes.SEND_API_V1_REQUEST, { request: ApiV1Req... |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {InjectionToken, ViewEncapsulation, ɵɵdefineInjectable, ɵɵdefineInjector} from '../../src/core';
import {crea... |
import * as path from "path"
import {argv} from "yargs"
const BUILD_DIR = argv.buildDir || "./build"
const JS_BUILD_DIR = path.join(BUILD_DIR, "js")
const CSS_BUILD_DIR = path.join(BUILD_DIR, "css")
// TODO FIXME how can we generate coffeescript and have require
// find it without putting it in src/ ? The browserify ... |
import { DynamicModule, Module, Provider } from '@nestjs/common';
import {
JwtModuleAsyncOptions,
JwtModuleOptions,
JwtOptionsFactory
} from './interfaces';
import { JWT_MODULE_OPTIONS } from './jwt.constants';
import { createJwtProvider } from './jwt.providers';
import { JwtService } from './jwt.service';
@Modu... |
import React from "react";
import { FormGroup as FormGroupBase } from "reactstrap";
import { ErrorMessage, useFormContext } from "react-hook-form";
export interface FormGroupProps {
name: string;
icon?: boolean;
hasError: boolean;
children: any;
}
export const FormGroup = ({
name,
icon,
hasError,
chil... |
import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers";
import { ethers } from "hardhat";
import {
BasicUniversalReceiver,
BasicUniversalReceiver__factory,
UniversalProfile__factory,
UniversalReceiverAddressStore,
UniversalReceiverAddressStore__factory,
UniversalReceiverTester,
UniversalRec... |
import {BlockFrame} from '@/services/data/graphics/graphics-types';
import {PipelineBlockGraphicsRect, PipelinesGraphics, TopicGraphics} from '@/services/data/tuples/pipeline-types';
import {Topic, TopicId, TopicType} from '@/services/data/tuples/topic-types';
import {isDistinctTopic, isMetaTopic, isRawTopic} from '@/s... |
import { useState, useEffect } from 'react'
// https://usehooks.com/useKeyPress/
export const useKeyPress = (targetKey: string) => {
// State for keeping track of whether key is pressed
const [keyPressed, setKeyPressed] = useState(false)
// Add event listeners
useEffect(() => {
// If pressed key is our ta... |
// Copyright (C) 2018 The Android Open Source Project
//
// 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 applic... |
import { Component, Input, OnInit } from '@angular/core';
@Component({
selector: 'app-cfg-toolbar-action-dropdown',
templateUrl: './cfg-toolbar-action-dropdown.component.html',
styles: [
]
})
export class CfgToolbarActionDropdownComponent implements OnInit {
@Input() public dataConent;
constructor() { }
... |
import * as shell from "shelljs";
export default class ShellAsync {
static exec(commandString: string): Promise<boolean> {
return new Promise<boolean>((re, rt) => {
let result = shell.exec(commandString, {
async: true,
silent: false,
});
result.on("error", (error) => rt(error));... |
import React from 'react';
import { ThemeCompositions } from '@teambit/documenter.theme.theme-compositions';
import { MDXLayout } from '@teambit/mdx.ui.mdx-layout';
import { Typescript } from './index';
export const TypescriptDocs = () => (
<ThemeCompositions>
<MDXLayout>
<Typescript />
</MDXLayout>
... |
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { RatingModule } from 'ng2-bootstrap/rating';
import { SharedModule } from '../../shared';
import { RatingSectionComponent } fro... |
import { Router } from 'express';
import { getCustomRepository } from 'typeorm';
import { parseISO } from 'date-fns';
import AppointmentsRepository from '../repositories/AppointmentsRepository';
import CreateAppointmentService from '../services/CreateAppointmentService';
import ensureAuthenticated from '../middleware... |
import clsx from 'clsx';
import type { ComponentProps } from 'react';
import { twMerge } from 'tailwind-merge';
type MenuGroupProps = ComponentProps<'div'>;
export const MenuGroup = ({
className,
children,
...props
}: MenuGroupProps) => {
return (
<div className={twMerge(clsx('w-full px-1 py-1', className... |
import React from "react";
import ArticleListComp from "../../components/ArticleList";
import { ArticleListType } from "../../components/ArticleList";
const Tech: React.FC<ArticleListType> = (props) => {
const { ArticleList } = props;
return (
<div className="tech-view">
<ArticleListComp ArticleList={Arti... |
import { Client } from '../client'
import { UriHelper } from '../uri-helper'
/* subclasses */
import { Jobs } from './print/jobs'
import { Messages } from './print/messages'
import { Printers } from './print/printers'
export interface PrintOptions {
user?: string
base?: string
}
export class Print {
endpoint: ... |
import styled, { css } from "react-emotion";
import { innerCellCss, cellAlignmentCss } from "../style";
export type TextAlign = "left" | "right" | "center";
export interface CellProps {
textAlign?: TextAlign;
children: React.ReactElement<HTMLElement> | string;
className?: string;
}
const alignmentStyle = (props... |
/*
* Copyright 2019 Red Hat, Inc. and/or its affiliates.
*
* 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 app... |
export type FileTokenType = 'fileAccess' | 'fileAccessLink';
export enum FileStorage {
FOLDER = 'folder',
DB = 'db',
} |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
import { Geometry, Specification } from "../..";
import { ChartStateManager } from "../../prototypes";
import {
getPointValueName,
PolarGuideCoordinatorAttributesExtend,
} from "../../prototypes/guides/polar_coordinator"... |
import 'reflect-metadata';
import morgan from 'morgan';
import passport from 'passport';
import cors from 'cors';
import * as express from 'express';
import { createLogger, format, transports, Logger, LoggerOptions } from 'winston';
import { Application, Request, Response, NextFunction } from 'express';
import { Invers... |
import * as ethereumjsWallet from 'ethereumjs-wallet'
const ethUtil = require('ethereumjs-util')
const ethSigUtil = require('eth-sig-util')
import * as HashingLogic from '../src/HashingLogic'
const aliceWallet = ethereumjsWallet.fromPrivateKey(new Buffer('c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0... |
/** @file Defines the protocol typings for DecoderWorkers. */
import {TrainingExample} from "../../../../play/experience";
import {PortMessageBase, PortResultBase} from "../../../../port/PortProtocol";
import {WorkerProtocol} from "../../../../port/WorkerProtocol";
/** Typings for the `workerData` object given to the ... |
/* eslint-disable class-methods-use-this */
import * as humanizeDuration from 'humanize-duration';
export class TimeTrackerService {
getISOTime(): string {
return new Date().toISOString();
}
getISOTimeWithZeroMilliseconds(): string {
return new Date().toISOString().replace(/[0-9]{3}Z$/, '000Z');
}
... |
import { Injectable } from '@nestjs/common';
import * as _ from 'lodash';
import { RedisCacheService } from './redis-cache/redis-cache.service';
@Injectable()
export class AppService {
constructor(private readonly redisCacheService: RedisCacheService) {}
async getHello(): Promise<any> {
const hello = await thi... |
import { SliderConfigurableExample } from './slider-configurable/slider-configurable-example';
import { SliderFormattingExample } from './slider-formatting/slider-formatting-example';
import { SliderOverviewExample } from './slider-overview/slider-overview-example';
import { SliderHarnessExample } from './slider-harnes... |
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="pl_PL">
<context>
<name>AddressBook</name>
<message>
<location filename="../pages/AddressBook.qml" line="64"/>
<source>Address</source>
<translation>Adres</translation>
</message>
<message>
<... |
/*
Imports
*/
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
// Inner
import { ObservablesService } from "../observable/observable.service";
import { environment } from "../../../environments/environment";
import { UserModel } from '../../models/... |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="pam" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About BITALGO</source>
<translation type="unfinished"/>
</message>
<message>
<location line=... |
import { Platform } from "../types"
import AnchorIcon from "../images/platforms/anchor.png"
import SpotifyIcon from "../images/platforms/spotify.png"
import ApplePodcastsIcon from "../images/platforms/apple.png"
import GooglePodcastsIcon from "../images/platforms/google.png"
import RSSIcon from "../images/platforms/rs... |
import { NgRedux, NgReduxModule } from '@angular-redux/store'
import { async, ComponentFixture, TestBed } from '@angular/core/testing'
import { FormsModule } from '@angular/forms'
import { HttpModule } from '@angular/http'
import { LoginComponent } from './login.component'
import { Router } from '@angular/router'
imp... |
import fs from 'fs'
import { promisify } from 'util'
import { I18nError } from './error'
export const readFileAsync = promisify(fs.readFile)
export const existsAsync = promisify(fs.exists)
export const readdirAsync = promisify(fs.readdir)
export const lstatAsync = promisify(fs.lstat)
/**
* Load JSON files from speci... |
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {IconsProviderModule} from './icons-provider.module';
import {NzLayoutModule} from 'ng-zorro-antd/layout';
import {... |
interface ILoadDataOpts {
path: string;
models: ILoadDataOptsModel;
}
interface ILoadDataOptsModel {
[index: string]: {};
}
export declare function loadData(opts: ILoadDataOpts): Promise<any>;
export {}; |
import React, { VFC } from 'react'
import { ArticleImageFIle } from '../../types/dataTypes'
interface Props {
imageFile: ArticleImageFIle
}
const ArticleImage: VFC<Props> = ({ imageFile }) => {
return (
<div>
<div className="w-[120px] h-[120px] border u-flex-center bg-gray-50">
<img src={imageFi... |
import {Component} from '@angular/core';
import {LocationService} from '../location/location.service'
import {BusstopsService} from './busstops.service';
@Component({
templateUrl: 'build/pages/busstops/busstops.component.html',
selector: 'busstops'
})
export class BusstopComponent{
busstops = [{'name': 'Mo... |
/* eslint-disable */
import * as Types from '../../types';
import { gql } from '@apollo/client';
import * as Apollo from '@apollo/client';
const defaultOptions = {}
export type CircularRebalanceMutationVariables = Types.Exact<{
route: Types.Scalars['String'];
}>;
export type CircularRebalanceMutation = { __typena... |
export type Schema = {
fields: { [key: string]: string | Schema }
required?: string[]
}
export const isSchema = (model: Record<string, unknown>): boolean => {
if (typeof model !== 'object') {
return false;
}
return model['fields'] !== undefined;
}; |
import * as React from 'react';
import { connect } from 'react-redux';
import { RootState, HeatMapValue, LegacyDateFormat } from '../../types';
import { SQUARE_SIZE, SQUARE_BORDER_RADIUS } from '../../constants/misc';
import {
selectDatabaseDate,
clearDatabaseDateSelection
} from '../../actions/selectDatabaseDate';... |
import Agent = require('http-proxy-agent');
// $ExpectType HttpProxyAgent
new Agent('url');
new Agent({});
new Agent({ host: 'url' });
// $ExpectError
new Agent();
// $ExpectError
new Agent({ a: 1 }); |
import * as path from "path";
import { Construct } from "constructs";
import { JsonFile, Project, Bindings, LifeCycle, LifeCycleStage, Fields } from "../../../L1";
import { GitIgnore, ManifestEntry } from "../../../L2";
import { NpmIgnore, PackageDependency, PackageDependencyType } from "../constructs";
import { Typesc... |
import { gql } from '@apollo/client';
export interface MediaGalleryItemType {
disabled: boolean;
label: string;
position: number;
url: string;
}
export const MEDIA_GALLERY_FRAGMENT = gql`
fragment MediaGallery on ProductInterface {
mediaGallery: media_gallery {
disabled
label
position
... |
import React from "react";
import { Pressable, Text, View } from "react-native";
import FastImage from "react-native-fast-image";
import { Button, Chip, Surface } from "react-native-paper";
import { RandomMediaInfo } from "../../../../Api/types";
import { ThemeColors } from "../../../../Components/types";
import { getS... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
import * as React from "react";
import { IEmojiProps } from "../../styled";
const SvgHandSingleFinger21 = (props: IEmojiProps) => (
<svg viewBox="0 0 72 72" width="1em" height="1em" {...props}>
<g fill="#c19a65" stroke="#c19a65">
<path d="M26.303 55.288c-11.975 0-18.39-7.161-18.39-16.25s5.935-19.29 31.152-... |
import {
Column,
CreateDateColumn,
Entity,
ManyToMany,
PrimaryGeneratedColumn,
} from 'typeorm';
import { Course } from './course.entity';
@Entity('tags')
export class Tag {
@PrimaryGeneratedColumn()
id: number;
@Column()
name: string;
@ManyToMany(
() => Course,
(course: Course) => {
... |
declare type IncomingMessage = any;
declare type ServerResponse = any;
import { App } from "../../index";
import { Options } from "../../types";
export declare type MiddlewareOptions = {
pathPrefix?: string;
log?: Options["log"];
onUnhandledRequest?: (request: IncomingMessage, response: ServerResponse) => v... |
// generated by ng_file_service_ts
import { Injectable, Component, Inject } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { DOCUMENT, Location } from '@angular/common'
/*
* Behavior subject
*/
import { BehaviorSub... |
import React, { useState } from "react";
import { Alert } from "react-native";
import firestore from "@react-native-firebase/firestore";
import { Container } from "./styles";
import { ButtonIcon } from "../ButtonIcon";
import { Input } from "../Input";
export function FormBox() {
const [description, setDescription]... |
export function createCustomTheme(): string {
return `
// Custom Theming for NG-ZORRO
// For more information: https://ng.ant.design/docs/customize-theme/en
@import "../node_modules/ng-zorro-antd/ng-zorro-antd.less";
// Override less variables to here
// View all variables: https://github.com/NG-ZORRO/ng-zorro-antd/... |
/**
* Removes special characters in a given string
*
* @param str
*
* @returns string without special characters
*/
export function removeSpecialCharacters(str: string): string {
return str
.replace(/^[^\w\s\d!?]/g, '')
.normalize('NFD')
.replace(/[\u0300-\u036F]/g, '')
} |
import { getScrollParent } from '../get-scroll-parent';
type FakeStyledElem = HTMLElement & { __fakeStyles: any };
describe('getScrollParent', () => {
const actualDescriptor = {
...Object.getOwnPropertyDescriptor(window, 'getComputedStyle'),
};
beforeAll(() => {
Object.defineProperty(window, 'getComput... |
import { SpaceType } from "file/space-type";
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
class TextAttributes extends XmlAttributeComponent<{ readonly space: SpaceType }> {
protected readonly xmlKeys = { space: "xml:space" };
}
export class Text extends XmlComponent {
constructo... |
import illustrationImg from "../assets/images/illustration.svg"
import logoImg from "../assets/images/logo.svg"
import googleIconImg from "../assets/images/google-icon.svg"
import {Button} from "../components/Button"
import "../styles/auth.scss"
//webpack (snowpack, vite ...)
export function Home() {
return (
... |
import { usePageCtx } from "../pageContext";
import Card from "./Card";
import NoResults from "./NoResults";
import { Box } from "@fower/react";
import { FaSpinner } from "react-icons/fa";
const Results = () => {
const { filteredData, matches } = usePageCtx();
if (matches("loading")) {
return (
<Box mt-1... |
import { Divider, Fab, makeStyles } from '@material-ui/core';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { useDispatch } from 'react-redux';
import * as coreHub from 'src/core-hub';
import usePermission from 'src/hooks/usePermission';
import { SCENES_CAN_PASS_TALKING_STICK, SCENES... |
/**
* Copyright (c) 2021 BlockDev AG
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React, { useState } from "react"
import { observer } from "mobx-react-lite"
import styled from "styled-components"
import toast from "react-ho... |
import { HeaderWrapper } from "./Header.styles";
export function Header(): JSX.Element {
return (
<HeaderWrapper>
<h1>Hello World</h1>
</HeaderWrapper>
);
} |
namespace GoldenLayoutTest {
// class SimpleComponent {
function create(container: any, state: any) {
let element: HTMLSpanElement = document.createElement("span");
element.innerHTML = "<h2>hamanamahanahama</h2>";
container.getElement().html(element);
}
... |
/**
* Cloud Guard APIs
* A description of the Cloud Guard APIs
* OpenAPI spec version: 20200131
*
*
* NOTE: This class is auto generated by OracleSDKGenerator.
* Do not edit the class manually.
*
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
* This software is dual-licensed t... |
import { Component } from '@angular/core';
import { demoSnippet, loadingSpinnerUsage } from './data-table-loading-spinner.list';
@Component({
selector: 'app-data-table-loading-spinner-component',
templateUrl: './data-table-loading-spinner.component.html',
styleUrls: ['./data-table-loading-spinner.component.scss... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import React from 'react';
import { ChoiceGroup, IChoiceGroupOption, concatStyleSets } from '@fluentui/react';
import { useSwitchableFluentTheme } from '../theming/SwitchableFluentThemeProvider';
/**
* Props for ThemeSelector component
*/
ex... |
namespace Lesson08.Services {
export class AccountService {
private isUserLoggedIn: boolean = false;
public isLoggedIn(): boolean {
return this.isUserLoggedIn;
}
public logUserIn(): void {
this.isUserLoggedIn = true;
}
public logUserOut(): v... |
/* eslint-disable */
/* tslint:disable */
/**
* This is an autogenerated file created by the Stencil compiler.
* It contains typing information for all components that exist in this project.
*/
import { HTMLStencilElement, JSXBase } from '@stencil/core/internal';
import {
MatchResults,
} from '@stencil/router';
... |
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CareerDetailsActionItemsComponent } from './career-details-action-items.component';
describe('CareerDetailsActionItemsComponent', () => {
let component: CareerDetailsActionItemsComponent;
let fixture: ComponentFixture<CareerDetails... |
import {useState} from 'react';
import * as C from './App.styles'
import {Item} from './Types/item'
import {ListItem} from './components/ListItem'
import {AddArea} from './components/AddArea'
const App = () =>{
const[list, setList] = useState<Item[]>([
]);
const handleAddTask = (taksName: string) =>{
... |
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { Variable } from '@angular/compiler/src/render3/r3_ast';
import { Component, OnInit, ElementRef, ViewChild } from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router'
import KeenSlider from ... |
import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common';
import { Observable } from 'rxjs';
import { UserRole } from 'src/shared/auth/user-role.enum';
@Injectable()
export class RoleGuard implements CanActivate {
entryRole: UserRole;
constructor(role: UserRole) {
this.entryRole = role;
}
... |
import { mediaApi } from '@sitecore-jss/sitecore-jss/media';
import PropTypes from 'prop-types';
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import { convertAttributesToReactProps } from '../utils';
export interface ImageFieldValue {
[attributeName: string]: unknown;
src?: string;
/... |
import { Injectable, Inject } from '@nestjs/common';
import { ILogin } from '@interfaces';
import { ClientProxy } from '@nestjs/microservices';
@Injectable()
export class AuthService {
constructor(
@Inject('AUTH_SERVICE') private readonly clientService: ClientProxy) {}
login(payload: ILogin) {
const patte... |
import Vue from 'vue';
import VueI18n from 'vue-i18n';
import enUS from './en-us';
Vue.use(VueI18n);
// create config after adding plugin
const i18n = new VueI18n({
locale: 'en-us',
fallbackLocale: 'en-us',
messages: {
'en-us': { locale: enUS },
},
});
Vue.mixin({
computed: {
YLocale(): a... |
export const findOdd = (xs: number[]): number => {
const obj: Record<string, number> = {};
let odd = 0;
for(const number of xs) {
if( obj[number] ) obj[number] += 1;
else obj[number] = 1;
}
for(const key in obj) {
if ( obj[key] % 2 !== 0 ) {
odd = Number(key);
... |
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {MatButtonModule} from '@angular/material/button';
import {MatChipsModule} from '@angular/material/chips';
import {MatFormFieldModule} from '@angular/material/form-field';
import {MatIconModule} from '@angular/material/icon';
imp... |
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PassageDoComponent } from './passage-do.component';
describe('PassageDoComponent', () => {
let component: PassageDoComponent;
let fixture: ComponentFixture<PassageDoComponent>;
beforeEach(async(() => {
TestBed.configureTesti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.