text stringlengths 3.08k 15.5k |
|---|
type UnicodeFraction = {character: string; ref: string; value: number}
/**
* Copyright 2017 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/l... |
<filename>lib/base-request.ts
/**
* Created by karl on 01/07/15.
*/
'use strict';
import mockLogger = require('./mock-logger');
import request = require('request');
import http = require('http');
var merge = require('merge');
var mask = /("[^"]*?password[^"]*?":|"cc":)(.+?)([,}])/g;
function cleanLogData(data) {... |
import { tx, view } from "../wallet";
const FACTORY_ADDRESS_SELECTOR: Record<string, string> = {
"mainnet": "sputnik-dao.near",
"testnet": "sputnikv2.testnet"
};
// base URLs for SputnikDAO reference UI. See: https://github.com/near-daos/sputnik-dao-2-ui-reference
const REFERENCE_UI_URL_SELECTOR: Record<strin... |
<filename>src/node/ts-utils.ts
import * as _ from 'lodash';
import * as fs from 'fs';
import * as path from 'path';
import * as TSType from 'typescript';
import * as TSLintType from 'tslint';
import { IConfigurationFile } from 'tslint/lib/configuration';
import { TypeScriptLanguageServiceHost } from './language-service... |
import React, { FunctionComponent, useEffect, useState } from 'react';
import { Feilmelding, Normaltekst, Undertekst } from 'nav-frontend-typografi';
import Typeahead from '../common/typeahead/Typeahead';
import capitalizeEmployerName from '../stilling/edit/endre-arbeidsgiver/capitalizeEmployerName';
import capitalizeL... |
import * as PropTypes from 'prop-types';
import { Component } from 'react';
import {connect} from 'react-redux';
import {Theme, withTheme} from '@material-ui/core/styles';
import withWidth, {isWidthUp} from '@material-ui/core/withWidth';
import GridList from '@material-ui/core/GridList';
import Paper from '@material-ui... |
/*
* Copyright (c) 2020, JavaFamily Technology Corp, All Rights Reserved.
*
* The software and information contained herein are copyrighted and
* proprietary to JavaFamily Technology Corp. This software is furnished
* pursuant to a written license agreement and may be used, copied,
* transmitted, and stored only ... |
import { getCLIArguments } from "./Command";
import { nicePrint } from "./Output";
import { AnyHandler, ScalarObject } from "@solid-js/core";
// ----------------------------------------------------------------------------- STRUCT
type TShortcutOptions = {
argumentIndex :number
shortcuts :string[]
}
type TAskListO... |
/**
* This CheckboxTree does a few opinionated things to facilitate DataCategory selection
* * Indeterminate parents when not all children are selected
* * Separate "selected" and "checked" states, since only the most specific child is "selected".
* * However, the parents are not "selected"—they will either... |
/*
Copyright 2020 <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, distribute, sublicense,... |
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
/* eslint-disable no-console */
/* eslint-disable class-methods-use-this */
import chalk from "chalk";
import inquirer from "inquirer";
import ora, { Ora } from "ora";
import CliTable3, { Table... |
import {TestBed, getTestBed, ComponentFixture} from '@angular/core/testing';
import {Component, RootRenderer, ApplicationModule, NO_ERRORS_SCHEMA} from '@angular/core';
import {CommonModule} from "@angular/common";
import {RichTextRootRenderer, RichTextRootRenderer_, PRINTER, FORMATTER} from '../src/rich_text_renderer... |
import moment from "moment";
import {
Connection,
ColumnType,
MoreThan,
MoreThanOrEqual,
LessThan,
LessThanOrEqual,
Like,
In,
Between,
Not,
Equal,
IsNull,
} from "typeorm";
import { ColumnMetadata } from "typeorm/metadata/ColumnMetadata";
import dbConn from "../../utils/db";
import { intTypes, ... |
<gh_stars>10-100
import { Rule, Diagnostic } from "@siteimprove/alfa-act";
import { Node } from "@siteimprove/alfa-aria";
import { Array } from "@siteimprove/alfa-array";
import { Device } from "@siteimprove/alfa-device";
import { Element, Namespace } from "@siteimprove/alfa-dom";
import { Iterable } from "@siteimprove... |
import * as PIXI from 'pixi.js';
import {Audion} from '../../devtools/Types';
import {AudionPanel} from '../Types';
import {AudioGraphTextCacheGroup} from './AudioGraphTextCacheGroup';
import {AudioNodePort} from './AudioNodePort';
import {
GraphColor,
colorFromNodeType,
GraphPortStyle,
GraphNodeStyle,
} fro... |
import React, {useEffect, useState} from 'react';
import {AppNotification} from '../../components/notification/AppNotification';
/**
* Tokens that may be put onto the browser's clipboard to trigger special
* handling in this hook.
*/
export enum ClipboardActionToken {
Default = 'CLIPBOARD_ACTION_DEFAULT',
Share... |
import React, { useState, useEffect } from 'react';
import {
NoWrapTitle,
DarkSubTitle,
Separation,
SingleLine,
ResponsiveLine,
SubTitle,
} from '../../../../components/generic/Styled';
import { useMutation } from '@apollo/react-hooks';
import { PAY_ADDRESS } from '../../../../graphql/mutation';
import styl... |
<filename>src/extension.ts<gh_stars>0
'use strict';
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';
import * as websocket from 'websocket';
import * as shelljs from 'shelljs';
import * as fs fr... |
import { Languages } from "../../../Languages"
function lang(key,a?,b?,c?,d?,e?) {
return Languages.get("SphereUserInvite", key)(a,b,c,d,e);
}
import * as React from 'react';
import {
Alert,
ScrollView} from 'react-native';
import { Background } from '../../components/Background'
import { ListEditableItems } fr... |
<reponame>liquidity-network/nocust-client
// These are the validators of data, that comes from server
// Done as part of e2e tests to not bloat release bundle with @hapi/joi dependency
// Ideally there should be TS types of server data and they should be source of truth
// for both these validations and server data par... |
<reponame>owenr88/amplify-cli<gh_stars>0
import { MappingTemplate } from '@aws-amplify/graphql-transformer-core';
import { TransformerResolverProvider, FieldMapEntry, ReadonlyArray } from '@aws-amplify/graphql-transformer-interfaces';
import { LambdaDataSource } from '@aws-cdk/aws-appsync';
import {
and,
compoundEx... |
<gh_stars>0
import Block from '../../common/Block/Block';
import { UserData } from '../../api/AuthAPI';
import { ChatMessage } from '../../api/ChatAPI';
import isEqual from '../../utils/isEqual';
import MessengerController from '../../controllers/MessengerController';
import AddUserPopup from 'components/AddUserPopup';... |
import StreamParser from "./parser.ts";
import { Credentials } from "./models.ts"
import { deepAssign as merge } from "https://deno.land/std/_util/deep_assign.ts";
// Package version
const VERSION = 0.1;
class SimpleTwitter {
VERSION = VERSION;
requestDefaults: any;
constructor(public options: any) {
this.o... |
<reponame>januwA/connect-livereload<gh_stars>0
import { NextFunction } from "connect";
import express from "express";
export type FileMatcher = string | RegExp;
export interface Rule {
match: RegExp;
fn: (w: string, s: string) => string;
}
export interface Options {
/**
* Which resource files will not be in... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
import * as Q from "q";
import * as adb from "../../../common/android/adb";
import {FileSystem} from "../../../common/node/fileSystem";
import {APKSerializer} from "./apkS... |
/*
* Deepkit Framework
* Copyright (C) 2021 Deepkit UG, <NAME>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the MIT License.
*
* You should have received a copy of the MIT License along with this program.
*/
import { AfterViewInit, ChangeDetectorRef, Componen... |
/* eslint-disable max-lines-per-function */
import React, { RefObject } from 'react';
import {
ViewRef,
TextRef,
SliderRef,
FocusManager,
Input,
InputEventObject,
ButtonRef,
VideoRef,
FormFactor,
} from '@youi/react-native-youi';
import { BackButton, Timeline, ToggleButton } from './../index';
import... |
import {Cell, GameSetting, CellState} from './logic'
class Matrix2D<T> {
private matrix: {[x: number]: {[y: number]: T}};
/**
* Creates an new instance of the Matrix2D class
*/
constructor() {
this.matrix = {};
}
/**
* Sets an item on the matrix
* @param x The index of the item on the X axis
* @pa... |
<reponame>lightcom-io/vsf-strapi
/* eslint-disable @typescript-eslint/explicit-member-accessibility */
import Vue from 'vue'
import { camelCase } from 'camel-case'
import pluralize from 'pluralize'
import { ActionTree, GetterTree, MutationTree } from 'vuex';
import { Strapi } from './Strapi'
import { Logger } from '@vu... |
import { Controller, Get, Param, Body, HttpStatus, Session, HttpException, Post, Delete } from '@nestjs/common';
import { EventblocksService } from './eventblocks.service';
import { MergedEventblock, Eventblock } from './eventblock.entity';
import { DeleteResult } from 'typeorm';
@Controller('eventblocks')
export clas... |
import React, { useState } from 'react'
import { FormLabel, Text, Flex, Input, Button } from '@chakra-ui/react'
import { Icon } from '../Icon'
type RowProps = {
label: string
labelId?: string
labelFor?: string
infoIcon?: React.ReactNode
sx?: Record<string, unknown>
}
export const Row: React.FC<Row... |
<reponame>blaxk/serverless-command<gh_stars>1-10
import { spawn } from 'child_process';
import * as yaml from 'js-yaml';
import * as fs from 'fs';
import * as _ from 'lodash';
import { window, workspace } from 'vscode';
export interface IServerlessInvokeOptions {
'stage': string;
'region': string;
'nodeModulesPath'... |
import {
parse,
graphql,
buildSchema,
GraphQLScalarType,
GraphQLObjectType,
print
} from 'graphql';
import {createStore, applyMiddleware} from 'redux';
let initialLocalState = {
GRAPH_SM_STATE: true
};
let remoteEndpoint = null;
let localSchema = null;
let localSchemaString = null;
let loc... |
import {Outcome, convertAddressToBytes32} from "@statechannels/nitro-protocol";
import {SharedData} from "../../state";
import {ProtocolLocator} from "../../../communication";
import {ConsensusUpdateState, initializeConsensusUpdate} from "../consensus-update";
import {
CONSENSUS_UPDATE_PROTOCOL_LOCATOR,
consensusU... |
import { useState, useEffect, useCallback } from "react";
import Skeleton from "react-loading-skeleton";
import { useRouter } from "next/router";
import toast from "react-hot-toast";
import Image from "next/image";
import Head from "next/head";
import axios from "axios";
import Footer from "../components/Footer";
imp... |
<reponame>knarfeh/test-infra<gh_stars>0
interface Lens {
Name: string;
Title: string;
HTMLView: string;
Priority: number;
}
declare const src: string;
declare const viewerCache: {[key: string]: string[]};
declare const views: Lens[];
// Loads views for this job
function loadViews(): void {
for (let view of ... |
import React from 'react'
import Link from 'next/link'
import { Form, FormikProps } from 'formik'
import {
BooleanRadio,
CheckboxSmall,
FormWrapper,
Input,
} from '../components/FormComponents'
import { FormErrors, TwoPercentUserInput } from '../types/PageUserInputs'
import styles from './osobne-udaje.module.cs... |
import * as React from 'react';
import {noop} from '@shopify/javascript-utilities/other';
import get from 'lodash/get';
import merge from 'lodash/merge';
import replace from 'lodash/replace';
import hoistStatics from 'hoist-non-react-statics';
import {autobind} from '@shopify/javascript-utilities/decorators';
import cr... |
<filename>src/linkAttributes/linkAttributes.ts
import {
App,
getAllTags,
getLinkpath,
LinkCache,
MarkdownPostProcessorContext,
MarkdownView,
TFile,
} from "obsidian";
import { SuperchargedLinksSettings } from "src/settings/SuperchargedLinksSettings";
export function clearExtraAttributes(link: HTMLElement... |
<gh_stars>0
import {
Connection,
Request,
Response,
ResponseOptions,
ResponseType,
Headers,
ReadyState,
RequestMethod,
ResponseContentType
} from '@angular/http';
import { Observable, throwError, Observer } from 'rxjs';
import { flatMap, catchError, map } from 'rxjs/operators';
import { C... |
<filename>src/index.ts
/* global DEBUG */
// tslint:disable-next-line
import got, { OptionsOfBufferResponseBody, OptionsOfJSONResponseBody, OptionsOfTextResponseBody, OptionsOfUnknownResponseBody, BeforeRequestHook, AfterResponseHook, RequiredRetryOptions, Hooks } from 'got';
import { Readable } from 'stream';
// tslin... |
<filename>src/treetop/BookmarksManager.ts
import { get, writable } from 'svelte/store';
import browser, { Bookmarks } from 'webextension-polyfill';
import {
BOOKMARK_TREE_NODE_TYPE_BOOKMARK,
BOOKMARK_TREE_NODE_TYPE_FOLDER,
BOOKMARK_TREE_NODE_TYPE_SEPARATOR,
BOOKMARKS_MENU_GUID,
BOOKMARKS_TOOLBAR_GUID,
OTHE... |
import { riot, template } from '../riot-ts';
import BaseElement from '../base-element';
import store, { ApplicationState } from '../../model/store';
import { userActions } from '../../model/users/actions';
import { commonActions } from '../../model/common/actions';
import HomeHeaderTemplate from './header.html!text';
i... |
import { Box, Button, DialogActions, DialogProps, IconButton, Theme, Tooltip } from "@material-ui/core";
import { makeStyles } from "@material-ui/styles";
import { mdiFullscreen, mdiFullscreenExit, mdiMessagePlusOutline, mdiMessageTextOutline } from "@mdi/js";
import Icon from "@mdi/react";
import React, { FC, useCallb... |
<reponame>tfwdev/moncher<filename>src/lerpsystem.ts
import {Clock} from "tfw/core/clock"
import {log} from "tfw/core/util"
import {ResourceLoader} from "tfw/asset/loader"
import {Component, Domain, EntityConfig, ID, Matcher, System} from "tfw/entity/entity"
import {TransformComponent} from "tfw/space/entity"
import {Js... |
<gh_stars>10-100
// script: generateTypes, version: 0.3
// dependencies
import * as QtQml from '../QtQml/types';
type Signal<T> = {
connect: (handler: T) => void;
disconnect: (handler: T) => void;
};
export enum QAbstractItemModel_LayoutChangeHint {
NoLayoutChangeHint = 0,
VerticalSortHint = 1,
HorizontalSo... |
import { TableBuilder, ITableDataSource } from './TableBuilder';
import { map, each, find } from 'underscore';
import agGridModule = require('ag-grid/main');
import { IQueryResult } from '../../rest/QueryResult';
import { IComponentBindings } from '../Base/ComponentBindings';
import { $$, Dom } from '../../utils/Dom';
... |
/**
* Copyright 2021 <NAME>
* Copyright 2021 Google 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 ap... |
<reponame>sanity-io/diff-match-patch
import { cleanupSemanticLossless } from '../diff/cleanup'
import { diff, DiffType } from '../diff/diff'
import { diffText1, diffText2 } from '../diff/diffText'
import { levenshtein } from '../diff/levenshtein'
import { xIndex } from '../diff/xIndex'
import { match } from '../match/m... |
import CypherQuery from "./CypherQuery";
import CypherRawText from "./CypherRawText";
import { DangerousTextError } from "./Errors";
import { IHelperConfig } from "./Interfaces";
enum RelationDir {
Left,
Right,
None
}
interface IRelationshipConfig {
name?: string;
labels?: string[];
direction?... |
import React, { ElementType, ChangeEvent, useState } from "react";
import {
createStyles,
Grid,
withStyles,
WithStyles,
Theme,
Box,
CircularProgress,
Typography,
} from "@material-ui/core";
import { MaterialUiPickersDate } from "@material-ui/pickers/typings/date";
import moment from "moment";
import { u... |
<filename>src/store/modules/user.ts<gh_stars>1-10
import type { ErrorMessageMode } from '/#/axios';
import { defineStore } from 'pinia';
import { store } from '/@/store';
import { PageEnum } from '/@/enums/pageEnum';
import {
TOKEN_KEY,
EXPIRESIN_KEY,
REFRESH_TOKEN_KEY,
ROLES_KEY,
USER_INFO_KEY
} from '... |
<reponame>divasatanica/auf
import { EventEmitter } from 'events';
import { IDataPropInfo, IIterationItem } from './type';
const dslReg = /\<%(.+)\%\>/;
const dataReg = /{{([\$|\w|\s|\.])+}}/g;
const descReg = /^<!--/;
const descEndReg = /-->$/;
const iterationReg = /for\s?{{([\w|\s]+)}}\s?in\s?{{([\w|\s|\.]+)}}\s?=>\s... |
import React from "react";
import ReactPlayer from "react-player";
import {Socket} from "socket.io-client";
import "./Player.css";
import PlayerControls from "./PlayerControls";
import {getUrl, PlayURL} from "../queue/QueueItemView";
interface PlayerProps {
controlsHidden: boolean,
showRootPlayer: boolean,
... |
import { ImperiumData, RowWrapper } from "../imperium-data";
import { localizationCharacterNameByHeroId, localizationString } from "../localization";
import { item2wikiWithType } from "../wiki-item";
import { questMetadata } from "../wiki-quest";
const ChaptersTable = ImperiumData.fromGamedata().getTable("Chapters");
... |
import axios from "axios";
import {
empty,
Instance,
IssueID,
Pipeline,
PipelineID,
Principal,
ResourceIdentifier,
ResourceObject,
Stage,
StageID,
Task,
TaskCheckRun,
TaskID,
TaskPatch,
TaskRun,
TaskState,
TaskStatusPatch,
unknown,
} from "../../types";
const state: () => TaskState ... |
<reponame>DarrenDanielDay/TypeScriptExercise<gh_stars>1-10
import { PrimitiveTypes } from "./util-types";
export type Concat<A extends string, B extends string> = `${A}${B}`;
export type TripleConcat<
Head extends string,
Splitter extends string,
Tail extends string
> = `${Head}${Splitter}${Tail}`;
export type E... |
import { Mongo } from 'meteor/mongo'
import { Tracker } from 'meteor/tracker'
import { Omit, ProtectedString } from '../lib'
declare module 'meteor/tracker' {
namespace Tracker {
// Fix an incomplete definition of Tracker.nonreactive in @typings/meteor
function nonreactive<U>(func: () => U): U
}
}
// Note: This... |
<filename>src/assets/styleguide/js/n-hopin-styleguide-js-colors-grid-async.ts
import {VariableGroup, Variable} from './_variable-group';
import {copyToClipboard} from './_clipboard';
const namespace = 'n-hopin-styleguide-';
const COLORS_CONTAINER_SELECTOR = `.${namespace}js-colors-grid`;
const SWATCH_GROUP_CLASS = `$... |
import {Component, ComponentInterface, Event, EventEmitter, h, Prop, State} from "@stencil/core";
import {
MarketProductListInterface,
MarketProductPageInterface,
MarketProductsSliderCardsInterface
} from "../../../../../../../../index";
declare const Flickity: any;
@Component({
tag: "s-cnt-market-product-pag... |
import { Component, OnInit, ViewChild } from '@angular/core';
import {WeatherComponent} from '../weather/weather.component';
// Variables globaux qui servent d'intermédiaires pour stocker les données json des requêtes XMLHTTP
let tabVille = [];
let tabPhoto = [];
let tabURLPhoto = [];
let placeId = '';
let index = 0;
... |
import * as React from 'react';
import * as PropTypes from 'prop-types';
import { PopupProps } from '@progress/kendo-react-popup';
import { FormComponent, FormComponentProps, FormComponentValidity } from '@progress/kendo-react-common';
import { DateInput, DateInputProps } from '../dateinput/DateInput';
import { Calenda... |
import React from 'react';
import TimezonePicker, { Timezone } from './TimezonePicker.component';
import defaultColor from '../settings/color.settings';
import defaultTimezones from '../data/timezones';
import getUserDateTime from '../lib/getUserDateTime';
// import getCurrentDateTimeInFormat from '../lib/getCurrentD... |
import { ReactWrapper } from "enzyme";
import withProviders from "~utils/withProviders";
import FieldGenerator from "../index";
const onChange = jest.fn();
const onFieldRemove = jest.fn();
const input = {
type: "text",
name: "seasonId",
label: "Season ID",
tooltip:
"Select a start and end date below to au... |
import {AttributeInfo, ProductFullInfo} from "../../core/api/CoffeeRequest";
import {BaseReduxComponent, IReduxProps} from "../../core/BaseComponent";
import {NavigationAction, NavigationLeafRoute, NavigationScreenProp} from "react-navigation";
import {ICommonNavParams} from "../../navigation/actions";
import {connectA... |
<reponame>AgFlore/vocadb<gh_stars>100-1000
import CommentContract from '@DataContracts/CommentContract';
import PartialFindResultContract from '@DataContracts/PartialFindResultContract';
import ReleaseEventContract from '@DataContracts/ReleaseEvents/ReleaseEventContract';
import SongListContract from '@DataContracts... |
/*
* Copyright (c) 2018 by Filestack.
* Some 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 ... |
<filename>src/common/edit.ts
import * as yargs from 'yargs';
import * as path from 'path';
import common from './common';
import Index from '../class/index';
import Type from '../class/type';
import Tag from '../class/tag';
import Answer from '../class/answer';
import CleanAnswer from '../class/cleananswer';
import Art... |
/**
* An "async function" in the context of Async is an asynchronous function with
* a variable number of parameters, with the final parameter being a callback.
* (`function (arg1, arg2, ..., callback) {}`)
* The final callback is of the form `callback(err, results...)`, which must be
* called once the function is... |
import React, { useState, useCallback, useImperativeHandle, forwardRef, useEffect, useMemo } from 'react';
import { JSONSchema7 } from 'json-schema';
import { Switch } from '../../common';
import state from '../../../state';
interface TemplateParameterProps {
propertyName: string;
property: JSONSchema7;
isRequ... |
<gh_stars>0
import { flatten, identity, merge, mergeAll } from 'ramda';
import { Schema, SchemaProperties, PropertyAttributes } from '../../../source';
import { Column, Options } from '../discovery';
/**
* Allows Integer columns to be represented as a String when the `strictNumbers`
* option is not in use.
*/
cons... |
<filename>src/app/views/user/profile-list/profile-list.component.ts
import {Component, ViewChild,OnInit, Optional} from '@angular/core';
import {MatTableDataSource} from '@angular/material/table';
import {MatSort} from '@angular/material/sort';
import {MatPaginator} from '@angular/material/paginator';
import { AlertSer... |
import { EventBus } from "../event-bus.js";
const css = `
:host {
order: 1;
position: sticky;
right: 0;
top: 5rem;
flex-shrink: 0;
margin: 0 0 0 1.25rem; /* 20 / 16 */
width: 200px;
transition: margin 100ms ease-in-out;
}
@media screen and (m... |
import {
ContentState,
convertToRaw,
DraftBlockType,
DraftInlineStyleType,
RawDraftContentBlock,
} from "draft-js";
type TeXToken =
| "\\section"
| "\\subsection"
| "\\subsubsection"
| "\\item"
| "\\textbf"
| "\\textit"
| "\\underline"
| "\\texttt";
type Token = Record<DraftBlockType | Draft... |
import { parseIgnore } from '@useoptic/cli-config';
import { IHttpInteraction } from '@useoptic/domain-types';
import { spawn as spawnDiffEngine } from '@useoptic/diff-engine';
import {
CaptureInteractionIterator,
LocalCaptureInteractionPointerConverter,
} from '../captures/avro/file-system/interaction-iterator';
i... |
import { h, Component } from 'preact'
import { isDesktop, isHybrid, addDeviceRelatedProperties } from '~utils'
import { validateFile } from '~utils/file'
import { DOCUMENT_CAPTURE_LOCALES_MAPPING } from '~utils/localesMapping'
import { randomId } from '~utils/string'
import { appendToTracking, trackException } from '... |
import React, { ReactElement } from 'react';
import {
CssBaseline,
Divider, Drawer, Hidden, IconButton,
List,
ListItem,
ListItemIcon,
ListItemText
} from "@mui/material";
import createStyles from "@mui/styles/createStyles";
import { Theme} from "@mui/system";
import { useAppDispatch, useAppSelec... |
import { rangef, PI, PIH, PI2, RNG } from "./g0/misc";
let ax: AudioContext;
export let sampleRate = 44100, frequency = 440, volume = 1;
export function setVolume(v:number){
volume = v;
}
export function init() {
ax = ax || new window.AudioContext()
}
export function soundBuf(samples: number[][]) {
const buff... |
<gh_stars>0
/*
* Wheel mechanics inspired by https://codepen.io/barney-parker/pen/OPyYqy
*/
import { HttpClient } from '@angular/common/http';
import { Component, ElementRef, ViewChild } from '@angular/core';
import * as z from 'zod';
// roulette wheel options
const radius = 450;
const spinningSpeed = Math.PI / 20;
co... |
<gh_stars>0
/*
* 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... |
import * as React from "react";
import { SvgIcon } from "@material-ui/core";
import AddBox from "@material-ui/icons/AddBox";
import ArrowDownward from "@material-ui/icons/ArrowDownward";
import Check from "@material-ui/icons/Check";
import ChevronLeft from "@material-ui/icons/ChevronLeft";
import ChevronRight from "@ma... |
// Style: sass/layout/_navBar.scss
import React, { useState, useEffect } from 'react';
import { Link } from "react-router-dom";
import BriefProductsLists from '../BriefProductLists';
import Auth from '../../utils/auth';
import { capitalizeFirstLetter } from '../../utils/helpers';
import { getProducts } from '../../ut... |
<reponame>BeryJu/passbook
import { t } from "@lingui/macro";
import { CSSResult } from "lit";
import { TemplateResult, html } from "lit";
import { customElement, property } from "lit/decorators.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { until } from "lit/directives/until.js";
import PFDes... |
/**
* Copyright (c) Microsoft Corporation.
*
* 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 agr... |
/// <reference lib="dom"/>
import { Band, timeToDate, WorkoutType } from "./mod.ts";
import { MusicState } from "./src/constants.ts";
const LOGS = document.getElementById(
"logs",
)!;
const log = (
title: string,
color: string,
msg: string,
) => {
const isOnEnd = true; // Math.abs(LOGS.scroll... |
<gh_stars>100-1000
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
import * as crypto from 'crypto';
import * as fs from 'fs-extra';
import * as http from 'http';
import * as open from 'open';
import * as querystring from 'querystring';
import * as requestPromise from 'r... |
/*
* Copyright © 2021 Atomist, 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... |
<reponame>AtlasRender/atlas-monitor-desktop
/* eslint global-require: off, no-console: off, @typescript-eslint/no-var-requires: 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 ... |
<reponame>READYTOMASSACRE/league-gamemode
import { Hud } from "./Hud"
import { colorGradient, hex2rgba } from "../utils"
interface TextParams {
font: number
centre: boolean
color: RGBA
scale: Array2d
outline: boolean
}
interface HealthParams {
width: number
height: number
border: number
}
/**
* Hud ... |
<reponame>aamduka/ozone
import { UserDashboardDTO, UserDashboardStackDTO } from "../api/models/UserDashboardDTO";
import { UserWidgetDTO } from "../api/models/UserWidgetDTO";
import { DashboardNode } from "../components/widget-dashboard/types";
import { Dashboard, DashboardLayout, DashboardProps } from "../models/Dashb... |
<filename>build/index.d.ts<gh_stars>0
import { PermissionControllerConfig } from './PermissionControllerConfig';
import { Application, Request, Response, NextFunction } from 'express';
import { PermissionContext, RelatedRecord, UserRecord } from './PermissionContext';
export { MigrationColumnDefinition, MigrationTableD... |
<reponame>DTeuchert/vscode-todo-parser<gh_stars>10-100
import {commands, Uri, workspace, TextDocument, window} from 'vscode';
import * as assert from 'assert';
import {getFileExtension, getFolderName} from '../../src/utils/all';
import {CommandHandler} from '../../src/classes/all';
import {ParseCurrentFileCommand, Pars... |
import React from 'react';
import { useCallback, useState } from 'react';
import LoadingSpinner from '../Shared/LoadingSpinner';
import { History } from 'history';
import { useAddPostMutation } from '../../graphql/types';
import gql from 'graphql-tag';
import styled from 'styled-components';
// import { validateUrl } f... |
import { Box, Flex, Grid, Image } from '@chakra-ui/react'
import { useEffect, useRef, useState } from 'react'
import Bg from '../../assets/share/bg/pack-event.png'
import Collected from '../../assets/img/pack-event-collected.png'
import { PackEventDetailResponse } from '../../models/pack-event'
import { PosterOnLoaded ... |
<reponame>tobias-albert/album-viewer
import { Album } from './album';
import { Artist } from './artist';
const DEMI: Artist = {
name: '<NAME>',
age: 26,
country: 'United States'
}
const a: string = "../assets/albums/";
export const ALBUMS: Album[] = [
{name: '<NAME>', artist: DEMI, year: 2008, image: a + "do... |
<gh_stars>100-1000
import { map } from "rxjs/operators";
import type {
CompoundAccountSummary,
LoansLikeArray,
} from "@ledgerhq/live-common/lib/compound/types";
import {
formatCurrencyUnit,
findCompoundToken,
} from "@ledgerhq/live-common/lib/currencies";
import { makeCompoundSummaryForAccount } from "@ledgerh... |
/*
Copyright 2016 - 2021 The Matrix.org Foundation C.I.C.
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... |
<filename>frontend/src/musicGalaxy/conf.ts
import type { Quality } from './ArtistMapInst';
export const BASE_ARTIST_COLOR = 0x1586a6;
export const PLAYING_ARTIST_COLOR = 0xfe54bb;
export const HIGHLIGHTED_ARTIST_COLOR = 0xad4a03;
export const BASE_CONNECTION_COLOR = 0x0072dd;
export const ARTIST_GEOMETRY_DETAIL = 3;
e... |
<reponame>iquipsys-positron/iqs-facades-public-node
let _ = require('lodash');
let async = require('async');
import { DataPage } from 'pip-services3-commons-node';
import { ConfigParams } from 'pip-services3-commons-node';
import { FilterParams } from 'pip-services3-commons-node';
import { IReferences } from 'pip-serv... |
<filename>src/utils/diff-utils.ts<gh_stars>10-100
import * as path from 'path';
import * as fs from 'fs';
import * as diffJs from 'diff';
import chalk from 'chalk';
// const ansiToHtml = require('ansi-to-html')
import * as fileUtils from './file-utils';
/* globals gT: true */
/* globals gIn: true */
// ansi, htm... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.