text stringlengths 3.08k 15.5k |
|---|
/*
The MIT License (MIT)
Copyright (c) 2021 Vercel, Inc.
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, mod... |
<reponame>ricokahler/react-style-system<filename>packages/collect/src/transformCssTemplateLiteral.ts
import * as t from '@babel/types';
import generate from '@babel/generator';
import requireFromString from 'require-from-string';
const errorMessage =
'This is a bug in flair. Please open an issue.';
function parsePr... |
import { Command, flags } from "@oclif/command";
import path from "path";
import fs from "fs";
import { promisify } from "util";
import prompts from "prompts";
import dedent from "dedent";
import { bold, dim, green, underline } from "ansi-colors";
import {
findVault,
isVault,
to,
isPluginInstalled,
installPlu... |
<filename>extension/src/SymbolReference/types/AppPackage.ts<gh_stars>0
import * as AdmZip from "adm-zip"; // Ref: https://www.npmjs.com/package/adm-zip
import * as fs from "fs";
import * as path from "path";
import { ALObject } from "../../ALObject/ALElementTypes";
import { ManifestPackage, NavxManifest } from "../inte... |
// Experimental API below
/**
* get input values
*
* Extended by: <NAME> <<EMAIL>>
* Now gets values of inputs (including "checked" status radios, checkboxes), textareas and selects (including multiselects)
* Tries to identify the elements as exact as possible, falls back to numeric index when identification fail... |
<gh_stars>0
import {
Component,
OnInit,
ViewChild,
ViewContainerRef,
ComponentFactoryResolver,
Compiler,
ReflectiveInjector,
NgModule,
Input,
Output,
EventEmitter,
OnChanges,
Directive,
Type,
OnDestroy
} from "@angular/core";
import { Observable } from "rxjs/Observable";
import {
FormControl,
FormGroup... |
import {
Panel,
Group,
Color,
navigator,
Gravity,
animate,
Image,
Text,
ScaleType,
jsx,
VLayout,
layoutConfig,
Stack,
createRef,
ViewHolder,
ViewModel,
VMPanel,
FlexLayout,
Wrap,
FlexTypedValue,
FlexDirection,
Justify,
GestureContainer,
modal,
Scroller,
} from "doric";
... |
<reponame>u6th9d/rpc-demo
import net = require("net");
import { EventEmitter } from "events";
export abstract class Proxy extends EventEmitter {
public type: "client" | "server";
private socket: net.Socket;
private rBuffers: Buffer[];
private wBuffers: Buffer[];
private callbacks: Callbacks;
pr... |
<filename>app/scripts/controllers/main.ts
/// <reference path="../app.ts" />
'use strict';
module tdmApp {
export interface IMainScope extends ng.IScope {
onPlaceOrder: Function;
onReset: Function;
onChangeOrder: Function;
checkVeg: Function;
pizza: string;
cold: string;
name: string;
... |
<filename>main/pluginManager.ts
import * as fs from 'fs';
import * as _ from 'lodash';
import * as path from 'path';
import * as util from 'util';
import { getLocale } from '../common/language';
import { ILoadedFolder, ILoadedGroup, ILoadedPath, IParsedFile } from '../typings';
import getPlugins, { IPlugin } from './p... |
<filename>kafka-manager-console/src/constants/status-map.ts
import { IStatusMap, IStringMap, ILabelValue } from 'types/base-type';
export const optionMap = [
'byteIn/byteOut',
'bytesRejectedPerSec',
'failFetchRequestPerSec',
'failProduceRequestPerSec',
'fetchConsumerRequestPerSec',
'healthScore',
'logFlu... |
<filename>app/features/distnet/distnetClasses.ts
import fs from 'fs';
import * as R from 'ramda';
export const APP_NAME = 'dist-task-lists';
/**
* This is the main object stored into the state with the name 'distnet'.
* */
export interface DistnetState {
settings: SettingsInternal;
settingsChanged: boolean;
s... |
import { useAppDispatch, useAppSelector } from '../../../appStore/hooks';
import {
getKMeans,
selectKmeansTweets,
selectSearchWords
} from '../../../appSlice/appSlice';
import * as _ from 'lodash';
import { useState } from 'react';
import { format } from 'date-fns';
import locale from 'date-fns/locale/es';
impor... |
import { SDK } from "codechain-sdk";
import { Block, H256, U64 } from "codechain-sdk/lib/core/classes";
import * as _ from "lodash";
import { Job, scheduleJob } from "node-schedule";
import { InvalidBlockNumber, InvalidTransaction } from "../exception";
import { BlockAttribute } from "../models/block";
import * as Bloc... |
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import './account-summary.scss';
import autobind from 'autobind-decorator';
import cn from 'classnames';
import { observer } from 'mobx-react';
import React, { Component } from 'react';
import { IconButton } from '@fluentui/react/lib/Button';... |
import React, { useEffect, useState } from 'react';
import { render } from 'react-dom';
import $ from 'jquery';
import { fire } from 'delegated-events'
import * as pageDetect from 'github-url-detection';
import {
Callout, Stack,Link, Text, initializeIcons,
mergeStyleSets, FontWeights, DirectionalHint
} from '@fluen... |
<reponame>howard-tian/kdsconsole
import { Component, OnInit, Inject } from '@angular/core';
import { FormControl, Validators } from '@angular/forms';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { TranslateService } from '@ngx-translate/core';
import { AlertService } from '../../../s... |
import { AxiosInstance } from 'axios'
import { IOnCheckoutSuccess } from '..'
import { IError, IEvent, ITicket, IUserProfile } from '../types'
export interface IClientRequest extends AxiosInstance {
setGuestToken: (token: string) => void
setAccessToken: (token: string) => void
setBaseUrl: (baseUrl: string) => v... |
/**
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership.
*
* 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... |
import fetch from "isomorphic-unfetch";
import qs from "querystringify";
import {
IDataset,
IDatasetListResponse,
IDatasetMetadataResponse,
IStockOverlayFetchResponse,
ITickersResponse,
} from "./dataTypes/response";
import {Paths} from "./paths";
import {validateRangeDateFormat} from "./utils";
export inter... |
/* tslint:disable:no-non-null-assertion */
import { CreateAddressInput, UpdateAddressInput, UpdateCustomerInput } from '@vendure/common/lib/generated-shop-types';
import { AttemptLogin, GetCustomer } from '@vendure/common/lib/generated-types';
import gql from 'graphql-tag';
import path from 'path';
import { ATTEMPT_LO... |
// eslint-disable-next-line eslint-comments/disable-enable-pair -- x
/* eslint-disable func-style, no-restricted-imports -- x */
import chai from "chai"
import { RegExpParser, visitRegExpAST } from "regexpp"
import type { Alternative, Node } from "regexpp/ast"
import type { OptionalMatchingDirection } from "../../../li... |
import { useContext, useState } from 'react'
import { Form, Button, Alert, Card } from 'react-bootstrap'
import { useFormik } from 'formik'
import { UserProfileContext } from '../../contexts/UserProfile.Context';
import { IFetchError } from '../../lib/types/types';
import { capitalizeString, handlePotentialAxiosError, ... |
<gh_stars>1-10
import { AsyncMultiTree, IAsyncMultiTree } from "src/base/browser/secondary/tree/asyncMultiTree";
import { ITreeMouseEvent, ITreeSpliceEvent } from "src/base/browser/secondary/tree/tree";
import { Disposable, DisposableManager } from "src/base/common/dispose";
import { Emitter, Register } from "src/base/... |
import { DataGenerator } from '../dataGenerator'
/**
* Options for the Spectrum data generator.
*/
export interface SpectrumDataOptions {
/**
* How many samples to generate.
*/
numberOfSamples: number
/**
* How many values are in a single spectrum sample.
*/
sampleSize: number
... |
import { KubernetesObject } from "@kubernetes/client-node"
import { K8SResourceType, KV, OperateFunction, PlanContextData } from "yam-types"
import { AppAlert } from "../types.d"
const DEFAULT_ALERT_INTERVAL = "8h"
const ALL_SEVERITY = ["warning", "error", "critical"]
let defaultRuleLabels = {
"release": "prometheu... |
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-nocheck
import React, { FunctionComponent, useEffect } from 'react';
import {
Card,
CardBody,
CardFooter,
PaginationVa... |
<filename>projects/chartjs-widgets/src/lib/time-series/time-series.ts
import {ChangeDetectionStrategy, Component, ElementRef, Inject, ViewChild} from '@angular/core';
import {
MATERIAL_COLORS,
SavedFiltererState,
WIDGET_DATA,
WidgetConfig,
WidgetData
} from '@crafted/components';
import {DataSource, Filterer... |
import builder, { BuilderComponent, BuilderContent } from "@builder.io/react";
import { GetStaticPaths, GetStaticProps } from "next";
import React, { useEffect, useState } from "react";
import { GetApp } from "../../components/GetApp";
import Layout from "../../components/Layout";
import { AppInfo } from "../../interf... |
import { PiniaPluginContext, Store, SubscriptionCallbackMutation } from 'pinia'
import { computed, ComputedRef, reactive } from 'vue'
import { compress, decompress } from 'lzutf8'
declare module 'pinia' {
export interface DefineStoreOptionsBase<S, Store> {
history?: boolean | Partial<HistoryPluginOptions>
}
... |
import React, { useState, useRef, useEffect } from 'react';
import { Dimensions } from 'react-native';
import { View, StyleSheet, ActivityIndicator } from 'react-native';
import WebView from 'react-native-webview';
import YoutubeIframe, { InitialPlayerParams } from 'react-native-youtube-iframe';
import Video from 'reac... |
import * as httpHeaders from 'http-headers';
import { Red, Node } from 'node-red';
import { Server, createServer, IncomingMessage, ServerResponse } from 'http';
import { Socket, createSocket } from 'dgram';
export interface Device {
UUID: string,
HTTP_PORT: number,
SSDP_RESPONSE: Buffer,
DESCXML: stri... |
import ClickAwayListener from "react-click-away-listener";
import { useNavigate } from "react-router";
import Wallet from './Wallet';
import { useState, useEffect } from 'react';
import { getWalletPlanets } from "scripts/api";
import { getGlobalState, useGlobalState } from "hooks/useGlobalState";
import GalacticSpec fr... |
import { Connection, PublicKey, Account, SystemProgram, Transaction } from '@solana/web3.js';
import axios from 'axios';
import { Obligation, ObligationParser } from './layouts/obligation';
import { bits, blob, struct, u8, u32, nu64 } from 'buffer-layout';
import { EnrichedReserve, ReserveParser } from './layouts/reser... |
/*
* Copyright (c) 2022 R3BL LLC. All rights reserved.
*
* 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 appli... |
<filename>src/graphics/Renderer.ts
import { IndexBuffer } from "./IndexBuffer";
import { VertexBuffer } from "./VertexBuffer";
import { Shader } from "./shader/Shader";
import { mat3, mat4 } from "gl-matrix";
import { Texture2D } from "./Texture2D";
import { UniformBuffer } from "./UniformBuffer";
import { Material } f... |
<gh_stars>0
import { runClient, invocationResponse, clearInvocationResponse, activeSocket,
sendInvocationParams, sendClientDone, isConnected } from './SeleniumIpcClient';
import { tempFile, toTemp, fromTemp, projectDir,
logFile, fileToString, wdioConfigFile, pathExists } from './FileUtils';
import ... |
<gh_stars>10-100
import { select, event, geoPath, geoNaturalEarth1, geoEquirectangular } from 'd3'
import { getPercentage, getActiveCase, getActiveCaseID } from 'utils'
import { Country, IDProvince } from 'typings/api'
interface Legend {
color: string
value: number
}
export const worldLegends: Legend[] = [
... |
<reponame>vuescape/reporting-time
import { CalendarDay } from '../CalendarDay'
import { CalendarMonth } from '../CalendarMonth'
import { CalendarQuarter } from '../CalendarQuarter'
import { CalendarYear } from '../CalendarYear'
import { FiscalMonth } from '../FiscalMonth'
import { FiscalQuarter } from '../FiscalQuarter... |
import React from "react";
import { Maybe } from "true-myth";
import { Form, Formik, FormikProps } from "formik";
import Big from "big.js";
import { styled } from "@/uikit";
import { Button } from "@/uikit/components/Button";
import { hexToRGBA } from "@/util/hexToRGBA";
import c999Icon from "@/assets/icons/c999.svg";
... |
import React, {
MouseEventHandler,
ReactNode,
useContext,
useReducer,
useRef,
} from "react";
import MButtonComponent from "../../generic/MButton";
import { createStyles, makeStyles, Theme } from "@material-ui/core";
import { DialogContext } from "../../context/DialogContext";
import { IDialogContext } from "... |
import { DumpJoint } from './joints/dumpJoints';
import { DumpShape } from '../collision/shapes/dumpShapes';
import { b2Fixture } from './b2Fixture';
import { b2Body, b2BodyType } from './b2Body';
import { b2Joint, b2JointType } from './joints/b2Joint';
import { b2World } from './b2World';
import { b2Assert } from '../... |
import { Component, ElementRef, Inject, Input, OnInit, PLATFORM_ID, QueryList, ViewChild, ViewChildren } from '@angular/core';
import { Product } from '../../interfaces/product';
import { CarouselComponent, SlidesOutputData } from 'ngx-owl-carousel-o';
import { FormControl } from '@angular/forms';
import { CartService ... |
/*
* Copyright 2022 Salto Labs Ltd.
*
* 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 ... |
import React, { useState, useCallback, useEffect } from 'react';
import { MapTypeStyle } from 'google-map-react';
import {
Loc,
useAuth,
MapParams,
detectLocation,
ObjectItem,
ObjectItemComponentProps,
Place,
Story,
Chat,
leaveComment,
voteUp,
closeObject,
useLoadObjects,
PointingSegment,
... |
import {Box, Flex, PseudoBox, PseudoBoxProps} from '@chakra-ui/core'
import {
faChartArea,
faCompass,
faCubes,
faDatabase,
faGlobe,
faInfoCircle,
faLayerGroup,
faPencilAlt,
faServer,
faSignOutAlt,
faTh,
faWifi,
IconDefinition
} from '@fortawesome/free-solid-svg-icons'
import get from 'lodash/g... |
import { ApiServiceClient } from '../protos/ApiserviceServiceClientPb';
import {
LoginRequest,
LoginResponse,
RefreshRequest
} from '../protos/authservice_pb';
import { token } from '../utils/token';
import {
ChangePasswordRequest,
ChangePrivilegeRequest,
DeleteUserRequest,
NewUserRequest,
SearchRequest... |
var MAX_WEIGHT = 100;
var MAX_RADIUS = 50;
var weightMutation = d3.random.normal(0, C.WEIGHT_MUTATION_CONSTANT);
var radiusMutation = d3.random.normal(0, C.RADIUS_MUTATION_CONSTANT);
var colorMutation = d3.random.normal(0, C.COLOR_MUTATION_CONSTANT);
function bound(x, a, b) {
if (x < a) return a;
if (x > b) return ... |
<gh_stars>1-10
import BreakException from "@ungate/plugininf/lib/errors/BreakException";
import ErrorException from "@ungate/plugininf/lib/errors/ErrorException";
import { IParamsInfo } from "@ungate/plugininf/lib/ICCTParams";
import IContext, { IFormData } from "@ungate/plugininf/lib/IContext";
import { IGateQuery } f... |
<reponame>ken5scal/crossfeed
import buildRequestFilter from './buildRequestFilter';
function buildFrom(current, resultsPerPage) {
if (!current || !resultsPerPage) return;
return (current - 1) * resultsPerPage;
}
const nonKeywordFields = new Set(['updatedAt', 'createdAt']);
function buildSort(sortDirection, sortFi... |
'use strict'
import {
isString, isObject, isUndefined,
merge, first, last, chain, trimEnd } from 'lodash'
import { inspect } from 'util'
import { sep } from 'path'
import stringRender from 'string-render'
export interface IErrorLike {
message: string,
stack?: string,
name?: string
}
interface IElement {
... |
<filename>js/src/index.ts<gh_stars>10-100
/* eslint-disable max-classes-per-file */
import {
Dialog, showDialog, CommandToolbarButton,
} from "@jupyterlab/apputils";
import {
DocumentRegistry,
} from "@jupyterlab/docregistry";
import {
PageConfig,
} from "@jupyterlab/coreutils";
import {
INotebookModel, Note... |
import React from 'react'
import * as AlternateUrls from '../../config/modifiedCountries'
import { WIKI_API_ADD_COUNTRY } from '../../config/config'
import { LoadingSpinner }from '../loading-spinner/index'
import './styles.scss'
interface IProps {
country : any
}
interface IState {
isLoaded : boolean
isError ... |
/*
Copyright 2019 Google Inc.
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, software
dis... |
<reponame>GabrielInTheWorld/oauth-2-app<gh_stars>0
import PouchDB from 'pouchdb';
import * as PouchDBFind from 'pouchdb-find';
import { Constructor, DatabasePort, ReplicaObject } from '../interfaces/database-port';
import { Constructable } from '../../application/model-layer/core/modules/decorators';
import { Logger }... |
/**This JSON format is used for members of a type, so that users can see a short-but-sweet view of the member and understand what it is with an anchor going to the fuller more detailed view of the member.*/
export interface CompactFullUris {
/**The file location to the compact partial view of the member of the type t... |
<filename>dist/custom-elements/index.d.ts<gh_stars>1-10
/* MdsComponents custom elements bundle */
import type { Components, JSX } from "../types/components";
interface MxBadge extends Components.MxBadge, HTMLElement {}
export const MxBadge: {
prototype: MxBadge;
new (): MxBadge;
};
interface MxBanner extends Co... |
import {Injectable} from '@angular/core';
import {BehaviorSubject, interval, ReplaySubject, Subject} from 'rxjs';
import {GameGrid, MoveDirections, TileState} from '../definitions';
import {filter, switchMap, take, tap} from 'rxjs/operators';
interface Part {
x: number, y: number
}
@Injectable()
export class Game... |
<filename>Client/src/app/components/assignation-special-request/assignation-special-request.component.ts
import { Component, OnInit } from '@angular/core';
import { FormGroup, FormBuilder, Validators, FormArray } from '@angular/forms';
import { WeekDay } from '@angular/common';
import { Section, Building, Classroom, As... |
import type { Ban, BanCancellation, BanExtension } from '../entities'
import { type BanRepository, BanScopes } from '../repositories'
import { ConflictError, ForbiddenError, NotFoundError, UnprocessableError } from '../errors'
import { constants, util } from '../util'
import { inject, injectable } from 'inversify'
impo... |
// Copyright 2019-2022 @polkadot/extension-ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { NetworkJson } from '@subwallet/extension-base/background/KoniTypes';
import { InputFilter, Link } from '@subwallet/extension-koni-ui/components';
import useFetchNetworkMap from '@subwallet/extension-kon... |
<reponame>gintamamadao/js-sql-query
import Base from "./base";
import { TableOptions } from "../constant/enum";
import { TABLE_OPT_VALUES, FEILD_TEMPLATE } from "../constant/constant";
import { DialectTypes } from "../constant/enum";
import { Type } from "schema-verify";
import { tableInfoVerify } from "../verify/build... |
import * as React from 'react';
import { RowConteiner, CollumConteiner } from './Layout';
import { useRef, useState, useEffect } from 'react';
import { strictEqual } from 'assert';
import './mardownHolder.scss';
var marked = require('marked');
var fs = require("fs");
const Label = ({children, onClick}: any) => (
... |
<filename>test/client/get_token_silently.test.ts
/**
* @jest-environment jsdom
*/
import { TextEncoder } from 'util'
import { Crypto } from '@peculiar/webcrypto'
import { mockCodeToTokenFetch, setup } from './helper'
// global.crypto = new Crypto()
// global.TextEncoder = TextEncoder
const mockCacheGet = jest.fn().m... |
// Copyright (c) 2019 <NAME>
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
import * as React from 'react';
import { Icon, Image, Menu, Sidebar, Container, Popup, Responsive, IconProps } from "semantic-ui-react";
import { NavLink as Link, NavLinkProps, withRouter, RouteC... |
<filename>src/multiStepInput.ts
import {
QuickPickItem,
window,
Disposable,
QuickInputButton,
QuickInput,
ExtensionContext,
QuickInputButtons,
} from "vscode";
import { fileServer } from "./fileserver";
interface IPickItem extends QuickPickItem {
goImterface: fileServer.IInterface;
}
export async func... |
import React, { useState } from 'react';
import { FormGroup, Input, Label } from 'reactstrap';
import { useId } from '../../../hooks/useId/useId';
import {
FieldCompatibleWithPredeterminedOptions,
isOptionSelected,
getKeyForOption
} from '../../option';
import { FieldCompatible } from '../../types';
import { useO... |
/* eslint-disable */
import {
ASN1Element as _Element,
ASN1TagClass as _TagClass,
OBJECT_IDENTIFIER,
OPTIONAL,
} from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
export { SMIME_CAPS } from "../AlgorithmInformation-2009/SMIME-CAPS.oca";
/* START_OF_SYMBOL_DEFINITION SMIMECapa... |
import React, { Fragment, useEffect, useState } from 'react';
import styles from '@/utils/table.less';
import { FirmwareData } from './data';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Button, Card, Divider, message, Popconfirm, Spin, Table } from 'antd';
import { ColumnProps, PaginationConfig... |
/*
MIT License
Copyright (c) 2019 <NAME>
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, publish, distrib... |
<filename>src/core/workers/noteWorker.ts
import { convertNoteResponse, convertSynchronizeNotesResponse } from 'services/api/converters';
import { storage } from 'services/storage';
import { IServerNote, IServerSyncNote } from 'services/api/types/Note';
import { NoteFieldsForCreation, INote, TemporaryId, NoteId } from '... |
import gql from 'graphql-tag';
import * as React from 'react';
import * as ApolloReactCommon from '@apollo/react-common';
import * as ApolloReactComponents from '@apollo/react-components';
import * as ApolloReactHoc from '@apollo/react-hoc';
import * as ApolloReactHooks from '@apollo/react-hooks';
export type Maybe<T> ... |
/* tslint:disable no-any */
/**
* @todo Break the client portion into a new package
* @todo Bring tests back and convert them to work with jest
* @todo Create integration test for the CLI addon
* @todo Better code abstraction
*/
import type { Compiler, Stats } from "webpack";
import { pathMatch } from "./helpers"... |
<gh_stars>10-100
// 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, Version 2.0
// (the "Licen... |
<filename>src/main/main.ts
/* eslint global-require: off, no-console: off, promise/always-return: off */
/**
* This module executes inside of electron's main process. You can start
* electron renderer process from here and communicate with the other processes
* through IPC.
*
* When running `npm run build` or `np... |
import { useCallback, useState } from "react";
import { useSnackbar } from "notistack";
import {
ChainId,
CHAIN_ID_SOLANA,
getEmitterAddressSolana,
hexToNativeString,
ixFromRust,
parseSequenceFromLogSolana,
postVaaSolanaWithRetry,
getClaimAddressSolana,
} from "@certusone/wormhole-sdk";
import getSigned... |
<reponame>pixelpicosean/voltar<gh_stars>10-100
import { res_class_map } from 'engine/registry';
import { Vector2 } from 'engine/core/math/vector2';
import { Rect2 } from 'engine/core/math/rect2';
import { Transform2D } from 'engine/core/math/transform_2d';
import { Color } from 'engine/core/color';
import { Shape2D } ... |
<reponame>maxs-test/joplin
import * as fs from 'fs-extra';
import * as path from 'path';
import * as process from 'process';
const { execCommand, execCommandVerbose, rootDir, resolveRelativePathWithinDir, gitPullTry } = require('./tool-utils.js');
interface NpmPackage {
name: string;
version: string;
date: Date;
}
... |
import './ChannelsCard.scss';
import React from 'react';
import Card from 'react-bootstrap/Card';
import Button from 'react-bootstrap/Button';
import ListGroup from 'react-bootstrap/ListGroup';
import { ChannelModel } from '../../model/chat/channel.model';
import { ConfirmDialogCommon } from '../shared/dialog/ConfirmDi... |
<gh_stars>0
import { config } from "dotenv";
const path = require('path');
// console.log(path.join(__dirname, '../.env'));
// const replace = require('replace-in-file');
// const options = {
// files: path.join(__dirname, '../.env'),
// from: [/^lat.*\n/gm,
// /^lon.*\n/gm,
// // /^EDGE_PORT.*\n/gm,
// ... |
import * as React from "react";
import { DeepPartial } from "ts-essentials";
export interface ISize {
width: number;
height: number;
}
export interface IPosition {
left: number;
top: number;
}
// Items and behaviours
export interface IItem {
position: IPosition;
itemId?: number;
ables: {
rotate: b... |
<reponame>hmcts/civil-citizen-ui<filename>src/main/routes/features/response/responseType/citizenResponseTypeController.ts<gh_stars>1-10
import * as express from 'express';
import {
CITIZEN_ALREADY_PAID_URL,
CITIZEN_REJECT_ALL_CLAIM_URL,
CITIZEN_RESPONSE_TYPE_URL,
CLAIM_TASK_LIST_URL,
} from '../../../urls';
imp... |
import {
State,
Player,
Card,
suits,
cardPoints,
trickWinner,
} from '../simulator'
import { playerWithCard } from '../simulator/simulator'
import '../utils/arrayGenerate'
import { range } from '../utils/range'
export type GameSummary<L extends number> = {
size: L
summary(state: State, player: Player, ... |
//Thanks to https://stackoverflow.com/questions/105034/how-to-create-guid-uuid
export function uuidv4() {
// @ts-ignore
return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c => (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16) )
}
export function adHocId(){
return uuidv4()
}
function... |
import { on, once, emit, showUI } from '@create-figma-plugin/utilities'
import { validateSelection, SelectionState } from './utils/selection'
import { getCastedShadows } from './utils/shadow'
import { hexToGL } from './utils/color'
import { searchForEnclosingNode, isSymbol } from './utils/node'
import { WINDOW_INITIAL_... |
/* eslint-disable @typescript-eslint/no-explicit-any */
import React from 'react';
import { TouchableOpacity } from 'react-native';
import { Col, Row, Text } from 'native-base';
import styles from './PersonInfoRow.styles';
import renderMaskedOrResult from '../../../helpers/renderMaskedOrResult';
import { connect } from... |
<filename>modules/graphql/src/migration/permissions/PermissionsGenerator.ts<gh_stars>10-100
import { IDbSchema } from "../DbSchemaInterface";
import { PoolClient, OPERATION_SORT_POSITION } from "soniq";
import { IHelpers } from "../schemaExtensions/ISchemaExtension";
import { ExpressionCompiler } from "../ExpressionCom... |
/**
Copyright 2021 NFT-DAO 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 applicable law or agreed to in writing, software
distr... |
import React, { useState, useMemo, useCallback, CSSProperties } from 'react';
import { Player, File, Rank, beginGame, fileDifference, rankDifference, GameRule, GamePiece } from '../chess/game';
import { ReactComponent as BlackBishop } from '../svg/bb.svg';
import { ReactComponent as BlackKing } from '../svg/bk.svg';
im... |
/** @format */
function n(this: any, e) {
this.init(e || {});
}
n.prototype = {
init: function (e) {
this.phase = e.phase || 0;
this.offset = e.offset || 0;
this.frequency = e.frequency || 0.001;
this.amplitude = e.amplitude || 1;
},
update: function () {
return (this.phase += this.frequenc... |
import Fuse from 'fuse.js'
import { atom, DefaultValue, selector } from 'recoil'
import { AllToggleState, SortOrder, State } from '@core/subscribe'
import { getName } from '@core/utils'
import { DataLoadState } from '@core/const'
import { defaultState } from './const'
import { SortKey, VTB } from './type'
const getU... |
import { GetBreaksResponse } from '@mymicds/sdk';
import * as portal from './portal';
import moment from 'moment';
/**
* Gets the day that school will start for a given year.
* Based on two consecutive years, we have gathered enough data to conclude that
* the last day of school is _probably_ the third Wednesday of... |
import React, { useState } from "react";
import {
Button,
Grid,
makeStyles,
TextField,
Typography,
Card,
CardActions,
CardContent,
CardMedia,
Box,
Popover,
Chip,
} from "@material-ui/core";
import { IImageItem } from "../Types/ImageStore";
import RemoveIcon from "@material-ui/icons/RemoveCircleO... |
<gh_stars>1-10
import {
setCheckboxValue,
setRadioButton,
setSelectValue,
setTextAreaValue,
setTextInputValue,
trigger,
} from "./index"
import {expect} from "chai"
import {where} from "mocha-where"
function htmlToElement(html: string) {
const template = document.createElement("template")
... |
<filename>src/server/extra/RandomEngagements.ts
import * as fs from 'fs-extra';
import * as _ from 'lodash';
import * as Common from '../../common/Common';
import * as Hull3 from '../Hull3';
import * as Mission from '../Mission';
import * as Settings from '../Settings'
import {Ast, Lexer, Parser, PrettyPrinter} from '... |
<filename>src/index.ts
process.on('unhandledRejection', (reason, promise) => {
console.error(reason);
});
import * as express from "express";
import * as bodyParser from "body-parser";
import { post, get } from "request";
import { posix, resolve } from "path";
import { readFileSync, writeFileSync, appendFileSy... |
/* eslint-disable import/prefer-default-export */
import {
State,
pastMSec,
initialSettings,
initialOptions,
HtmlBookmarks,
MyHistoryItem,
CliMessageTypes,
PayloadAction,
} from './types';
import {
aDayMSec,
pipe,
propEq,
propNe,
regsterChromeEvents,
setLocal,
getLocal,
cbToResolve,
... |
<reponame>repetere/modelx<gh_stars>1-10
import { Data, } from '@jsonstack/data/src/DataSet';
import { CSVOptions, loadCSV, loadTSV, } from '@jsonstack/data/src/csv';
import { getFirstDataset, } from './transforms'
import Promisie from 'promisie';
import axios from 'axios';
export type DataSets = { [index: string... |
<filename>packages/test-runner/src/test.ts
/**
* Copyright Microsoft Corporation. All rights reserved.
*
* 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/lic... |
<filename>app/server.ts
import 'zone.js/dist/zone-node';
import 'reflect-metadata';
import { enableProdMode } from '@angular/core';
import { ngExpressEngine } from '@nguniversal/express-engine';
// Import module map for lazy loading
import { provideModuleMap } from '@nguniversal/module-map-ngfactory-loader';
import * ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.