text
stringlengths
184
4.48M
import React, { useState } from "react"; import { Box, Button, Heading, SimpleGrid, Spinner, Text, useToast, } from "@chakra-ui/react"; import { InfoIcon } from "@chakra-ui/icons"; import { Grid, Badge, Flex, Select } from "@chakra-ui/react"; import { Link } from "react-router-dom"; import { Modal, Mo...
<?php /** * Pimcore * * This source file is available under two different licenses: * - GNU General Public License version 3 (GPLv3) * - Pimcore Commercial License (PCL) * Full copyright and license information is available in * LICENSE.md which is distributed with this source code. * * @copyright Copyright...
"use strict"; /** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.createBlogFeedFiles = void 0; const tslib_1 = ...
# Git ## Установка git Ubuntu ```bash sudo apt update # на всякий случай смотрим новые версии sudo apt install git-all ``` Windows - GitHub Desktop (CLI + GUI) ## Настройка git ```bash git config --global user.name "<имя фамилия>" git config --global user.email "<ваш емейл>" ``` ## Аккаунт на github ```bash # Создан...
<?php namespace Modules\Marketing\Http\Livewire\Banner; use App\Constants\BackgroundPosition; use App\Services\ImageService; use Livewire\Component; use Livewire\WithFileUploads; use Modules\Marketing\Entities\Banner; class Edit extends Component { use WithFileUploads; public $banner, $oldThumbnail, $thumbn...
package ru.yandex.practicum.filmorate.mapper; import org.mapstruct.*; import java.util.Comparator; import java.util.HashSet; import java.util.Set; import java.util.TreeSet; import java.util.stream.Collectors; import ru.yandex.practicum.filmorate.model.data.FilmEntity; import ru.yandex.practicum.filmorate.model.prese...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Data KasSiswa</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css...
import dotenv from "dotenv"; import Product from "../models/product"; import { productSchema } from "../schemas/product"; import Category from "../models/category"; import { paginate } from "mongoose-paginate-v2"; dotenv.config(); export const getAll = async (req, res) => { // const { _litmit = 10, _sort = "create...
import React, { Fragment, useState } from "react"; import { Transition, Dialog } from "@headlessui/react"; import AdminTable from '../../components/table/AdminTable' export default function Employee() { const [isOpen, setIsOpen] = useState(false); function closeModal() { setIsOpen(false); } function openModal(...
import torch from torch import Tensor from abc import ABC, abstractmethod from typing import Tuple class BaseSystem(ABC): @abstractmethod def apply_control(self, control_output: Tensor, distrubance: Tensor) -> None: """ Update the position and velocity of the object Args: control_output (float): control ...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Use different fonts</title> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> ...
# 🚀 C++ Programlama Dili Dersi 🚀 <p align="center"> <img src="https://github.com/YusufsKaygusuz/Deneyap_Software_Techn/assets/86704802/cd98b111-b66c-4ddb-b0c4-f62ce0ab8b46" alt="ReLU" width="150"/> <img src="https://github.com/YusufsKaygusuz/Deneyap_Software_Techn/assets/86704802/7bfa61ee-d340-41b9-8855-dec4c561744f...
import Map from '../../../../../src/ol/Map.js'; import View from '../../../../../src/ol/View.js'; import ZoomToExtent from '../../../../../src/ol/control/ZoomToExtent.js'; import { clearUserProjection, useGeographic, } from '../../../../../src/ol/proj.js'; describe('ol.control.ZoomToExtent', function () { descri...
package com.example.skiply.service; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframewor...
'use client'; import { ReactNode } from 'react'; export interface SocialLinkProps { href: string; children: ReactNode; className?: string; colorType?: string; } export default function SocialLink({ href, children, className = '', colorType = 'black', }: SocialLinkProps) { return ( <a rel=...
class Solution { public String removeDuplicateLetters(String s) { //algo //1.count-- //2.exist //3.check big or not -if true remove and mark false; //4.push and make false Stack<Character>st=new Stack<>(); boolean []exists=new boolean[26]; int[]freq=new int[26]; //filling ...
/* * Introducing useCallback and useEffect hooks */ import { useCallback, useEffect, useRef, useState } from 'react'; function App() { const [length, setLength] = useState(8); const [numberAllowed, setNumberAllowed] = useState(false); const [characterAllowed, setCharacterAllowed] = useState(false); const [pas...
<script lang="ts"> import { Button } from 'flowbite-svelte'; import { goto } from '$app/navigation'; import { TrashBinOutline } from 'flowbite-svelte-icons'; import { enhance } from '$app/forms'; import type { Employee } from '$lib/types'; import EmployeeForm from '$components/EmployeeForm.svelte'; import type {...
<div> {{-- Creamos nuevo archivo css buttons.css para crearle la apariencia de botón a nuesto icono de font awesome. Y recuerda importarlo despues en app.css --}} <a class="btn btn-green" wire:click="$set('open',true)"> <i class="fas fa-edit"></i> </a> {{-- Ahora creamos un modal para cuando le...
require 'test_helper' class ActivityLogsControllerTest < ActionDispatch::IntegrationTest test "should get index" do get "/activity_logs?user_id=#{peter_user.id}", headers: jwt_header, as: :json assert_response :success get "/activity_logs?schema_name=SCHEMA", headers: jwt_header, as: :json assert_r...
package org.restassured.javafaker; import org.restassured.requestbodylearning.Products_Pojo; import com.github.javafaker.Faker; /** * * @author Ritesh Mansukhani * In this Program we Generate Products_Pojo Instance utilizing Java Faker to Set * Variable values of Products_Pojo * */ public class DummyProductD...
// This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by Nisan and Schocken, MIT Press. // File name: projects/01/DMux8Way.hdl /** * 8-way demultiplexor: * {a, b, c, d, e, f, g, h} = {in, 0, 0, 0, 0, 0, 0, 0} if sel == 000 * {0, in, 0, 0, 0, 0,...
class EmailDataModel { final String firstName; final String lastName; final String email; EmailDataModel({ required this.firstName, required this.lastName, required this.email, }); factory EmailDataModel.fromJson(Map<String, dynamic> json) { return EmailDataModel( firstName: json['firs...
package tree; import visitor.NodeVisitor; /** * A node of the operator "*" on integer. * * @author lxcc0wave * @version 2017.3.15 */ public class Multiply extends BinaryOperator{ /** * Constructs a "*" oeprator with the specified operands. * * @param left left operand(not {@code null}) * @param right ri...
package domains; import javax.persistence.*; import java.sql.Date; @Entity @Table(name = "T_RATE_AVALIACAO_DIARIA") @SequenceGenerator(name = "avaliacaoDiaria", sequenceName = "SQ_TB_AVALIACAO_DIARIA", allocationSize = 1) public class AvaliacaoDiaria { public AvaliacaoDiaria() { } public AvaliacaoDiaria...
import { DeviceContribution } from '../api'; import { Device_GL } from './Device'; export interface WebGLRendererPluginOptions { targets: ('webgl1' | 'webgl2')[]; xrCompatible: boolean; antialias: boolean; preserveDrawingBuffer: boolean; premultipliedAlpha: boolean; onContextCreationError: (e: Event) => vo...
--1 SELECT UCASE('trybe') AS UCASE; --2 SELECT REPLACE( 'Você já ouviu falar do DuckDuckGo?', 'DuckDuckGo', 'Google' ) AS STR_REPLACE; --3 SELECT LENGTH('Uma frase qualquer') AS STR_LENGTH; --4 SELECT SUBSTRING( 'A linguagem JavaScript está entre as mais usadas', 13, 10 ) AS STR_S...
package com.iktex.hb04.models.entity; import com.fasterxml.jackson.annotation.JsonManagedReference; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import javax.persistence.*; import java.util.ArrayList; import java.util.List; @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE)...
/******************************************************************************* This file is part of the SimplexSolver. Copyright (C) 2009 Roman Tsisyk <roman@tsisyk.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as publ...
import { Component } from "react"; import { Link } from "react-router-dom"; class ErrorBoundary extends Component { state = { hasError: false }; static getDerivedStateFromError() { return { hasError: true }; } componentDidCatch(error, info) { //typicallt you would log this to something like TrackJS o...
# -*- coding: utf-8 -*- """ Created on Thu Aug 24 09:45:15 2023 @author: cycon """ import sys import numpy as np import EngineErrors as EngineErrors import EnginePerformanceFunctions as EPF # Use to define the general states/functions shared by each/most stages class Stage(): def __init__(self, **kwargs): ...
package com.processout.sdk.ui.core.component import androidx.annotation.DrawableRes import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.core.MutableTransitionState import androidx.compose.animation.core.tween import androidx.compose.animation.fadeIn import androidx.compose.animation....
import java.net.*; import java.io.*; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Scanner; public class bank { static HashMap<String, customerInfo> map = new HashMap<>(); //creating hashmap to store customer objects with their name as the key ...
package com.controller; import java.io.File; import java.math.BigDecimal; import java.net.URL; import java.text.SimpleDateFormat; import com.alibaba.fastjson.JSONObject; import java.util.*; import org.springframework.beans.BeanUtils; import javax.servlet.http.HttpServletRequest; import org.springframework.web.context....
# 一、入门 📕Java中的日志系统 ## 1. JUL Java Util Logging :Java 原生的日志框架。 JUL 不需要引入第三方依赖包。包含了一些核心组件,如记录器(Logger)、处理器(Handler)、格式化器(Formatter)和过滤器(Filter)等。适用于小型应用或对日志功能要求不高的场景。 JUL 本身并没有像 `Slf4j` 那样专门的、广泛使用的日志门面。主要就是 Java 自身提供的一套日志机制,直接使用其相关的 API 来进行日志操作。 可以使用Lombok快速开启日志 ```java @Log public class Main { public static...
import LogoutButton from "../components/LogoutButton"; import React, {useEffect, useState} from "react"; import {Image, Item} from "../model/Item"; import axios from "axios"; import "material-react-toastify/dist/ReactToastify.css"; import {toast} from "react-toastify"; import Button from "@mui/material/Button"; import ...
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: int leastWeightCapacity(int arr[], int n, int d) { // code here int start = 0; int end = 0; int mid; int ans; ...
package day_8.org.encapsulation; //Achieve security //For encapsulation data members should be private public class Employee { //private variable to store the data private String name; private int age; private double salary; //getter method for all -> read the value public String getName() { return name; ...
<!DOCTYPE html> <html lang='fr'> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="view-transition" content="same-origin"/> <title> {% block title %}The District {% endblock %} </title> <link rel="icon" href="data:image/svg+xml,<svg xmlns=%...
EVOSIM - README Evosim - A three-dimensional, real time simulation of natural selection. This is a proof of concept executed with the intention of realising how capable today's computing power is in simulating of 3D artificial genepools, which are likely to contain many rigidbodies. The program is intended to be a...
#include <stdio.h> #include <string.h> #define NAME_LENGTH 100 enum weapon { no_weapon, big_sword, little_sword, wand, fish }; enum armor { no_armor, knight_armor, mage_robes, overalls }; struct party_member { char character_name[NAME_LENGTH]; // Gear: enum weapon weapon; enum armor armor; }; void ...
const HttpError = require("../models/http-error"); const moment = require("moment"); const bcrypt = require("bcryptjs"); const jwt = require("jsonwebtoken"); const User = require("../models/user"); const getUsers = async (req, res, next) => { let users; try { users = await User.find({}, "-password"); } cat...
// // MainButton.swift // fitAtStreet // // Created by Ruslan Sadritdinov on 25.08.2023. // import UIKit final class MainButton: UIButton { override init(frame: CGRect) { super.init(frame: frame) setup() } @available(*, unavailable) required init?(coder: NSCoder) { fatalErr...
import React, { useEffect, useState } from 'react'; import VoteListItemProperty from './VoteListItemProperty'; import VoteListItemName from './VoteListItemName'; import VoteListItemPeriod from './VoteListItemPeriod'; import VoteListItemProgress from './VoteListItemProgress'; import { useNavigate } from 'react-router-do...
--- title: "Palettes de couleurs" format: html: default docx: toc: true number-sections: true filters: - lightbox lightbox: auto --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) options(Encoding="UTF-8") library(Statamarkdown) stataexe <- "C:/Program Files/Stata17/StataSE-64.exe" knit...
<!DOCTYPE html> <html> <head> <title>R7b</title> <meta name="viewport" content="width=device-width,initial-scale=1"> <%= csrf_meta_tags %> <%= csp_meta_tag %> <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> <%= javascript_include_tag "application", "data-turbo-track": "...
// Copyright 2023 The glassdb Authors // // 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 agree...
import * as React from 'react'; import './TournamentsPage.scss'; import { inject, observer } from 'mobx-react'; import { StoreNames } from '../../stores/Store'; import { UserStore } from '../../stores/UserStore'; import { Tournament } from 'models/Tournament'; import TournamentsTable from './TournamentsTable/Tournament...
module ourtime import time // const ( // numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0'] // letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', // 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] // months = { // 'january': 1 // 'february': 2 // ...
import { Body, Controller, Get, HttpStatus, Post, Response, UseGuards, } from '@nestjs/common'; import { AuthService } from 'src/auth/auth.service'; import { AuthDto } from './auth-dto/auth.dto'; import { JwtService } from '@nestjs/jwt'; import { JwtAuthGuard } from './auth.guard'; @Controller('auth') ex...
import { Route } from "@/interfaces/router"; import { getMetadataTitle } from "@/utils/core"; import type { Metadata } from "next"; import { Inter } from "next/font/google"; import Link from "next/link"; const inter = Inter({ subsets: ["latin"] }); export const metadata: Metadata = { title: getMetadataTitle(), de...
# Conversational Search by @howethomas (https://github.com/howethomas) This Streamlit app searches an ElasticSearch server for simple text based search of anything that would appear in a vCon: names of agents, customers, phone numbers, stores - anything contained within the parties, dialogs, attachments and analysis. ...
use self::{meta::AssetLoaderMetas, observers::on_import_folder}; use crate::{ config::AssetConfig, database::{AssetDatabase, LoadState}, loader::AssetLoader, storage::{AssetSettings, Assets}, Asset, AssetId, AssetPath, Settings, }; use rouge_ecs::{ macros::Resource, observer::{Action, Action...
import 'package:flutter/material.dart'; class Input extends StatefulWidget { final bool showLastIcon; final String placeholder; final bool valid; final Function(String text) onChanged; const Input({Key? key, this.showLastIcon = false, required this.placeholder,this.valid=true, required this.onChanged}) : su...
<!DOCTYPE html> <html ⚡> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> <title>Dual Spaces</title> <link rel="canonical" href="https://algebrology.github.io/dual-spaces/" /> <meta name="referrer" content="no-referrer-when-downgrade...
import json import multiprocessing as mp import typing as t import uuid from dataclasses import dataclass from unstructured.ingest.enhanced_dataclass import enhanced_field from unstructured.ingest.error import DestinationConnectionError, WriteError from unstructured.ingest.interfaces import ( AccessConfig, Bas...
import React from "react"; import { useLocation, useNavigate } from "react-router-dom"; export default function Header() { const location = useLocation(); const navigate = useNavigate(); console.log(location.pathname); function pathMathRoute(route) { if (route === location.pathname) { console.log("t...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_striteri.c :+: :+: :+: ...
import { Component, OnInit } from '@angular/core'; import {HttpHeaders, HttpResponse} from '@angular/common/http'; import { ActivatedRoute, Data, ParamMap, Router } from '@angular/router'; import { combineLatest, filter, Observable, switchMap, tap } from 'rxjs'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; i...
package com.jpa.kotlinjpa.controller.dto import com.jpa.kotlinjpa.entity.Student import jakarta.validation.constraints.NotBlank data class StudentSignInDto( @field:NotBlank val name: String, @field:NotBlank val email: String, @field:NotBlank val phone: String ) { fu...
// // Created by nonolive66 on 2018/7/25. // #include <log.h> #include <string.h> #include "librtmp/rtmp.h" #include "SpecificData.h" #include "HandlerThread.h" #include "Object.h" #include "Lock.h" #define ERROR_DISCONNECT -100 #ifndef HARDWAREVIDEOCODEC_RTMP_H #define HARDWAREVIDEOCODEC_RTMP_H class RtmpClient { ...
package com.example.quizapp import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.widget.Toast import androidx.activity.result.contract.ActivityResultContracts import com.example.quizapp.databinding.ActivityQuizBinding import com.google.firebase.firestore...
--- title: Syntax ref: https://developer.mozilla.org/docs/Web/JavaScript/Reference --- ## Basic ### Built-in functions ```js typeof myVar; // 'string', 'number', 'boolean', 'object', 'undefined' isNaN(myVar); ``` #### Type conversion ```js const num = parseInt('10'); const dec = parseFloat('3.1416'); const bool =...
import { useState, useEffect } from 'react'; import { createUserWithEmailAndPassword, updateProfile } from 'firebase/auth'; import { ref, uploadBytesResumable, getDownloadURL } from 'firebase/storage'; import { doc, setDoc } from 'firebase/firestore'; import { projectAuth, projectStorage, projectFirestore } from '../fi...
import 'reflect-metadata'; import { Resolver, Query, Args, Mutation, Int } from '@nestjs/graphql'; import { UserModel } from '../Models/user'; import { UsersService } from './users.service'; import { UserCreateInput } from './dto/user-create-input.input'; import { LoginInput } from './dto/login-input.input'; import { L...
# SvelteKit TypeSafe API Fetch 🔗🌐 Making SvelteKit **fetch** and **validation** of server endpoints easier than ever! ## Feature list - Type safe `fetch`-like functions to create a better coding experience. - Usage of the powerful `zod` library to parse the incomming data. - Plug and play and opt-in structur...
--- type: reference, howto stage: Secure group: Composition Analysis info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- # Dependency Scanning Analyzers **(ULTIMATE)** Dependency Scanning rel...
1. What is DP? Ans : Technique to solve overlapping subproblems and optimal structures optimal structures -> Min,Max,Largest Dp Simply Means -> Recursion + Storage Types of Dp 1. Memozations (Top Down) 2. Tabulation (Bottom Up) Steps To Solve Any DP Problmes 1.Recursion ---> 2. Recursion + Memozations ---> 3. Tabul...
import 'package:flutter/material.dart'; import 'package:today_weather/apps/utils/convert.dart'; import 'package:today_weather/models/model_weather.dart'; import 'package:today_weather/pages/home/widgets/widget_forecast.dart'; // ignore: must_be_immutable class WidgetHourly extends StatelessWidget { WidgetHourly( ...
using System; using System.ComponentModel.DataAnnotations; namespace EducationDepartment.Models.ViewModels { public class RegisterViewModel { [Required] [EmailAddress] [Display(Name = "Email")] public string Email { get; set; } [Required] [StringLength(20, ErrorMessage = "The {0} must be at least...
<!DOCTYPE html> <html lang="en"> <head> <title>My Portfolio</title> <!-- Required meta tags --> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <!-- Bootstrap CSS v5.2.1 --> <link href="https://cdn.jsdeliv...
import { Resolver, Mutation, Args, Query } from '@nestjs/graphql'; import { StudentType } from './student.type'; import { StudentService } from './student.service'; import { CreateStudentInput } from './student.input'; @Resolver(of => StudentType) export class StudentResolver { constructor(private studentService: St...
import React from "react"; import Button from "@material-ui/core/Button"; import TextField from "@material-ui/core/TextField"; import Grid from "@material-ui/core/Grid"; import Typography from "@material-ui/core/Typography"; import CustomSnackbar from '../CustomSnackbar' import { Formik } from "formik"; import { common...
import { OperatorsRegex } from "../operators/regex" import { TokenExpr, TokenType } from "./token" /** List of regular expressions to scan a token */ export const TokenRegex: readonly TokenExpr[] = [ // Exponential numbers are in the form `AeB` where A and B // are decimal numbers. The `e` can be upper or low...
<div class="max-w-2xl mt-16 p-4 mx-auto"> <button mat-raised-button color="primary" routerLink="/recipes" class="mb-4">Zurück zur Rezeptliste</button> <form #form="ngForm" class="flex flex-col gap-4"> <h1>Rezept erstellen</h1> <mat-form-field> <mat-label>Name</mat-label> ...
# Leetcode question 283: Move Zeros # Given an integer array nums, move all 0's to the end of it while # maintaining the relative order of the non-zero elements. # Do not return anything modify nums in-place def moveZeroes(nums: list[int]) -> None: # create two pointers that start at zero i = 0 j = 0 ...
package de.muenchen.isi.domain.service; import de.muenchen.isi.domain.exception.AbfrageStatusNotAllowedException; import de.muenchen.isi.domain.exception.BauvorhabenNotReferencedException; import de.muenchen.isi.domain.exception.EntityIsReferencedException; import de.muenchen.isi.domain.exception.EntityNotFoundExcepti...
#include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include <DS3231.h> #include <NewPing.h> #include <math.h> // Bibliothèque pour utiliser la constante pi // Définition des dimensions de l'écran OLED #define SCREEN_WIDTH 128 // Largeur de l'écran OLED en pixels #define SCREEN_HEIGHT 64 // Haute...
import React, {useState, useEffect, createContext, useContext, useCallback} from 'react'; const URL = "https://openlibrary.org/search.json?title="; const AppContext = createContext(); const AppProvider = ({children}) => { const [searchTerm, setSearchTerm] = useState(""); const [books, setBooks] = useState([])...
package com.app4web.asdzendo.paemi.ui.recycler.grid.dummy import java.util.ArrayList import java.util.HashMap /** * Helper class for providing sample content for user interfaces created by * Android template wizards. * * TODO: Replace all uses of this class before publishing your app. */ object DummyContent { ...
import React from 'react'; import { render, screen } from '@testing-library/react'; import { MemoryRouter } from 'react-router-dom'; import { createMemoryHistory } from 'history'; import { App } from './App'; describe('App component', () => { let history; beforeEach(() => { history = createMemoryHistory(); ...
package com.xzp.springboot.rocketmq.config; import com.aliyun.openservices.ons.api.MessageListener; import com.aliyun.openservices.ons.api.PropertyKeyConst; import com.aliyun.openservices.ons.api.bean.ConsumerBean; import com.aliyun.openservices.ons.api.bean.ProducerBean; import com.aliyun.openservices.ons.api.bean.Su...
import React, { useState, useEffect } from 'react'; import { useSelector } from 'react-redux'; import { RootState } from '../../store/storeConfig'; import { Container, Paper } from '@mui/material'; import { useStyles } from './style'; import { Theme, useMediaQuery } from '@material-ui/core'; import { Alert } from '../....
import { Body, Controller, Param, Post, UseGuards, Get, Put, } from '@nestjs/common'; import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger'; import { ProgressService } from './progress.service'; import JwtAuthenticationGuard from 'src/auth/guards/jwt-authentiacation.guard'; import { Roles...
class Solution { public: void reverseString(vector<char>& s) { int n = s.size(); int l=0,h=n-1; while(l<h){ swap(s[l],s[h]); l++; h--; } } }; // Another Solution class Solution { public: void r...
import os.path from PIL import Image from torch.utils.data import Dataset class CustomDataset(Dataset): def __init__(self, txt_file, root_folder, transform=None): self.txt_file = txt_file self.transform = transform self.root_folder = root_folder self.data = self._load_data() d...
"""" Copyright © Krypton 2019-2023 - https://github.com/kkrypt0nn (https://krypton.ninja) Description: 🐍 A simple template to start to code your own and personalized discord bot in Python programming language. Version: 5.5.0 """ import json import http.client import discord from discord.ext import commands from disco...
# The emails vector has already been defined for you emails <- c("john.doe@ivyleague.edu", "education@world.gov", "dalai.lama@peace.org", "invalid.edu", "quant@bigdatacollege.edu", "cookie.monster@sesame.tv") # Use grepl() to match for .edu addresses more robustly See how metacharacters were used. grepl(pa...
<?php namespace App\Listeners\Transaction\Created; use Error; use Exception; use App\Models\Setting; use App\Events\Transaction; use App\Models\Transaction as TransactionModel; use Illuminate\Support\Facades\Log; class InvoiceListener { /** * Create the event listener. * * @return void */ ...
// Require necessary files const fs = require('node:fs'); const path = require('node:path'); const { Client, Collection, Intents } = require('discord.js'); const token = process.env['TOKEN']; // New client instance with specified intents const client = new Client({ intents: [Intents.FLAGS.GUILDS] }); // Read commands...
from celery import shared_task from django.utils import timezone from datetime import timedelta from loan.models import Loan, Repayment from company.models import SmsSetting, SystemSetting, TemplateSetting from .loan_math import update_due_amount,get_previous_due_date, update_credit_score, total_penalty,get_interval_p...
% initialize EEGLAB if ~exist('ALLCOM','var') eeglab; end % initialize fieldtrip without adding alternative files to path % assuming FT is on your path already or is added via EEGlab plugin manager global ft_default ft_default.toolbox.signal = 'matlab'; % can be 'compat' or 'matlab' ft_default.toolbox.stats = 'ma...
package com.heyanle.easybangumi4.base.preferences.mmkv import com.heyanle.easybangumi4.base.preferences.Preference import com.heyanle.okkv2.core.okkv import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharingStarte...
from __future__ import print_function import logging import grpc import EmployeeService_pb2 import EmployeeService_pb2_grpc import const def run(): with grpc.insecure_channel(const.IP+':'+const.PORT) as channel: stub = EmployeeService_pb2_grpc.EmployeeServiceStub(channel) # Query an employee's d...
# Stopwatch App This is a simple Stopwatch App created using HTML, CSS, and JavaScript. The app allows users to start, stop, and reset a timer, displaying elapsed time in a human-readable format. ## Features - Start button: Initiates the stopwatch timer. - Pause (Stop) button: Halts the timer. - Reset button: Resets...
# Curso de Vue.js de Cero a Experto Apuntes y proyectos para el curso de Vue.js [![Vue Ready](https://img.shields.io/badge/Code-Vue.js-%2342b983)](https://es.vuejs.org/) [![LICENSE](https://img.shields.io/badge/Lisence-CC-%23e64545)](https://joseluisgs.github.io/docs/license/) ![GitHub](https://img.shields.io/github/...
<template> <form @submit.prevent="login"> <VAlert v-if="error" type="error" class="mb-4"> Error: {{ error }} </VAlert> <div v-if="loading" class="flex items-center justify-center flex-1"> <VLoading class="w-24 h-24 text-primary-600" /> </div> <div class="space-y-4" v-if="!loading"> <VInput...
<script lang="ts" setup> const Links = { home: 'http://www.huohuo90.com', github: 'https://github.com/ecaps1038/yike-design-dev', devStandard: 'https://dwawvfgxvzk.feishu.cn/wiki/GraewTYxJidb6dkeV5ycjGG4nHb', task: 'https://dwawvfgxvzk.feishu.cn/wiki/T8D3w5VqbinQr5kLNoVcrDQKnbg?table=tblT9WqhCE0EWKfP&view=vewXx...
<?php // services Custom Post Type function services_init() { // set up services labels $labels = array( 'name' => 'servicess', 'singular_name' => 'services', 'add_new' => 'Add New services', 'add_new_item' => 'Add New services', 'edit_item' => 'Edit services', '...
=== ACVO === Contributors: themely Tags: one-column, two-columns, featured-images, custom-menu, custom-logo, right-sidebar, full-width-template, theme-options, translation-ready, threaded-comments, portfolio, photography, blog Requires at least: 4.7 Tested up to: 5.9 Stable tag: 1.1.3 Requires PHP: 5.6 License: GPLv2 ...