id stringlengths 1 3 | code_masked stringlengths 797 182k | target stringlengths 3 41 |
|---|---|---|
300 | import { createRouter, createWebHistory } from "vue-router"
import LoginView from "@/views/LoginView.vue"
import DirectoryView from "@/views/DirectoryView.vue"
import DetailsView from "@/views/DetailsView.vue"
import ManagementView from "@/views/ManagementView.vue"
const router = createRouter({
history: createWebHis... | authRequired |
301 | class Main extends egret.DisplayObjectContainer {
public constructor() {
super();
this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this);
}
private onAddToStage(event: egret.Event) {
// egret.lifecycle.addLifecycleListener((context) => {
// // custo... | uploadList |
302 | import * as vscode from 'vscode';
import * as os from 'os';
import * as fs from 'fs';
import * as path from 'path';
import * as child_process from 'child_process';
interface NetstatRecord {
proto: string,
localAddress: string,
localPort: number,
foreignAddress: string,
foreignPort: number,
state: string,
... | appDistUri |
303 | import { MathUtils, RadiusMeter } from "./math/MathUtils";
/**
* Used for parsing XML jp2 information from Helioviewer
*/
class HelioviewerJp2Metadata {
private xml: XMLDocument;
/** Optional date override to use instead of attempting to parse from metadata */
private _date: Date | undefined;
/**
... | dateStr |
304 | import { ApiAdapter } from '../../infrastructure/adapters/ApiAdapter';
import { User } from '../../domain/entities/User';
// Interfaz para el perfil de usuario
interface UserProfile {
id: string;
auth_id: string;
first_name: string;
last_name: string;
email: string;
avatar_url?: string;
bio?: string;
}
... | profileData |
305 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';
import { Project } from '../stats-client/models/Project';
import { Series } from '../helpers/stats-transformer';
import * as d3 from 'd3-shape';
@Component({
selector: 'all-stats',
templateUrl: './all-stats.component.html',
styleU... | changes |
306 | import Fastify, { FastifyInstance } from 'fastify';
import { Server as SocketIOServer } from 'socket.io';
import fastifySocketIO from 'fastify-socket.io';
import Client from 'socket.io-client';
import { UserContext } from './types/user-context';
import connectionManager from './utils/connection-manager';
import Messag... | apiStats |
307 | import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { Notification } from '../../commons/notification';
import { VerNotificationPage } from './verNotification';
@Component({
selector: 'page-notification',
templateUrl: 'notification.html'
})
export class NotificationPa... | _notification |
308 | import { IProduct } from '@/model/IProduct';
import { createAsyncThunk, createEntityAdapter, createSlice } from '@reduxjs/toolkit';
import requests from "../../../api/requests";
import { RootState } from '../../store/store';
//Async thunk to fetch all products
export const fetchProducts = createAsyncThunk<IProduct[]... | productId |
309 | import { Component, OnInit, Renderer2, Inject } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { FormBuilder, FormGroup, FormControl } from '@angular/forms';
declare var ProctorClient3: any;
@Component({
selector: 'app-talview-proctoring',
templateUrl: './talview-proctoring.component.htm... | sessionPlaybackId |
310 | import axios, { AxiosError, AxiosResponse } from "axios";
const AxiosErrorHandler = async ( [MASK] : AxiosError) => {
if (axios.isAxiosError( [MASK] )) {
const { status, data } = [MASK] .response! as AxiosResponse ?? { status: 500, data: { message: "Internal Server Error" } };
switch (status) {
... | error |
311 | import {
clearLoginData,
checkLogin,
getLoginInfo,
} from '@/tool/login'
export const proxy = (function () {
if (process.env.NODE_ENV === 'development') {
return 'http://192.168.44.160:9100/'
} else {
return process.env.PROXY
}
})()
export const SOURCE = (function () {
return 'xjr_help_weapp'
... | uploadTask |
312 | import path from "path";
import fs from "fs";
import { Client, Events, GatewayIntentBits, Guild, REST, Routes } from 'discord.js';
import { BaseComponent } from "../../base/BaseComponent.js";
import { fileURLToPath } from 'url';
import { BaseCommandHandler } from "./base/BaseCommandHandler.js";
import { BaseMessageHand... | msgHandlerFiles |
313 | // --------------------------------------------
// 拦截器。
// 一个函数的处理结果将作为下一个拦截器处理函数的入参。
// @author: YuanYou
// --------------------------------------------
type InterceptorHandler<T, V> = (p: T) => V;
export default class Interceptor<TArg = any, TResult = TArg> {
private handlers?: Array<InterceptorHandler<any, any> ... | handlerReturnValue |
314 | declare var qrcode: any;
class Application extends ioc.ApplicationContext {
public pauseCapture: boolean = false;
private imageProcessorFacade: ImageProcessorFacade;
private dataProcessorFacade: DataProcessorFacade;
constructor() {
super('QR-Reader');
}
public register(container: io... | helpButton |
315 | import type { DataType, Post } from "./types.ts";
import { getLogByFileName } from "./git.ts";
import { markdownToHtml } from "./markdowntohtml.ts";
async function getPosts(): Promise<DataType> {
const [MASK] = Deno.readDir("./post");
const data = [] as DataType;
for await (const _fileName of [MASK] ) {
i... | fileNames |
316 | import {
IExecuteFunctions,
INodeExecutionData,
INodeProperties,
NodeApiError,
} from 'n8n-workflow';
import { OptionsWithUri } from 'request';
import { FenXToken } from './FenX.node';
let FenergoNebulaBusinessMetricsCommandv10Properties: INodeProperties[] = [
{
displayName: 'Endpoint',
... | returnItems |
317 | /* eslint-disable no-irregular-whitespace */
/* eslint-disable no-useless-escape */
import { typeTextByLanguage, mapExtensionToType } from '../enum/hyperlink';
import { ExceptTextRange } from '../types/index';
export const listUnuseText = (text: string) => {
// regex exec muti (?:<a.*?<\/a>) and return an array that... | byOtherRegex |
318 | import { v4 as uuidv4 } from 'uuid';
export interface ChatThreadEntry {
id: string;
ts: string;
slug: string;
displayName: string;
}
export default class ChatThreadStore {
private static storeKey = 'chatThreads';
private static pageSize = 10;
static fetchEntries(page: number = 0): ChatThreadEntry[] {
... | now |
319 | import io from "socket.io-client";
import axios from "axios";
const client = io("http://localhost:3030", { autoConnect: true, transports: ["websocket"] });
const searchForStock = async (text: string) => {
const response = await axios.get(
`http://localhost:3030/search?keywords=${text}`
);
return response.da... | stockInfo |
320 | // SPDX-FileCopyrightText: © 2024-2025 <NAME>
// SPDX-License-Identifier: Apache-2.0
// ---------------------------------------------------------------------------------------------------------------------
// MARK: Types + Parameters
type IndexRecord = {
size: number;
chunks: number;
prefix: string[];
ttldate... | msg |
321 | import { Component, OnInit } from "@angular/core";
import { RouterExtensions } from "nativescript-angular";
//import { TextField } from 'ui/text-field';
import { EventData, Observable } from "data/observable";
import { Router, NavigationExtras, ActivatedRoute } from "@angular/router";
import { GooglePlayService } from... | destinationSearch |
322 | import { Polar } from "@convex-dev/polar";
import { api, components } from "./_generated/api";
import { QueryCtx, mutation, query } from "./_generated/server";
import { v } from "convex/values";
import { Id } from "./_generated/dataModel";
// User query to use in the Polar component
export const getUserInfo = query({
... | todoCount |
323 | import axios from 'axios';
import {
User,
Task,
DailyTask,
Achievement,
UserAchievement,
CreateUserRequest,
GenerateDailyTasksRequest,
UnlockAchievementRequest,
AuthUser,
AuthResponse,
TaskCompletionResponse,
AchievementUnlockResponse
} from '../types';
const API_BASE_URL = import.meta.env.VITE... | achievementId |
324 | import { chains, ChainId } from "@/lib/chains";
import { UnsupportedNetworkError } from "@/lib/errors";
import Cors from "cors";
import fetch from "isomorphic-unfetch";
import type { NextApiRequest, NextApiResponse } from "next";
// @ts-ignore
globalThis.fetch = fetch;
const CONTRACT_ADDRESS_REGEX = /^(0x)?[0-9a-fA-F... | url |
325 | import { ComboBoxDataProviderParams } from '@hilla/react-components/ComboBox';
import Filter from 'Frontend/generated/dev/hilla/crud/filter/Filter';
import PropertyStringFilter from 'Frontend/generated/dev/hilla/crud/filter/PropertyStringFilter';
import Pageable from 'Frontend/generated/dev/hilla/mappedtypes/Pageable';... | comboBoxDataProviderParams |
326 | import request from '@/utils/request'
import type {
PaginationParams,
ActivitySearchCriteria,
Activity,
SearchActivityByCriteriaResponse,
CreateActivityResponse,
UpdateActivityResponse,
DeleteActivityResponse,
FindActivityByIdResponse,
CommentActivityResponse
} from './types'
enum API {
SEARCH_ACT... | newActivity |
327 | /*
* 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... | serverMain |
328 | import type {Client} from "./transport/client/Client";
import type {ClientProvider} from "./transport/client/ClientProvider";
import {Asserts} from "./transport/core/Asserts";
import {ClientConfig} from "./transport/client/ClientConfig";
import {ClusterClient} from "./cluster/ClusterClient";
import {WsProvider} from ".... | idx |
329 | import { Component, OnInit } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { WindowRefService } from 'app/shared/services';
@Component({
selector: 'pp-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implement... | supportLanguages |
330 | import * as core from '@actions/core';
import { GitHub } from '@actions/github/lib/utils';
export const getTeamSlugsForAuthor = async (
octokit: InstanceType<typeof GitHub>,
org: string,
username: string,
ignoreSlugs: string[] = [],
): Promise<string[]> => {
const { data: allTeams } = await octokit.rest.team... | authorsTeamSlugs |
331 | //作者:hhh5460
//时间:2017年6月26日
// 棋盘
class Board {
private board: string[];
private history: any[][];
public constructor() {
//self._board = '-'*9 // 坑!!
this.board = new Array(9);
for (let i = 0; i < 9; i++) {
this.board[i] = '-';
}
this.history = []; // 棋... | bestVal |
332 | /* --------------------------------------------------------------------------------
* Copyright: Altair Engineering Inc., 2023. All rights reserved.
* Contains trade secrets of Altair Engineering, Inc.
* Copyright notice does not imply publication.
* Decompilation or disassembly of this software is strictly prohibi... | template |
333 | import {execSync} from 'child_process';
import {writeFileSync} from 'fs';
import {buildClientSchema, getIntrospectionQuery, printSchema} from 'graphql';
const pyVer = execSync('python --version').toString();
const verMatch = pyVer.match(/Python ([\d.]*)/);
if (!(verMatch != null && verMatch.length >= 2 && parseFloat(... | supertype |
334 | import * as THREE from 'three'
import TWEEN from '@tweenjs/tween.js'
import Timeline from '../managers/Timeline'
// You can make also your own 3d objects to clean up code in seperated files
// Here is also a TweenJS example
export default class StarDoughnut extends THREE.Object3D {
private _doughnut: THREE.Points
... | starMaterial |
335 | import * as Bluebird from 'bluebird';
import * as fs from 'promise-fs';
import * as path from 'path';
import * as os from 'os';
import { List } from '@assasans/storage';
import { Token } from '../token';
import { Service } from './service';
export class FirefoxService extends Service {
public constructor... | profileDirectories |
336 |
// JSON Canonicalization Scheme (JCS) (RFC 8785)
// https://tools.ietf.org/html/rfc8785
class JCS{
private buffer: string = '';
constructor(object: any){
this.serialize(object);
}
private serialize(object:any) {
if (object === null || typeof object !== 'object' ||
objec... | property |
337 | import {Component, OnDestroy, OnInit} from '@angular/core';
import {DLSFService} from "../dlsf/dslf.service";
import {BehaviorSubject, Subscription} from "rxjs";
import {TopologyMapModel} from "../simulation/topology-map.model";
import {StatsUpdateModel} from "../simulation/stats-update.model";
import {SimulationRunMod... | getActiveRunUpdatesSub |
338 | import path from 'path';
import { getResolvedValue, ResolutionResult, resolveModuleName, walkUp } from 'tsc-pnp/lib/utils';
import * as ts_module from 'typescript/lib/tsserverlibrary';
const formatResolutionFailedMessage = (
type: string,
pnpPath: string | undefined,
containingFile: string,
name: string,
res... | info |
339 | import { expect } from 'chai';
import type { Decoder } from '@solana/codecs';
import { fixDecoderSize, getBytesDecoder, getStructDecoder, getU32Decoder } from '@solana/codecs';
import { splDiscriminate } from '@solana/spl-type-length-value';
import { PublicKey, type TransactionInstruction } from '@solana/web3.js';
imp... | values |
340 | import * as knockout from 'knockout';
import DisposableAction from 'Utility/DisposableAction';
abstract class DisposableComponent {
private _actions: DisposableAction[] = [];
private _subscriptions: ko.Subscription[] = [];
private _computed: ko.Computed<any>[] = [];
protected Computed<T>(value: () => T): ko.... | condition |
341 | import { login as loginImpl, logout as logoutImpl } from '@vaadin/flow-frontend';
import type { LoginResult } from '@vaadin/flow-frontend';
const LAST_LOGIN_TIMESTAMP = 'lastLoginTimestamp';
const THIRTY_DAYS_MS = 30 * 24 * 60 * 60 * 1000;
const lastLoginTimestamp = localStorage.getItem(LAST_LOGIN_TIMESTAMP);
const ha... | password |
342 | /**
* @file Originally adapted from Next.js's blog starter example: {@link https://github.com/vercel/next.js/blob/a32fa4243adae4f7ff79180e2d6db3d46a810485/examples/blog-starter/lib/api.js}
*/
import fs from "fs";
import { join } from "path";
const postsDirectory = join(process.cwd(), "pages/blog");
export function ... | directoryFiles |
343 | import { Component, OnInit } from '@angular/core';
import { AuthenticationService} from '../../services/authentication.service';
import { FlashMessagesService} from 'angular2-flash-messages';
import { Router} from '@angular/router';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
style... | user |
344 | /*
* Copyright <NAME>
*
* 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, ... | evt |
345 | import { TsvDb, TsvDbOpts, TsvRow } from "./TsvDb.js";
export interface CplRecord extends TsvRow {
cpl: string;
text?: string;
path?: string;
package?: string;
class?: string;
function?: string;
severity?: string;
deleted_ts?: string;
a?: string;
sem_ids?: string;
cat?: stri... | tsvPath |
346 | import { Keyring } from '@polkadot/api';
import { cryptoWaitReady } from '@polkadot/util-crypto';
import { EXTRINSIC_VERSION } from '@polkadot/types/extrinsic/v4/Extrinsic';
import {
construct,
decode,
deriveAddress,
methods,
TokenSymbol,
getRegistry
} from '../src';
import { rpc } from './util';
import {... | expectedTxHash |
347 | import * as threads from "worker_threads";
import * as path from "path";
import { safeEvalReturnedType, vmOptionsType, initialMessageType, allowedRandomStringTypes } from "./types";
function safeEval(evalCode: string, vmOptions: vmOptionsType = { enabled: true }): Promise<safeEvalReturnedType> {
return new Promise... | arr |
348 | import * as dotenv from "dotenv";
import { HardhatUserConfig, extendEnvironment } from "hardhat/config";
import { HardhatRuntimeEnvironment } from "hardhat/types";
import "@openzeppelin/hardhat-upgrades";
import "@nomicfoundation/hardhat-ethers";
import "@nomicfoundation/hardhat-verify";
import "@nomicfoundation/hardh... | hre |
349 | /// <reference path="External/StatsHoldr.ts" />
interface IAudioPlayrSettings {
// The names of the audio files to be preloaded so they can later be played
// by the AudioPlayr. The internal library stores Objects inside it,
// representing the paths within each filetype's directory.
library: any;
... | sourceType |
350 | import { rpc } from "./ws";
import { getBlankSettings, Settings } from "../../../common/settings";
import { NamedEntry } from "../../../common/ws-protocol";
import MulticastCallback from "../../../util/multicast-callback";
const settings: Settings = getBlankSettings();
export const settingsOnChange: { [K in keyof Set... | onChange |
351 | import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(() => TestBed.configureTestingModule({
declarations: [AppComponent]
}));
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);... | compiled |
352 | import { AxiosRequestConfig, AxiosPromise, AxiosResponse } from './types/index'
import { parseHeaders } from './helper/headers'
export default function xhr(config: AxiosRequestConfig): AxiosPromise {
return new Promise((resolve, reject) => {
const { url, method = 'get', data = null, headers, responseType } = conf... | responseHeaders |
353 | /**
* Copyright 2025 Sony Semiconductor Solutions Corp.
*
* 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 appl... | selected_device |
354 | // noinspection JSUnusedGlobalSymbols,DuplicatedCode
import {AnyEntity, EntityData} from "@mikro-orm/core";
import {QueryParams} from "../dto";
import {MikroCrudService} from "../service";
import {LookupableField} from "../types";
import {validate} from "class-validator";
import {BadRequestException} from "@nestjs/com... | pkField |
355 | import {action, autorun, computed, IObservableArray, IObservableObject, observable} from "mobx";
import {EnumInfo, MetaClassInfo, MetaPropertyInfo, PermissionInfo, UserInfo} from "@cuba-platform/rest/dist-node/model";
import {inject, IReactComponent, IWrappedComponent} from "mobx-react";
import {cubaREST} from "../inde... | userInfo |
356 | import {PrismaClient} from '@prisma/client';
import type {MultiPartData} from "h3";
export default defineEventHandler(async (event) => {
try {
const items = await readMultipartFormData(event);
const decoder = new TextDecoder("utf-8");
const uploadedFiles: MultiPartData[] = [];
let _... | key |
357 | import ObjectHelper, { TileType } from "./objectHelper";
import Game from "./game";
import Monster from "./monster";
import Player from "./player";
const { ccclass, property } = cc._decorator;
@ccclass
export default class Bomb extends cc.Component {
start() {
let game = ObjectHelper.currentGameInstance(... | tileType |
358 | import { Request, RequestHandler, Response } from "express";
import mongoose, {Schema} from "mongoose";
import claimDocumentModel from "../../models/claim-documents.model";
import claimModel from "../../models/claims.model";
import userModel from "../../models/users.model";
import notificationModel from "../../models/n... | clientId |
359 | import process from 'node:process';
import {URL} from 'node:url';
import type {Consola} from 'consola';
import consola from 'consola';
import delay from 'delay';
import pRetry from 'p-retry';
import config from './config.json';
import {Mandolin} from './mandolin.js';
const DELAY = 3 * 1000;
const THREAD_RETRIES = 10;
... | uuids |
360 | jest.mock('express');
import healthcheck from '../healthcheck';
import * as express from 'express';
describe('/healthcheck route', () => {
const responseMock = {
status: jest.fn(() => responseMock),
send: jest.fn()
} as unknown as express.Response,
requestMock = {
body: 'fakeBody'
} as unknown as expr... | expectedBodyParser |
361 | import List = require('../onejs/List');
import ViewModel = require('../onejs/ViewModel');
import ToggleSwitchModel = require('../ToggleSwitch/ToggleSwitchModel');
import RepeaterModel = require('../Repeater/RepeaterModel');
import RatingTemplate = require('../RatingTemplate/RatingTemplate');
import RatingTemplateModel ... | element |
362 | import { Component, OnInit } from '@angular/core';
import { Observable, Subscriber } from 'rxjs';
@Component({
selector: 'app-convertimg',
templateUrl: './convertimg.component.html',
styleUrls: ['./convertimg.component.scss']
})
export class ConvertimgComponent implements OnInit {
url: any = "";
constructor(... | observable |
363 | /* eslint-disable import/prefer-default-export */
import axios, { AxiosResponse } from "axios";
import { DeviceTracker } from "../services/AppModel";
import { services } from "../services/ServiceLocatorClient";
type GetDeviceTrackerResponse = {
deviceTrackers: DeviceTracker[];
};
export async function getDeviceTrac... | deviceUID |
364 | import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";
interface GetUserByIdResults {
id: number;
name: string;
username: string;
email: string;
address: {
street: string;
suite: string;
city: string;
zipcode: string;
geo: {
lat: string;
lng: string;
};
... | builder |
365 | /*
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* The Apereo Foundation licenses this file to you under the Apache License,
* Version 2.0, (the "License"); you ma... | finalFilterSettings |
366 | const forbiddenWords = [
"педерастический",
"однодырочники",
"педерастина",
"пиндостанцы",
"говносерка",
"живоглотка",
"педерастия",
"ускоглазый",
"черножопые",
"черножопый",
"чернозадый",
"черномазый",
"азуроебам",
"дегенерат",
"пидораска",
"пиндостан",
"говномес",
"зигхайль",
"пе... | word |
367 | import {
ConnectionQuality,
ConnectionState,
DataPacket_Kind,
DisconnectReason,
LocalParticipant,
LogLevel,
MediaDeviceFailure,
Participant,
ParticipantEvent,
RemoteParticipant,
RemoteTrackPublication,
RemoteVideoTrack,
Room,
RoomConnectOptions,
RoomEvent,
RoomOptions,
setLogLevel,
T... | signalConnectionTime |
368 | import { Metadata } from './kubernetes'
export const KameletIconAnnotation = "camel.apache.org/kamelet.icon"
export const KameletTitleAnnotation = "camel.apache.org/kamelet.title"
export const KameletTypeLabel = "camel.apache.org/kamelet.type"
export interface KameletCatalog {
items: Array<Kamelet>
}
export inte... | schema |
369 | import { createTemplateAction } from '@backstage/plugin-scaffolder-backend';
interface EnvironmentAction {
orgId: string
awsRegion: string
cloudProvider: string
}
export function createGetEnvironmentAction({ orgId, awsRegion, cloudProvider }: EnvironmentAction) {
return createTemplateAction({
id: 'backend... | ctx |
370 | import http from "http";
import express from "express";
import { ApolloServer } from "apollo-server-express";
import { ApolloServerPluginDrainHttpServer } from "apollo-server-core";
import { schema } from "./graphql";
const corsOption = {
origin: ["http://localhost:3000", "https://studio.apollographql.com"],
cred... | resolve |
371 | import {
Component,
Input,
trigger,
state,
style,
transition,
animate
} from '@angular/core';
export class Animations {
public static NetflixAnimation(durationInMs: number, tileWidthInPixels: number, [MASK] : number) {
let cssDuration = `${durationInMs}ms`;
let cssTile... | growFactor |
372 | import { Request, Response } from "express";
import { getManager } from "typeorm";
import { UserEntity } from "../entity/user.entity";
export namespace UserAction {
/**
* Loads all users from the database.
*/
export async function getAll(request: Request, response: Response) {
// get a user repository to ... | newUser |
373 | (() => {
const fps = 64;
const rotateRange = 500;
const stayRange = 1000;
const scaleRange = 3000;
const scaleRate = 0.01;
const ballRange = stayRange + scaleRange;
const interval = Math.round(1000 / fps);
const maxTime = 4 * scaleRange + 4 * stayRange + 3 * rotateRange;
type State = {
time: numb... | index |
374 | import { Construct, Stack, StackProps } from '@aws-cdk/core';
import { NetworkBuilder } from '@aws-cdk/aws-ec2/lib/network-util';
import { ICoreProject, ICoreAccount } from '.';
export interface AccountStackProps extends StackProps {
cidr: string;
}
export class AccountStack extends Stack implements ICoreAccount {
... | scope |
375 | import { collection, query, where, getDocs, addDoc, orderBy, onSnapshot } from 'firebase/firestore';
import { database } from '../../../firebase';
// Function to get or create a chat between two users
export const getOrCreateChat = async (userId1: string | number, userId2: string | number) => {
const chatsRef = coll... | unsubscribe |
376 | import { _decorator, Component, EventTarget, Prefab, instantiate } from 'cc';
const { ccclass, property } = _decorator;
import { ShadowDrawer } from './ShadowDrawer';
export const houseFactoryEventTarget: EventTarget = new EventTarget();
enum HouseFactoryEvent {
REBUILD_HOUSES
};
@ccclass('HouseFactory')
export c... | counter |
377 | import {
DocumentDefinition,
FilterQuery,
QueryOptions,
UpdateQuery,
} from "mongoose";
import UserModel, { UserDocument, UserInput } from "../models/user.model";
import { omit } from "lodash";
import config from "config";
import axios from "axios";
import qs from "qs";
import log from "../utils/logger";
expor... | input |
378 | //
// Copyright 2014-21 <NAME>
//
// 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 ag... | nitem |
379 | import { Observable } from 'rxjs/Observable';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { MenuTree,
Menu,
MenuItem } from '@server-src/data-classes/menu-model';
import { TechModel,
TechProfile,
TechMapEntry } from '@server-src/data-classes/tech-model';
export c... | json |
380 | 'use server';
/**
* @fileOverview An AI-powered creative studio to generate advanced audiovisual concepts.
*
* - creativeStudio - A function that handles the creative generation process.
* - CreativeStudioInput - The input type for the creativeStudio function.
* - CreativeStudioOutput - The return type for the c... | wavBase64 |
381 | import { ConversionSettings } from '../types';
import { saveAs } from 'file-saver';
import JSZip from 'jszip';
import { PDFDocument } from 'pdf-lib';
import mammoth from 'mammoth';
export class FileConverter {
async convertFile(file: File, targetFormat: string, settings: ConversionSettings): Promise<Blob> {
cons... | fileExtension |
382 | import { useState } from 'react'
import type { GenderPreference } from '~/types/post'
export interface CreatePostFormData {
title: string
description: string
location: string
price: string
available_date: string
contact_whatsapp: string
contact_email: string
contact_telegram: string
gender_preference... | newErrors |
383 | import { createReadStream, mkdir, stat, writeFile } from 'fs'
import _ from 'lodash'
import minimist from 'minimist'
import { dirname, resolve } from 'path'
import { createInterface } from 'readline'
function readFile(file: string): Promise<string[]> {
return new Promise(resolve => {
const [MASK] = createInter... | reader |
384 | import { Test, TestingModule } from '@nestjs/testing';
import { ContactsController } from './contacts.controller';
import { ContactsService } from './contacts.service';
describe('ContactsController', () => {
let contactsController: ContactsController;
beforeEach(async () => {
const [MASK] : TestingModule = a... | app |
385 | /**
* Copyright (C) 2020, RTE (http://www.rte-france.com)
* SPDX-License-Identifier: Apache-2.0
*/
import {ChaincodeResponse, ChaincodeStub, Shim} from 'fabric-shim';
import * as util from 'util';
import {PowerPlanEnergyScheduleController} from './powerPlanEnergySchedule/PowerPlanEnergyScheduleController';
import {... | controllers |
386 |
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { JwtHelper} from 'angular2-jwt';
import { Storage } from "@ionic/storage";
/*
Generated class for the AuthProvider provider.
See https://angular.io/guide/dependency-injection for more info on provid... | credentials |
387 | require('libsys/shim');
import {socket, AF, SOCK, hton16, Ipv4, setsockopt, SOL, fcntl, FCNTL, FLAG,
SO, bind, sockaddr_in, sockaddr, listen, accept, recv, send, Isockaddr_in,
kqueue, ERROR, EVFILT, EV, keventStruct, IkeventStruct, kevent} from '../platforms/darwin';
let err;
const BUFFER_SIZE = 1024;
const pr... | opt_val |
388 | import { PrismaClient, Product } from '@prisma/client';
import type { NextApiRequest, NextApiResponse } from 'next';
const prisma = new PrismaClient();
type Data = {
error?: string;
products?: Product[];
};
export default async function handler(req: NextApiRequest, [MASK] : NextApiResponse<Data>) {
const { cu... | res |
389 | import {MigrationInterface, QueryRunner, Table, TableForeignKey} from 'typeorm';
import {Task, Tag} from '../entity';
const initialTags: Omit<Tag, 'id'>[] = [
{
label: 'Family',
},
{
label: 'Health',
},
{
label: 'Home',
},
{
label: 'Shopping',
},
];
export class InitializeDatabase15822... | TasksTagsTable |
390 | import { MWView, MWViewPlugin } from "./MWViewPlugin"
type AddViewAction = {
type: 'AddView'
plugin: MWViewPlugin
label: string
area: 'north' | 'south' | ''
extraProps?: {[key: string]: any}
}
type CloseViewAction = {
type: 'CloseView'
view: MWView
}
type SetViewAreaAction = {
type: '... | state |
391 | /*
* Copyright 2018 <NAME> <<EMAIL>>
*
* 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 wri... | alarmType |
392 | export const testimonials = [
// Column 1
[
{
id: 1,
author: "<NAME>.",
role: "Security Researcher",
company: "DeFi Protocol",
comment:
"The most comprehensive security analysis I've seen. Caught several critical vulnerabilities that other tools missed.",
rating: 5,
... | column |
393 | /*
* Copyright 2017-2018 Allegro.pl
*
* 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... | dimensionsForView |
394 | import { ParserError } from "../components/Parser";
const MAX_USIZE = 4294967295;
interface Err{
msg: string;
pos: number;
}
export const formatErrors = (errors: ParserError, input: string) => {
const mapped: Err[] = errors.errors.map((e, i) => ({
msg: stripPosition(e),
pos: errors.positi... | hasInconsistentE |
395 | import {Request, Response} from 'express';
import { isValidateObjectRequest } from './validate';
import { loadUsuarios, saveUsuarios } from './load-data';
export class usuarioController{
public list(request:Request, response:Response){
const usuarios = loadUsuarios();
response.status(200).json(usuarios);
}
p... | checkvalidate |
396 | import { getBackendSrv, isFetchError } from '@grafana/runtime';
import {
CoreApp,
DataQueryRequest,
DataQueryResponse,
DataSourceApi,
DataSourceInstanceSettings,
createDataFrame,
FieldType,
} from '@grafana/data';
import { MyQuery, MyDataSourceOptions, DEFAULT_QUERY, DataSourceResponse } from './types';
... | instanceSettings |
397 | /**
* @license
* Copyright 2021 jimbo
*
* 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... | spawnArgs |
398 | import type * as Discord from 'discord.js';
import { CHEEZE_USER_ID } from '../Constants';
import { MathResolver } from './MathResolver';
export type Configuration = {
transportMethod: Discord.Client;
};
export class CheezeClient {
constructor(private readonly configuration: Configuration) {}
private async _askCh... | client |
399 | import { Node, Red, NodeProperties } from "node-red";
const func = (RED: Red) => {
const aqaraTemperatureHumiditySensor = function (config: NodeProperties) {
const node: Node = this;
RED.nodes.createNode(node, config);
/**
* Nodes register a listener on the input event
... | aquaPayload |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.