lang
stringclasses 10
values | seed
stringlengths 5
2.12k
|
---|---|
typescript | export class DataScienceProductPathService extends BaseProductPathsService {
constructor(@inject(IServiceContainer) serviceContainer: IServiceContainer) {
super(serviceContainer);
}
public getExecutableNameFromSettings(product: Product, _?: Uri): string {
return this.productInstaller.translateProductToModuleName(product);
} |
typescript | export const randomIntInRange = (min = 0, max = 100) =>
Math.floor(Math.random() * (max - min + 1)) + min;
|
typescript |
context("generateKey", () => {
it("RSA 3072bits", async () => {
const alg: globalThis.RsaHashedKeyGenParams = {
name: "RSASSA-PKCS1-v1_5",
hash: "SHA-256",
publicExponent: new Uint8Array([1,0,1]),
modulusLength: 3072,
};
const keys = await crypto.subtle.generateKey(alg, false, ["sign", "verify"]);
assert.strictEqual((keys.privateKey.algorithm as RsaHashedKeyAlgorithm).modulusLength, 3072);
});
|
typescript |
export interface ITagCloudProps {
description: string;
context : IWebPartContext;
}
|
typescript |
mongoose.connect('mongodb://localhost:27017/upvoteDB', {
useNewUrlParser: true,
autoReconnect: true
})
.then(() => console.log('[master] Connected to MongoDB.'))
.catch((e) => console.log(e));
app.listen(port, () => {
console.log(`[express] Listening at port ${port}`);
});
|
typescript | export class Activity {
firstName: string | null;
lastName: string | null;
uid: string | null;
activity: string | null;
description: string | null;
link: string | null;
points: number | null;
id: string | null;
|
typescript | selector: 'app-household-home-loans',
templateUrl: './household-home-loans.component.html',
styleUrls: ['./household-home-loans.component.scss']
})
export class HouseholdHomeLoansComponent implements OnInit {
@Input()
public loansList: Loan[];
@Input()
public name: string;
constructor() { |
typescript | onChange={action('onChange')}
onSubmit={action('onSubmit')}
onClear={action('onClear')}
/>
))
.add('button text and input placeholder', () => (
<SearchInput
buttonText="buttonText"
placeholder="placeholder" |
typescript | failure,
HandleCommand,
HandlerContext,
HandlerResult,
MappedParameter,
MappedParameters,
Parameter,
Success,
Tags,
} from "@atomist/automation-client";
import * as slack from "@atomist/slack-messages/SlackMessages"; |
typescript | import { Medecin } from "./Medecin";
import { Patient } from "./Patient";
export class Rdv {
id: number;
dateRdv: string;
heure: string;
note: string;
patient: Patient;
medecin: Medecin;
} |
typescript | });
$('#chbDarkTheme').on('change', function () {
$('body').removeAttr('data-theme');
if ($(this).prop('checked')) {
$('body').attr('data-theme', 'dark'); |
typescript | {
path: '',
component: HomeComponent
},
{
path: 'page2',
// 懒加载
loadChildren: () => import('./page2/page2.module').then(m => m.Page2Module)
},
]; |
typescript | import type { IRemoteMiddlewareReqParams } from '@interfaces/i-remote-middleware-client';
/**
* Mock implementation of middleware
*/
class MiddlewareMock implements MiddlewareEntity {
id: number;
sender: string;
senderMethod: string;
target: string;
targetMethod: string;
type: MiddlewareType;
params: IRemoteMiddlewareReqParams;
|
typescript | colors: [theme.palette.secondary.light],
fill: {
opacity: 1
},
labels: [],
plotOptions: {
radialBar: {
dataLabels: { |
typescript | pagingOnly: 'PagingOnly',
parkLocation: 'ParkLocation',
room: 'Room',
sharedLinesGroup: 'SharedLinesGroup',
site: 'Site',
user: 'User',
virtualUser: 'VirtualUser',
voicemail: 'Voicemail',
} as const);
export default extensionTypes; |
typescript | import { Box } from '@fower/react'
// import {TickerInter} from '../../utils/types.ts'
interface TickerInter{
lastPrice: string //最新价格
lastQty: string //最新成交的数量
bidPrice: string //买一价
bidQty: string //买一价对应的数量
askPrice: string //卖一价
askQty: string //卖一价对应的量
highPrice: string//24h最高价
lowPrice: string //24h最低价
volume: string //24h成交量(USDT) |
typescript | label={translate('global.form.newpassword')}
placeholder={translate('global.form.newpassword.placeholder')}
type="password"
onChange={this.updatePassword}
validate={{
required: { value: true, errorMessage: translate('global.messages.validate.newpassword.required') },
minLength: { value: 4, errorMessage: translate('global.messages.validate.newpassword.minlength') },
maxLength: { value: 50, errorMessage: translate('global.messages.validate.newpassword.maxlength') }
}}
/>
<PasswordStrengthBar password={<PASSWORD>} />
<AvField |
typescript | );
try {
await handler(handlerParams as HandlerExtraParams & DataTypeOverrides);
if (!messageBackoff) {
channel.ack(message);
}
} catch (e: any) {
await failThisMessage(e);
}
},
{
consumerTag, |
typescript | import * as PropTypes from 'prop-types';
import { commonPropTypes } from '../../utils';
import { Box, BoxProps, BoxStylesProps } from '../Box/Box';
import { ChatDensity } from './chatDensityContext';
export interface ChatMessageDetailsOwnProps {
/** Chat density. */
density?: ChatDensity;
mine?: boolean;
}
export interface ChatMessageDetailsProps extends ChatMessageDetailsOwnProps, BoxProps {} |
typescript | res => {
const data = res.data.article;
store.setTitle(data.title);
store.setBody(data.body);
store.setDescription(data.description);
data.tagList.map(tag => {
store.addTagList(tag);
}); |
typescript |
interface ProjectProps {
project: {
name: string;
image: any;
githubLink: string;
liveLink?: string;
};
}
export default ({ project }: ProjectProps) => { |
typescript | return 'week';
}
return next;
};
export const PickerModeMap: Record<
PickerMode,
((next: PanelMode) => PanelMode) | null
> = {
year: getYearNextMode,
month: getMonthNextMode,
week: getWeekNextMode, |
typescript | import { FloatTerm, max, neg } from "@thi.ng/shader-ast";
/**
* Inline function. Variadic SDF shape subtraction (a - b) for any number of
* terms (at least 1 required).
*
* @param a -
* @param terms -
*/
export const sdfSubtract = (a: FloatTerm, ...terms: FloatTerm[]) =>
terms.reduce((a, b) => max(a, neg(b)), a);
|
typescript | const { Option } = Select;
const children = [];
for (let i = 10; i < 36; i++) {
children.push(<Option key={i.toString(36) + i}>{i.toString(36) + i}</Option>);
}
function handleChange(value) {
console.log(`selected ${value}`); |
typescript | {
path: 'contact',
component: ContactComponent
},
{ |
typescript | }
h! *= 60;
return [h!, s, l];
}
/**
* @param r Red in the range 0-255 |
typescript | import { IReadonlyTheme } from '@microsoft/sp-component-base';
import { PagesToDisplay } from '@src/utilities';
import { DisplayMode } from "@microsoft/sp-core-library";
import { WebPartContext } from '@microsoft/sp-webpart-base';
export interface IContainerProps {
currentPageId: number;
pagesToDisplay: PagesToDisplay;
treeFrom: number;
treeExpandTo: number;
themeVariant: IReadonlyTheme;
context: WebPartContext;
domElement: HTMLElement;
// all this is just for WebPartTitle control
showTitle: boolean; |
typescript | import type { Engine } from "tsparticles-engine";
import { PerlinNoiseGenerator } from "./PerlinNoiseGenerator";
export const perlinNoisePathName = "perlinNoise";
|
typescript | return (
<div className={styles.wrapper}>
{isParentAvailable && (
<div className={revealClass} ref={onRef}>
{children}
</div>
)}
</div>
); |
typescript | import HttpResponse from '../responses/HttpResponse';
export default class ApiProxyMiddleware extends BaseMiddleware<IAPIGatewayProxyHandlerAWS, IAPIGatewayProxyHandler, IAPIGatewayMiddlewareArgs> {
private wrappedFunction: IAPIGatewayProxyHandler;
constructor(wrappedFunction: IAPIGatewayProxyHandler<any>) {
super();
this.wrappedFunction = wrappedFunction;
}
getHandler(): IAPIGatewayProxyHandlerAWS {
|
typescript | version https://git-lfs.github.com/spec/v1
oid sha256:2d95c3517616db488e17d7813200a77103153e6473b5bba1d1702b0f6c8580b2
size 1760056
|
typescript | interface ToastCardProps {
item: IToastItem;
}
export const ToastCard: React.FC<ToastCardProps> = (props) => {
return (
<Card id="ToastCard">
<CardHeader
id="CardHeader"
title={ |
typescript | useEffect(() => {
if (isOpen) {
closeTimer();
}
}, [isOpen]);
return ( |
typescript | running: string;
finished: string;
error: string;
cancelled: string;
abnormal: string;
unknown: string;
};
};
priority: {
high: string; |
typescript | <path d="M57.39 80H464c61.9 0 112 50.1 112 112v48c0 8.8-7.2 16-16 16s-16-7.2-16-16v-48c0-44.2-35.8-80-80-80H57.39l57.41 52.2c6.5 5.9 7 16 1 22.6-5.9 6.5-16.02 7-22.56 1l-88.003-80C1.901 104.8 0 100.5 0 96c0-4.51 1.902-8.81 5.237-11.84L93.24 4.161c6.54-5.944 16.66-5.462 22.56 1.076 6 6.543 5.5 16.653-1 22.603L57.39 80zM470.6 291c10.5 7.8 17.3 19.5 19 32.4l17.6 134.4c3.7 28.7-18.7 54.2-47.6 54.2H116.4c-28.93 0-51.3-25.5-47.55-54.2l17.52-134.4c1.69-12.9 8.58-24.6 19.03-32.4l173.1-127.9c5.6-5 13.4-5 19 0L470.6 291zM272 207.7 124.5 316.8c-4.4 2.6-5.8 6.5-6.4 10.8l-17.5 134.3c-1.27 9.6 6.2 18.1 15.8 18.1H272V320.3c-.9-.2-.9-.4 0-.6v-112zm32 168.5V480h64.2L304 376.2zm101.6 103.4.3.4h53.7c9.6 0 17.1-8.5 15.8-18.1l-17.5-134.3c-.6-4.3-2.9-8.2-6.4-10.8L304 207.7v107.7l101.6 164.2z" />
</svg>
);
const SvgTentArrowTurnLeft = (props: SvgIconProps) => (
<SvgIcon component={SvgComponent} {...props} />
);
export default SvgTentArrowTurnLeft; |
typescript | import { eventBus, ElsaPlugin } from "../services";
import { ActivityDesignDisplayContext, EventTypes, SyntaxNames } from "../models";
import { parseJson } from "../utils/utils";
export class DynamicOutcomesPlugin implements ElsaPlugin {
constructor() {
eventBus.on(EventTypes.ActivityDesignDisplaying, this.onActivityDesignDisplaying);
}
onActivityDesignDisplaying = (context: ActivityDesignDisplayContext) => {
const propValuesAsOutcomes = context.activityDescriptor.inputProperties.filter(prop => prop.considerValuesAsOutcomes);
if (propValuesAsOutcomes.length > 0)
{ |
typescript |
if(!this.isProtocol(protocol)){
throw new Error('url must starts with http:// or https://')
}
let hostname:string = this.host.split('://').pop() || ''
if(hostname === undefined || hostname === null || hostname.length === 0) {
throw new Error('hostname is required to poke request.')
}
const full_url:Array<string> = hostname?.split('/') || []
hostname = full_url.shift() || ''
let path = this.options?.path || full_url.join('/')
path = `/${path}${Object.keys(this.options?.query || {}).length > 0 ? stringifyQuery(this.options?.query || {}) : ''}`
|
typescript | this.isLoading = true;
let type:string = this.usersForm.controls['typeFilter'].value;
let status:string = this.usersForm.controls['statusFilter'].value;
let search:string = this.usersForm.controls['search'].value;
this.userService.getUsersPaged(currentPage, perPage, undefined, undefined, type, search, status).subscribe(
data =>{
this.currentPage = currentPage;
this.perPage = perPage;
if(currentPage > 0)
{
this.users = this.users.concat(data.users);
}else |
typescript | /* Components */
export { default as BeaconProvider } from './components/BeaconProvider';
/* Hooks */
export { default as useBeaconRef } from './hooks/useBeaconRef';
export { default as useBeaconPosition } from './hooks/useBeaconPosition';
|
typescript | import { TutorEntity } from './tutor.entity';
import { ForumStatusEntity } from './forum-status.entity';
import { Forum_threadEntity } from './forum_thread.entity';
@Entity({ name: 'forum_post' })
export class Forum_postEntity extends AbstractEntity {
@Column({ type: 'text' })
content: string;
@OneToOne(() => ForumStatusEntity)
@JoinColumn({ name: 'forum_status_id', referencedColumnName: 'id' })
status: ForumStatusEntity;
@ManyToOne(() => Forum_threadEntity) |
typescript | title: string;
text: string;
trigger: React.ReactElement;
confirmText?: string;
rejectText?: string;
onConfirm: () => void;
onReject?: () => void;
}
const ConfirmationModal: React.FC<Props> = ({ title, text, trigger, onConfirm, confirmText, onReject, rejectText }) => {
return (
<Popup trigger={trigger} modal className="confirmationPopup">
{(close: () => void) => (
<> |
typescript | * "name": "My Extension",
* }
* ```
*
* * Config.js: |
typescript | createNewTransaction: (transaction: TransactionInput) => Promise<void>
deleteTransaction: (id: number) => Promise<void>
}
const TransactionsContext = createContext<TransactionsContextData>({} as TransactionsContextData);
export function TransactionsProvider ({children}: TransactionsProviderProps) {
|
typescript |
const handleChange = (newSrc: string): void => {
setModal(false)
if (typeof onChange === 'function') {
onChange(newSrc)
}
}
const handleClick = (): void => {
setModal(!modal)
}
const onRejected = (rejected: any): void => {
console.log(rejected)
}
|
typescript | ).toBeInTheDocument()
expect(input).toBeInTheDocument()
fireEvent.change(input, {
target: { value: '1000000' } |
typescript | {
cursor: [4, 9],
},
client,
);
await sendVSCodeKeys("<C-o>", 0);
await wait(1000);
await assertContent( |
typescript | perna: { ok: true },
braco: { ok: true },
peito: { ok: true },
}
}; |
typescript | describe('utils', () => {
test('toStorePath', () => {
expect(toStorePath('a')).toBe('a')
expect(toStorePath('a/b/c')).toBe('a.b.c')
})
describe('getStateByNamespace', () => {
test('', () => {
const state = {
module1: {
base: {
count: 2
} |
typescript | const res = temp.join('/');
return res;
}
export function isExistFile(file: any) {
try {
fs.statSync(file);
return true;
} catch (err) {
if (err.code === 'ENOENT') return false; |
typescript | export * from './path-follower';
export * from './target-follower';
|
typescript | }
const allSourcesExist = source.every(existsSync);
if (!allSourcesExist) {
logError('Not all input directories or files exist');
return false;
}
const validSource = isValidSource(...source); |
typescript | .on('data', (e) => {
data = data.concat(e)
})
.on('error', function (e) {
reject(e)
})
.on('close', () => {
resolve(data)
})
.on('end', () => {
resolve(data)
})
})
} |
typescript | export interface Action {
request: any;
response: any;
context?: any;
next?: Function;
}
|
typescript | case LOADING_USER:
return {
...state,
isLoading: true,
};
case USER_LOADED: |
typescript | import React from "react";
import { ClaimConfigurator } from "./ClaimConfigurator";
export default {
title: "ClaimConfigurator",
};
// export const WithBar = () => <ClaimConfigurator foo="bar" />;
// export const WithBaz = () => <ClaimConfigurator foo="baz" />;
|
typescript | import JobInfoDTO from '../dtos/JobInfoDTO';
export default interface CrawlerProvider {
searchJobs(): Promise<JobInfoDTO[]>;
}
|
typescript | export class AuthInterceptorService implements HttpInterceptor {
private readonly UNAUTHORIZED_STATUSES = [401, 403];
constructor(
private authenticationService: AuthenticationService,
private router: Router
) {} |
typescript | )((props: AppNavigator.Props) => (
<Navigator
screenProps={ ({ context: props.context }) }
navigation={
addNavigationHelpers({
dispatch: props.dispatch,
state: props.navigation,
addListener,
})
}
/>
));
|
typescript | import { IAccountDetails } from "app/eth-extended/data/account/details/IAccountDetails";
import { IProtocolAccountMeta } from "app/eth-extended/data/account/details/IProtocolAccountMeta";
interface IProtocolAccountDetails extends IAccountDetails {
meta: IProtocolAccountMeta;
}
export function isProtocolAccountDetails(accountDetails: IAccountDetails): accountDetails is IProtocolAccountDetails {
return !!(accountDetails.meta && accountDetails.meta.protocol);
}
|
typescript | import { executeTestCaseFor } from './birdbox-driver.test';
executeTestCaseFor('athena');
|
typescript | watch(flashMagic, v => {
ipcUpdateLyrice(UpdateType.UPDATE_MAGIC, v)
})
watch(index, v => {
ipcUpdateLyrice(UpdateType.UPDATE_INDEX, v)
})
watch(lyrice, v => {
ipcUpdateLyrice(UpdateType.UPDATE_LYRICE, v) |
typescript | import matter from 'gray-matter';
import { Heading, Stack } from '@chakra-ui/react';
import type { GetStaticProps, NextPage } from 'next';
import Head from 'next/head';
// import TweetEmbed from 'react-tweet-embed';
import { ExternalPost, InternalPost, PageMetadata } from '../../components/UI';
import { getParsedDate, sortByDate } from '../../utils'; |
typescript | }
const ExternalLink: FC<ExternalLinkProps> = ({ children, ...props }) => {
return (
<a {...props} target="_blank" rel="noreferrer noopener" className="text-primary">{children}</a>
); |
typescript |
getItemViewType(position:number):number {
return AdapterView.ITEM_VIEW_TYPE_IGNORE;
} |
typescript | import { ReactElement } from 'react';
import { PlaceholderProps } from '../components/Placeholder';
import { GroupBase } from '../types';
export declare type PlaceholderComponent = <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: PlaceholderProps<Option, IsMulti, Group>) => ReactElement;
declare const AnimatedPlaceholder: (WrappedComponent: PlaceholderComponent) => <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: PlaceholderProps<Option, IsMulti, Group>) => JSX.Element;
export default AnimatedPlaceholder;
|
typescript | export * from './authRedirect'
export * from './protectedComponent'
|
typescript |
export const MIN_BOARD_WIDTH = 5;
export const MAX_BOARD_WIDTH = 50;
export const MIN_BOARD_HEIGHT = 5;
export const MAX_BOARD_HEIGHT = 50;
export const SESSION_NAME = 'mineSweeper';
|
typescript | export default [
{ label: "Articles", path: "/" },
{ label: "About Me", path: "/pages/about" },
{ label: "Contact Me", path: "/pages/contacts" },
]
|
typescript | break;
}
}
});
}
}
); |
typescript | import { InquirerQuestion } from 'skitch-types';
export interface RoleConfig {
role: string;
}
export declare const requires: (res: RoleConfig) => string[][];
export declare const change: ({ role }: RoleConfig) => string[];
declare const questions: Array<InquirerQuestion>;
export default questions;
|
typescript | export * from './comment/comment.component';
export * from './comment-view/comment-view.component';
export * from './banta-comments/banta-comments.component';
export * from './live-comment.component';
export * from './comment-field/comment-field.component';
export * from './comments.module'; |
typescript | isIPBanned(ip: string): boolean;
getBanReason(id: string): string;
getIPBanReason(ip: string): string;
banPlayer(id: string, reason?: string): void;
banIP(ip: string, reason?: string): void; |
typescript | import styled from 'styled-components';
export const WrapperLayout = styled.section`
margin: 16px;
`;
|
typescript | private scaQueue: string[] = [];
constructor() {
for(let e of Deno.args){
this.scaQueue.push(e);
}
}
public hasNext(): boolean{
if (this.scaQueue.length > 0){ |
typescript | * @constant
* @type {CURVES}
* @implements {CURVES}
*/
export const CurveNames_Union3_Intersection0_Element: CURVES = {
class: "CURVES",
decoderFor: {},
|
typescript |
const SvgComponent = props => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" {...props}>
<path d="M100 32h187.1v32H107.3l42.8 192h337.7l54-192H384V32h157.8c20.3 0 36.5 20.25 30.8 40.66l-54 192.04c-3.9 13.8-16.5 23.3-30.8 23.3H158.2l14.6 64H496c8.8 0 16 7.2 16 16s-7.2 16-16 16H160c-7.5 0-13.9-5.2-15.6-12.5L67.23 32H16C7.164 32 0 24.84 0 16 0 7.164 7.164 0 16 0h64c7.47 0 13.95 5.17 15.6 12.45L100 32zm27.1 424c0-30.9 26-56 56-56 31.8 0 56 25.1 56 56s-24.2 56-56 56c-30 0-56-25.1-56-56zm56 24c14.2 0 24-10.7 24-24s-9.8-24-24-24c-12.4 0-24 10.7-24 24s11.6 24 24 24zM512 456c0 30.9-25.1 56-56 56s-56-25.1-56-56 25.1-56 56-56 56 25.1 56 56zm-56-24c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zM352 153.4l36.7-36.7c6.2-6.3 16.4-6.3 22.6 0 6.3 6.2 6.3 16.4 0 22.6l-64 64c-6.2 6.3-16.4 6.3-22.6 0l-64-64c-6.3-6.2-6.3-16.4 0-22.6 6.2-6.3 16.4-6.3 22.6 0l36.7 36.7V16c0-8.836 7.2-16 16-16s16 7.164 16 16v137.4z" />
</svg>
);
const SvgCartArrowDown = (props: SvgIconProps) => ( |
typescript | key = key.substr(this.url.length);
if (key.indexOf("/") !== -1) {
key = key.substr(0, key.indexOf("/") + 1);
}
if (key.indexOf("#") !== -1) {
key = key.substr(0, key.indexOf("#") + 1); |
typescript | Deno.test({
name: `"distillOperation" should call "onOperationDistilled" hook when defined`,
fn() {
const path = `/some/path`;
const httpMethod = `get`;
const operationId = `validOperationId`;
const onOperationDistilled: Spy<void> = spy();
const result = testDistillOperation(simpleOperation(operationId), {
httpMethod,
onOperationDistilled,
path, |
typescript | isOpen={editModal}
onRequestClose={closeEditModal}
lessonId={lessonId}
courseId={id}
setData={(data) => setLessons(lessons.map(lesson =>
lesson.id === data.id ? {...data} : lesson))}
/>
<Container>
<LessonsList>
{lessons.map((lesson, index) => ( |
typescript | if (shape.isSelected()) {
this.removeSelectedItem(shape);
}
shape.deleteConstraiedViews.getViews().forEach(v => this.remove(v));
this.idGenerator.unregisterExistingIdForPrefix(shape.viewType, shape.id);
this.idMap.delete(shape.id);
if (shape.getObj()) {
this.byObjIdMap.delete(shape.getObj().id);
} |
typescript | constructor(private route: ActivatedRoute) { }
ngOnInit() {
this.route.paramMap.subscribe(params => {
this.id = params.get('id'); |
typescript | import { InjectionToken } from '@angular/core';
export const SOCIALS_INJECTION_TOKEN = new InjectionToken(
'SOCIALS_INJECTION_TOKEN'
); |
typescript | private fn: Function
private intervalTime: any = 0
run(): void {
const { fn, intervalTime } = this
clearTimeout(intervalTime)
this.intervalTime = setTimeout(() => {
fn()
this.run() |
typescript | */
import gulp from "gulp";
import gutil from "gulp-util";
import { runAll } from "@shopify/theme-lint";
import { config } from "./includes/config";
import Reporter from "./includes/lint-reporter";
/** |
typescript | // Retrieve first office user can manage bookings for
setSelectedOffice(findOffice(user.permissions.officesCanManageBookingsFor[0].name));
}
}, [user, offices, selectedOffice, findOffice]);
useEffect(() => {
if (selectedOffice === undefined) {
setSelectedWithSlots(undefined);
} else {
setLoading(true);
getOffice(selectedOffice.id).then((result) => { |
typescript | import { waitForGethConnectivity } from 'src/geth/saga'
import { RootState } from 'src/redux/reducers'
import Logger from 'src/utils/Logger'
import { setGasPrice } from 'src/web3/actions'
import { web3 } from 'src/web3/contracts'
const TAG = 'web3/gas'
export const gasPriceSelector = (state: RootState) => state.web3.gasPrice
export const gasPriceLastUpdatedSelector = (state: RootState) => state.web3.gasPriceLastUpdated
export function* refreshGasPrice() {
yield call(waitForGethConnectivity)
let gasPrice = yield select(gasPriceSelector) |
typescript | return (
<footer className="fixed-bottom bg-primary text-light text-center text-lg-start">
© {new Date().getFullYear()}{" "}
<a className="link-light" href="https://fullstackcraft.com">
Full Stack Craft
</a> |
typescript | outputStyle: 'expanded'
};
return gulp.src(SYSTEM_SCSS)
.pipe(
sass(options).on('error', handleError)
)
.pipe(prefix({
cascade: false
}))
.pipe(gulp.dest('dist/css')); |
typescript | import { useRouterQueryString } from "./use-router-query-string";
export type UseDatasetResult = {
slug: string;
};
export const useDataset = (): UseDatasetResult => {
const slug = useRouterQueryString("datasetSlug");
return { slug };
};
|
typescript | export default null as import("core/nullable").default<
(x: {
target: import("..").default
keys: string | number
}) =>
Promise<unknown>
>
|
typescript | <Route path={path + route({ teamId }).outputs.template}>
<SearchFrame title="outputs">
<Outputs teamId={teamId} />
</SearchFrame>
</Route>
{team.tools && ( |
typescript | * and its job is to set the outputs to maximize the expected reward
*/
export class Brain {
temporal_window: number;
experience_size: number;
start_learn_threshold: number;
learning_steps_total: number;
learning_steps_burnin: number;
epsilon_min: number; |
typescript | segmentsManager: TrendSegmentsManager;
minXVal = Infinity;
minYVal = Infinity;
maxXVal = -Infinity;
maxYVal = -Infinity;
private chart: Chart;
private calculatedOptions: ITrendOptions;
private prependRequest: Promise<TTrendRawData>;
private ee: EventEmitter;
constructor(chartState: Chart, trendName: string, initialState: IChartState) {
var options = initialState.trends[trendName]; |
typescript | import "./CreditCard.scss"
import { useState } from "react"
import classnames from "classnames"
import { CardFormType } from "../../organisms/CreditCardForm/CreditCardForm"
interface P {
cardNumber: number[]
date: {
month: number[]
year: number[]
}
name?: string
cwr: number[]
isReverse?: boolean |
typescript | export const GitCommit = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="feather feather-git-commit">
<circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line>
</svg>`
|
typescript | public dialogRef: MatDialogRef<AccountEditComponent>,
private fb: FormBuilder,
) {
super(data, dialogRef);
}
/* Optional */ |
typescript | /*
* rock3d.js: A 3D game engine for making retro FPS games
* Copyright (C) 2018 <NAME> <<EMAIL>>
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software. |
typescript | return (
<Component
{...(Component === 'input' && { type: type })}
className={_className}
{...rest}
ref={ref}
>
{children}
</Component>
)
},
) |
typescript | import { Effects } from 'redux-effects-middleware';
import { navigationEffects } from '../navigation/Navigation';
import { StoreState } from './types';
export function initEffects(effects: Effects<StoreState>) {
navigationEffects(effects);
}
|
typescript |
import { SystemRoutingModule } from './system-routing.module';
import { SystemComponent } from './component/system/system.component';
import { TranslateModule } from "@ngx-translate/core";
@NgModule({
declarations: [SystemComponent],
imports: [
CommonModule,
SystemRoutingModule,
TranslateModule,
]
}) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.