id stringlengths 1 3 | code_masked stringlengths 797 182k | target stringlengths 3 41 |
|---|---|---|
900 | import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-drag',
templateUrl: './drag.component.html',
styleUrls: ['./drag.component.less']
})
export class DragComponent implements OnInit {
items = [];
active = -1;
arr = [11, 12, 21, 22];
get items1() {
return this.items.filter... | len |
901 | import * as coords from './coords';
describe('basic coordinate helper functions', () => {
const table = coords.tableToCells([
['a', 'b'],
['x', 'y'],
]);
const column = coords.colToCells([undefined, true, false]);
const row = coords.rowToCells([1, undefined, 3]);
const colWithMerges = [
{ value: ... | shiftedUp |
902 | #!/usr/bin/env deno run
// $ brew install typescript
// $ echo '{"compilerOptions": {"noImplicitAny": true}}' > tsconfig.json
// Deno:
// $ brew install deno
// Node:
// $ npm install -g ts-node
// $ npm install -g typescript
// $ ./envelopes.ts
// or
// $ tsc envelopes.ts --outFile envelopes.ts.js
// $ deno run ./en... | higher_value |
903 | class RegionCreator {
public doLog: boolean = false;
public maxOneTime: number = 1;
public maxTime: number = 10;
public maxTries: number = 100;
public generateFaster: boolean = true; // if true, generates the first cell of each region in the spot starting from the smallest ids,
... | neighborToCheck |
904 | import { useState } from "react"
interface Message {
role: "user" | "assistant"
content: string
reasoning_content?: string // 推理链输出
}
const API_KEY = import.meta.env.VITE_DEEPSEEK_API_KEY
const BASE_URL = "https://api.deepseek.com/v1"
export function useChatStream() {
const [streaming, setStreaming] = useSt... | decoder |
905 | import { Component } from '@angular/core';
import { RootFacadeService } from './root-facade.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
isTodayStatusReady: boolean = false;
isTodayMoreInfoReady: boolean ... | facadeService |
906 | // eslint-disable-next-line import/no-unresolved
import { SERVER } from '@env';
import axios, { AxiosError, isAxiosError } from 'axios';
import { ErrorJSON, Sig } from '@/@types/server';
import { refreshTokens } from '@/redux/auth/auth.slice';
import { store } from '@/redux/store';
// console.log('SERVER', SERVER);
... | originalRequest |
907 | /**
* (C) Symbol Contributors 2022
*
* 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 t... | contactInfo |
908 | import 'colors';
import { Resource } from '../Resource';
import { Unit } from '../Unit';
import { City, CityTile } from './city';
import { GameMap } from '../GameMap';
import { Cart, Worker } from '../Unit';
import { LuxMatchConfigs, SerializedState } from '../types';
import { DEFAULT_CONFIGS } from '../defaults';
impo... | destunit |
909 | /*
Copyright (C) 2021 rubybb <https://github.com/rubybb>
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 a... | initialURL |
910 | import { defineConfig } from 'vitepress'
import UnoCSS from 'unocss/vite'
import { resolveURL } from 'ufo'
export default defineConfig({
head: [
['link', { rel: 'icon', href: '/logo.png' }],
[
'script',
{ async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-JYEBV84K3Q' }
],
[
... | pageData |
911 | import axios from 'axios';
import { url } from '../utils/Utils';
import { ChatInfo_APIResponse, UserCredentials } from '../types';
const chunkEntitiesAPI = async ( [MASK] : UserCredentials, chunk_ids: string) => {
try {
const formData = new FormData();
formData.append('uri', [MASK] ?.uri ?? '');
formDat... | userCredentials |
912 | import _ from 'lodash';
import NodeModel from "@/components-com/workflow/model/node.model";
import Utils from '@/utils/utils';
import {NODE_KEY, UUID_NUM} from "@/components-com/workflow/const/workflow.const";
import WorkflowModel from "@/components-com/workflow/model/workflow.model";
import EventModel from "@/componen... | conditionTwoLevel |
913 | import { makeObservable, observable, action, computed, runInAction } from 'mobx';
import { BaseViewModel } from './BaseViewModel';
import { CartItem, Product } from '../models/types';
import AsyncStorage from '@react-native-async-storage/async-storage';
export class CartViewModel extends BaseViewModel {
@observabl... | existingItem |
914 | import { HttpInterceptorFn } from '@angular/common/http';
import { inject } from '@angular/core';
import { AuthService } from '../services/auth.service';
export const authInterceptor: HttpInterceptorFn = (req, next) => {
if (req.url.includes('revoke') || req.url.includes('logout'))
return next(req);
const aut... | refreshToken |
915 | // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
/**
*
* (c) Copyright Ascensio System SIA 2025
*
* 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 ... | path |
916 | import { HttpClient } from '@angular/common/http';
import { Component, OnDestroy, signal } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
import {
IonApp,
IonButton,
IonButtons,
IonContent,
IonFooter,
IonHeader,
IonIcon,
Io... | mobileMode |
917 | import { createServerClient } from '@supabase/ssr'
import { NextResponse, type NextRequest } from 'next/server'
export async function updateSession(request: NextRequest) {
let supabaseResponse = NextResponse.next({
request,
})
const supabase = createServerClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
... | cookiesToSet |
918 | type Method = 'GET' | 'POST';
export default class BookingSystemRequest {
base: string = '/api';
path: string;
request: XMLHttpRequest;
payload: any | undefined;
method: string;
handleSuccess: (response: any) => void = () => {};
handleFailure: (response: any, status: number) => void = () =>... | handleError |
919 | import { parse } from 'csv-parse';
import fs from 'fs';
import path from 'path';
const WORKER_COUNT = 32;
const delimiter = ';';
function getDataPath(fileName: string): string {
return path.join('./data/', fileName);
}
function getStaticApiPath(fileName: string): string {
return path.join('./static/api/', fileNa... | villagesWorker |
920 | import { defineStore } from "pinia";
import { useToast } from "primevue/usetoast";
export const useAuthStore = defineStore("authStore", () => {
const currentUser = ref(null);
const isAuthorized = ref(true);
function setCurrentUser( [MASK] ) {
currentUser.value = [MASK] ;
isAuthorized.value = true;
}
... | user |
921 | import { type APIPromise, multipartFormRequestOptions, type RequestOptions, type Uploadable } from '@zhengxs/http';
import { APIResource } from '../resource';
export class Files extends APIResource {
/**
* 上传媒体文件
*
* https://open.dingtalk.com/document/orgapp/upload-media-files
*/
create(body: FileCrea... | init |
922 | import { Injectable} from "@angular/core";
import { User } from "../User/User";
import { CookieService } from "ngx-cookie-service";
import CryptoJS from "crypto-js";
@Injectable({
providedIn: 'root'
})
export class getUser{
public static user:User = new User("","",-1,"","","","","",false,false,"",false);
... | encryptedValue |
923 | import {
createRequestAction,
createSagaFetcher,
isFetchFailure,
isFetching,
isFetchSuccess,
selectPayload,
selectErrorPayload,
hasFetchFailures,
selectErrorPayloads,
State,
StateItem,
} from './index'
import { AnyAction, applyMiddleware, combineReducers, createStore } from 'redux'
import createSa... | testIndex |
924 | import { rhoValToJs } from "rchain-toolkit/src/utils/rhoValToJs";
import { rhoExprToVar } from "rchain-toolkit/src/utils/rhoExprToVar";
import { decodePar } from "rchain-toolkit/src/utils/decodeParBrowser";
import { getDeployDataToSign } from "rchain-toolkit/src/utils/getDeployDataToSignBrowser";
const decodeBase16 = ... | terms |
925 | import {
App,
TFolder,
Plugin,
PluginSettingTab,
Setting,
TAbstractFile,
TFile,
WorkspaceLeaf,
normalizePath,
Notice,
Menu,
ViewState
} from 'obsidian';
// 不再使用固定文件名,而是动态获取
interface FileExplorer {
onClick: (event: MouseEvent, file: TAbstractFile) => void;
filter: (file: TAbstractFile) => boolean;... | infoDiv |
926 | ///<reference path="typings/webrtc/RTCPeerConnection.d.ts"/>
///<reference path="typings/webrtc/MediaStream.d.ts"/>
///<reference path="typings/stormancer.d.ts"/>
///<reference path="typings/jQuery/jquery.d.ts"/>
declare function getUserMedia(constraints: any, success: (s: MediaStream) => void, failure: () => void): vo... | streamConfig |
927 | import UIComponent from "sap/ui/core/UIComponent";
import deviceModel from "./core/DeviceModel";
import { support } from "sap/ui/Device";
import FlexibleColumnLayoutSemanticHelper from "sap/f/FlexibleColumnLayoutSemanticHelper";
import { LayoutType } from "sap/f/library";
import FlexibleColumnLayout from "sap/f/Flexibl... | FCL |
928 | import React, { useState } from "react"
export default function usePasswordGenerator() {
// elements (????)
const [rangeInputValue, setRangeInputValue] = useState<number>(8);
const [password, setPassword] = useState<string>("");
const [enableUppercaseLetters, setEnableUppercaseLetters] = useState<bool... | allowedSpecialCharacters |
929 | import { Options } from '@docusaurus/plugin-client-redirects';
export const redirectsOptions: Options = {
redirects: [
// Write down PR responsible for the removal of a page next to the "from" redirect.
{
to: '/adrs',
from: [
'/adrs/0000-architectural-decisio... | existingPath |
930 | import { NextRequest, NextResponse } from "next/server";
import { SentenceSplitter, globalsHelper } from "@llamaindex/edge";
interface RequestBody {
text?: string;
chunkSize?: number;
chunkOverlap?: number;
splitLongSentences?: boolean;
chunkingTokenizerFn?: (text: string) => string[];
paragraphSeparator?: strin... | splitter |
931 | import RootPath from "app-root-path";
import fs from "fs";
import path from "path";
import gitChangedFiles from "git-changed-files";
import {EOL} from "os";
const binDir = path.join(RootPath.path, "node_modules", ".bin");
const assetsDir = path.join(RootPath.path, "..", "assets");
const assetPathForDocuments = path.jo... | filtered |
932 | import {
createCipheriv,
createDecipheriv,
createHash,
randomBytes,
scryptSync
} from "crypto";
class Secret {
constructor() { }
private static createIV(algorithmParam: "sha256" | "sha512", secretParam: string, [MASK] : string) {
const algorithm = algorithmParam;
const secret = secretParam;
... | secretIVParam |
933 | import { Injectable } from "@angular/core";
import { HttpClient } from "@angular/common/http";
const HEATPUMPPVCOVERAGEURL = "http://192.168.1.55:9000/api/heatpumpPvCoverage";
export interface Day {
timestamp: number;
heatPumpPvCoverage: HeatPumpPvCoverage;
}
export interface HeatPumpPvCoverage {
consumption: ... | month |
934 | import Schema, { VEditorSchema } from "./Schema";
/**
* History
*/
class History {
index = -1;
schemaList: string[] = [];
schema: Schema;
constructor(schema: Schema) {
this.schema = schema;
}
/**
*/
push(data: VEditorSchema) {
const [MASK] = JSON.stringify(data).trim();
const last = ... | json |
935 | import ShortUrl from './short_url';
import URLShortenerService from './url_shortener_service';
class ShortUrlsDatabase {
private ShortUrls: Array<ShortUrl>;
private urlShortenerService: URLShortenerService;
private static instance: ShortUrlsDatabase;
private constructor() {
th... | originalURL |
936 | export class Token {
private readonly _value: string;
constructor(value: string) {
this._value = value;
}
public toString(): string {
return this._value;
}
}
export const ACCESS_TOKEN = Symbol("ACCESS TOKEN");
export const REFRESH_TOKEN = Symbol("REFRESH TOKEN");
export class Acc... | serialised |
937 | import {AfterViewInit, Component, inject, OnInit, TemplateRef, ViewChild} from '@angular/core';
import {
ActionMenuBtnRefToken,
CheckBoxRefToken,
ConfigBtnRefToken, DataTableComponent, WDTRow, FilterBtnRefToken,
SearchInputRefToken, ToggleRefToken, ActionMenuMultipleBtnRefToken, TranslationsToken
} from 'projects/w... | prevPage |
938 | /* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import MessageBox from "sap/m/MessageBox";
import BaseController from "./BaseController";
import formatter from "../model/formatter";
import { initializeApp, getAuth } from "wcintegration/lib/firebase";
... | firebaseConfig |
939 | import {Injectable} from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
//we know that response will be in JSON format
const httpOptions = {
headers: new HttpHeaders({ 'Content-Type': 'application/json' })
};
@Injectable()
export class StudentService {
constructor(private ... | responseData |
940 | /*
* This work is released into the Public Domain under the
* terms of the Creative Commons CC0 1.0 Universal license.
* https://creativecommons.org/publicdomain/zero/1.0/
*/
import { LayoutStructure as GridLayoutStructure } from "./grid"
import { LayoutStructure as FloatLayoutStructure } from "./float"
export i... | gls |
941 | import { createSelector, createSlice, PayloadAction } from '@reduxjs/toolkit';
import { ManualIndex, Chunk, TextItem } from '../models/Chunk';
import { v4 as uuidv4 } from 'uuid';
import { isManualChunk, isTextItem } from '../utilities';
interface ChunkState {
currentIndex: ManualIndex;
loading: boolean;
selectio... | chunkIndex |
942 | /*-
*
* Hedera Wallet Connect
*
* Copyright (C) 2023 Hedera Hashgraph, 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
*
* ... | metadata |
943 | import { JwkDIDProvider } from '@sphereon/ssi-sdk-ext.did-provider-jwk'
import { getDidJwkResolver } from '@sphereon/ssi-sdk-ext.did-resolver-jwk'
import { SphereonKeyManager } from '@sphereon/ssi-sdk-ext.key-manager'
import { SphereonKeyManagementSystem } from '@sphereon/ssi-sdk-ext.kms-local'
import { createAgent, ID... | secretBox |
944 | /**
* tiktok shop openapi
* sdk for apis
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import localVarRequest from 'request';
import http fr... | basePathOrUsername |
945 | import { Hono } from 'hono';
import { OpenAI } from 'openai';
import { getSummaryPrompt } from '../prompts/prompts'
import { articleService } from "../services/article";
export type Env = {
DB: D1Database;
BUCKET: R2Bucket;
CACHE: KVNamespace;
AI: Ai;
ENV_TYPE: 'dev' | 'prod' | 'stage';
OPENAI_URL: string;... | toLang |
946 | import { ClassType, isObject, toEntries } from '@michealpearce/utils'
import {
BaseEntity,
CreateDateColumn,
DeleteDateColumn,
PrimaryGeneratedColumn,
UpdateDateColumn,
} from 'typeorm'
import { BaseModelData, ModelData, ModelIDData, ModelUUIDData } from './data'
import { isBaseModel } from './functions'
import ty... | model |
947 | import { ESLintUtils, TSESTree } from '@typescript-eslint/utils'
// Add files to this list only if there is no other option.
// Almost always this should be third-party libraries.
// In case of first-party code, prefer to move it into correct location
const allowList = new Set(['sql-template-tag', '@prisma/client-comm... | checkImport |
948 | import I_Color from '../color/I_Color';
import I_RGB from '../color/I_RGB';
const colorizer = new I_Color();
type DataForLogging = string | string[];
export default class IOut {
/**
* The standard out write stream
*/
private stdout: NodeJS.WriteStream;
/**
* The standard error write stream
*/... | textToLog |
949 | import * as core from "@actions/core";
import * as exec from "@actions/exec";
import * as tc from "@actions/tool-cache";
import * as fs from "node:fs";
import * as path from "node:path";
import { getModeFromInput } from "./lib";
const breakpointVersion = "0.0.23";
interface WaitConfig {
endpoint: string;
duration: ... | configFile |
950 | import {
ForbiddenException,
HttpServer,
INestApplication,
} from '@nestjs/common';
import { NestFastifyApplication } from '@nestjs/platform-fastify';
import type { OpenAPIObject } from '@nestjs/swagger';
import Handlebars from 'handlebars';
import { posix, resolve } from 'path';
import * as fsPromises from 'fs/p... | formatPath |
951 | /*
uamp-js — Universal Agent Messaging Protocol SDK (v1.0.0)
=========================================================
Target: UAMP 1.0 (stable envelope freeze)
- Zero `any`: strict‑mode, fully typed helpers
- No external path/URL hacks (ESM‑first)
- Minimal public surface: types + `UAMPClient` + crypto hel... | streamId |
952 | import { AppointmentDetails } from './types';
export function getSystemPrompt(details: AppointmentDetails): string {
const companyName = details.company_name || 'Acme Appointments';
const [MASK] = `
### Background ###
You are Alex, a professional, friendly, diligent appointment coordinator for ${comp... | basePrompt |
953 | import * as fc from 'fast-check';
import { DiceRoll } from '../../../src/logic/DiceRoll.js';
/**
* This shows how to implement a custom shrinker and arbitrary in fast-check js
*/
/** @internal */
function halvePosInteger(n: number): number {
return Math.floor(n / 2);
}
/** @internal */
function halveNegInteger... | mrng |
954 | // Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
import { NextResponse } from "next/server";
import fs from "fs";
import * as fsPromises from "fs/promises";
import path from "path";
import { FlagConfig } from "@/utils/types";
import { Variants } from "antd/es/config-provider";
export async... | new_var |
955 | import {
Creep,
OwnedStructure,
Structure,
StructureRampart,
StructureTower,
} from "game/prototypes";
import { Flag, RESOURCE_SCORE, ScoreCollector, AreaEffect } from "arena";
import { constants, pathFinder, prototypes } from "game";
import {
createConstructionSite,
getObjectsByPrototype,
// getTicks,
... | layer10Persistant |
956 | import axios from 'axios';
import { getWLEDEffect } from './wled-effects/get-wled-effect';
import { IndividualLEDSetting, LEDIndexColor, LEDRangeColor, SegmentData, WLEDEffect, SegmentEffectSettings, WLEDEffectByName, RGB } from './wled.types';
class WLEDAdapter {
private baseUrl: string;
constructor(ip: stri... | resetData |
957 | import { BackendSrvRequest, getBackendSrv } from '@grafana/runtime';
import cache from 'memory-cache';
import { Observable } from 'rxjs';
import { Pair } from 'types';
export default class Api {
cache: any;
baseUrl: string;
params: URLSearchParams;
lastCacheDuration: number | undefined;
constructor(baseUrl:... | cacheDurationSeconds |
958 | /* eslint-disable no-underscore-dangle */
import { ModelClient } from '@adobe/aem-spa-page-model-manager';
export default class LocalDevModelClient extends ModelClient {
private authorizationHeader: string;
constructor(apiHost: string, authorizationHeader: string) {
super(apiHost);
this.authorizationHeade... | apihostPrefix |
959 | import { createPropertyImage, updateProperty } from "@/services"
import { put } from "@vercel/blob"
import { NextResponse } from "next/server"
import {
S3Client,
PutObjectCommand,
GetObjectCommand,
} from "@aws-sdk/client-s3"
const bucketClient = new S3Client({
region: process.env.S3_REGION || "",
credentials: {
... | command |
960 | import { Logger } from 'homebridge'; //purely for types
import SerialPort from 'serialport';
export class Essentia {
readonly port: SerialPort;
readonly parser: SerialPort.parsers.Readline;
readonly serialPortPath: string;
readonly baudRate: number;
readonly cmdDelay: number;
readonly log... | sourceId |
961 | import { RouterId } from 'src/domain/router.id';
import { RouterType } from 'src/domain/router.type';
import { Predicate } from 'src/utils/types';
export class Router {
public constructor(private readonly _routerType: RouterType, private readonly _routerId: RouterId) {}
public static filterRouterByType(routerType... | predicate |
962 | /**
* ESOS API Documentation
* ESOS API Documentation
*
* The version of the OpenAPI document: uk-esos-app-api 0.81.0-SNAPSHOT
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { HttpClie... | convertFormParamsToString |
963 | import { HttpContext, HttpContextToken } from "./http";
export interface IHttpContext {
ACCESS_TOKEN?: boolean,
SHOW_LOADING?: boolean,
SHOW_ERROR?: boolean,
IS_CACHE_ENABLED?: boolean
RESET_CACHE?: boolean
}
const ACCESS_TOKEN = new HttpContextToken<boolean>(() => false);
const SHOW_LOADING = new HttpContext... | contextList |
964 | import { CreepSpawner } from "CreepSpawner";
import { SpawnQueue, SpawnQueueMemory } from "SpawnQueue";
import { CreepBuilder } from "CreepBuilder";
import { ResourcePlanner, ResourcePlannerMemory } from "planning/ResourcePlanner";
import { BaseBuilder, HatchlingBuilder } from "baseBuilding/HatchingBuilder";
interface... | firstRun |
965 | import { FundInfoListItemType } from "../type/fund";
// 在天天基金拿到的数据源内容如下
// [基金代码, 基金名称, 基金简称, 计算日期, 单位净值, 累计净值, 日增长率, 近一周, 近一个月, 近3个月, 近6个月, 近1年, 近3年, 今年来, 成立来, 成立时间]
export default class Fund {
fundInfoList: FundInfoListItemType[];
constructor(fundInfoList) {
this.fundInfoList = fundInfoList.map(infoText => ... | isPass |
966 | import detectEthereumProvider from "@metamask/detect-provider";
export async function connectMetaMask() {
const [MASK] = await detectMetaMask();
if ( [MASK] ) {
console.log("MetaMask successfully detected!");
try {
await (window as any).ethereum
.request({
method: "eth_requestAcc... | metaMaskExist |
967 | import * as ts from 'typescript';
import { factory } from 'typescript';
import { AssertionType, KeyStartsWithIS, Params, staticAssertType } from './types';
/** Special cases where defaults for empty array arguments are undefined instead of actually empty arrays */
type NO_SPECIAL = {
TypeArguments?: ts.TypeNode[];... | object |
968 | import { ApiClient } from './client'
import { Constants } from '../utils/constants'
import { ConfigInitProps } from '../interfaces/config'
import { FundsApiInterface } from '../interfaces/funds'
import { GetEnergyResponse } from '../interfaces/responses/get-energy'
import { ConsumeEnergyResponse } from '../interfaces/r... | requestIds |
969 | import { Given } from '@badeball/cypress-cucumber-preprocessor';
Given('user logged in as {string}', function(userType) {
let loginMail = '';
let [MASK] = '';
switch (userType) {
case 'supervisor': {
loginMail = Cypress.env('SUPERVISOR_LOGIN');
[MASK] = Cypress.env('SUPERVISOR_PW');
br... | loginPW |
970 | import type { ProcessorOptions, Track, TrackProcessor } from 'livekit-client';
import { TrackTransformer } from './transformers';
export default class ProcessorWrapper<TransformerOptions extends Record<string, unknown>>
implements TrackProcessor<Track.Kind> {
static get isSupported() {
return (
typeof Me... | readableStream |
971 | import { APP_BASE_HREF, Location } from '@angular/common';
import { Component, forwardRef, Type } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { Router, Routes } from '@angular/router';
import { RouterTestingModule } from... | appRoutingModule |
972 |
/**
* Forked from third-party library.
* @see https://github.com/denoland/deno_std/blob/627844f47fffd4319186df46beff6f38588887ff/encoding/base58.ts
* @copyright the Deno authors. All rights reserved.
* @license MIT
*/
/**
* {@linkcode encode} and {@linkcode decode} for
* [base58](https://en.wikipedia.org/wiki... | notZeroData |
973 | // src/lib/dateUtils.ts
import { eachDayOfInterval, isSameDay, isWeekend, addDays, startOfDay } from 'date-fns';
// Fungsi ini membutuhkan daftar hari libur sebagai argumen
export function calculateWorkingDaysBetween(start: Date, end: Date, holidays: Date[]): number {
if (start > end) return 0;
let count = 0;
ea... | startDate |
974 | import {
MessageActionRow,
MessageButton,
MessageComponentInteraction,
MessageEmbed,
} from 'discord.js';
import { ICommand } from 'wokcommands';
import { ApplicationCommandOptionTypes } from 'discord.js/typings/enums';
import accountDB from '../../../db/accountdb';
import discordDB from '../../../db/di... | confirm |
975 | import * as path from 'path';
import { Configuration, ServiceDocsApi } from 'msadoc-client';
import { firstValueFrom } from 'rxjs';
import { AjaxConfig } from 'rxjs/ajax';
import { readFile } from '../utils/fs';
import { logErrorMessage, logSuccessMessage } from '../utils/log';
export async function handleUploadComm... | newRequestConfig |
976 | import { useAtom, useAtomValue, useSetAtom } from 'jotai';
import { dateToUnix, useNostrEvents } from 'nostr-react';
import { useEffect, useRef } from 'react';
import { defaultFilter } from '@/constants/defaultValues';
import { Filter } from '@/interfaces/nostr/filter';
import { Post } from '@/interfaces/posts/post';
... | now |
977 | // Copyright 2018-2020 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 applicable law or agreed t... | filepath |
978 | import { Injectable, Injector, Type } from '@angular/core';
import { FormBuilder, FormGroup, FormArray, Validators } from '@angular/forms';
import { InjetorEstaticoService } from '../comum/servico/injetor-estatico.service';
@Injectable({ providedIn: 'root' })
export class CrudFormService <F, E, L> {
private _fb:... | entidade |
979 | import * as express from 'express';
import {validate} from '../services/validation'
import {run} from '../services/exec';
import {Task} from '../models/taskModel';
export class TaskController {
constructor() {
}
/**
* Find all request
* @param req
* @param res
*/
static findAll(re... | schema |
980 | import * as dotenv from "dotenv";
import fs from "fs";
import ora from "ora";
import { summerize } from "./src/chatgpt.js";
import { executeSequentially } from "./src/execute-sequentially.js";
import { splitTextByCharCount } from "./src/split-text.js";
dotenv.config();
(async () => {
const inputFilePath = process.e... | summeries |
981 | import { ChainlitAPI } from '@/api';
import { useChainlitContext } from '@/index';
import useSWRV, { type IConfig } from 'swrv';
import { useAuthState } from './auth/state';
const fetcher = async (client: ChainlitAPI, endpoint: string) => {
const res = await client.get(endpoint);
return res?.json();
};
const clo... | newClient |
982 | import { RealtimeClient } from "@openai/realtime-api-beta";
export function addToolMoveCard( [MASK] : RealtimeClient) {
[MASK] .addTool(
{
name: 'move_card',
description: 'Moves a Kanban card from one column to another.',
parameters: {
type: 'object',
... | client |
983 | import { useEffect, useRef } from "react";
export function asArray<T>(obj: T | T[]): T[] {
if (Array.isArray(obj)) {
return obj;
} else if (obj) {
return [obj];
}
return [];
}
export function randomString() {
return (Math.random() * Math.pow(2, 54)).toString(36);
}
export function sortByKeys(a: any... | keyA |
984 | import { Command, type OptionValues } from 'commander'
import BaseCommand from '@/commands/BaseCommand'
import FileController from '@/FileController'
import ImageFactory from '@/factories/ImageFactory'
const DEFAULT_IMAGE_WIDTH: number = 640
const DEFAULT_IMAGE_HEIGHT: number = 480
const DEFAULT_FPS: number = 30
const... | numImages |
985 | import { createHash } from "node:crypto";
import { bench, benchSync } from "npm:@hazae41/deimos";
import { sha1 as nobleSha1 } from "npm:@noble/hashes/sha1";
import { Memory } from "../mod.ts";
import { initBundledOnce, sha1 } from "../mods/mod.ts";
await initBundledOnce()
const samples = 1000
const data = crypto.ge... | hasher |
986 | import qs from 'qs'
import { Client } from '../client'
export interface ThBaseHandlerOptions {
endpoint: string
base: string
}
export interface HandlerQuery {
uri?: string
limit?: number
offset?: number
query?: any
[key: string]: any
}
export class ThBaseHandler {
private readonly handlerOptions: ThB... | basePath |
987 | import { MaxSupported } from '@/constants';
import {
AudioAssetConfig,
VideoAssetConfig,
ImageAssetConfig,
TextAssetConfig,
TextStyleProps,
} from '@/types/config';
import { v4 as uuidv4 } from 'uuid';
import { TextStyleDefaultValues } from './config';
const validateMaxSupport = (
duration: number,
maxDu... | attribute |
988 | import {RendererProps} from '../factory';
import {extendObject} from '../utils/helper';
import {RendererEvent} from '../utils/renderer-event';
import {evalExpression} from '../utils/tpl';
import {dataMapping} from '../utils/tpl-builtin';
import {IBreakAction} from './BreakAction';
import {IContinueAction} from './Conti... | actions |
989 | import {
Body,
Controller,
Request,
Post,
Get,
// UseGuards,
Query,
HttpCode,
HttpStatus,
} from '@nestjs/common';
import { AppService } from './app.service';
// import { AuthGuard } from '@nestjs/passport';
import { AuthService } from './modules/auth/auth.service';
// import { LocalAuthGuard } from '... | access_token_res |
990 | import { Env, ServerStatus } from './types';
import { sendTelegramMessage } from './telegram';
import { handleTelegramWebhook } from './telegramBot'; // Import the new handler
import { Hono } from 'hono';
import { Context } from 'hono';
const app = new Hono<{ Bindings: Env }>();
// Middleware: Authentication
async fu... | alertThresholdSeconds |
991 | import { css } from 'styled-components'
type ACC = number | null | undefined
type Rule = 'minWidth' | 'maxWidth' | 'only'
export type Breakpoints = Record<string, number>
export const defaultBreakpoints: Breakpoints = {
xxs: 0,
xs: 320,
s: 576,
m: 768,
l: 992,
xl: 1200,
}
// Breakpoint
export const med... | boudWidthRule |
992 | import {
DataQueryRequest,
DataQueryResponse,
DataSourceApi,
DataSourceInstanceSettings,
FieldType,
MutableDataFrame,
} from '@grafana/data';
import { getTemplateSrv, getBackendSrv } from '@grafana/runtime';
import _ from 'lodash';
import defaults from 'lodash/defaults';
import { defaultQuery, MyDataSourceO... | defaultErrorMessage |
993 | import path = require('path');
import {CodeLensProvider, TextDocument, CodeLens, Command, DocumentSelector, Position, workspace, ExtensionContext} from 'vscode'
import { getClientForActiveEnvironment } from '../soar/client';
import { SoarAction } from '../soar/models';
export class RunActionLensProvider implements Cod... | metadataJSON |
994 | import { APIGatewayProxyEventV2, APIGatewayProxyResultV2 } from "aws-lambda";
export class HTTP401Error extends Error {}
export class HTTP403Error extends Error {}
export class HTTP404Error extends Error {}
export const getErrorStatusCode = (error: any): number => {
if (error instanceof HTTP401Error) {
return 4... | writableEvent |
995 | import {SandboxDatastore} from './sandbox-datastore.js';
import {SandboxRecord} from './sandbox-record.js';
import {SandboxConfig} from './sandbox-config.js';
import * as envUtils from '../utils/env-utils.js';
import * as cliUtils from '../utils/cli-utils.js';
import fs from "fs";
import decompress from "decompress";
... | sandboxid |
996 | import { Component, OnInit } from '@angular/core';
import {Observable} from 'rxjs';
@Component({
selector: 'app-ingresos',
templateUrl: './ingresos.component.html',
styleUrls: ['./ingresos.component.css']
})
export class IngresosComponent implements OnInit {
constructor() { }
public observable;
public arr... | cursor |
997 | /*import { Construct, Duration, StackProps, Stack } from '@aws-cdk/core';
import * as iam from '@aws-cdk/aws-iam';
import * as ecs from '@aws-cdk/aws-ecs';
import * as rds from '@aws-cdk/aws-rds';
import * as
*/
//CDK2.0
import { Construct } from "constructs";
import { Duration, aws_iam as iam, aws_rds as rds, aws... | appsubnetids |
998 | import { RepoTree } from 'src/app/models/api/project.model';
import { PhpInfo, Project, EnvVars } from './../models/api/project.model';
import { Router } from '@angular/router';
import { ProgressService } from './progress.service';
import { User } from '../models/api/user.model';
import { LoginResponseModel } from '../... | needle |
999 | import { Component, OnInit } from '@angular/core';
import {NgForm} from '@angular/forms';
import {McategoryModel} from '../../../../models/category/mcategory.model';
import {McategoryService} from '../../../../services/category/mcategory.service';
import {ToastrService} from 'ngx-toastr';
import {BehaviorSubject} from ... | dateStr |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.