text stringlengths 10 953k |
|---|
// TypeScript Version: 2.1
import * as React from 'react';
import { IconBaseProps } from 'react-icon-base';
export default class MdFlipToFront extends React.Component<IconBaseProps, any> { } |
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { LayoutNavbarComponent } from './layout-navbar.component';
describe('LayoutNavbarComponent', () => {
let component: LayoutNavbarComponent;
let fixture: ComponentFixture<LayoutNavbarComponent>;
beforeEach(async(() => {
TestBed... |
// Type definitions for express-socket.io-session 1.3
// Project: https://github.com/oskosk/express-socket.io-session
// Definitions by: AylaJK <https://github.com/AylaJK>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import socketio = require('socket.io');
import expres... |
import Post from '../models/post';
export const incrementComments = async (id: string) => {
await Post.findOneAndUpdate({ _id: id }, { $inc: { commentCounter: 1, } });
};
export const decrementComments = async (id: string) => {
await Post.findOneAndUpdate({ _id: id }, { $inc: { commentCounter: -1, } });
}; |
import { Component, OnInit, Input } from '@angular/core';
import { AuthenticationService } from 'app/authentication.service';
@Component({
selector: 'email',
templateUrl: './email.component.html',
styleUrls: ['./email.component.css']
})
export class EmailComponent implements OnInit {
@Input() id;
name = ""... |
/**
* 分片文件合并任务中心前端方法
* */
const enum CFMTHubMethod {
新增任务 = 'AddTask',
更新任务 = 'UpdateTask',
移除任务 = 'RemoveTask',
更新分片来源信息 = 'UpdateChunksSource'
} |
/**
* unix-timestamp-date-time.module
*/
import {NgModule} from '@angular/core';
import {PlatformModule} from '@angular/cdk/platform';
import {DateTimeAdapter} from '../date-time-adapter.class';
import {OWL_DATE_TIME_FORMATS} from '../date-time-format.class';
import {UnixTimestampDateTimeAdapter} from './unix-timest... |
import { PeriodItem } from '@lib'
export class AroonUp {
public static calculate(allPeriods: PeriodItem[], length = 25) {
const usedPeriods = [...allPeriods]
usedPeriods.length = length
return ((length - this.getHighestPeriodIndex(usedPeriods)) / length) * 100
}
public static getHighestPeriodIndex(... |
/**
* @file ACane 手杖
* @author Auto Generated by IconPark
*/
/* tslint:disable: max-line-length */
/* eslint-disable max-len */
import {ISvgIconProps, IconHelper, IconWrapper} from '../runtime';
export default IconWrapper(
'a-cane',
true,
(h: IconHelper, props: ISvgIconProps) => (
<svg
... |
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 { UpdateConfigurationSetSendingEnabled } from "../model/operations/UpdateConfigurationSetSendingEnabled";
import { InputTypesUnion } from "../types/InputT... |
/**
* Represents an Object with id property.
*
* @public
*/
export interface Identifiable<ID = string | number> {
/** A unique ID that identifies the Object. */
id: ID;
} |
import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "@aws-sdk/smithy-client";
import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types";
import { WorkMailServiceException as __BaseException } from "./WorkMailServiceException";
export enum AccessControlRuleEffect {
ALLOW = "ALLOW"... |
export type CheckboxValue = string | number | boolean
export type CheckboxOption = {
label: string
value: CheckboxValue
disabled?: boolean
} |
import { FormProvider, useForm } from 'react-hook-form';
import { render, screen } from '@testing-library/react';
import { CalendarEventFormFields } from '../../types';
import CalendarEventStartTime from './CalendarEventStartTime';
const Component = () => (
<FormProvider {...useForm<CalendarEventFormFields>()}>
... |
import { encodeERC20AssetData } from '@0x/contracts-asset-proxy';
import { CoordinatorContract, CoordinatorRevertErrors, SignedCoordinatorApproval } from '@0x/contracts-coordinator';
import {
ExchangeCancelEventArgs,
ExchangeCancelUpToEventArgs,
exchangeDataEncoder,
ExchangeEvents,
ExchangeFillEvent... |
<TS language="cs" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Pravým tlačítkem myši můžeš upravit označení adresy</translation>
</message>
<message>
<source>Create a new address</source>
... |
import { createFullSchedule } from "./schedule"
import { url } from "./support/url"
import * as uuid from "uuid"
import { addDays, format } from "date-fns"
export function createMeeting(meetingName: string, meetingLink: string): void {
cy.visit(url("/meetings"))
cy.contains("Create new Meeting").click()
cy.wait(... |
export { default as defaultBehavior } from './Behaviors/defaultBehavior'
export { default as buttonBehavior } from './Behaviors/Button/buttonBehavior'
export { default as toggleButtonBehavior } from './Behaviors/Button/toggleButtonBehavior'
export { default as imageBehavior } from './Behaviors/Image/imageBehavior'
expo... |
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TestPage1Component } from './test-page1.component';
describe('TestPage1Component', () => {
let component: TestPage1Component;
let fixture: ComponentFixture<TestPage1Component>;
beforeEach(async () => {
await TestBed.configureTestin... |
import { CommonModule } from '@angular/common'
import { NgModule } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { RouterModule, Routes } from '@angular/router'
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'
import { CoreCommonModule } from '@core/common.module'... |
/*---------------------------------------------------------------------------------------------
* Copywight (c) Micwosoft Cowpowation. Aww wights wesewved.
* Wicensed unda the MIT Wicense. See Wicense.txt in the pwoject woot fow wicense infowmation.
*----------------------------------------------------------------... |
import {Store} from './store';
import fetch from 'node-fetch';
export const Newegg: Store = {
currency: '$',
labels: {
captcha: {
container: 'body',
text: ['are you a human?'],
},
inStock: [
{
container: '.product-buy',
text: ['add to cart'],
},
{
c... |
import { EventPayloadMap } from "@octokit/webhooks-definitions/schema";
import { verify } from "../verify/index";
import { State, EmitterWebhookEventMap } from "../types";
export type WebhookEventName = keyof EventPayloadMap;
export function verifyAndReceive(
state: State,
event: EmitterWebhookEventMap[WebhookEve... |
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ContractOfferComponent } from './contract-offer.component';
describe('ContractOfferComponent', () => {
let component: ContractOfferComponent;
let fixture: ComponentFixture<ContractOfferComponent>;
beforeEach(async(() => {
Te... |
import { Controller, Get, Post, Body, Patch, Param, Delete, UseGuards, Request, ValidationPipe, Query } from '@nestjs/common';
import { UsuarioAssuntoService } from './usuario-assunto.service';
import { CreateUsuarioAssuntoDto, CreateUsuarioAssuntoResponseDto } from './dto/create-usuario-assunto.dto';
import { UpdateUs... |
// FIXME: import * p2 from "p2";
/* tslint:disable */
const p2 = require("p2");
/* tslint:enable */
(<any>window).p2 = p2;
namespace P2 {
"use strict";
export const world = new p2.World();
export const autoUpdate = true;
}
(<any>SupEngine).P2 = P2;
SupEngine.registerEarlyUpdateFunction("P2js", (gameInstance) ... |
export const getDayFormat = (date = new Date()) => {
const year = date.getFullYear();
const month = date.getMonth() + 1;
const day = date.getDate();
return `${year}/${month}/${day}`;
};
export const isMonday = (date = new Date()) => {
if (date.getDay() == 1) {
return false;
}
return true;
}; |
// Type definitions for @storybook/addon-storyshots 4.0
// Project: https://github.com/storybookjs/storybook/tree/master/addons/storyshots, https://github.com/storybookjs/storybook/tree/master/addons/storyshots/storyshots-core
// Definitions by: Bradley Ayers <https://github.com/bradleyayers>
// Definitions: https://gi... |
import {User} from "../models/user.models";
import {getRepository, Repository} from "typeorm";
import {Project, ProjectProps} from "../models/project.models";
import {ProjectParticipant} from "../models/projectParticipant";
export class ProjectManagerController {
private static instance: ProjectManagerController... |
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false,
hmr: false,
API_BASE_URL: "http://localhost... |
import React from 'react';
import { graphql } from 'gatsby';
import Layout from '../containers/layout';
import PostCard from '../components/post-card/post-card';
import SEO from '../components/seo';
import {
TagPostsWrapper,
TagPageHeading,
TagName,
CategoryPostCol,
PostsList,
PostRow,
} from './templates.style';... |
import { GET_ETL_HISTORY, GET_ETL_TIMING, UPDATE_ETL_TIMING,SORT_ETL_HISTORY_GRID, UPDATE_HISTORY_PAGINATION} from '../utils/constants/action.types';
import {GridUtil} from '../view/components/grid/grid_util';
import { HISTORY_GRID_OPTIONS, HISTORY_GRID_PAGINATION } from '../view/components/admin/customizations/customi... |
import { IWechatAPI } from './WechatAPI';
export interface IWechat {
/**
* 通过config接口注入权限验证配置
* 所有需要使用JS-SDK的页面必须先注入配置信息,否则将无法调用(同一个url仅需调用一次,对于变化url的SPA的web app可在每次url变化时进行调用,目前Android微信客户端不支持pushState的H5新特性,所以使用pushState来实现web app的页面会导致签名失败,此问题会在Android6.2中修复)
* @param ticket {string} 从服务端获取
* @param j... |
import * as dotenv from 'dotenv';
dotenv.config();
export default {
twilio: {
accountSid: process.env.TWILIO_ACCOUNT_SID,
apiKey: process.env.TWILIO_API_KEY,
apiSecret: process.env.TWILIO_API_SECRET,
},
}; |
/**
* Modified to be a feature fill and wrapped as tinymce module.
*
* Promise polyfill under MIT license: https://github.com/taylorhakes/promise-polyfill
*/
type Callback<T, TResult = T> = ((value: T) => TResult | PromiseLike<TResult>);
type RejectFn = (reason?: any) => void;
type ResolveFn<T> = (value?: T | Prom... |
import { Module } from '@nestjs/common';
import { PriceLogsService } from './price-logs.service';
import { TypeOrmModule } from '@nestjs/typeorm';
import { PriceLogRepository } from './price-log.repository';
@Module({
imports: [
TypeOrmModule.forFeature([PriceLogRepository])
],
providers: [PriceLogsService],... |
import React, { lazy, Suspense, ReactElement } from 'react';
import {
HashRouter,
Switch,
Route
} from 'react-router-dom';
import Home from './components/Home';
import Loading from './components/Loading';
import NotFound from './components/NotFound';
import routes from './routes';
export default function Router... |
import { initPinsCtx } from './pins';
import { createKeyboardService } from "./keyboard-service";
import { createMorseContext } from "./morse-ctx";
function bootstrap() {
trace("Bootstraping...\n");
const pinCtx = initPinsCtx();
Object.freeze(pinCtx);
trace("Pins Initialized\n");
trace("Initializing BLE HID\... |
export interface ICorpAPIBase {
/**
* ID key of the service
*/
readonly keyId: string
/**
* Current time in seconds (UTC)
*/
readonly time: string
}
export interface IInitializeAccessParams extends ICorpAPIBase {
/**
* List of the rights that service wants to receive
* from the client (1 l... |
import * as React from 'react';
import styles from './FolderPicker.module.scss';
import { IPropertyFieldFolderPickerHostProps } from './IPropertyFieldFolderPickerHost';
import { IFolder } from '../../services/IFolderExplorerService';
import { IconButton, PrimaryButton, DefaultButton } from 'office-ui-fabric-react/lib/B... |
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-restful',
templateUrl: './restful.component.html',
styleUrls: ['./restful.component.css']
})
export class RestfulComponent implements OnInit {
constructor() { }
ngOnInit() {
}
} |
declare const Prettier: (props: any) => JSX.Element;
export default Prettier; |
import { IHashtag } from "../../../model/Hashtag";
import HashtagLine from "./HashtagLine";
interface Props {
className?: string,
hashtags: IHashtag[][]
}
export default function HashtagBox(props: Props) {
return (
<div className={props.className}>
{
props.hashtags.map(... |
import { Component, OnInit } from '@angular/core';
import { NbMenuItem } from '@nebular/theme';
@Component({
selector: 'ngx-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.scss']
})
export class DashboardComponent implements OnInit {
trainingPosted: number = 0;
trai... |
import { Box, Flex, Image, Text, Link, Heading } from 'theme-ui'
const Error = () => {
return (
<Flex>
<Image sx={{ width: 100, height: 100 }} src="/icons/icon-512x512.png" />
<Box mt={4} ml={4}>
<Heading as="h2">Metamask not installed</Heading>
<Text mt={2}>
Go to{' '}
... |
// /src/action/all_inbox/materialiconsoutlined/24px.svg
import { createSvgIcon } from './createSvgIcon';
export const SvgAllInboxOutlined = createSvgIcon(
`<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
<path d="M0 0h24v24H0V0z" fill="none"/>
<path d="M19 3H5c-1.1 0-2 .9-... |
import Utils from '../../../../Utils';
import commands from '../../commands';
import GlobalOptions from '../../../../GlobalOptions';
import { CommandOption, CommandValidate } from '../../../../Command';
import GraphCommand from '../../../base/GraphCommand';
import request from '../../../../request';
const vorpal: Vorp... |
export declare const defaultConfig: {
type: string;
properties: {
dataPath: {
type: string;
format: string;
example: string;
description: string;
};
};
required: string[];
default: {};
}; |
import * as assert from "assert";
import { XmlAttribute, XmlCollection, XmlElement, XmlObject } from "../src";
context("XmlCollection", () => {
@XmlElement({
localName: "child",
namespaceURI: "http://some.com",
})
class Child extends XmlObject {
@XmlAttribute({ localName: "id", defa... |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="cs" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Bruhcoin</source>
<translation>O Bruhcoinu</translation>
</messa... |
import merchantSessionKey from '../../src/utils/merchant-session-key'
import { ConfigOptions } from '../../src/client/configOptions'
beforeEach(() => {
jest.clearAllMocks()
})
describe('defult', () => {
test(`
WHEN default function is called
THEN a new merchant session key should return
`,... |
export function currentTimestamp(): number {
return new Date().valueOf();
} |
import React, { useState } from 'react';
import { View, Text, Image, Linking } from 'react-native';
import { RectButton } from 'react-native-gesture-handler';
import AsyncStorage from '@react-native-community/async-storage';
import heartOutlineIcon from '../../assets/images/icons/heart-outline.png';
import unfavoriteI... |
import { HttpClient } from '@angular/common/http';
import { Component, OnInit, OnDestroy, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { ToasterService } from 'angular2-toaster';
import { finalize, takeUntil } from 'rxjs/operators';
import { ServerAPI }... |
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-medication-plan-list',
templateUrl: './medication-plan-list.component.html',
styleUrls: ['./medication-plan-list.component.css']
})
export class MedicationPlanListComponent implements OnInit {
constructor() { }
ngOnInit() {
}
... |
module Fayde.Text {
export enum EmitChangedType {
NOTHING = 0,
SELECTION = 1 << 0,
TEXT = 1 << 1,
}
export class Proxy implements ITextOwner {
selAnchor: number = 0;
selCursor: number = 0;
selText: string = "";
text: string = "";
maxLength: nu... |
/// <reference types="node" />
import fs = require('fs');
import { AbstractInputFileSystem } from './common-types';
declare class SyncAsyncFileSystemDecorator {
fs: AbstractInputFileSystem;
readdir?(path: string, callback: (err: NodeJS.ErrnoException | null, files?: string[]) => void): void;
readFile?(fi... |
import { Injectable } from '@angular/core';
import { User } from './user.model';
import { Observable } from 'rxjs/Observable';
import { AngularFireDatabase, FirebaseListObservable, FirebaseObjectObservable } from 'angularfire2/database';
import 'rxjs/add/operator/map';
@Injectable()
export class UserService {
cons... |
import React, { SVGProps } from 'react';
import { IIblisReactUndrawProps } from '../iblis_react_undraw_props';
export const SvgAllTheData = (props: IIblisReactUndrawProps & SVGProps<SVGSVGElement>) => (
<svg
data-name="Layer 1"
viewBox="0 0 1120 829.801"
className={props.class}
width="100%"
height... |
/* eslint-disable import/no-unresolved */
import * as vscode from 'vscode';
/* eslint-enable import/no-unresolved */
import { ParseResult } from './parser';
import {
createLogger, Logger, LoggerConfig, validateLoggerConfig,
} from './logger';
import { createLogRotator, LogRotator } from './logRotator';
import { ensur... |
import { expect, haveResource } from '@aws-cdk/assert';
import { Stack } from '@aws-cdk/core';
import { SinglePageAppHosting } from '../../lib';
describe('Single Page App Hosting', () => {
it('should be valid', () => {
const stack = new Stack();
new SinglePageAppHosting(stack, 'SPA', {
... |
import type { IMove } from "../../../Interfaces/Options/Particles/IMove";
import { Attract } from "./Attract";
import { MoveDirection } from "../../../Enums/MoveDirection";
import { OutMode } from "../../../Enums/OutMode";
import { Trail } from "./Trail";
import type { RecursivePartial } from "../../../Types/RecursiveP... |
export interface CastToArrayBuffer {
toArrayBuffer(): ArrayBuffer;
}
export type CanCastToArrayBuffer = ArrayBuffer | CastToArrayBuffer;
export interface CreateOptions {
validate?: boolean;
}
export interface UnionType {
type: string;
value: any;
}
export function SerializeUint32Vec(
value: Array<CanCastT... |
GOCAD TSurf 1
HEADER {
name:SAFS-SGPR-SJMT-San_Gorgonio_Pass_midcrust_detachment-CFM5_2000m
*visible:true
*solid*color:0.085658 0.319847 0.695521 1
}
GOCAD_ORIGINAL_COORDINATE_SYSTEM
NAME Default
AXIS_NAME "X" "Y" "Z"
AXIS_UNIT "m" "m" "m"
ZPOSITIVE Elevation
END_ORIGINAL_COORDINATE_SYSTEM
TFACE
VRTX 1 492533.86377 376... |
import React from "react";
import Svg, { Path } from "react-native-svg";
import { IconProps } from "../../types/IconProps";
import { Icon } from "../../types/Icon";
const defaultProps: IconProps = {
size: 24
};
const TrendingUp: Icon = ({ size, ...props }: IconProps) => (
<Svg width={size} height={size} viewBox="0... |
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="it_IT">
<context>
<name></name>
<message id="calendar_item_events_all">
<source></source>
<translation>Tutto</translation>
</message>
<message id="calendar_item_events_no_allday">
<source></source>
... |
import React from "react";
import { useMaybeFragment } from "@wdp/lib/api/hooks";
import { graphql } from "react-relay";
import VolumeHero from "../VolumeHero";
import { BreadcrumbsBar } from "components/layout";
import EntityHTMLHead from "components/composed/entity/EntityHTMLHead";
import { VolumeLayoutFragment$key }... |
import { useEffect, useState } from 'react';
import { createScrollSpy } from './create-scroll-spy';
export const createScrollSpyFactory = (options: IntersectionObserverInit) => {
const { observe, onIntersectionChange, clean } = createScrollSpy(options);
return (url: string) => {
const [isActive, setActive] = ... |
import React, { useRef, useEffect, useState } from 'react';
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
interface DiffEditorProps extends BasicEditorProps {
modified: string;
opts: any;
}
/**
* value: 源代码
* modified: 修改过的代码
*/
function DiffEditor(props: DiffEditorProps) {
const { value,... |
// /src/image/linked_camera/materialiconssharp/24px.svg
import { createSvgIcon } from './createSvgIcon';
export const SvgLinkedCameraSharp = createSvgIcon(
`<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
<path d="M0 0h24v24H0V0z" fill="none"/>
<circle cx="12" cy="14" r="3... |
import { CustomQuery, Context } from '@vue-storefront/core';
import defaultMutation from './defaultMutation';
import { GetUserNameParams, GetUserNameResponse} from '../../../types/Api';
export default async function getUserName(context:Context, params:GetUserNameParams, customQuery?: CustomQuery): Promise<GetUserNameR... |
import { GeoJSON } from './GeoJSON';
import { Box } from '../base/Box';
import * as THREE from 'three';
import { Mall } from '../base/Mall';
export class ParseGeoJson {
constructor() { }
parse(json: GeoJSON): Box[] {
if (json.type !== 'FeatureCollection') {
console.error('geojson type字段不符合要求!');
return [... |
/// <reference path="./external/gm_config/types/index.d.ts"/>
import './external/gm_config/gm_config';
export class Configuration {
private static instance: Configuration = new Configuration();
static getInstance() {
return this.instance;
}
constructor() {
GM_config.init(
{
id: 'MacawUn... |
import * as React from "react";
import * as querystring from "query-string";
import Loading from "../Loading";
import { RouteComponentProps } from "react-router";
import {
CellMeasurer,
CellMeasurerCache,
AutoSizer,
List
} from "react-virtualized";
import gql from "graphql-tag";
import { useQuery } from "react... |
import * as core from '@actions/core';
import { getProtoc, getDartPlugin, getGRPC, getGRPCWeb } from './installer';
async function run() {
try {
const protocVersion = core.getInput('protoc-version') || '3.13.0';
await getProtoc(protocVersion);
const enableGRPC = core.getInput('enable-grpc') || false;
... |
import * as prom from 'prom-client';
import { WebSocket } from 'uWebSockets.js';
export interface MetricsInterface {
/**
* Handle a new connection.
*/
markNewConnection(ws: WebSocket): void;
/**
* Handle a disconnection.
*/
markDisconnection(ws: WebSocket): void;
/**
* Ha... |
import {
ComposableMap,
Geographies,
Geography,
Marker,
ZoomableGroup,
} from "react-simple-maps";
import { IMarker } from "../Models/IMarker";
import { SolarPanelIcon } from "./SolarPanel";
interface IMapChartProps {
markers: IMarker[];
onChooseCity: (city: string) => void;
}
export const MapChart = ({... |
import Vue from 'vue';
import Router from '../router';
import Component from 'vue-class-component';
@Component
export default class CatchIonicGoBack extends Vue {
// Catch the bubbled-up event from the Ionic's back button
catchIonicGoBack(event: Event): void {
if (!event.target) return;
// We only care fo... |
import path from 'path'
import browserSync from 'browser-sync'
import express, { Express } from 'express'
import errorOverlayMiddleware from 'react-dev-utils/errorOverlayMiddleware'
import webpack, {
Compiler,
Configuration,
DefinePlugin,
HotModuleReplacementPlugin,
Options,
} from 'webpack'
import webpackDev... |
import { GreengrassClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GreengrassClient";
import { CreateConnectorDefinitionRequest, CreateConnectorDefinitionResponse } from "../models/models_0";
import {
deserializeAws_restJson1CreateConnectorDefinitionCommand,
serializeAws_restJson1CreateConnec... |
/*
MIT License
Copyright (c) 2020 Egor Nepomnyaschih
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publ... |
import { Injectable } from '@angular/core';
import { Observable, of } from 'rxjs';
import * as moment from 'moment';
import { Post } from '../models/post';
@Injectable({
providedIn: 'root',
})
export class PostService {
posts: Post[] = [
new Post({
id: '1',
title: 'test',
url: 'test',
... |
import { useStoragePrefix } from "."
const STORAGE = window.localStorage
const getPrefixedKeys = (prefix: string) =>
Object.keys(STORAGE)
.filter(key => key.startsWith(prefix))
.map(key => key.replace(prefix, ""))
const setPrefixedItem = (prefix: string, key: string, value: string) =>
STORAGE.setItem(pre... |
import * as React from 'react'
import * as ReactDOM from 'react-dom'
import * as ReactTestRenderer from 'react-test-renderer'
import * as sinon from 'sinon'
import xhrMock, {delay, sequence} from 'xhr-mock'
import {
UseXhrResult,
useXhr,
} from '../index'
import {
SendHttpRequestData,
} from '../utils'
const sl... |
import Link from "next/link";
interface Props {
/**
* Determines whether this anchor links to external content
*/
isExternalLink: boolean;
/**
* The visible link name
*/
name: string;
/**
* The url the nav-link is pointing towards
*/
url: string;
}
const linkClassName =
"text-base font... |
import { TemplateProps } from "../src";
describe("TemplateProps", () => {
it("makes every variable 'optional'", () => {
type Variables = { title: string };
function generator(): TemplateProps<Variables> {
const variables = { title: "foo" };
return { variables, agent: {} } as any;
}
const ... |
import { Module } from '@nestjs/common';
import { UserController } from './user.controller';
import { UserDao } from './user.dao';
import { UserService } from './user.service';
@Module({
controllers: [UserController],
providers: [UserDao, UserService],
exports: [UserDao],
})
export class UserModule {} |
// TODO: creator coin buys: no-balance case is kinda dumb, we should have a module telling you to buy bitclout or
// creator coin
// TODO: creator coin buys: need warning about potential slippage
// TODO: creator coin buys: may need tiptips explaining why total != amount * currentPriceElsewhereOnSite
import { Change... |
import { Injectable } from '@angular/core';
@Injectable()
export class SettingsProvider {
private _apiUrl: string;
private _name: string;
constructor() {
// get from localstorage and use that if not use default
this._apiUrl = 'https://xfitness.dxt.rs/api';
// this._name = this._authProvider.currentU... |
import * as Immutable from "immutable"
import { Unit, Fun, Prod, Sum, unit, absurd, fst, snd, defun, fun, inl, inr, apply, apply_pair, id, constant, curry, uncurry, lazy, swap_prod, swap_sum, compose_pair } from "ts-bccc"
// import { mk_coroutine, Coroutine, suspend, co_unit, co_run, co_error } from "ts-bccc"
import * ... |
import {Component, EventEmitter, Input, Output} from '@angular/core';
import {MouseEventUtils} from "../../../utils/mouse-event-utils";
@Component({
selector: 'app-generic-button',
templateUrl: './generic-button.component.html',
styleUrls: ['./generic-button.component.scss']
})
export class GenericButtonCo... |
import { graphql } from 'gatsby'
import _ from 'lodash'
import * as React from 'react'
import BlogPosts from '../components/BlogPosts'
import Layout from '../components/Layout'
export default class GoList extends React.Component<any, any> {
public render(): JSX.Element | null {
const metaProps = {
... |
{
export function bar() {
}
} |
import React from 'react';
import { useSelector } from 'react-redux';
import { CompatibilityPage } from './CompatibilityPage';
import type { PublicCompatibilityPageProps } from './CompatibilityPage';
import { AppState } from '../../../store';
function ConnectedCompatibilityPage(props: PublicCompatibilityPageProps) {
... |
import {Pipe, PipeTransform} from '@angular/core';
@Pipe({
name:'convertToSpaces'
})
export class ConvertToSpacesPipe implements PipeTransform{
transform(value:string ,character:string):string{
return value.replace(character,' ');
}
} |
import { Component, OnInit } from '@angular/core';
import { EventsDataService, Event } from '../Services/events-data.service';
import * as moment from 'moment';
import { ActivatedRoute } from '@angular/router';
import { SocialService } from 'ng6-social-button';
import { MatSnackBar } from '@angular/material';
@Compon... |
export class ChangesModel {
constructor(public ID: number,
public Date: string,
public ChangeItem: string,
public ImporterApproved: string,
public PMApproved: string,
public Json: {
ChangeCost: { Cost, Currency, EqCost },
... |
import { Field } from '@nestjs/graphql';
import { InputType } from '@nestjs/graphql';
import { DeviceWhereUniqueInput } from './device-where-unique.input';
import { DeviceCreateWithoutDeviceExtrasInput } from './device-create-without-device-extras.input';
@InputType()
export class DeviceCreateOrConnectWithoutDeviceExt... |
import * as React from 'react';
import { DemoPage } from '../DemoPage';
import { ChoiceGroupPageProps } from '@fluentui/react-examples/lib/react/ChoiceGroup/ChoiceGroup.doc';
export const ChoiceGroupPage = (props: { isHeaderVisible: boolean }) => (
<DemoPage
jsonDocs={require('@fluentui/api-docs/lib/pages/react/... |
import { configure } from "@testing-library/dom"
import "@testing-library/jest-dom"
import { rest } from "msw"
import { setupServer } from "msw/node"
import * as data from "./__mocks__/data.json"
configure({ testIdAttribute: "data-qa" })
export const handlers = [
rest.get("/api/v1/lectures/", (req, res, ctx) => {... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.