text
stringlengths
184
4.48M
import React from 'react'; import PropTypes from 'prop-types'; import guessedWordsContext from './contexts/guessedWordsContext'; import successContext from './contexts/successContext'; import languageContext from './contexts/languageContext'; import stringsModules from './helpers/strings'; // don't destructure when mo...
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}"> <link rel="stylesheet" th:href="@{/css/bootstrap-table.min.css}"> <script th:src="@{/js/jquery-3.6.0.min.js}"></script> <script th:inline="javascript"> var $contextPath = /*[[@{/}...
package com.inretailpharma.digital.deliverymanager.strategy; import com.inretailpharma.digital.deliverymanager.adapter.IAuditAdapter; import com.inretailpharma.digital.deliverymanager.adapter.ITrackerAdapter; import com.inretailpharma.digital.deliverymanager.canonical.manager.OrderCanonical; import com.inretailpharma....
import React, { useEffect, useState } from 'react'; import axios from "axios"; import { Header } from './Header'; import { Configmap } from './components/Configmap'; import { Env } from './components/Env'; import { Disk } from './components/Disk'; import { Secret } from './components/Secret'; interface IData { na...
import React from 'react'; import { Pressable, StyleSheet } from 'react-native'; import { MonoText } from './StyledText'; const styles = StyleSheet.create({ container: { marginVertical: 10, }, titleStyle: { fontSize: 14, textDecorationLine: 'underline' }, descriptionStyle: { fontSize: 18 }, }); type Profi...
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace ExpenseCashflow.Models { public class Expense { public int Id { get; set; } private string _description; [Required(ErrorMessage = "Description is required!")] public str...
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Validation\Rules; class UserRequest extends FormRequest { public function rules() { // if edit without changing password if (isset(request()->r_type) && !request()->password) { return [ 'name' => '...
package turingMachine.logic; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class TuringMachine { private String machineName; private String statesName; private String alphabetName; private String tmAlphabetName; private String computationsName; privat...
import React from "react"; import { Typography, Button, Grid} from "@mui/material"; import { useStyles } from "./style"; import { useSelector, useDispatch } from "react-redux"; import { addFavorite, deleteFavorite } from "../../store/slices/favorites"; import { dayNames, monthsNames } from '../../const'; const Current...
import pandas as pd import numpy as np import pgeocode from geopy.geocoders import Nominatim from geopy.extra.rate_limiter import RateLimiter from tqdm import tqdm import re import unicodedata from ds.utils.metaflow import est_conn def clean_dash_names(name): """ Clean out names with dashed in like by remov...
import NextAuth, { NextAuthOptions } from 'next-auth'; import GithubProvider from 'next-auth/providers/github'; import Credentials from 'next-auth/providers/credentials'; import { dbUsers } from '../../../database'; export const authOptions: NextAuthOptions = { // Configure one or more authentication providers pro...
import 'package:artisian/helper/admobservice.dart'; import 'package:artisian/widget/custombottom.dart'; import 'package:artisian/view/carosalview.dart'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:artisian/widget/appdrawer.dart'; import 'package:google_mobi...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Inheritance { class Circle : Shape { // F i e l d s ( I n s t a n c e V a r i a b l e s ) private double radius = 1.0; // C o n s t r u c t o r s ...
import { Link } from 'react-router-dom'; import { MdLocationOn } from 'react-icons/md'; export default function ListingItem({ name, _id: id, imgUrls, address, description, offer, discountPrice, regularPrice, type, bedrooms, bathrooms, }) { return ( <div className='bg-white shadow-md hover:s...
// Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Concurrent; using System.IO; using System.Reactive.Linq; using System.Runtime.Loader; using System.Th...
module ErgodicController using FFTW, LinearAlgebra, StaticArrays using RecipesBase struct Grid{T, F} o::T dx::T # spacing of each cell N::Tuple{Int, Int} # total extent of the simulation domain dct_plan::F end function Grid(o::T, dx::T, L::T) where {T} Ns = ntuple(i->Int(ceil(1 + L[i] / (dx[i]))...
<!DOCTYPE html> <html lang="ru"> <head> <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="theme-color" content="#978a33"> <meta name="keywords" content="Абакус, Ментальная арифметика, Тестовы...
# Tutorial / Manual of use The following tutorial is just a guidance to the use of the software. If there is something that is not understood in the tutorial, it is recommended to visit the software documentation. There you will find much more information about each class. In case you need to change some connectio...
import React, { useEffect, useRef, useState, forwardRef, startTransition } from "react" import { styled } from '@mui/material/styles' import SearchIcon from '@mui/icons-material/Search' import CloseIcon from '@mui/icons-material/Close' import { useDebounce } from '../../../hooks/custom_hooks' import { toast } from 'rea...
#ifndef BUREAUCRAT_HPP # define BUREAUCRAT_HPP #include <iostream> #include <exception> #include <stdexcept> using std::string; using std::exception; class Bureaucrat { private: string const _name; unsigned int _grade; Bureaucrat(); public: Bureaucrat(string const name, unsigned int grade); Bureaucrat(...
# -*- perl -*- # t/006_refresh_list.t use 5.010; use CPAN::Mini::Visit::Simple; use CPAN::Mini::Visit::Simple::Auxiliary qw( create_minicpan_for_testing create_one_new_distro_version create_file ); use Carp; use File::Spec; use Test::More; require CPAN::Mini; my $config_file = CPAN::Mini->config_file({});...
package java_Pra; /** * Java program to demonstrate How to write a parameterized classes in Java and type-safety * provided by the parameterized class. The program also compares non parameterized to * parameterized class to highlight issues with non-generic classes in Java. * * @author Javin Paul */ public class...
/* * test_av_play.c - Test playing an MPEG A+V PES (e.g. VDR recordings) from a file. * * Copyright (C) 2000 Ralph Metzler <ralph@convergence.de> * & Marcus Metzler <marcus@convergence.de> * for convergence integrated media GmbH * * This program is free software; you can redi...
package service; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.stream.Collectors; import javax.enterprise.context.ApplicationScoped; import javax.transaction.Transactional; import ca.uhn.fhir.parser.IParser; import org.hl7.fhir.r4.model.Pati...
import React, { Component } from "react"; import { MDBNavbar, MDBNavbarBrand, MDBNavbarNav, MDBNavItem, MDBNavLink, MDBNavbarToggler, MDBCollapse, MDBFormInline, MDBDropdown, MDBDropdownToggle, MDBDropdownMenu, MDBDropdownItem } from "mdbreact"; import { BrowserRouter as Router } from 'react-router-dom'; import HasbroL...
import { DomainError, Entity } from "../common"; import { Address } from "./address"; import { Freight } from "./freight"; import { PaymentType } from "./payment"; import { Product } from "./product"; import { PurchaseValue } from "./purchase-value"; export enum PurchaseStatus { PENDING_PAYMENT = "PENDING_PAYMENT", ...
package rgb import ( "fmt" "image" "image/color" "image/draw" "image/jpeg" "image/png" "io" "net/http" "os" ) func Load(filePath string) *image.RGBA { imgFile, err := os.Open(filePath) if err != nil { panic(err) } defer imgFile.Close() buffer := make([]byte, 512) // docs tell that it takes only the f...
import Image from "next/image"; import { ReactNode, useEffect, useRef } from "react"; import { HiMenu } from "react-icons/hi"; import avatar from "@/assets/code steam.jpg"; import Link from "next/link"; import { IoIosArrowBack } from "react-icons/io"; interface SidebarProps { handleOpenSidebar: () => void; handleC...
import React from "react"; // import { motion } from "framer-motion"; // import Lottie from "lottie-react"; import SelfAwarenessTest from "./pages/SelfAwarenessTest"; import "./App.css"; import logo from "./assets/ahead9.png"; import Hero from "./pages/Hero"; import Carousel from "./pages/Carousel"; import MeetAhead ...
# For All the Odds You'll get two numbers as your input. You'll output all the odd numbers from least to greatest that are strictly between the input numbers that meet a certain condition. The condition is that the odd number must contain some digit that is found in either of the input values. For example: ``` inpu...
using UnityEngine; using strange.extensions.dispatcher.eventdispatcher.api; using System.Collections; using System; using TMPro; using System.Collections.Generic; using PFS.Assets.Scripts.Models.Quizzes; using PFS.Assets.Scripts.Models.Requests; using PFS.Assets.Scripts.Models.SoundManagerModels; namespace PFS.Assets...
/* eslint-disable no-param-reassign */ import create from 'zustand'; import produce from 'immer'; import { persist } from 'zustand/middleware'; import AsyncStorage from '@react-native-async-storage/async-storage'; import { ColorsDTO, ThemeName } from './types'; interface StoreProps { theme: ThemeName; colors: { ...
%%%------------------------------------------------------------------- %%% File : gtp_udp_client.erl %%% Author : Bruce Fitzsimons <bruce@fitzsimons.org> %%% Description : %%% %%% Created : 18 Jan 2008 by Bruce Fitzsimons <bruce@fitzsimons.org> %%% %%% Copyright 2008 Bruce Fitzsimons %%% %%% This file is part of op...
/* * Copyright 2010 the original author or 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 applica...
--- title: Building Serverless Architecture for Scalable Backends description: published: true date: 2023-02-01T23:23:41.806Z tags: editor: markdown dateCreated: 2023-02-01T23:23:37.633Z --- - [Creación de una arquitectura sin servidor para backends escalables***Spanish** document is available*](/es/Knowledge-base/B...
import { Injectable } from '@nestjs/common'; import { Model } from 'mongoose'; import { AlbumsService } from 'src/albums/albums.service'; import { Photos, PhotosDocument } from 'src/schemas/photos.schema'; import { InjectModel } from '@nestjs/mongoose'; @Injectable() export class FilesService { constructor( @Inj...
<template> <div style="margin-top: 1rem" class="container"> <a-row> <a-col id="tittle" class="col-12 mt-2 mb-1 text-center"> <h1>在线随机数生成器</h1> </a-col> </a-row> <a-row :gutter="50" style="text-align: left;margin-top: 2rem"> <a-col :span="12...
/* ** RickyD ** ** Author: Paulo Assis <pj.assis@gmail.com> ** ** License: GPL v2 or later */ #ifndef header_gameobject_vprojectile #define header_gameobject_vprojectile #if _MSC_VER > 1000 #pragma once #endif #define VPROJ_VELOCITY 15 #define VPROJ_TRIGGER_TIME 1600 //ms #include "precomp.h" #include "gameobject_m...
#include "stm32f10x.h" // Device header #include <stdio.h>//引入printf头文件 #include <stdarg.h> #include "SerialPort.h" uint8_t SerialPort_RxPacket[4];//接收 uint8_t SerialPort_TxPacket[4];//发送 uint8_t SerialPort_RxFlag;//接收标志位 void SerialPort_Init(void) { //开启GPIO时钟 RCC_APB2PeriphClockCmd(RCC_APB2Perip...
/** * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06 */ import ClayButton from '@clayui/button'; import {useModal} from '@clayui/modal'; import {openToast} from 'frontend-js-web'; import PropTypes from 'pro...
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateReservationsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('reservatio...
const crypto = require("crypto"); const express = require("express"); const mongoose = require("mongoose"); const bodyParser = require("body-parser"); const jwt = require("jsonwebtoken"); const cookieParser = require("cookie-parser"); const multer = require("multer"); const session = require("express-session"); const ...
package farmacia; import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import javax.swing.JButton; import javax.swing.JFrame...
// Copyright © Aptos Foundation // SPDX-License-Identifier: Apache-2.0 use crate::dag::{ dag_fetcher::TFetchRequester, dag_store::Dag, rb_handler::{NodeBroadcastHandleError, NodeBroadcastHandler}, storage::DAGStorage, tests::{dag_test::MockStorage, helpers::new_node}, types::NodeCertificate, ...
// 联合类型可与类型别名搭配使用 // 这样组合起来的话代码会更间接 type ID = number | string function printId(id: ID) { if (typeof id === 'string') { console.log(id.length); } else { console.log(id); } } export {}
const path = require('path') const { getPool } = require(path.resolve('./', 'db')) const sgMail = require('@sendgrid/mail') const ejs = require('ejs') const { error } = require(path.resolve('helper')) sgMail.setApiKey(process.env.SENDGRID_API_KEY) const { FP_ENV, FP_HOST } = process.env const devPort = 3000 const hydr...
// ignore_for_file: public_member_api_docs part of 'serial_device_information.dart'; @immutable class USBDeviceInformation extends SerialDeviceInformation { const USBDeviceInformation({ required super.deviceName, required this.devicePath, required this.subsystem, required this.vid, required this...
*{ margin: 0; padding: 0; } body{ background: url(../imagens/fundo-madeira.jpg) black no-repeat ; background-size: cover; width: 100vw; height: 100vh; } #botoes{ padding-top: 50px; width: 7vw; height: 90vh; text-align: center; float: right; margin-right: 20px; } #botoe...
--- permalink: install/task_add_storage_systems.html sidebar: sidebar keywords: add, storage system, SVM summary: Debe configurar el sistema de almacenamiento que le dé acceso de SnapCenter al almacenamiento de ONTAP para realizar operaciones de protección de datos y aprovisionamiento. Puede añadir una SVM independi...
import { useRef, ChangeEvent } from "react"; import { ImUpload } from "react-icons/im"; import { toast } from "react-toastify"; import cls from "./construct-image.module.scss"; import { useAppDispatch } from "@/shared/hooks/redux-hooks.ts"; import { changeSiteElementUrl } from "@/entities/site/model/site.selectors.ts";...
import React from 'react'; import { Text, TouchableOpacity, Image } from 'react-native'; import styles from './option.styles'; type OptionProps = { title: string; isSelected: boolean; onPress: () => void; customContainer?: any; Icon?: any; type?: 'icon' | 'img'; }; const Option = ({ onPress, title, ...
package kr.or.ddit.admin.filtering.controller; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.inject.Inject; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.DeleteMapp...
# a form can be declared like so let Foo: Form = (Nat Bool Nat) # the `name` macro creates destructuring functions name (left whether right) upon Foo # a piece of data can have a particular form let x: Foo = (5 true 1) # and the destructuring functions defined earlier can access individual pieces of a piece of data let...
<div class="instruct" id="main"> <p>In the following experiment you will see a small white dot in the center of the screen surrounded by a big outer white ring, as well as a orange bucket attached to the ring:</p> <!--- <img src="images/stim_circle.png" alt="image failed to load" style="width:400;height:400px;"> -...
package com.assignment.ledger.wallet.application.dto; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import org.springframework.data.annotation.Id; import org.springframework.data.elasticsearch.annotations.DateFormat; import org.springframework.data.elasti...
import React from 'react'; import { IntlProvider } from 'react-intl'; import { HashRouter as Router } from 'react-router-dom'; import './App.css'; import { IntlContext } from './contexts/IntlContext'; import Headers from './components/Headers'; import Footers from './components/Footers'; import Container from './compon...
from django.db import models from ceralan_website.core.base_model import BaseModel from django.core.validators import FileExtensionValidator from django.utils.translation import gettext_lazy as _ class Product(BaseModel): account = models.ForeignKey('account.MyUser', on_delete=models.CASCADE, related_name='produc...
import json import traceback from fastapi import FastAPI, HTTPException from starlette.responses import JSONResponse, Response import docker import psutil # Initialize Docker client client = docker.from_env() # Create FastAPI instance app = FastAPI(docs_url="/api/swagger/", openapi_url="/api/openapi.json") @app.ge...
import Foundation import LiveLikeSwift /// Makes submitting votes more responsive by preemptively modifying the vote counts before the server responds /// Assumes initial vote counts contains user's vote if exists /// Assumes submitVote will always succeed /// Assumes that next realtime update will contain my vote cla...
#Напишите функцию print_products(),которая принимает произвольное количество аргументов # и выводит список продуктов # (любая непустая строка) по образцу: <номер продукта>) # <название продукта> (нумерация продуктов начинается с единицы). Если среди переданных аргументов нет ни одного продукта, необходимо вывести текст...
import React, { useState, useEffect } from "react"; import QRCode from "react-qr-code"; import './App.css'; import appCredenciales from './firebaseConfig'; import { getAuth, onAuthStateChanged, updateCurrentUser } from 'firebase/auth'; import Loging from "./components/Loging"; import Home from './components/Home'; co...
/** @format */ import React, { useState } from "react" import { Form, Row, Col, InputGroup, Container } from "react-bootstrap" import { Formik } from "formik" import * as Yup from "yup" import Button from "../../Common/Buttons/Button" import { FaEye, FaEyeSlash } from "react-icons/fa" import { Link, useNavigate } from...
import React from 'react'; import { render } from '@testing-library/react'; import Button from '../button'; import { ButtonProps } from '../interface'; describe('<Popover />', () => { test('should render default', () => { const { container } = render(<Button>button</Button>); expect(container).toMatchSnapsho...
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance w...
import User from '../models/User.js'; import { compare } from 'bcrypt'; import Form from '../models/Form.js'; import SurveyStats from '../models/SurveyStats.js'; const createUser = async (req, res) => { try { const user = await User.create(req.body); console.log(user); res.status(201).json...
<!DOCTYPE html> {% load static %} <html> <head> <title> {% block title %} {% endblock title %} </title> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-47692315-56"></script> <script> window.dataLayer = window.dataLayer || ...
/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program for reception of UART packets * @date : 2/20/24 * @author : S24-21 *****************************************************************...
//package com.zbkj.admin.task.bargain; // //import com.zbkj.common.utils.DateUtil; //import com.zbkj.service.service.StoreBargainService; //import org.slf4j.Logger; //import org.slf4j.LoggerFactory; //import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.context.annotation.Configur...
<template> <div> <div class="aac-container"> <div class="toolbar" style="float:left;padding-top:10px;padding-left:15px;"> <el-form :inline="true" :size="size" label-width="100px"> <el-row> <el-form-item label="设备编码" prop="mchCode"> <el-input v-model="filters.mchCo...
import React from 'react'; import { Text, Font, Page, View, Image, Document, StyleSheet, } from '@react-pdf/renderer'; import Header from './Header'; import Education from './Education'; import Experience from './Experience'; import { PageSize, ScrapedResult, WorkExperience, WorkExperienceProps } from '@...
#!/usr/bin/python3 """module that returns True if object is an instance inherited from specified class""" def inherits_from(obj, a_class): """function that checks if the object is an instance of a class that inherited (directly or indirectly) from the specified class""" return issubclass(type(obj)...
# 6. Introduce separate Data Access Layer Date: 2024-06-15 ## Status Accepted ## Context To enhance the maintainability and testability of the Big Transit application, we need a clear separation between the business logic and the data access logic. This separation will allow us to decouple the concerns of data pers...
import { BadRequestException, ConflictException, Injectable, InternalServerErrorException, NotFoundException } from '@nestjs/common'; import { CreateProduitDto } from './dto/create-produit.dto'; import { UpdateProduitDto } from './dto/update-produit.dto'; import { InjectModel } from '@nestjs/mongoose'; import { Product...
import os from ament_index_python.packages import get_package_share_directory import launch import launch.actions import launch.substitutions import launch_ros.actions from launch import LaunchDescription from launch_ros.substitutions import FindPackageShare from launch.substitutions import PathJoinSubstitution from ...
import { NgModule } from '@angular/core'; import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; import { AuthGuard } from './auth/auth.guard'; const routes: Routes = [ { path: '', redirectTo: 'your-food', pathMatch: 'full' }, { path: 'home', loadChildren: () => import('./home/home.mod...
import { Inverter } from 'shared/inverter/src/inverter'; import * as assert from 'assert'; // the reason why these tests are done in the extension directory instead of inverter is because they are used to achieve 100% test coverage suite('Svelte Invertion Suite', () => { [ { input: `{#if dog}`, outpu...
### the constraints that (1) only one disk may be moved at a time, and multi-attributes holds 11 #multi-attributes upper-disk multi-attributes clear 3 learn -off sp {tower-of-hanoi*propose*state*initial-and-desired-states "A 3-Disk Tower of Hanoi Problem." (state <s> ^superstate nil) --> (<s> ...
# Click Control Click control attributes are used to set whether a component can respond to finger interactions such as click and touch events. > **NOTE** > > The APIs of this module are supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. ## Attributes ...
import React from 'react'; import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; import { ToastContainer } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; import Header from './components/Header'; import Dashboard from './pages/Dashboard'; import Goals from './pages/Goals'; i...
package pt.ulisboa.tecnico.socialsoftware.humanaethica.enrollment.dto; import pt.ulisboa.tecnico.socialsoftware.humanaethica.enrollment.domain.Enrollment; import pt.ulisboa.tecnico.socialsoftware.humanaethica.user.dto.UserDto; import pt.ulisboa.tecnico.socialsoftware.humanaethica.utils.DateHandler; public class Enrol...
Problem Description A palindrome is a string that is the same as its reverse. Example "malayalam", "dad", "appa" etc. In this problem, you are asked to find the length of the longest contiguous substring of a given string, which is a palindrome. NOTE:If you are using Python then select Python 3(python-3.5) Problem...
local ensure_packer = function() local fn = vim.fn local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) vim.cmd [[packadd packer.nvim...
<template> <vx-card no-shadow> <Back></Back> <vs-tabs> <vs-tab :label="label"> <div class="vx-row" > <div class="vx-col sm:w-1/2 w-full mb-2"> <Status :status="req.request_status" :req="req"></Status> <h...
package com.tvolkov.pbs.client; import com.tvolkov.pbs.dto.Application; import com.tvolkov.pbs.dto.ObtainTokenRequestBody; import com.tvolkov.pbs.dto.PrzybyszTokenResponse; import com.tvolkov.pbs.dto.Stage; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.http.MediaType; import org.sp...
<?php /** * @file * Implement an image field, based on the file module's file field. */ use Drupal\Component\Utility\String; /** * Prepares variables for the Swipebox image field template. * * @param array $variables * An associative array containing: * - image_original_uri: The stream URI to the uploade...
<script setup lang="ts"> const cfg = useRuntimeConfig(); const env = process.env.NODE_ENV; useHead({ meta: [ { "http-equiv": "accept-ch", content: "dpr, viewport-width, width", }, { "http-equiv": "delegate-ch", content: "sec-ch-width https://res.cloudinary.com; sec-ch-dpr...
import { useContext, useEffect, useState } from 'react'; import { useGetRequest } from '../../common/hooks/useGetRequest'; import { Modal } from '../Modal'; import { BikeStation } from '../bike_stations/types'; import { CenteredLoader } from '../common/Loader'; import { InputGroup } from '../common/input/InputGroup'; i...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract MedicalHistory { struct Patient { string name; uint age; string[] conditions; string[] medications; } mapping(address=> Patient) public patients; function admitPatient(string memory _name, uin...
const { Op } = require('sequelize'); const { User, League, Team } = require('../models'); const { decrypter, encrypter } = require('../helpers/bcrypt'); const { tokenGenerator } = require('../helpers/jwt'); const { convertObjectToSnakeCase, convertObjectToCamelCase, } = require('../helpers/ResponseHelpers'); const ...
import { describe, expect, it, vi } from 'vitest'; import { render, screen, fireEvent } from '@testing-library/react'; import { SlideOutDrawer } from './slide-out-drawer.component'; describe('slide-out-drawer.component', () => { it('should render the children passed in', () => { const slideOutDrawer = ( <...
import unittest import numpy as np import sys sys.path.append("../../src") from pyoseg.inference import filter_size class TestFilterSize(unittest.TestCase): def test_filter_size_0(self): # Test case 1: Minimum area is 0, expect no filtering pred = np.array([[1, 1, 1], [1,...
import { PrismaClient, Guest } from '@prisma/client'; import prisma from '../config/database'; export type CreateGuestData = Omit<Guest, 'id' | 'createdAt' | 'confirmed'>; export default class GuestRepository { private prisma: PrismaClient; constructor() { this.prisma = prisma; } async create(data: Crea...
import React, { useEffect } from 'react'; import { useSelector, useDispatch } from 'react-redux'; import { getMessages } from '../redux/messagesSlice'; const Message = () => { const dispatch = useDispatch(); const greetingsData = useSelector((state) => state.messages); console.log(greetingsData); useEffect(()...
#include <GL/glew.h> #include <GL/glut.h> #include <stdio.h> #include <stdlib.h> #include <math.h> static char* vsSource = "#version 120 \n\ attribute vec4 aPosition; \n\ attribute vec4 aColor; \n\ varying vec4 vColor; \n\ void main(void) { \n\ gl_Position = aPosition; \n\ vColor = aColor; \n\ }"; static char* fs...
import { Controller } from "@hotwired/stimulus" import consumer from "../channels/consumer" let writingTimeout; // Connects to data-controller="writing" export default class extends Controller { connect() { document.addEventListener('message-sent', this.stopWriting.bind(this)); this.channel_id = document.q...
<?php /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a co...
import { Component, Input, TemplateRef } from '@angular/core'; import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; import { Option } from './types/multiselect'; @Component({ selector: 'app-multiselect', templateUrl: './multiselect.component.html', styleUrls: ['./multiselect.component.scss']...
package com.wjjzst.ads.first_stage.exam.二叉树.easy; import com.wjjzst.ads.first_stage.exam.二叉树.TreeNode; import java.util.LinkedList; import java.util.Queue; /** * https://leetcode-cn.com/problems/invert-binary-tree/ * * @Author: Wjj * @Date: 2019/5/4 9:30 */ public class _226_翻转二叉树invert_binary_tree { class ...
import { Status } from '../../../hooks/types/misc'; import defaultTheme from '../../../theme/defaultTheme'; import { render, fireEvent, waitFor } from '../../../utils/tests/test-utils'; import RecordingActionBar from './RecordingActionBar'; const actionCallbackMock = jest.fn(); const stopActionMock = jest.fn(() => Pr...
/* * Copyright (C) 2022 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...