text
stringlengths
184
4.48M
import React, { useCallback, useEffect, useRef } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { setIsCompleted, setIsWatching, setLinkedColors } from '../../store/slicers/gameSlicer.js'; import GameStatus from './GameStatus/GameStatus.jsx'; import Engine from './Engine/Engine.jsx';...
import { TextField } from '@mui/material'; import { FC, useRef, useEffect } from 'react'; import { useFormContext, useWatch } from 'react-hook-form'; import { useAppDispatch } from 'redux-toolkit/hooks'; import { useDescriptionSelector, setDescription } from 'redux-toolkit/slices/currentPlaceSlice'; export const Descr...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Youtube.com Clone</title> <link rel="stylesheet" href="styles/general.css"> <link rel="stylesheet" href="styles/header.css"> <link rel="stylesheet" ...
<!DOCTYPE html> <html lang="pt-BR"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>DOM</title> <style> body{ background: rgb(100, 100, 199); color: white; font: normal 18pt Arial; } </sty...
import { Card, CardContent, Typography } from "@mui/material" import React from "react" import { useSelector } from "react-redux" import "./user-info-styles.scss" export const UserInfo = () => { const currentUser = useSelector((state) => state.user.currentUser) return ( <div className="card-container"> ...
import React, { ChangeEventHandler } from 'react'; import { Dialog, DialogContent, DialogActions, Select, InputLabel, createMuiTheme, MuiThemeProvider, MenuItem, Checkbox, ListItemText } from '@material-ui/core'; import { StyledTextField, StyledFormControl, StyledCircularProgressPrimary } from '../../../global/globalSt...
/* * The JabaJaba class library * Copyright (C) 1997-2003 ASAMI, Tomoharu (asami@AsamiOffice.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *...
import { TestBed } from '@angular/core/testing'; import { FirebaseModule } from '@app/firebase/firebase.module'; import { lastValueFrom } from 'rxjs'; import { UserService } from './user.service'; describe('UserService', () => { let service: UserService; beforeEach(() => { TestBed.configureTestingModule({ ...
import json import pytest from pokemon import retrieve_pokemons_by_type from io import StringIO from unittest.mock import mock_open, patch from pokemon import retrieve_pokemons_by_type # Criamos o contexto de um pokemon do tipo grama @pytest.fixture def grass_type_pokemon(): return { "national_number": "00...
from odoo import api, fields, models from odoo.exceptions import UserError,ValidationError import math class ConcreteSplitTensileStrength(models.Model): _name = "mechanical.concrete.split.tensile" _inherit = "lerm.eln" _rec_name = "name" name = fields.Char("Name",default="Concrete Split Tensile Streng...
import { Route, Routes } from 'react-router-dom' import { useDispatch } from 'react-redux' import Home from './routes/home' import Topbar from './components/topbar' import Authentication from './routes/authentication' import Shop from './routes/shop' import Product from './routes/product' import Checkout from './route...
import moment from 'moment'; import 'moment/dist/locale/es'; import 'moment/dist/locale/fr'; import 'moment/dist/locale/en-gb'; const format = 'DD MMM YYYY, hh:mm A'; const format2 = 'ddd DD MMM YYYY, hh:mm A Z'; const getLocale = () => { const localeStorage = localStorage.getItem('i18nextLng'); if (localeStorage...
import React from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import {faClock} from "@fortawesome/free-solid-svg-icons"; import SongItemContainer from '../songs/song_item_container'; import {faPlayCircle,faPauseCircle} from "@fortawesome/free-solid-svg-icons"; import {calculateTotalTimeLe...
我每天使用 Git ,但是很多命令记不住。 一般来说,日常使用只要记住下图6个命令,就可以了。但是熟练使用,恐怕要记住60~100个命令。 ![img](D:%5Cdeng_de_rong%5Cdocs%5Cdoc_images_%5Cbg2015120901.png) 下面是我整理的常用 Git 命令清单。几个专用名词的译名如下。 > - Workspace:工作区 > - Index / Stage:暂存区 > - Repository:本地仓库 > - Remote:远程仓库 ## 一、新建代码库 > ```bash > # 在当前目录新建一个Git代码库 > $ git init > > # 新建一个目录,将其...
import { FieldMetadataType } from 'src/metadata/field-metadata/field-metadata.entity'; import { commentStandardFieldIds } from 'src/workspace/workspace-sync-metadata/constants/standard-field-ids'; import { standardObjectIds } from 'src/workspace/workspace-sync-metadata/constants/standard-object-ids'; import { FieldMeta...
<template> <div class="g-content-c p-module"> <div class="g-form-layout-m"> <Form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="80"> <Form-item label="角色ID" prop="roleId"> <Input v-model="formValidate.roleId" :maxlength="30" placeholder="ID值请确认"></Input> ...
package com.greenfoxacademy.pirateinspring.services; import com.greenfoxacademy.pirateinspring.entities.Pirate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.io.Serializable; import java.util.ArrayList; import java.util.Optional; @Service pu...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; using System.Threading.Tasks; using Tailspin.Surveys.Data.DataModels; using Tailspin.Surveys.Data.DTOs; using Tailspin....
// Copyright 2024 Peter Dimov // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt #include <boost/compat/invoke.hpp> #include <boost/core/lightweight_test_trait.hpp> #include <boost/config.hpp> #include <boost/config/workaround.hpp> struct F { void operator()() ...
\documentclass[a4paper, 9pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{xcolor} \usepackage{parskip} \usepackage{enumitem} \usepackage{graphicx} \date{\today} \author{Diedler Baptiste} \title{Réseaux} \begin{document} \maketitle \section{définition} \begin{description}[style=nex...
import speech_recognition as sr import openai from gtts import gTTS from playsound import playsound import os # Sua chave de API da OpenAI openai.api_key = "" # Inicializa o reconhecedor de fala rec = sr.Recognizer() # Função para reconhecimento de fala def recognize_speech(): with sr.Microphone(device_index=1) ...
package Queue import ( "errors" "sync" "time" ) type Queue struct { exit chan bool capacity int topics map[string][]chan any sync.RWMutex //once sync.Once } func NewQueue() *Queue { return &Queue{ exit: make(chan bool), topics: make(map[string][]chan any), } } func (q *Queue) ShowExit(...
// // This file is part of Miro (The Middleware for Robots) // Copyright (C) 1999-2005 // Department of Neuroinformatics, University of Ulm, Germany // // This program 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 Softw...
import React, { useContext, useEffect, useState } from 'react' import { Container, Row, Col, Form, FormGroup, Button } from 'reactstrap' import '../styles/login.css' import { Link, redirect, useNavigate } from 'react-router-dom' import loginImg from '../assets/images/login.png' import userIcon from '../assets/images/us...
import React from "react"; import { Box, Button, Popover } from "@mui/material"; import MoreVertIcon from "@mui/icons-material/MoreVert"; import IconButton from "@mui/material/IconButton"; import DeleteIcon from "@mui/icons-material/Delete"; import EditIcon from "@mui/icons-material/Edit"; import { toast } from "sonner...
import React, { useState, useEffect } from 'react'; import ProductCard from "./ProductCard"; import { getDatabase, ref, onValue } from "firebase/database"; import { db } from "./Utils/Firebase"; import axios from 'axios'; export default function Body() { const [csvData, setCsvData] = useState([]); useEffect...
package org.example.back.account; import jakarta.persistence.*; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import org.example.back.user.User; import org.hibernate.annotations.CreationTimestamp; import java.sql.Timestamp; import java.time.LocalDateTime; @NoArgsConstructor @Data @Table...
package test.gui; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.ChoiceBox; import javafx.scene.control.TextField; import javafx.stage.Stage; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test...
const validatePermissions = (permissions) => { const validPermissions = [ 'CREATE_INSTANT_INVITE', 'KICK_MEMBERS', 'BAN_MEMBERS', 'ADMINISTRATOR', 'MANAGE_CHANNELS', 'MANAGE_GUILD', 'ADD_REACTIONS', 'VIEW_AUDIT_LOG', 'PRIORITY_SPEAKER', 'STREAM', 'VIEW_CHANNEL', 'SEND_M...
<style> #sortbuttons { user-select: none; } table, th, td { border-style: solid; border-width: 1px; border-spacing:0; border-collapse: collapse; } </style> <form id="form"> <input type="text" name="search"> <!-- <input type="submit" value="search"> --> </f...
--- title: قراءة بيانات الجدول من ملف في Aspose.Tasks linktitle: قراءة بيانات الجدول من ملف في Aspose.Tasks second_title: Aspose.Tasks جافا API description: أطلق العنان لقوة Aspose.Tasks لـ Java. تعلم كيفية استخراج بيانات الجدول من الملفات في هذا البرنامج التعليمي الشامل. type: docs weight: 17 url: /ar/java/project-dat...
// Create map to store websocket connections const connections = new Map<string, WebSocket>(); // Broadcast to connections at a pre-defined interval setInterval(() => { const now = new Date(); connections.forEach((socket) => socket.send("the current time is: " + now)); }, parseInt(Deno.env.get("PING_INTERVAL") || ...
import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; import 'package:flutterchatapp/pages/top_page.dart'; import 'package:flutterchatapp/utils/shared_prefs.dart'; import 'utils/firebase.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initia...
<?php namespace App\Http\Controllers; use App\Models\Role; use Illuminate\Http\Request; class RoleController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $data = [ 'dRole' => Role::...
""" Functions to manipulate conninfo strings """ # Copyright (C) 2020 The Psycopg Team from __future__ import annotations import re from typing import Any from . import pq from . import errors as e from . import _conninfo_utils from . import _conninfo_attempts from . import _conninfo_attempts_async # re-exoprts C...
import { AfterViewInit, Component, OnInit, ViewChild } from '@angular/core'; import { ChatService } from './services/chat/chat.service'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export cla...
package com.example.mdbspringboot.order; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController @RequestMapping("/orders") public class OrderController { @Autowired private OrderService service; @PostMapping...
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.EntityFrameworkCore; using EventOrganizerDomain.Model; using EventOrganizerInfrastructure; namespace EventOrganizerInfrastructure.C...
import { Article } from '@/types'; import { getArticle, getArticles } from '@/utils'; import { Box, Flex, Heading, Text, VStack, useColorModeValue, } from '@chakra-ui/react'; import Image from 'next/image'; import { GetStaticPaths, GetStaticProps } from 'next'; import format from 'date-fns/format'; import { IPara...
# Linear regression models: Diagnostics and model-building ```{r} pacman::p_load(tidyverse, GLMsData, janitor, patchwork) ``` ```{r} data("lungcap") lung <- lungcap |> as_tibble() |> clean_names() |> mutate(smoke = factor( smoke, levels = c(0, 1), labels = c('Non-smoker', 'Smoker'))) ...
package main import ( "fmt" "sync" "time" ) // Paramter should have pointer to waitgroup func PrintName(s string, wg *sync.WaitGroup) { for i := 0; i < 10; i++ { fmt.Println(s) time.Sleep(100) } // Once process is done then we should mark waitgroup as done wg.Done() } func PrintNumbers(i int, wg *sync.Wa...
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Product Management</title> <link rel="icon" href="/Web_Travel/2.Service/resources/images/online-...
package com.example.s.camera2basic; import android.Manifest; import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.app.DialogFragment; import android.app.Fragment; import android.content.Context; import android.content.DialogInterface; import android.content.pm.PackageM...
// NOTE: think of the store as the base, AND the state as the status of the mission // (1) store() <<--- reducer, state // (2) reducer() <<--- state, action // (3) subscribe() // get the 'current' state // (4) dispatch( ) <<--- action // const reducer = (state, action) => { // if (action.type === 'ATTA...
import {Component} from 'react' import Loader from 'react-loader-spinner' import CourseItemCard from '../CourseItemCard' import FailureView from '../FailureView' import './index.css' const apiStatusConstants = { initial: 'INITIAL', success: 'SUCCESS', failure: 'FAILURE', inProgress: 'IN_PROGRESS', } class Hom...
import { ApiProperty } from "@nestjs/swagger"; import { IsNumber, IsString, Length } from "class-validator"; export class CreateCommentDto { @ApiProperty({ example: 'good product', description: 'message' }) @IsString({ message: 'must be string' }) @Length(2, 16, { message: 'must be 2 - 16 symbols' }) r...
# 【动态规划】221-最大正方形 动态规划,`dp(i, j)=min(dp(i − 1, j), dp(i − 1, j − 1), dp(i, j − 1)) + 1` ```java class Solution { public int maximalSquare(char[][] matrix) { int m = matrix.length, n = matrix[0].length; int[][] dp = new int[m][n]; int maxLength = 0; for (int i = 0; i < m; i++) { ...
import {useEffect, useState} from "react"; import {Button, Paper, Stack, Table, TableBody, TableCell, TableContainer, TableHead, TableRow} from "@mui/material"; import Ticket from "./Ticket"; import TicketService from "../services/TicketService" import {useNavigate} from "react-router-dom"; import * as React from "reac...
// staff.hpp #ifndef STAFF_HPP #define STAFF_HPP #include <iostream> #include <fstream> #include <iomanip> #include <vector> #include <algorithm> #include <limits> #include <set> class Staff { private: int id; std::string name; int age; std::string gender; int height; int weight; int cont...
import { createCanvas, registerFont } from "canvas"; import path from "path"; import fs from "fs"; import sharp from "sharp"; import { Currency } from './enums'; export const createTextAndImageOverlay = async (currency: Currency) => { const apiKeyToken = process.env.ETHERSCAN; const url = `https://api.ethersca...
import { Image, ScrollView, StyleSheet, Text, View } from "react-native"; import { useNavigation, useRoute } from "@react-navigation/native"; import { MEALS } from "../data/dummy-data"; import MealDetails from "../components/MealDetails"; import Subtitle from "../components/MealDetail/Subtitle"; import List from "../co...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Responsive Grid</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/...
import { PLOP_PROMPT_TYPE, PATH, PLOP_ACTION_TYPE, BREAK_LINE } from '../constants.js'; import { getAllDirsInDirectory } from '../utils.js'; export default (plop) => ({ description: 'Remove API', prompts: [ { type: PLOP_PROMPT_TYPE.LIST, name: 'serviceName', choices: () => { const all...
package com.example.services; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; import com.example.Client.entities.Client; import com.example.repositories.ClientRepository; @Service public class ClientServiceImpl implements ClientServi...
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Ajax테스트</title> </head> <body> <h2 onclick="getImage();">이 행을 클릭해요. Ajax로 이미지를 요청하고 출력해요....</h2> <script> let imgname = 1; function getImage() { imgname = imgname == 10 ? 1 : imgname+1; const xhr = new XMLHttpRequest(); xhr.responseType = 'blob'; xhr.on...
--- title: Updated 2024 Approved VLC Trimming on Mac Made Simple Preserve Video Integrity and Quality date: 2024-04-29T13:32:52.026Z updated: 2024-04-30T13:32:52.026Z tags: - video editing software - video editing categories: - ai - video description: This Article Describes Updated 2024 Approved VLC Trimming ...
<template> <div style="width: 100%; height: 100%" class="d-flex flex-column align-center justify-space-between" > <template v-if="!done"> <p class="font-weight-light grey--text mt-6" :class="$vuetify.breakpoint.smAndDown ? 'subtitle-1' : 'title'" > Wait for the downlo...
print ("Hola Mundo") print(3+3-2) #no hace falta estacios ya que python pone los espacios entre los valores print("hola", "como estas") #str parsea a string print("hola", str(58)) #distintas formas de imprimir variables age = 35 print(f"edad: {age}") print("edad:", age) name = "Lucia" print(f"Nombre: {name}") #la...
package com.example.Giinie; import android.Manifest; import android.os.Handler; import android.util.Log; import android.view.Gravity; import android.widget.ImageButton; import android.view.View; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.loca...
/* ------------------- Author:Bobby Date: 04/01/2022 ------------------- */ //Time complexity O(N*log(N)) //space complexity O(1) class Solution { private: bool isPossible(vector<int>& nums,int target,int mid){ int n=nums.size(); long long int sum=0; for(int i=0;i<mid;i++){ sum+...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="../css/main.css"> <link rel="stylesheet" href="../css/header.css"> <link rel="stylesheet" ...
import { IMMPosterRef } from '@wmeimob/taro-poster/src/components/poster' import { useRef } from 'react' import { isPrd } from '../../../../config' import { useToast } from '@wmeimob/taro-design/src/layout/pageContainer' import { api } from '@wmeimob/taro-api' import { GoodsVO } from '@wmeimob/taro-api' import { routeN...
import { Column, Entity } from "typeorm"; import { ApiProperty } from "@nestjs/swagger"; @Entity() export class Address { @Column() @ApiProperty({ type: "string", example: "'573 route d", description: "The address of the sales-point", }) street: string; @Column() @ApiProperty({ type: "stri...
import { useRef } from "react"; import { useState } from "react"; import { AnimatePresence, motion } from "framer-motion"; import { Squash as Hamburger } from "hamburger-react"; import { routes } from "@/lib/constant"; import Link from "next/link"; export const NavMobile = () => { const [isOpen, setOpen] = useState(...
import meow from "meow"; import inquirer from "inquirer"; import { runTransformsOnChromeRecording } from "../transform.js"; import { expandedFiles } from "../utils.js"; import { InquirerAnswerTypes } from "../types"; const cli = meow( ` Usage $ npx webpagetest-chrome-recorder <path-of-recording.json> [options]...
package com.billyindrai.subjetpack3.data import androidx.lifecycle.LiveData import androidx.paging.LivePagedListBuilder import androidx.paging.PagedList import com.billyindrai.subjetpack3.AppExecutors import com.billyindrai.subjetpack3.Resources import com.billyindrai.subjetpack3.data.entity.MovieEntity import com.bil...
use super::cv_pipeline::manager::CVPipelineManager; use super::cv_pipeline::stages::camera_stage::OpenCVCameraSource; use super::cv_pipeline::stages::display_recorder_stage::DisplaySource; use super::cv_pipeline::stages::egui_dispatcher_stage::BGRConvertToEguiStage; use super::cv_pipeline::stages::wechat_qr_detect_stag...
import { router, useForm } from "@inertiajs/react"; import { Trash } from "lucide-react"; import moment from "moment"; import React from "react"; import { Toaster, toast } from "sonner"; function ExpenseList({ budget }) { const Expenses = budget.expenses; const { post } = useForm(); const DeleteExpense =...
#pragma once /* File name : motor.h Author: Stephan Scholz / WilhelmKuckelsberg Project name : KuCo_Phantom 1 Date : 2022-06-14 Description : */ #include <Arduino.h> #include <RP2040_PWM.h> //#define LOCAL_DEBUG #include "myLogger.h" #include "config.h" /* #define _PWM_LOGLEVEL_ 0 #if (defined(ARDUINO_NANO_RP...
import type { Metadata } from "next"; import { Inter } from "next/font/google"; import "@/app/globals.css"; import RedProv from "../redux-service/reduxProvider"; import CheckAuthUser from "../lib/checkAuthUser"; import GoogleAuthSessionProvider from "../lib/googleAuthSessionProvider"; const inter = Inter({ subsets: ["...
import 'package:assignmen_1/Screens/Accepter/searchscreen.dart'; import 'package:assignmen_1/Screens/Accepter/send_request.dart'; import 'package:assignmen_1/repository/location_controller.dart'; import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; import 'package:get/get.dart'; import '...
<html> <head> <title>jQuery WAI-ARIA Checkbox Demo</title> <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="jquery.waria-checkbox.js"></script> <script type="text/javascript" src="https://raw.github.com/nyl...
classdef behavior_funcs %behavior consists of functions used to assess locomotion of rodent % behavior % % Adapted from OF from ephys_tools by LB 12/2022 properties Property end methods(Static) %% General locomotion function lengt...
#----------------------------------------------------------------------------- # Name: CCC '21 S2 - Modern Art (main.py) # Author: Aryan Mittal # Created: 17-Feb-2024 # Updated: 17-Feb-2024 #--------------------------------------------------------------------------- # Gets the dimensions of the canvas an...
<!DOCTYPE html> <html lang="fr"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="style.css"> <title>Physique-Chimie</title> </head> <body> <header id="pc"> <div> <h1>Physique-Chimie<...
"use client"; import { useEffect, useState } from "react"; import axios from "axios"; import styled from "styled-components"; const Container = styled.div` padding: 20px; max-width: 600px; margin: 0 auto; `; const Title = styled.h1` text-align: center; font-size: 24px; margin-bottom: 20px; `; const Input...
/* 6) Создать класс человек с возможностью ездить и останавливаться на: машине, скейтборде,велосипеде(что будет если расширить список ?). */ package gb.oop.seminars; import java.util.Objects; public class Human1 extends Animal { private final int MAX_RUN_DISTANCE = 42_000; private Vehicle curVehicle; pub...
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Nop.Core; using Nop.Services.Catalog; using Nop.Services.Customers; using Nop.Services.Localization; using Nop.Plugin.Misc.SimpleLMS.Services; using Nop.Plugin.Misc.SimpleLMS.Domains; using Nop.Plugin.Misc.SimpleLMS....
//-------------------------------------------------------------------- // // Laboratory 5 stackarr.cpp // // SOLUTION: Array implementation of the Stack ADT // //-------------------------------------------------------------------- #include "stackarr.h" //-----------------------...
import React from "react"; import { Container, Logo, LogoutBtn } from "../index"; import { Link, useNavigate } from "react-router-dom"; import { useSelector } from "react-redux"; function Header() { const authStatus = useSelector((state) => state.auth.status) const navigate = useNavigate() const navItem...
import { Button } from "@chakra-ui/button"; import { Input, InputGroup, InputLeftAddon } from "@chakra-ui/input"; import { VStack } from "@chakra-ui/layout"; import { Select } from "@chakra-ui/select"; import { Textarea } from "@chakra-ui/textarea"; import { useToast } from "@chakra-ui/toast"; import React, { memo, use...
/** * Feb 20, 201111:23:08 AM * gblog-core * org.gaoyoubo.core.util * ClassLoaderUtils.java * @author gaoyb */ package org.mspring.platform.utils; import java.io.IOException; import java.io.InputStream; import java.net.URL; /** * @author gaoyb * */ public class ClassLoaderUtils { /** * 获取类路径下的资源 ...
package javaComparator; import java.util.*; import java.lang.Integer; class Checker implements Comparator<Player> { public int compare(Player a, Player b) { int s1 = a.score; int s2 = b.score; String str1 = a.name; String str2 = b.name; int sCompare = Integer.compare(...
package com.lyming.controller; import com.lyming.user.User; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cloud.client.ServiceInstance; import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; import or...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using static System.Console; namespace _26._10._23.Т8._1 { internal class Program { //1.1. Вызов пустого метода Func без возвращения значений для вычисления функции y=x^2 //and ...
#3-d plot of z = 2x^2 - y^2 x_min <- -3 x_max <- 3 y_min <- -3 y_max <- 3 x <- seq(-3, 3, by = 0.1) y <- seq(-3, 3, by = 0.1) z <- matrix(nrow=length(x), ncol=length(y)) for(i in 1:length(x)){ for(j in 1:length(y)){ z[i,j] <- 2*x[i]^2 - y[j]^2 } } contour(x,y,z) library(mvtnorm) min <- -3 max <- 3 var_x <- 1.5...
package com.interview.java8.flatmap; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.concurrent.ConcurrentHashMap; class Employee { private String name; private int age; public Employee(String name, int age) { this.name = name; thi...
--- title: Recommended RBAC Configuration --- This page summarises the contents of the [securing access to the dashboard](securing-access-to-the-dashboard.mdx), [service account permissions](service-account-permissions.mdx) and [user permissions](user-permissions.mdx). They should be read in addition to this page in o...
#lex import ply.lex as lex from plygenCreator import action tokens=('NUMBER','ID','DEF','TAB','RETURN','IF','ELIF','ELSE','PRINT','FOR','IN','RANGE','GREATERTHAN','MINUS','SPACE','COMMENT','AND','OR','NOT') literals=['+','(',')',':',',','<','/','*','=','!','\'','"','%'] lineCount=0 def t_newline(t): r'\n+' global l...
import React from "react"; import { Accordion, AccordionItem, AccordionItemButton, AccordionItemHeading, AccordionItemPanel, } from "react-accessible-accordion" import "./forecast.css" const WEEK_DAYS = ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'] const Forecast = ({da...
import { matchers } from 'jest-json-schema'; import request from 'supertest'; import express from 'express'; import {itemsRouter} from '../src/items/items.router'; expect.extend(matchers); const app = express(); app.use("/items", itemsRouter); it('responds to /:id', async () => { const schema = { properties: ...
import React, { useState } from "react"; import styled from "styled-components"; import PropTypes from "prop-types"; import { useNavigate } from "react-router-dom"; /* Components */ import Course from "../../components/Course"; import { FlexContainer } from "../../components/FlexContainer"; import Review from "../../c...
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { RouterModule, Routes } from '@angular/router'; import { HomeComponent } from './pages/home/home.component'; import { AboutComponent } from './pages/about/about.component'; import { ContactComponent } from './pages/contact...
Début d'année 2021, mon objectif est clair : **Il me faut constituer un portoflio** Celui-ci se déploiera autour des différentes prestations que je propose : * **Maîtrise de la totalité des étapes du développement de projets web**, * Conception : réception du besoin, maquettage, architecture logicielle, * **Déploiemen...
export { }; const icons = document.querySelectorAll<HTMLButtonElement>("[data-icon]") icons.forEach((icon) => { const svg = icon.querySelector("[data-svg]")?.innerHTML const copy = icon.querySelector("[data-copy]") as HTMLButtonElement const download = icon.querySelector("[data-download]") as HTMLButtonEle...
import { BrowserRouter, Routes, Route } from 'react-router-dom' // page components import Navbar from './components/Navbar' import Home from './pages/home/Home' import Create from './pages/create/Create' import Search from './pages/search/Search' import Recipe from './pages/recipe/Recipe' // styles import './App.css'...
import { AnimatePresence, motion, useAnimation, Variants } from "framer-motion"; import { useEffect } from "react"; import { useInView } from "react-intersection-observer"; // const boxVariant: Variants = { // visible: { opacity: 1, scale: 1, transition: { duration: 0.5 } }, // hidden: { opacity: 0, scale: 0 }, //...
from entity.IAdminService import IAdminService from entity.Admin import Admin from util.DBConnection import DBConnection from exception.AdminNotFoundException import AdminNotFoundException from exception.InvalidInputException import InvalidInputException class AdminService(DBConnection, IAdminService): def __init...
--- title: js设计模式 date: 2023-11-01 15:53:12 description: 前端js总计23种设计模式简析 tags: - javascript - 设计模式 categories: - javascript - 设计模式 --- <h2>设计模式三大分类</h2> <ol> <li>创建型模式:用于描述对象的创建方式,包括单例模式、工厂模式、建造者模式、原型模式等</li> <li>结构型模式:用于描述对象之间的组合方式,包括适配器模式、桥接模式、装饰者模式、外观模式、享元模式、组合模式等。</li> <li>行为型模式:用于描述对象之间的交互方式,包括观察者模式、命令...
#include <iostream> #include <fstream> #include <string> #include <sstream> #include <vector> #include <map> #include <bitset> using namespace std; typedef enum { Undefined = 0, PipeLoop = 1, ZoneA = 2, ZoneB = 3, } ETileType; struct position { int x; int y; }; struct entity { position currentPosition...