text
stringlengths
184
4.48M
"use client"; import { useState, useTransition } from "react"; import { useForm } from "react-hook-form"; import { zodResolver } from "@hookform/resolvers/zod"; import * as z from "zod"; import Link from "next/link"; import { Button } from "@/components/ui/button"; import { Form, FormControl, FormField, Form...
import React, { useState } from "react"; import { Form, Row, Col, Button } from "react-bootstrap"; import { Link, useNavigate } from "react-router-dom"; import { InputField } from "../../Components/InputField"; import { auth } from "../../Config/firebase"; import { createUserWithEmailAndPassword } from "firebase/auth";...
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; interface IMinePool { struct MineBrief { uint8 nftType; uint8 gen; uint32 tokenId; uint32[] wells; uint256 power; uint256 capacity; //油田储能 uint256 output; //架设油井后的产量 uint256 pendingRewar...
import { createAction, props } from '@ngrx/store'; import { QuestionTemplate } from '../../models'; export const loadQuestionTemplatesRequest = createAction( '[Question Template] Load Question Templates Request' ); export const loadQuestionTemplatesSuccess = createAction( '[Question Template] Load Question Templa...
import styled from "styled-components"; import PersonAddIcon from "@mui/icons-material/PersonAdd"; import { useRecoilValue } from "recoil"; import { studentLoginState } from "../../atom/atoms"; import { useForm } from "react-hook-form"; import { useEffect, useState } from "react"; import { useMutation } from "@tanstack...
package PratikAtm; import java.util.Scanner; public class Main { public static void main(String[] args) { String userName, password; Scanner input = new Scanner(System.in); int right = 3; int balance = 1500; // int select; -- do while ; byte choise = 0; int p...
# Prerequisite This guide will start at the point where your original orange backlight is removed from your Flipper. You can use [This Guide](https://telegra.ph/Izmenenie-cveta-podsvetki-Flipper-Zero-11-14) (Needs translation if you don't speak Russian), [This Guide](https://telegra.ph/Flipper-Zero-RGB-backlight-guide...
import 'package:ecommerce/models/activity_model.dart'; import 'package:ecommerce/themes/colors.dart'; import 'package:ecommerce/widgets/activity_widget.dart'; import 'package:flutter/material.dart'; class NotificationActivityScreen extends StatelessWidget { NotificationActivityScreen({Key? key}) : super(key: key); ...
package com.colegioapi.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.sprin...
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class PenyesuaianTableUsers extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('users', functi...
import 'dart:io'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:image_picker/image_picker.dart'; import '../../controller/profile_controller.dart'; import '../../model/profile_model.dart'; class ProfileView extends StatefulWidget { @override State<ProfileView> createState...
import { useEffect, useState } from "react" import { useAppSelector } from "../../app/hooks" import { ICurrent } from "../../Interfaces/Weather/current" const Current = ({ cityName }: { cityName?: string }) => { const tempCurrent = useAppSelector((e) => e.weather.current) const [current, setCurrent] = useSt...
--NPCManager is required for setting basic NPC properties local npcManager = require("npcManager") local npcutils = require("npcs/npcutils") --Create the library table local sampleNPC = {} --NPC_ID is dynamic based on the name of the library file local npcID = NPC_ID --Defines NPC config for our NPC. You can remove s...
/* package com.trace.sdkapp; import io.grpc.ManagedChannel; import io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts; import io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.hyperledger.fabric.client.CallOption; import org.hyperledg...
/** * @author:syf20020816@outlook.com * @since:20230915 * @version:0.1.3 * @type:interface * @description: * # SURProgress * SURProgress is commonly used to display download progress or event processing progress * And you can fully control it through the progress property * ## properties * - in property <Themes> them...
import streamlit as st import plotly.graph_objects as go import altair as alt from visualisation import Visualization from Pred import LinearForecast from Pred import ExponentialSmoothingForecast from scipy.stats import pearsonr, spearmanr import pandas as pd st.set_page_config( page_title="Cryptocurrency Reddi...
/************************************************************************************ * * Name : mrLED * File : LED.h * Author : Mark Reds <marco@markreds.it> * Date : September 8, 2020 * Version : 1.0.2 * Notes : This library allows an Arduino board to control LEDs. * * Copyright (C) 2020 Marco ...
import {Room, RoomInfo, RoomState, RoomVisibility} from "../struct/room"; import {Constants, Util, Validation} from "../helpers"; import pool from "./pool"; import {User, UserState} from "../struct/user"; import {Message, MessageLike} from "../struct/message"; import db from "./db"; class RoomDBHandler { static asyn...
package controllers import ( "context" "errors" "fmt" "github.com/mylxsw/aidea-server/pkg/ai/chat" "github.com/mylxsw/aidea-server/pkg/misc" "github.com/mylxsw/aidea-server/pkg/rate" repo2 "github.com/mylxsw/aidea-server/pkg/repo" "github.com/mylxsw/aidea-server/pkg/repo/model" service2 "github.com/mylxsw/aid...
package Testes; import java.io.File; import java.io.FileWriter; import java.io.IOException; import org.jdom2.Document; import org.jdom2.Element; import org.jdom2.output.XMLOutputter; import Sistema.*; public class EscritorXML { static XMLOutputter xout = new XMLOutputter(); public static void criarXML() { Ele...
// // InfoViewController.swift // Navigation // // Created by ROMAN VRONSKY on 19.07.2022. // import UIKit class InfoViewController: UIViewController { private var namesResidents = [String]() private lazy var tableView: UITableView = { let tableView = UITableView(frame: .zero, style: .pla...
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { HomeResolver } from './home/home.resolver'; import { HomeComponent } from './home/home.component'; import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; import { SpinnerComponent } fro...
sap.ui.define([ "sap/ui/base/Object", "sap/m/MessageBox" ], function (UI5Object, MessageBox) { "use strict"; return UI5Object.extend("ean.edu.solicitud.controller.ErrorHandler", { // /** // * Handles application errors by automatically attaching to the model events and displaying errors when needed. ...
import axios from 'axios'; import Restaurant from '../../interfaces/restaurantInterface'; import { loadRestaurants, loadFavorites, addToFavorites, updateRestaurant, updateRestaurantFavs, deleteFromFavorites } from './actionCreators'; import actionTypes from './actionTypes'; jest.mock('axios'); const moc...
pkgs <- c("terra", "tidyverse", "wavethresh", "sf") sapply(pkgs, require, character.only=TRUE, quietly=TRUE) # --- wavelet decomposition ----------------- w.filter.number = 1; w.family = "DaubExPhase" # ------------------------------------------- f <- list.files("~/../../Volumes/az_drive/temp/CorralsTrail/", pattern...
<!--/*--> <html> <head> <link rel="stylesheet" type="text/css" href="narrative.css"/> </head> <body> <!--*/--> <div> <div class="hapiHeaderText"> <th:block th:text="Vaccination"/> </div> <table class="hapiPropertyTable"> <th:block th:if="${resource.hasPatient}"> <thead><tr...
import { expect } from '@storybook/jest'; import { ComponentMeta, ComponentStory } from '@storybook/react'; import { screen, userEvent, within } from '@storybook/testing-library'; import { List } from 'immutable'; import React from 'react'; import { convertJs } from '@graasp/sdk'; import { FlagRecord } from '@graasp/...
<template> <div class="search-panel"> <el-row class="m-header-searchbar"> <el-col :span="3" class="left"> <img src="https://s0.meituan.net/bs/fe-web-meituan/e5eeaef/img/logo.png" alt=""> </el-col> <el-col :span="15" class="center"> <div class="wrapper"> <el-input v-mode...
/* * Copyright (c) 2019 sep.gg <seputaes@sep.gg> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, m...
# примеры API-запросов #@baseUrl = http://localhost:8000/api/v1 # создание продукта POST {{baseUrl}}/products/ Content-Type: application/json { "title": "Помидор_6", "description": "Лучшие помидоры на рынке_2" } ### # получение продуктов GET {{baseUrl}}/products/ Content-Type: application/json ### # обновлен...
## これはなに - [うひょさんに聞く!React 19アップデートの勘所](https://findy.connpass.com/event/318090/)に参加したので、まとめ - スライド資料とか追加されたら追記するかも - 13時にしゃぶしゃぶ予約しちゃったので、Q&Aは聴けないかも ## React19 RC - React19のRCが公開されたので、それをメインに解説 - 具体的なAPIを細かく見ていくというよりは、React19時代に重要になりそうな概念などの話がメイン ## Reactの歴史 - React16 - Hooksの時代 - React17 - No New Features - React1...
import { createSignal } from "solid-js"; import { Avatar } from "~/components"; import { useCommentsContext } from "~/context"; import DATA from "~/data/data.json"; import { generateRandomId } from "~/helpers"; import { TComment } from "~/types"; type TNewCommentProps = { isReply?: boolean; id?: string; classNam...
//SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.20; import "./interfaces/IRiver.1.sol"; import "./interfaces/IELFeeRecipient.1.sol"; import "./libraries/LibUint256.sol"; import "./Initializable.sol"; import "./state/shared/RiverAddress.sol"; /// @title Execution Layer Fee Recipient (v1) /// @author Kiln //...
import { Engine } from "../engines/engine"; import { Primitive } from "../engines/engine.draw"; import { BufferStore, DataType, IndexFormat, PrimitiveType } from "../engines/engine.enum"; import { iGeometryIndex, IndexBuffer } from "./index-buffer"; import { iGeometryAttribute, VertexArrayBuffer } from "./vertex-array-...
# Introduction V-pipe is a bio-informatics pipeline built on top of the Snakemake workflow management system. Bioconda is optimized for use on Unix and MacOS systems but does not have a Windows Channel. For that reason, WSL (Windows Subsystem for Linux) installation is advised. This Markdown shares resources that mak...
package com.example.rdo_server.utilities; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; /** * @author Xabier Ferrer Ardanaz * @author Razican (Iban Eguia) */ public class Database extends SQLiteOpenHelper { private static Database ...
# Copyright (C) 2017 Greenbone Networks GmbH # Some text descriptions might be excerpted from (a) referenced # source(s), and are Copyright (C) by the respective right holder(s). # # SPDX-License-Identifier: GPL-2.0-or-later # # This program is free software; you can redistribute it and/or # modify it under the terms o...
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np from PIL import Image from torch.utils import data from torchvision import transforms, utils from torch.utils.data import Dataset, DataLoader import cv2 def ratioFunction(num1, num2): num1 = in...
import { NgModule } from '@angular/core'; import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; const routes: Routes = [ { path:'pocetna', loadChildren: ()=> import('./pocetna/pocetna.module').then(m=>m.PocetnaPageModule) }, { path: '', redirectTo: 'pocetna', pathMatc...
import { Component, Inject, OnDestroy, OnInit, Optional } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { Editor, toHTML, Toolbar } from 'ngx-editor'; import { ToastrService } from 'ngx-toastr';...
/** * @file LinkedListHolderTest.h * @brief Header file for class LinkedListHolderTest * @date 06/08/2015 * @author Giuseppe Ferrò * * @copyright Copyright 2015 F4E | European Joint Undertaking for ITER and * the Development of Fusion Energy ('Fusion for Energy'). * Licensed under the EUPL, Version 1.1 or - as ...
import { mixins } from 'vue-class-component'; import { Component, Vue, Inject } from 'vue-property-decorator'; import Vue2Filters from 'vue2-filters'; import { IAnswerToOffer } from '@/shared/model/answer-to-offer.model'; import AlertMixin from '@/shared/alert/alert.mixin'; import AnswerToOfferService from './answer-...
# HOW PROMISES WORK Assume, you have only promise types P, and P's can fulfill, reject and then as anticipated. Assume that fulfill(value) and reject(reason) behaves as expected, not permitting other transitions. How then, does then work? Believe it or not, like this: ```cofeescript class P ... then: (onFulfi...
<?php namespace App\Http\Controllers\API\v1; use App\Http\Controllers\Controller; use App\Http\Requests\v1\StoreGoodRequest; use App\Http\Requests\v1\UpdateGoodRequest; use App\Http\Resources\v1\GoodResource; use App\Jobs\GeneratePDFJob; use App\Jobs\MergePDFsJob; use App\Models\Good; use App\Models\Warehouse; use Ex...
import { useState } from "react"; function AddNewNote({onAddNote}) { const [title, setTitle] = useState(""); const [description, setDescription] = useState(""); const handelSubmit = (e) => { e.preventDefault(); if (!title || !description) return null; const newNote = { ...
:- use_module('../prolog/clp_term'). :- begin_tests(clp_term). % Tests for term_indomain/2 test('term_indomain_+_+_fails', [ throws(error(uninstantiation_error(1), _)) ]) :- term_indomain(1, all_terms). test('term_indomain_+_-_fails', [ throws(error(uninstantiation_error(1), _)) ]) :- term_indomain(1, _). test(...
import React, {useEffect, useRef} from "react"; interface DialogProps { isOpen: boolean; onOk?: () => void; onClose?: () => void; onCancel?: () => void; title?: string; children: React.ReactNode; ok: string | boolean; cancel: string | boolean; fullScreen?: boolean; } export default...
Introduction to Azure Active Directory -------------------------------------- Microsoft previewed Active Directory in 1999, released it first with Windows 2000 Server edition, and revised it to extend functionality and improve administration in Windows Server 2003. Active Directory support was also added to Windows 95...
import { toFileUrl } from "std/path/mod.ts"; import { Api, VERSION as telegramVersion } from "$grm"; import { bigInt } from "$grm-deps"; import { bold, CommandHandler, fmt, longText, Module, type Stringable, updateMessage, version, } from "$xor"; import { whois } from "./helpers.ts"; const LOAD_TIME = ...
import 'package:flutter/material.dart'; import '../../../../../__styling/spacing.dart'; import '../../../../../_models/item.dart'; import '../../../../../_widgets/others/icons.dart'; import '../../../../../_widgets/others/text.dart'; import '../_helpers/helpers.dart'; class FinanceOverview extends StatelessWidget { ...
from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from bs4 import BeautifulSoup import requests import time import os # Setup Selenium WebDriver driver = webdriver.Chrome() ...
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
package com.example.rpcollegemobile import android.util.Log import com.example.rpcollegemobile.itemEvent.Event import okhttp3.Call import okhttp3.Callback import okhttp3.Response import org.json.JSONArray import org.json.JSONException import java.io.IOException import java.util.* class Repository { fun loadEvent...
<template> <el-dialog v-model="showSettings" :before-close="handleClose" width="calc(var(--app-width) * 0.8)" > <template #header> <span class="el-dialog__title"> {{ $t('moderator.organism.settings.facilitatorSettings.header') }} </span> <br /> <br /> <p> ...
package com.krillinator.recap_1_navigation_composedestination.ui.composables import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layo...
package com.infras.dauth.ui.fiat.transaction.viewmodel import androidx.lifecycle.MutableLiveData import androidx.lifecycle.viewModelScope import com.infras.dauth.R import com.infras.dauth.app.BaseViewModel import com.infras.dauth.ext.isAreaCode import com.infras.dauth.ext.isMail import com.infras.dauth.ext.isPhone imp...
// Import the express router as shown in the lecture code // Note: please do not forget to export the router! import { Router } from "express"; import { ObjectId } from "mongodb"; import { events } from "../data/index.js"; import { checkString, checkDate, checkTime, timeToMinutes, } from "../helpers.js"; expor...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet" /> <link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="...
<h3>3. Longest Substring Without Repeating Characters</h3> <br> Given a string <code>s</code>, find the length of the <strong>longest substring</strong> without repeating characters.<br> <br> <b>Example 1:</b><br> <br> <pre> <strong>Input:</strong> s = "abcabcbb" <strong>Output:</strong> 3 <strong>Explanation:</s...
/* * 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. */ package com.facebook.react.views.image; import androidx.annotation.IntDef; import androidx.annotation.Nullable; import com.faceboo...
/* Eversion, a CRPG engine. Copyright (c) 2002-2012 Utkan Güngördü (utkan@freeconsole.org) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the Licen...
/*--------------- 1ra Area: Codigo de Usuario -----------------------*/ //-------> importaciones, paquetes package analizadores; import java_cup.runtime.Symbol; import java.util.LinkedList; //------> Codigo para el parser,variables, metodos parser code {: public String resultado=""; public static LinkedList<TE...
Feature: As an admin I need to be able to specify a padding time for services So that my staff has enough time between appointments. Scenario: I add a service with no padding Given I am logged in as admin And I am on "/manage-services" When I follow "New Service" And I fill in "name" with "traini...
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....
#Start #options(stringsAsFactors=F)#有意思,全局设置不转换为因子 #清除所有变量 rm(list=ls()) #运行开始 timestart<-Sys.time() #记录开始运行时间 options(stringsAsFactors=F, quote="",unzip = "internal")#有意思,全局设置不转换为因子 options("repos" = c(CRAN = "https://mirrors.tuna.tsinghua.edu.cn/CRAN/")) options(BioC_mirror = "https://mirrors.tuna.tsinghua.edu.cn/bio...
const axios = require("axios"); const { JSDOM } = require("jsdom"); const getProductUrl = (product_id) => `https://www.amazon.com/gp/product/ajax/?asin=${product_id}&m=&smid=&sourcecustomerorglistid=&sourcecustomerorglistitemid=&sr=8-5&pc=dp&experienceId=aodAjaxMain`; const selectors = { image: "#aod-asin-image-i...
using System; using System.Linq; using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; namespace CartLogic { public class ShoppingCartInterface : MonoBehaviour { [SerializeField] private TMP_Text addedItems; [SerializeField] private TMP_Text...
package frame; import dao.BookDao; import model.Book; import util.Connect; import util.StringNull; import javax.swing.*; import javax.swing.border.EmptyBorder; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.sql.Connection; import java.sql.ResultSet; /** * 删除图...
/* eslint-disable @typescript-eslint/naming-convention */ import { DeleteObjectCommand, GetObjectCommand, ListObjectsCommand, PutObjectCommand } from '@aws-sdk/client-s3'; import { type Readable } from 'node:stream'; import { type GetObjectDataPayload, type S3Service, type PutObjectPayload, type GetObjectsKey...
<?php /** * @author Jaap Jansma <jaap.jansma@civicoop.org> * @license AGPL-3.0 */ namespace Civi\ActionProvider\Condition; use \Civi\ActionProvider\Parameter\ParameterBagInterface; use \Civi\ActionProvider\Parameter\ParameterBag; use Civi\ActionProvider\Parameter\Specification; use \Civi\ActionProvider\Parameter\S...
import 'package:flutter/material.dart'; import '../services/bookmark_service.dart'; import '../models/job_model.dart'; class BookmarkScreen extends StatefulWidget { @override _BookmarkScreenState createState() => _BookmarkScreenState(); } class _BookmarkScreenState extends State<BookmarkScreen> { late Future<Li...
# Copyright © 2023 Apple Inc. import io import itertools import numpy as np import os from urllib import request import zipfile def load_dataset(dataname): if dataname == "ptb": return ptb() elif dataname == "wikitext2": return wikitext(dataset="2") else: return wikitext(dataset="...
using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Net.Http.Headers; using System.Web.Http; using CompactDiscDAO; using Microsoft.Owin.Security.OAuth; using Microsoft.Practices.Unity; using Newtonsoft.Json.Serialization; namespace CompactDiscRest { public static...
package EP2021; public class Bebida { private String nome; private String[] ingredientes; private double preco; public Bebida(String nome, String[] ingredientes, double preco){ this.nome = nome; this.ingredientes = ingredientes; this.preco = preco; } public String getN...
<template> <div> <a-card> <div v-show="!addSocsoModal && !editSocsoModal"> <ChosenAlertBox permissionNameAdd="setup_payroll_socso_add" permissionNameDelete="setup_payroll_socso_delete" :isActive="true" position="right" :totalSelected="selectedRowKeys...
package com.tool.thread.countdownlatch; import java.util.Arrays; import java.util.concurrent.CountDownLatch; public class CountDownLatchExample3 { public static void main(String[] args) { String[] names = new String[]{"姚明", "易建联", "李宁", "邓亚萍"}; new Referee(names).start(); } //裁判员 pub...
import json from unittest.mock import patch from requests import Response from src.sut import Sut from tests.mocks.mock_connection_manager import MockConnectionManager @patch("src.sut.Sut.semi_complex_method") @patch("src.sut.ContextManagerDeps") @patch("src.sut.NestedDependency.play") @patch("src.sut.external_call...
package com.example.vitalize.Service; import interfaces.IService; import com.example.vitalize.Entity.RendezVous; import com.example.vitalize.Entity.Users; import com.example.vitalize.Util.MyDataBase; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException...
/** * \file * \brief CryptoAuthLib Basic API - Helper Functions to * * \copyright (c) 2015-2020 Microchip Technology Inc. and its subsidiaries. * * \page License * * Subject to your compliance with these terms, you may use Microchip software * and any derivatives exclusively with Microchip products. It is your...
from pyboy import PyBoy, WindowEvent import time import requests class PokemonEmulatorBackground: def __init__(self): self.pressAction = [ WindowEvent.PRESS_BUTTON_A, # 0 WindowEvent.PRESS_BUTTON_B, # 1 WindowEvent.PRESS_BUTTON_SELECT,# 2 WindowEvent....
import { render, screen } from "@testing-library/react"; import { describe, expect, it } from "vitest"; import FormRaw from "./formRaw"; describe("FormRaw", () => { it("should render without error", () => { render(<FormRaw />); expect(screen.getByTestId("form-raw")).toBeInTheDocument(); }); it("should r...
# 类与对象 [toc] ## 特征 1. 封装 2. 继承 3. 多态 ## 类 一种复杂的**数据类型**,它是将个体**属性类型**和与这些属性有关的**操作**封装在一起的集合体,因此,定义类就是定义一种新的数据类型 <!-- 相比起结构体而言多了操作函数 --> <!-- 对象是类的实例化 --> > 注意:定义时系统并**不为类分配存储空间**,所以不能对类的数据成员初始化 ### 类的数据隐藏 类的⼀些属性可以设置为不被外界直接操作,所以这些数据 对外界来说是不可⻅性,外⾯只有**通过类的操作函数**才能操作类 的内部数据 ### 类的定义 编译时进行创建(程序运行前) ```cpp class N...
<?php namespace App\Controller; use App\Entity\FriendsRequest; use App\Entity\User; use App\Repository\FriendsRequestRepository; use App\Repository\UserRepository; use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonRespon...
export type errorAuthTypes = { E400: { status: number; message: { phone_numberAlreadyUsed: string; emailAlreadyUsed: string; nicknameAlreadyUsed: string; phone_number_not_valid: string; email_not_valid: string; nickname_not_valid: string; }; }; }; export type errorNo...
'use client'; import { Row, createColumnHelper, getCoreRowModel, getFilteredRowModel, getPaginationRowModel, getSortedRowModel, useReactTable, } from '@tanstack/react-table'; import { getExplorerURI } from '@webb-tools/api-provider-environment/transaction/utils'; import { chainsConfig } from '@webb-tools...
import { Injectable } from '@angular/core'; import { AuthData } from '../models/auth.model'; import { HttpClient } from '@angular/common/http'; import { map, mergeMap, MonoTypeOperatorFunction, Observable, Subscriber, tap } from 'rxjs'; import { PlanOnServer } from './server.service.model/planOnServer.model'; import { ...
// Copyright 2013-2023, University of Colorado Boulder /** * Visual representation of H3O+/OH- ratio. * * Particles are drawn as flat circles, directly to Canvas for performance. * In the pH range is close to neutral, the relationship between number of particles and pH is log. * Outside that range, we can't possi...
package com.group.libraryapp.domain; import jakarta.persistence.*; import java.util.List; @Entity public class User { @OneToMany(mappedBy = "user", cascade = CascadeType.ALL) List<UserLoanHistory> userLoanHistories; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private long id; @Co...
package com.george.school.entity; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; import java.io.Serializable; import java.time.LocalDate; import java.time.LocalDateTime; /** * <p> * 系统...
/** ** \file tree/eseq.hh ** \brief Intermediate representation: eseq.hh **/ #pragma once #include <iosfwd> #include <tree/exp.hh> #include <tree/seq.hh> #include <tree/stm.hh> namespace tree { class Eseq : public Exp { public: /** \brief Build a list of expressions. ** ** \param stm Sta...
// Given two strings s and t, return true if s is a subsequence of t, or false otherwise. // A subsequence of a string is a new string that is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (i.e., "ace" is a subseq...
var express = require('express'); var bodyParser = require('body-parser'); var app = express(); app.locals.pretty = true; //우리가 설치한 jade 템플릿 엔진과 우리가 만드는 app의 프레임워크인 express를 연결하는 코드 app.set('view engine', 'jade'); app.set('views', './views'); app.use(express.static('public')); app.use(bodyParser.urlencoded({ exten...
import React from "react"; import { Booking } from "@/types/Booking"; import useModalStore from "@/stores/useModal"; import { useFormik } from "formik"; import * as Yup from "yup"; import { useMutation } from "@tanstack/react-query"; import createHmac from "create-hmac"; import axios from "axios"; type Props = {}; c...
import { Component, Inject } from '@angular/core'; import { OKTA_AUTH, OktaAuthStateService } from '@okta/okta-angular'; import OktaAuth, { UserClaims } from '@okta/okta-auth-js'; @Component({ selector: 'app-login-status', templateUrl: './login-status.component.html', styleUrls: ['./login-status.component.css'] ...
import React from 'react'; import './App.css'; import BusinessList from './components/BusinessList/BusinessList'; import SearchBar from './components/SearchBar/SearchBar'; import Yelp from './util/Yelp'; class App extends React.Component { constructor (props){ super(props); this.state = { businesses: [...
import { TatumOneSDK } from '@tatumio/one' import { REPLACE_ME_WITH_TATUM_API_KEY } from '@tatumio/shared-testing-common' const oneSDK = TatumOneSDK({ apiKey: REPLACE_ME_WITH_TATUM_API_KEY }) export async function oneBlockchainExample() { // Get transaction details by hash // https://apidoc.tatum.io/tag/Harmony#o...
import { AuthEntity } from '@joinus/domain'; import { ApiProperty } from '@nestjs/swagger'; import { Type } from 'class-transformer'; import { IsBoolean, IsDate, IsOptional, IsString, ValidateNested } from 'class-validator'; import { RoleDto } from '../../role'; import { UserDto } from '../../user/dto/user.dto'; expo...
import { SimpleGrid, Spinner, Text } from "@chakra-ui/react"; import React from "react"; import InfiniteScroll from "react-infinite-scroll-component"; import useGames from "../hooks/useGames"; import GameCard from "./GameCard"; import GameCardContainer from "./GameCardContainer"; import SkelitonCard from "./SkelitonC...
//Code1 function arrayFunction() { const newArray = []; const fruitsArray = ['Apple','Banana','Pear','Strawberry']; console.log(fruitsArray); } //code2 function arrayFunction2() { const newArray2 = []; const fruitsArray2 = ['Apple','Banana','Pear','Strawberry']; //array index starts at ...
import Layout from './components/layout/Layout'; import { Route, Routes } from 'react-router-dom'; import Products from './pages/Products'; import ProductDetail from './pages/ProductDetail'; import Cart from './pages/Cart'; import Login from './pages/Login'; import Register from './pages/Register'; import NotFound fro...