id
stringlengths
1
3
code_masked
stringlengths
797
182k
target
stringlengths
3
41
0
import {checkAvifFeature} from "./check-avif-feature.js"; import {checkWebpFeature} from "./check-webp-feature.js"; type FormatType = "avif" | "webp" | null; const promisesPool: ((value: FormatType) => void)[] = []; const resolvePromises = (format: FormatType): void => { promisesPool.forEach((resolve) => resol...
isWebp
1
import * as v from 'valibot' type Message< Type extends string, Payload extends object | undefined = undefined, > = Payload extends object ? { type: Type } & Payload : { type: Type } export type MessageToHostApp = | Message<'request-auth-token'> | Message<'request-query-params'> | Message<'set-query-params'...
event
2
import * as yargs from 'yargs'; export class CliApp { private args: yargs.Argv; constructor() { this.init(); } public init(): void { // Init as described in: https://github.com/yargs/yargs/blob/master/docs/advanced.md#using-the-non-singleton-interface this.args = yargs((process...
dateRegex
3
import { u128, VM, Context as VMContext } from "near-sdk-as"; import { name, symbol, decimals, totalSupply, initialize, balanceOf, transfer, allowance, approve, transferFrom } from "../erc20"; import { getNewestTransferEvent, getNewestApprovalEvent } from "../events" // accounts const zero = "0x0"; ...
event2
4
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { apiCall } from './api'; // Mock the auth module - move this before any constants vi.mock('./auth', () => { return { refreshToken: vi.fn(), }; }); // Get the mocked function after vi.mock const mockRefreshToken = vi.mocked(await...
errorResponse
5
import { EmotivePoint } from "../shared/models/emotivePoint"; import { Face } from "../shared/models/faces"; import * as FaceApi from "../shared/faceapi"; import * as emojiLookup from "emoji-dictionary"; const EMOJIS_TO_TRAIN = [ "☺️", "🤓", "😃", "😆", "😉", "😍", "😎", "😐", "😕", "😖", "😘", ...
array
6
class Case { CaseID: number; DTCreated: Date; DTReceived: Date; DTClosed: Date; DTAbandoned: Date; CustomerFirstName: string; CustomerLastName: string; CustomerUserID: string; CustomerComputerName: string; CustomerPhone: string; CustomerEmail: string; SupportCategory: st...
hostAndPort
7
import {Component} from '@angular/core'; import {StompService} from 'ng2-stomp-service'; import {Subscription} from 'rxjs'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { connected = false; greetings = new Array<string...
data
8
// This code was generated by the angular-custom-elements-schematic. Any changes will be overwritten next time it runs. import { Component, ElementRef, ChangeDetectionStrategy, ChangeDetectorRef, NgZone, Input, inject } from '@angular/core'; import { AccordionComponent as AccordionComponentCustomElement, defineAccordi...
changeDetectorRef
9
import { urlGenerator } from './urlGenerator' export const getParentTitle = (slug: string, allMdx?: any) => { const allContent = allMdx && allMdx.edges && allMdx.edges.map((mdx: any) => ({ ...mdx.node.fields, title: mdx.node.frontmatter.title, staticLink: mdx.node.frontmatter.staticLink...
slicedParts
10
import * as jspb from 'google-protobuf'; import { Event, MethodEnum } from './event_pb'; export class Context { private bytes: Uint8Array; constructor(bytes: Uint8Array) { this.bytes = bytes; } toObject(pb: any): any { const m = pb.deserializeBinary(this.bytes); return m.toObject(); } } export interface ...
buffer
11
import { KeyRotator } from "@economist/aws-key-rotator"; import { IAM } from "aws-sdk"; import { createCircleCIHandler } from "./circleci"; import { RotationJob } from "./jobs"; export function batchRotateKeys(iam: IAM, jobs: RotationJob[]) { const [MASK] : Promise<void>[] = []; const failedJobs: { user: stri...
promises
12
import fs from 'fs' import path from 'path' import matter from 'gray-matter' const postsDirectory = path.join(process.cwd(), 'content/blogs') export interface Source { title: string; url: string; author?: string; publishedDate?: string; } export interface BlogPost { slug: string title: string...
allPostsData
13
import { Assets, Exports } from './typings/assets.typings'; import sendRequest from './utils/send-request'; import endpoints from './utils/endpoints'; /** * Gets all asset paths in the current game version * @returns Array of paths */ async function getAssets(): Promise<Assets> { return await sendRequest<Assets>(...
parsed
14
import { Component, OnInit } from '@angular/core'; import { Web3Service } from '../../../services/web3/web3.service'; import { PersonService } from '../../../services/person/person.service'; import { AssetService } from '../../../services/asset/asset.service'; declare let require: any; const assetListArtifacts = requi...
recover1
15
const timeMessage = '⏰ The checks finished in'; console.time(timeMessage); // Load config at the beginning import { FileOption, getConfig } from './utils/config.js'; const config = await getConfig(); import fs from 'fs'; import path from 'path'; import { VFile } from 'vfile'; import { VFileMessage } from 'vfile-messag...
messageSummary
16
import { indexSearchParameterBundle, indexStructureDefinitionBundle } from '@medplum/core'; import { readJson, SEARCH_PARAMETER_BUNDLE_FILES } from '@medplum/definitions'; import { Bundle, Claim, HumanName, SearchParameter } from '@medplum/fhirtypes'; import { MockClient } from '@medplum/mock'; import { createWriteStre...
response
17
import { GameState } from "./models/GameState.ts"; import BulletController from "./controllers/BulletController.ts"; import EnemyController from "./controllers/EnemyController.ts"; import Player from "./models/Player.ts"; const background = new Image(); background.src = "assets/images/background.jpg"; export class Ga...
textOffset
18
import { setRequestLocale } from 'next-intl/server'; import { notFound } from "next/navigation"; import { buildIndexJSON } from "@/blogs/post" import { locales } from "@/navigation" export async function generateStaticParams() { return locales.map((locale) => ({locale})) } export async function GET(req: Request, ...
props
19
import * as functions from "firebase-functions"; import {initializeApp} from "firebase-admin/app"; import {getFirestore} from "firebase-admin/firestore"; const app = initializeApp(); const db = getFirestore(app); exports.assistantVotesCreatedListener = functions.firestore .document("assistantVotes/{assistantVoteI...
pAssistantVote
20
import { HANDLE_CHECKS } from "./constants.js"; import logger from "./logger.js"; import { createAccountReport, createAccountComment, createAccountLabel, } from "./moderation.js"; export const checkHandle = async ( did: string, handle: string, time: number, ) => { // Get a list of labels const labels: ...
checkList
21
/* eslint-disable @typescript-eslint/no-explicit-any */ import { JestChrome } from "jest-chrome/types/jest-chrome" import { sendMessage } from "./sendMessage" describe("sendMessage", () => { it("should send the message correctly", async () => { const message: Message = { type: "rating", subType: "get" } ...
promiseResult
22
import { BASE_URL, COUNTERS_ENDPOINT, LOGS_ENDPOINT, TIMERS_ENDPOINT, } from "./constants"; import { ConsoleTransport, MonitoringAPITransport } from "./transports"; /** * DEPRECATED: will be removed once versioning is handled */ class Logger { transports: ILoggingTransport[]; constructor(apiKey: string,...
useConsoleTransport
23
import { MiddlewareConsumer, Module, NestModule } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import { CommonModule } from './module/common/common.module'; import { AuthModule } from './module/auth/...
consumer
24
/* Copyright 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 to in ...
redactFn
25
import {Body, Controller, ForbiddenException, Get, HttpCode, Inject, Post} from '@nestjs/common' import {LarkBotService} from './lark-bot.service' import {LARK_BOT} from './lark-bot.constants' import {BotMessageDto, SessionResponseDto} from './lark-bot.dto' @Controller('lark') export class LarkBotController { @Injec...
body
26
/* eslint-disable no-console */ import * as jp from "jsonpath"; import * as _ from "lodash" import payload from "./payload"; const jsonPaths: Array<string> = [ // '$', // '$.level_0_string', '$.name', '$.description', '$.packages[:].tour.itinerary', // '$.*' ]; const pathMap= {} const allPath...
keepMap
27
import nodeHashcash from './index'; const sleep = (time: number) => new Promise(r => setTimeout(r, time)); describe('NodeHashcash', () => { const SECRET = 'my secret'; it('should generate random tokens', () => { const firstValue = nodeHashcash['generateToken'](8); const [MASK] = nodeHashcash...
secondValue
28
/** * @copyright 2017 <NAME> * @license Apache License, Version 2.0 * @see NOTICE file */ import {Constructable} from '../types/constructable'; import {instantiateFactories} from './instantiate-factories'; import {InjectionRecord} from '../interfaces/injection-record'; import {InjectionCycleError} from '../errors/i...
instanceMap
29
import { Component, Input, ViewChild, Optional } from '@angular/core'; import { Color, BaseChartDirective } from 'ng2-charts'; import { FilterValues } from '../filter/filtervalues.model'; import { StatisticsSourceInterface } from '../../services/statistics-source.interface'; import { Subscription, Observable, Subject }...
index
30
import { Logger } from '../logger/Logger'; /** * 适配屏幕工具类 */ export class FitScreenUtil { // 当前设计分辨率 private curDR: any = null; /** * 适配屏幕 * @param canvasNode 画布节点 */ fitScreen(canvasNode: cc.Node) { if (cc.sys.isNative) { this.fitNativeScreen(c...
aspect2
31
import { ServerResponse } from 'http' import { TOKEN_RENEW_LIMIT, DEVICES_COUNT_LIMIT, EXPIRATION_CHECK_INTERVAL, } from '@core/config' import { User } from '@core/core-types' import { createToken, parseToken } from '@core/token' import { setToken, unsetToken } from '@core/cookie' import { hashString } from '@c...
userId
32
import {IRepository} from "./interfaces/repository.interface.js"; import {User} from "../domain/user.js"; import {Bet} from "../domain/bet.js"; import {Dice} from "../domain/dice.js"; export class CreateBetUseCase { constructor(private userRepository: IRepository<User>, private betRepository: IRepository<Bet>) { ...
updatedBalance
33
import { AbstractCommandModule, Message } from "botyo-api"; const Spotify = require('spotify-web-api-node'); export default class SpotifyCommand extends AbstractCommandModule { private readonly market: string; private readonly spotify: any; private readonly authPromise: Promise<void>; private tokenExp...
tokenExpiresIn
34
import type { UseQueryStoreResult, MutationStoreResult, } from '@sveltestack/svelte-query'; import { QueryClient, useQuery, useMutation } from '@sveltestack/svelte-query'; import { getVersion } from '@tauri-apps/api/app'; import { appDir } from '@tauri-apps/api/path'; import { type FsOptions, readTextFile, createDi...
filePath
35
import * as assert from 'assert'; import * as vscode from 'vscode'; import { getDocUri, activate } from './helper'; // You can import and use all API from the 'vscode' module // as well as import your extension to test it // import * as myExtension from '../../extension'; suite('Extension Test Suite', function () { ...
lineno1
36
import { Item } from "../../components/products/item"; const items = new Array<Item>( { id: 1, name: "Gura phone case", description: "A Gawr Gura phone case, damn gura is too smart ", img_cover: "https://i.pinimg.com/originals/71/96/cf/7196cfdf85e22579fe08e82385d4061a.png", fav: true, }, ...
req
37
import { createSlice, createAsyncThunk, createEntityAdapter } from '@reduxjs/toolkit'; import { Book, getBookList } from 'src/apis/booksApi'; import { RootState } from '../store'; const booksAdapter = createEntityAdapter<Book>(); interface InitialState { status: 'idle' | 'loading' | 'succeeded' | 'failed'; error:...
response
38
import axios from 'axios'; import { Message as DiscordMessage, Channel as DiscordChannel, } from 'discord.js'; import { axiosErrorHandler } from './errorHandler'; const { DISCORD_BOT_TOKEN = '' } = process.env; const headers = { Authorization: `Bot ${DISCORD_BOT_TOKEN}`, 'Content-Type': 'application/json', };...
message3
39
import * as React from 'react'; import * as ReactDom from 'react-dom'; import { Version } from '@microsoft/sp-core-library'; import { IPropertyPaneConfiguration, PropertyPaneTextField, PropertyPaneToggle } from '@microsoft/sp-property-pane'; import { BaseClientSideWebPart } from '@microsoft/sp-webpart-base'; impo...
element
40
import * as secp from "https://deno.land/x/secp256k1/mod.ts"; import { Buffer } from "https://deno.land/std/node/buffer.ts"; async function test() { const [MASK] = Buffer.alloc(32); var i = 0; for (i = 0; i < [MASK] .length; i++) { [MASK] [i] = Math.random() * 256; } //.toString("hex"); console.log...
privateKey
41
import "./index.css"; import Stats from "stats.js"; import * as BABYLON from "@babylonjs/core"; //import "@babylonjs/loaders/glTF"; import Level from "./level"; class Game { private static mInstance: Game | null = null; mStats: Stats | null = null; //mLog: Log | null = null; mEngine: BABYLON.Engine ...
canvasElement
42
import { createClient } from 'microcms-js-sdk'; export type worksItem = { id: string; createdAt: string; updatedAt: string; publishedAt: string; revisedAt: string; title: string; thumbnail: { url: string; height: number; width: number; }; isWorks: string[]; /...
item
43
import { Component } from '@angular/core'; import { MyRandomNumberComponent } from './my.random.number.component'; import { DefaultService } from 'hello-world-api/api/default.service'; import { HelloWorldResponse } from 'hello-world-api/model/helloWorldResponse'; // HttpClient lives in a separate Angular module, so we'...
tmpName
44
import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; import * as logs from '@aws-cdk/aws-logs'; import * as cdk from '@aws-cdk/core'; // eslint-disable-next-line import/prefer-default-export export class Mem2CwStack extends cdk.Stack { constructor(scope: cdk.Construct, id: string, ...
props
45
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Copyright 2020 Adobe Systems Incorporated ~ ~ 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 ~ ~ htt...
routerLinkInstance
46
import initSections, { goToSection } from "../sections"; import { allCardDataBase, UniqCard } from "../cards"; import initClient from "./thirdWebClient"; import initPrivateKey, { generateNewPrivateKey, setPrivateKey, getPublicKey, } from "./keys"; import { checkFile, setFile, getDeckContent, saveFile } from "./m...
cardData
47
import { collection, doc, addDoc, updateDoc, deleteDoc, getDoc, getDocs, query, where, orderBy, limit, startAfter, DocumentData, QueryDocumentSnapshot, serverTimestamp, Timestamp } from "firebase/firestore"; import { db } from "./firebase"; import { ReportPost, ReportThread...
limitCount
48
import { Component, OnInit, Injectable } from '@angular/core'; import { OhmIndexService } from '../ohm-index.service'; import {SelectionModel} from '@angular/cdk/collections'; import {FlatTreeControl} from '@angular/cdk/tree'; import {BehaviorSubject} from 'rxjs'; import {MatTreeFlatDataSource, MatTreeFlattener} from '...
startIndex
49
import { BotBuilder, BotBuilderExt } from '@telefonica/bot-core'; import http = require('http'); export default [ dialog ]; function dialog(session: BotBuilder.Session, [MASK] : any, next: Function) { let groupEntity: BotBuilder.IEntity = BotBuilder.EntityRecognizer.findEntity( [MASK] .entities, 'laura.group...
args
50
import type { UserFromGetMe } from "grammy/types"; // Types import type { IJSONConfig } from "./utilities/types.ts"; import path from "path"; // stdlib import { Bot } from "grammy"; // 3rd-party deps import { ReadJson, CreateJsonFromDict } from "./utilities/json.ts";...
botInfo
51
import { graphql } from "@octokit/graphql"; import { map, of } from "rxjs"; const getEnv = () => { const organization = process.env.ORGANIZATION as string; const githubToken = process.env.GITHUB_TOKEN as string; const projectNumber = parseInt(process.env.PROJECT_NUMBER as string); const status = process.env.IT...
requestGraphql
52
///<reference path="../node_modules/grafana-sdk-mocks/app/headers/common.d.ts" /> import _ from 'lodash'; import {WifiPlugQueryCtrl} from "./query_ctrl"; export default class WifiPlugDatasource { id: number; name: string; url: string; /** @ngInject */ constructor(instanceSettings, private backendSrv, priva...
results
53
import { storageGet } from 'stores/storage'; const FORCE_WHITELABEL = process.env.NEXT_PUBLIC_WHITELABEL; // 'jeoi.tkngate.com' || 'test.tkngate.com' || 'tachyon.tkngate.com' || example: 'www.hobbycartelnft.com' const FORCE_PERMISSION_CONTRIB = null; const TPP = process.env.NEXT_PUBLIC_TPP_SERVER || `https://mgate....
urlStr
54
import { exportToDirectory, importDirectory, cleanupSVG, runSVGO, deOptimisePaths, scaleSVG, resetSVGOrigin, removeFigmaClipPathFromSVG, convertSVGToMask, } from '@iconify/tools'; import fs from "node:fs/promises"; import svgtofont from 'svgtofont'; import { createTTF } from 'svgtofont/lib/utils'; import pa...
exported
55
import { Injectable } from '@angular/core'; import {HttpClient} from '@angular/common/http'; import {AlertifyService} from './alertify.service'; import {City} from '../models/city'; import {Router} from '@angular/router'; import { Observable } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class CityServic...
cityId
56
import { shallowRef } from 'vue'; import { openDB, IDBPDatabase } from 'idb'; import router from '../router'; interface AssetDB { assets: { key: string; value: Blob; }; } // 资产列表配置 const ASSET_LIST = { sprite: [ 'ax.png', 'bearman.png', 'blackbear.png', 'candle0.png', 'candle1.png', 'candle2.png...
reject
57
import { Injectable } from '@angular/core'; import { Http, Headers, RequestOptions, Response } from '@angular/http'; import 'rxjs/add/operator/toPromise'; import {Observable} from 'rxjs/Rx'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/catch'; import { IRemind } from './remind.model'; @Injectable() expo...
error
58
import { Transaction } from '@mysten/sui/transactions' import { fullFunctionName } from '~~/helpers/network' export const prepareCreateGreetingTransaction = ( packageId: string ): Transaction => { const tx = new Transaction() tx.moveCall({ arguments: [], target: fullFunctionName(packageId, 'create'), }...
name
59
import {fetchWithAuth} from "./fetchWithAuth"; import type {AdventureCreateDto, AdventureDto, AdventurePatchDto} from "../types/adventure"; export const AdventureService = { async list(): Promise<AdventureDto[]> { const res = await fetchWithAuth("/api/adventures"); if (!res.ok) throw new Error("Оши...
formData
60
import { Component, OnInit } from '@angular/core'; import { Email } from './email'; import { MessageService } from 'primeng/api'; import { CriarChatService } from './criar-chat.service'; @Component({ selector: 'app-criar-chat', templateUrl: './criar-chat.component.html', styleUrls: ['./criar-chat.component.css']...
url1
61
/* Copyright 2022 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 to in ...
data
62
import defaults from 'lodash/defaults'; import { DataQueryRequest, DataQueryResponse, DataSourceApi, DataSourceInstanceSettings, AnnotationEvent, AnnotationQueryRequest, DataQueryError, } from '@grafana/data'; import { getBackendSrv } from '@grafana/runtime'; import { ConprofQuery, ConprofOptions, defa...
space
63
import { TreeImage, GpsCoordinate } from './types'; import ExifReader from 'exifreader'; // Result types for ROP type Result<T, E> = Success<T> | Failure<E>; type Success<T> = { success: true; data: T }; type Failure<E> = { success: false; error: E }; // Collection result for handling multiple operations type Collect...
name
64
export enum FieldMaskType { Exclude = 'exclude', Include = 'include', } export type FieldMaskConvertible = Iterable<string> | Record<string, any> | FieldMask; export class FieldMask { private _entries: Set<string> = new Set; constructor(public typ...
excludeMask
65
import weaviate, { WeaviateClient, generateUuid5 } from 'weaviate-ts-client'; // @ts-ignore - let me be happy export const client: WeaviateClient = weaviate.client({ scheme: 'http', host: 'localhost:8080', }); export async function addImage({ image, description }: { image: Blob, description: string }) { c...
dataObjs
66
import { parse } from 'ts-command-line-args' import { Map, Set } from 'immutable' import type { DataType, TaskProvider } from "@epfml/discojs"; import { defaultTasks } from '@epfml/discojs' interface BenchmarkArguments { provider: TaskProvider<DataType> numberOfUsers: number epochs: number roundDuration: numb...
raw
67
/* * Power BI Visual CLI * * Copyright (c) Microsoft Corporation * All rights reserved. * MIT License * * 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, ...
radius
68
import { Router } from 'express'; import { getRepository, getCustomRepository, getConnection } from 'typeorm'; import Product from '../models/Product'; import ProductRepository from '../repositories/ProductRepository'; const productRouter = Router(); productRouter.post('/', async (request, response) => { try { ...
repository
69
declare var CameraPreview : any; interface Screen { orientation: any; } module StressBlasterApp { "use strict"; class fireAnim { div: HTMLElement; snd: any; constructor (pgX : number, pgY : number) { this.div = document.createElement('div'); this.div.classList.add('image-wrapper'); ...
button
70
/** * These interfaces make it easier to ensure merging standards. */ export interface IMergeable { mergeable: (other: IMergeable) => boolean; merge: (other: IMergeable) => void; } export const MergeProperties = (property1: any, property2: any): any => { if (typeof property1 !== typeof property2) { console...
toAdd
71
// 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'; // This method is called when your extension is activated // Your extension is activated the very first time the command is executed export func...
document
72
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ import path from "path"; import { existsSync } from "fs"; import { mkdir, writeFile, rm } from "node:fs/promises"; import { handler } from "../index"; const __assetDirectoryPath = path.join(__dirname, "...
zipName
73
import * as vscode from "vscode"; import * as child_process from "child_process"; import * as fs from "fs"; import * as path from "path"; import KeilProject from "./project"; export function activate(context: vscode.ExtensionContext) { const subscriber = context.subscriptions; const channel = vscode.window.create...
action
74
import { InteractionType, InteractionResponseType, InteractionResponseFlags, verifyKey, } from 'discord-interactions' export async function handleRequest(request: Request): Promise<Response> { const signature = request.headers.get('X-Signature-Ed25519')! const timestamp = request.headers.get('X-Signature-T...
isValid
75
/* * Copyright (c) 2022 Huawei Device Co., 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 law ...
converted
76
/* * Copyright 2023 Collate. * 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...
match
77
import React from "react"; import {createGestureRecognizer} from "./GestureService.ts"; import {GestureRecognizer} from "@mediapipe/tasks-vision"; type Context = CanvasRenderingContext2D; interface BoardState { ctx: Context; stream: MediaStream; video: HTMLVideoElement; board: HTMLCanvasElement; l...
videoRef
78
import { ethers } from "hardhat"; import { Signer } from "ethers"; import { getStorageAt, getProof, getBlockByNumber, getBlockHashByNumber, BlockHash } from "../../library/source/demo"; import * as OracleSdk from '@keydonix/uniswap-oracle-sdk'; describe("Token", function () { let accounts: Signer[]; beforeEach(as...
blockNumber
79
// Air quality dashboard import * as VIAM from "@viamrobotics/sdk"; import { BSON } from "bson"; async function main() { const opts: VIAM.ViamClientOptions = { credential: { type: "api-key", // Key with location operator permissions // Replace <API-KEY> (including angle brackets) payload...
myDataClient
80
import * as forge from "node-forge"; import * as fs from "node:fs"; export default class SelfSigned { public static setupSelfSigned(sslMode = "./") { const certPath = "./generated-cert-1"; if(fs.existsSync(certPath)) { return JSON.parse(fs.readFileSync(certPath, { encoding: "utf8", f...
keys
81
import { DynamoDBClientConfig } from '@aws-sdk/client-dynamodb'; import { APIGatewayEvent, APIGatewayProxyHandler, Context } from 'aws-lambda'; import 'source-map-support/register.js' import { deleteAlarm } from '@shared/core/usecase/alarm-service.mjs'; import { ArgumentError } from '@shared/core/entity/argument-error....
event
82
import { ROLES } from "src/components/RoleSelect"; import { withAnyRole } from "src/lib/auth"; import { createApiClient } from "src/lib/oasst_client_factory"; import prisma from "src/lib/prismadb"; /** * Update's the user's data in the database. Accessible only to admins. */ const handler = withAnyRole(["admin", "m...
oasstApiClient
83
interface HtmlClassChangerOptions { baseClass: string, list: { selector: string, class: string }[] } export class HtmlClassChanger { private html: HTMLElement; constructor(private readonly config: HtmlClassChangerOptions) { this.html = document.querySelector('html'); this.setUp(); } private setU...
dir
84
import { NavController, NavParams, Platform } from 'ionic-angular'; import {Component} from '@angular/core'; import { HomePage } from '../home/home'; @Component({ selector: 'page-currency', templateUrl: 'currency.html', }) export class CurrencyPage{ tileWidth: number = 50; co...
platform
85
import { createAsyncThunk, createSlice } from "@reduxjs/toolkit"; import { deleteUserDataService } from "../../services/login"; import errorHandler from "../../utils/error-handler"; interface IDeleteUserState { isDeleted?: boolean; loading: boolean; error?: any; } const initialState: IDeleteUserState = { isD...
userName
86
import * as oa from "./openApi" import * as oaPlus from "./openApiPlus" import * as sm from "@ts-common/string-map" import * as _ from "@ts-common/iterator" import * as ps from "@ts-common/property-set" import { Json, stringify } from "@ts-common/json" type OptionalProperties<T> = { readonly [K in keyof T]+?: T[K]...
discriminatorEnums
87
/* 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 "License"); you may not...
obj_probe
88
import BaseController from "./BaseController"; import {Route$PatternMatchedEvent} from "sap/ui/core/routing/Route"; import JSONModel from "sap/ui/model/json/JSONModel"; import Popover from "sap/m/Popover"; import Fragment from "sap/ui/core/Fragment"; import Input from "sap/m/Input"; import {Button$PressEvent} from "sap...
oArguments
89
let calc = document.getElementById("calc"); function isDigit(value: string): boolean { return value != " " && !isNaN(Number(value)); } function isOperator(ch: string): boolean { switch (ch) { case "+": return true; case "-": return true; case "/": return true; case "*": return true; default:...
expressionField
90
import { Injectable } from '@angular/core'; import { AngularFireAuth } from '@angular/fire/auth'; import { BehaviorSubject, Observable, ReplaySubject, Subject } from 'rxjs'; import { tap, map, share } from 'rxjs/operators'; import { Router } from '@angular/router'; interface User { uid: string; email: string; } @...
errorMessage
91
import {ChangeDetectorRef, Component, Input, OnChanges, OnInit, SimpleChange, SimpleChanges} from '@angular/core'; import {CategoryService} from '../../../services/category.service'; @Component({ selector: 'app-mini-budget', templateUrl: './mini-budget.component.html', styleUrls: ['./mini-budget.component.scss']...
changes
92
import axios from 'axios'; import { setupAxiosInterceptors } from '@/api/axiosConfig'; import { OrgUnitsResponseProps } from '@/types/orgUnits'; import { chromeOsDevicesResponseProps } from '@/types/chromeOsDevices'; import { googleListUsersResponseProps } from '@/types/user'; class DirectoryApi { private axiosInsta...
orgUnitId
93
import { Investments } from './yearly/types.js'; export const calculateInvestments = ( [MASK] : { Action: string; Name: string; Total: string }[], ): Investments => { const investments = { totalDeposit: 0, totalInvestedInSek: 0, investedInUSD: { amount: 0, amountInSek: 0, conversionR...
records
94
import { Schema, model } from "mongoose"; export enum Category { Amenagement = "AMÉNAGEMENT", Vehicule = "VÉHICULE", Application = "APPLICATION", Sensibilisation = "SENSIBILISATION", Ateliers = "ATELIER", Other = "AUTRE", } export enum Region { HautesPyrenees = "hautes-pyrenees", PyrennesAtlantiques = "pyrene...
returnedObject
95
/* * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distrib...
sender
96
import { beforeEach, describe, expect, it, vi } from "vitest"; import { DeltaTimeStrategy } from "."; import { IngestionStrategy } from "../../strategy"; describe("DeltaTimeStrategy", () => { // Mock implementation for nowResolver let mockTimeValue = 1000; const mockNowResolver = vi.fn(() => mockTimeValue); // M...
returnedDeltaTime
97
import { JSONPrase } from '@/utils/utils'; export const paramsTableToJson = (data: any) => { let value = {}; if (Array.isArray(data)) { for (let i = 0; i < data.length; i++) { const item = data[i]; if (item.name) { const type = item.type.type; if (type !== 'string') { valu...
editKeys
98
import { Component, OnInit, Inject } from '@angular/core'; import { PrivilegeResponseDto, RoleResponseDto, RoleRequestDto } from 'src/app/app-security-module/models/role'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { PrivilegeApiService } from 'src/app/app-security-module/services/privi...
selectedPrivileges
99
// Return an array with the same shape as the input export function boundingBox(imageArray: number[][]): number[][] { const rows = imageArray.length; const cols = imageArray[0]?.length || 0; if (rows === 0 || cols == 0) return [] let top = rows; let bottom = 0; let left = cols; let [MASK]...
right