text
stringlengths
184
4.48M
--- id: Web MVC 核心 title: Web MVC 核心 cssclasses: - wide-page --- ## SpringMvc 架构 ### 基础架构-Servlet ![Servlet架构](./image/Mvc/Servlet架构.webp) Servlet 有以下的特点: 1. 请求模式: 请求/响应式(Request/Response) 2. 会屏蔽网络通信的细节,无需关注底层请求的处理 3. 包含完整的生命周期 Servlet 有以下的职责: 1. 处理请求 2. 资源管理 (连接数据库,处理本地资源...) 3. 视图的渲染 ### 核心架构-前端控制器 > Spring...
from django.shortcuts import render from .form import ImageForm from .models import Images import pickle from tensorflow.keras.models import load_model from tensorflow.keras.preprocessing import image import numpy as np import requests from bs4 import BeautifulSoup import re # Create your views here. # Load the list ...
import { useForm } from "@inertiajs/react"; import { useEffect, useState } from "react"; export default function CreateContact() { const { data, setData, post, processing, errors } = useForm({ name: "", type: "", description: "", }); const [isNotify, setIsNotify] = useState(false); const submit = ...
<?php /** * @link http://github.com/hbhe/zantoto * @copyright Copyright (c) 2020 Zantoto * @license [New BSD License](http://www.opensource.org/licenses/bsd-license.php) */ namespace backend\controllers; use common\models\Product; use common\models\Sku; use common\models\SkuSearch; use Yii; use yii\filters\Ver...
Absolutely, in programming, you don't always need to implement data structures from scratch to use them. --> You don't always need to implement data structures from scratch to use them --> Use third-party libraries for DSA, or built-in or library implementations of common data structures and focus on solving the s...
import { useComment } from "../store/CommentContext"; import DeleteButton from "../ui/DeleteButton"; import EditButton from "../ui/EditButton"; import ReplyButton from "../ui/ReplyButton"; import { timeAgo } from "../utils/helpers"; /* eslint-disable react/prop-types */ const User = ({ user, createdAt, onReply, onEdit...
package com.example.teammanagement.controller; import com.example.teammanagement.model.Task; import com.example.teammanagement.model.TaskStatus; import com.example.teammanagement.model.dtos.AddTaskDto; import com.example.teammanagement.model.dtos.TaskDto; import com.example.teammanagement.model.dtos.UpdateTaskDto; imp...
TITLE Segment Example (main module, Seg2.asm) ; Startup module, which calls a procedure located in an ; external module. Build this program using the make16.bat ; file located in the same directory. ; Last update: 06/01/2006 EXTRN var2:WORD ;subroutine_1 PROTO ; replaced by the following line: EXTERN sub...
import { chunk } from "lodash"; import moment from "moment"; import { DayDate } from "../types"; import { NUM_DAYS_IN_WEEK } from "./constants"; const PADDING_DAY = { year: -1, month: -1, day: -1, }; /** * * @param year * @returns */ export const getWeekChunksForYearGrid = (year: number): DayDate[][] => { ...
import React, { useState } from "react"; import axios from "axios"; // import uploader from "./../../images/uploader.png"; import swal from "sweetalert"; import "./Login.css"; import { Link } from "react-router-dom"; import { useNavigate } from "react-router-dom"; import Cookies from "universal-cookie"; import { useDis...
import { Body, Controller, Get, Param, Post, Put, Query, Res, UploadedFile, UseGuards, UseInterceptors, UsePipes, ValidationPipe, } from '@nestjs/common'; import { FaceSwapperService } from './face-swapper.service'; import { FileInterceptor } from '@nestjs/platform-express'; import { MinioServ...
import React, { useEffect } from 'react'; import { useState } from 'react'; import { storage } from '../../model/Storage'; import Days from './components/Days/Days'; import ThisDay from './components/ThisDay/ThisDay'; import ThisDayInfo from './components/ThisDayInfo/ThisDayInfo'; import s from './Home.module.scss'; im...
import {Component, OnDestroy} from '@angular/core'; import {combineLatest, Subscription} from "rxjs"; import {AuthService} from "../../core/service/auth/auth.service"; import {SnackbarService} from "../../core/service/snackbar.service"; import {StorageService} from "../../core/service/storage.service"; import {Router} ...
import 'package:flutter/material.dart'; import 'package:feather_icons/feather_icons.dart'; class BMI2Screen extends StatefulWidget { const BMI2Screen({Key? key}) : super(key: key); @override _BMI2ScreenState createState() => _BMI2ScreenState(); } class _BMI2ScreenState extends State<BMI2Screen> { String sel...
import React, { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; import { serverHost } from '@/config'; import Spinner from '@components/Spinner'; import styles from './InventoryDetails.module.css'; import useFetch from '../../hooks/useFetch'; import useToken from '../../hooks/useToken'; functio...
<template> <form @submit="checkData" class="login__form"> <input-data @passData="updateData" /> <div v-if="isErrorLogin" class="login__input__error">Введите логин.</div> <div v-if="isErrorPass" class="login__input__error">Введите пароль.</div> <login-checkbox @passData="updateFlagP...
package hust.soict.dsai.aims.media; import java.time.LocalDate; import java.util.Comparator; public abstract class Media { private String title; private String category; private float cost; private int id; private static int nbMedia; public static final Comparator<Media> COMPARE_BY_TITLE_COST = new MediaCompar...
import React, { Component } from 'react'; import { View, StyleSheet, Text, FlatList,TouchableOpacity } from 'react-native'; import { ListItem } from 'react-native-elements' import firebase from 'firebase'; import db from '../Config' import MyHeader from '../components/MyHeader'; import {SafeAreaProvider} from "react-na...
"use client"; import React, { useEffect, useState, useTransition } from "react"; import { DrawerProfile, DrawerClose, DrawerContent, DrawerFooter, DrawerHeader, DrawerTrigger, } from "../ui/drawer-profile"; import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessa...
import { Button, Box } from '@mui/material' import { useState } from 'react'; import './App.css'; import SudokuGrid from './components/SudokuGrid'; import { emptySudoku, stringToSudoku } from './utils/transform'; import { solve } from './utils/solve'; import sudokuLevels from "./utils/sudoku-db"; import { pt, Sudoku, ...
// Copyright 2023 Dimitrij Drus <dadrus@gmx.de> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable l...
Sure, here's a basic documentation for the scientific calculator you've created: ## Scientific Calculator Documentation The Scientific Calculator is a web-based tool designed to perform various mathematical calculations, including basic arithmetic operations, trigonometric functions, exponentiation, square roots, log...
import numpy as np import pytest from pandas._libs import index as libindex import pandas as pd from pandas import Categorical import pandas._testing as tm from pandas.core.indexes.api import CategoricalIndex, Index from ..common import Base class TestCategoricalIndex(Base): _holder = CategoricalIndex @py...
/* Compiled by Kathrin Meyer, University of Fribourg, July 2006 */ #include <stdio.h> #include <ctype.h> #include <string.h> #include <stdlib.h> #define MAXWORD 100 typedef struct tnode *Treeptr; typedef struct tnode { /* the tree node --- kr146 */ char *word; /* points to the next */ int count; /*...
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ /* Sonic Visualiser An audio file viewer and annotation editor. Centre for Digital Music, Queen Mary, University of London. This file copyright 2006 Chris Cannam. This program is free software; you can redistribute ...
package everyone.delivery.demo.common.exception.error; import everyone.delivery.demo.common.response.ResponseError; import lombok.AllArgsConstructor; import lombok.Getter; import org.springframework.http.HttpStatus; import java.util.EnumSet; /*** * 미리 정의해 둔 에러들 */ @AllArgsConstructor public enum CommonError implem...
Feature: Register to Alta-shop Account As an user I want to register to access alta shop feature So that I can login to the website Scenario: Register with valid data Given I am on the alta-shop login page When I go to the alta-shop register page And I input correct fullname fo...
import React from 'react'; import PropTypes from 'prop-types'; import {connect} from 'react-redux'; import DashboardView from './DashboardView'; import _ from 'lodash'; import util from '../../util'; import {removePassword} from '../../actions/UserActions'; import {Platform} from 'react-native'; class DashboardContro...
// 初始化关注页面、好 P 友页面、粉丝页面 import { InitPageBase } from '../crawl/InitPageBase' import { Colors } from '../Colors' import { lang } from '../Lang' import { options } from '../setting/Options' import { API } from '../API' import { store } from '../store/Store' import { log } from '../Log' import { Tools } from '../Tools' im...
import {Component, OnInit} from '@angular/core'; import {AuthService} from "../shared/services/auth.service"; import {Router} from "@angular/router"; import {MessageService} from "../shared/services/message.service"; import {Message} from "../shared/types/message.type"; @Component({ selector: 'app-nav', templateUr...
import React, { useEffect } from "react"; import { BrowserRouter as Routing, Route, Routes, redirect, useNavigate, Navigate, } from "react-router-dom"; import App from "./App"; import Blog from "./pages/Blog"; import Register from "./pages/Register"; import Login from "./pages/Login"; import Friends from "....
#pragma once #include <memory> /* As with any singleton object destruction cannot be completely guarded. As its currently instantiated it is possible to delete the underlying object from the shared_ptrs. But as they are smart pointers an explicit delete should never be required, this would just help protect agai...
import { Modal } from "antd"; import ElectroForm from "../../../components/form/ElectroForm"; import { FieldValues } from "react-hook-form"; import ElectroInput from "../../../components/form/ElectroInput"; import ElectroButton from "../../../components/form/ElectroButton"; import { productsApi } from "../../../redux/...
import os import numpy as np from sklearn.metrics import r2_score from sklearn.metrics import mean_squared_error from sklearn.metrics import mean_absolute_error from sklearn.metrics import mean_absolute_percentage_error from sklearn.metrics import mean_squared_log_error def MAE(y_true, y_pred): """ Mean Absolute E...
package LectureLambda; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author hooman */ import java.util.*; class Program1 { public static void main(String[] arg...
/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille * * ludovic.apvrille AT enst.fr * * This software is a computer program whose purpose is to allow the * edition of TURTLE analysis, design and deployment diagrams, to * allow the generation of RT-LOTOS or Java code from this diagram, * and ...
import { Sun, Moon } from "lucide-react"; import { Theme } from "~/utils/theme-provider"; const iconThemeMap = new Map([ [Theme.LIGHT, Sun], [Theme.DARK, Moon], ]); export interface ThemeToggleIconProps { theme: Theme; checked: boolean; } export const ThemeToggleIcon = ({ theme, checked }: ThemeToggleIconPro...
import * as vscode from 'vscode'; export default class Terminal { private _instance: vscode.Terminal; constructor( name: string, shellPath?: string, shellArgs?: string, location?: vscode.TerminalLocation ) { this._instance = vscode.window.createTerminal({ name, shellPath, s...
import { Link } from 'react-router-dom'; import Header from "../components/Header.jsx"; import {ProductContext} from "../context/ProductContext.jsx"; import {useContext} from "react"; import {CartContext} from "../context/CartContext.jsx"; export default function CatalogPage() { const { products, isLoading, error ...
use rustler::{Atom, Error, NifResult, Binary}; use rustler::types::atom; use rustix::io::Errno; use std::io; // Sucess means it will be encoded as an atom (from static string) // Failure means it will be encoded as a string fn io_error_to_atom(err: io::Error) -> Result<&'static str, String> { if let Some(code) = ...
import { useQuery } from '@tanstack/react-query'; import { format } from 'date-fns'; import React, { useState } from 'react'; import Loading from '../../Shared/Loading/Loading'; import BookingModal from '../BookingModal/BookingModal'; import AppointmentOption from '../AppointmentOptions/AppointmentOption'; import './Av...
import React from 'react'; import { Label } from '../../components/SignUp/Label'; import { Input } from '../../components/SignUp/Input'; import { cn } from '../../utils/cn'; import { IconBrandFacebook, IconBrandGoogle } from '@tabler/icons-react'; import { Form, Link, redirect } from 'react-router-dom'; import { Textar...
package com.example.springapp.controller; import java.util.List; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annot...
<?php /* * $Id: DeleteTask.php 321 2007-12-14 18:00:25Z hans $ * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED....
import tinycolor from 'tinycolor2' import { nanoid } from 'nanoid' import { Template, CanvasElement } from '@/types/canvas' import { ElementNames } from '@/types/elements' // import { PPTElement, PPTLineElement, Slide } from '@/types/slides' interface RotatedElementData { left: number top: number width: number ...
%% This script is derived from simCCEPLoop, except an outer loop varies the amplitude of brown noise (mulitiplicative coefficient) % We simulate 30 reps for each combination of SNR and responsiveness and test CARLA's accuracy % Generate data with responses at 0, 10, 20, 30, 40, 50, 60, 70, 80 percent of all channels % ...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* execution.c :+: :+: :+: ...
<?php /* +--------------------------------------------------------------------+ | CiviCRM version 2.2 | +--------------------------------------------------------------------+ | Copyright CiviCRM LLC (c) 2004-2009 | +--------------------...
package br.com.hmigl.hrzonbank.conta; import static org.junit.jupiter.api.Assertions.*; import br.com.hmigl.hrzonbank.compartilhado.CustomMockMvc; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; import org.springframewor...
import React from "react"; import ReactModal from "react-modal"; import styles from "./Modal.module.scss"; import classNames from "classnames/bind"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faCircleXmark } from "@fortawesome/free-solid-svg-icons"; const cx = classNames.bind(styles); R...
import React, { Fragment, useState } from "react"; import { Link } from "react-router-dom"; import axios from "axios"; const Login = () => { const [formData, setFormData] = useState({ email: "", password: "", }); const { email, password } = formData; const onChange = (e) => setFormData({ ...formD...
"use server"; import axios from "axios"; import { redirect } from "next/navigation"; import { z } from "zod"; import { deleteCookie, getCookie, setCookie } from "../lib/cookie"; export type AccountInitialState = { errors?: { firstName?: string[]; lastName?: string[]; email?: string[]; password?: stri...
const chargingIcon = document.querySelector(".charging_icon"); const batteryLevel = document.querySelector(".battery_level"); const chargingBar = document.querySelector(".charging_bar"); const dischargingTime = document.querySelector(".discharging_time"); const otherInfo = document.querySelector(".other_info"); /...
namespace LazyLoadingVsEagerLoadingEF; public static class Seeder { public static void SeedData(DataContext context) { context.Database.EnsureCreated(); if (context.Authors.Any()) { Console.WriteLine("Database already seeded."); return; } var au...
import BigNumber from "bignumber.js"; import { DRE, increaseTime, waitForTx } from "../helpers/misc-utils"; import { APPROVAL_AMOUNT_LENDING_POOL, MAX_UINT_AMOUNT, oneEther, ONE_DAY } from "../helpers/constants"; import { convertToCurrencyDecimals } from "../helpers/contracts-helpers"; import { makeSuite } from "./hel...
<div class="wrapper"> <form [formGroup]="authForm" (ngSubmit)="onSubmit()"> <mat-form-field *ngIf="!showLoginForm"> <mat-label>Enter your name</mat-label> <input matInput placeholder="John Doe" type="text" formControlName="name"> <mat-error>Name is required</mat-error> ...
function getRandomNumber(min, max) { return Math.floor(Math.random() * (max - min) + min); } const app = Vue.createApp({ data() { return { playerHealth: 100, monsterHealth: 100, currentRound: 0, winner: null, logMessages: [] }; }, methods: { attackMonster() { th...
import React from 'react'; import FetcherMetroEstacions from './FetcherMetroEstacions'; import MetroEstacio from './MetroEstacio'; import './List.css'; import Loader from './Loader'; function MetroEstacioList() { return ( <FetcherMetroEstacions> {({ data, loading, error }) => { if (loading) { ...
package com.siddydevelops.Database; import com.siddydevelops.Database.domain.dto.AuthorDto; import com.siddydevelops.Database.domain.dto.BookDto; import com.siddydevelops.Database.domain.entities.AuthorEntity; import com.siddydevelops.Database.domain.entities.BookEntity; public class TestDataUtil { private TestDa...
Description: Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes. You should try to do it in place. The program should run in O(1) space complexity and O(nodes) time complexity. Example: Given 1->2->3...
import { Link } from "react-router-dom"; import { fadeInAnimation } from "../../util/animation"; import styles from "./Home.module.css"; import { motion } from "framer-motion"; import PageTransitionAnimation from "../PageTransitionAnimation/PageTransitionAnimation"; export const Home = () => { return ( <PageTrans...
package assign06; import java.net.URL; import java.util.Iterator; import java.util.NoSuchElementException; /** * A class that creates and simulates a web browser * @author Aiden Fornalski * @version 2023-10-19 */ public class WebBrowser { private Stack<URL> back; private Stack<URL> forward; private UR...
package strategies.years; import databases.Database; import entities.Child; import entities.Gift; import enums.Category; import java.util.ArrayList; import java.util.Comparator; import java.util.stream.Collectors; public interface YearStrategy { /** * Assigns gifts to all the children in the database. ...
import Foundation import Algorithms struct Day13: Challenge { let input: String func run() -> String { var output = "" // output.append("Part 1: \(part1())\n") output.append("Part 2: \(part2())") return output } enum Signal: Equatable { case int(Int) ...
<?xml version="1.0" encoding="UTF-8"?> <knimeNode icon="./shp-wkt-writer-icon.png" type="Sink" xmlns="http://knime.org/node/v2.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://knime.org/node/v2.10 http://knime.org/node/v2.10.xsd"> <name>Write Geometries into Shap...
/* * Copyright (c) 2022-2022, Arumugam Jeganathan * * 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,...
import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing'; import { ResultComponent } from './result.component'; import { StatNamePipe } from '../pipes/stat-name.pipe'; import { BrowserModule } from '@angular/platform-browser'; import { AppRoutingModule } from '../app-routing.module'; import {...
import { Component, OnInit } from '@angular/core'; import { Pessoa } from '../models/pessoa'; import { PessoaService } from '../services/pessoa.service'; import { Router } from '@angular/router'; @Component({ selector: 'app-pessoa-list', templateUrl: './pessoa-list.component.html', styleUrls: ['./pessoa-list.co...
package requstid import ( "context" "github.com/gin-gonic/gin" "github.com/google/uuid" ) const ( // ContextRequestIDKey context request id for context ContextRequestIDKey = "request_id" // HeaderXRequestIDKey http header request id key HeaderXRequestIDKey = "X-Request-ID" ) // CtxKeyString for context.With...
# School API VI By the end of this assignment you will have a fully serviceable CRUD API with user authentication capabilities that will allow School staff to easily manage students and scholastic equipment. ## All Students Build an API endpoint of `http://127.0.0.1:8000/api/v1/students/` with the name of `all_stude...
<!DOCTYPE html> <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- CSRF Token --> <meta name="csrf-token" content="{{ csrf_token() }}"> <title>{{ config('app.name', 'CCompiler') }}</...
import 'package:app/common/data/my_cart_change_notifier.dart'; import 'package:app/p4/p4_catalog_page.dart'; import 'package:app/p4/p4_my_cart_page.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class P4App extends StatelessWidget { const P4App({super.key}); @override Wi...
import 'package:crypto_portfolio/data/gecko_api/dto/all_coins_list/all_coins_list.dart'; import 'package:crypto_portfolio/data/gecko_api/dto/get_coin_params/get_coin_params.dart'; extension GetCoinId on AllCoinsListDto { String getId(GetCoinParams params) { final List<CoinParamsDto> idsBySymbols = coins.where((e...
<!DOCTYPE html> <html lang="en"> <!-- The intent behind this section is to have a form in which people can drop a review on race they've attended. This page is to include features of the example of Chapter 7. --> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="../css/Homework1.css"> <m...
package com.ousl.tastytakeaway.model; import android.os.Parcel; import android.os.Parcelable; public class Menu implements Parcelable { private String name; private String rating; private float price; private int totalInCart; private String url; public int getTotalInCart() { return to...
import { createContext, useState } from "react"; const RulesContext = createContext(); export const RulesProvider = ({ children }) => { const [rules, setRules] = useState([]); const addRule = (newRule) => { setRules([newRule, ...rules]); }; const removeRule = (id) => { setRules(rules.filter((rule) =>...
<template> <div> <h1> DataCenter </h1> <h2> {{ dataCenter.name }} </h2> <form class="form"> <label for="dcName"> Name: <input ref="dcName" :value="dataCenter.name" type="text" /> </label> <br /> <label for="dcLat"> Breitengrad: <...
import React, { useState } from 'react'; const IconButton = ({ icon, onClick, disabled = false, size = 'm', variant = 'standard' }) => { const [isHovered, setIsHovered] = useState(false); const [isDisabled, setIsDisabled] = useState(disabled); const handleMouseOver = () => { setIsHovered(true); }; const...
import type { Network } from "./Network"; import type { ServicePort } from "./ServicePort"; import type { ServiceVolume } from "./ServiceVolume"; export type ServiceLoggingMap = { none: any; local: any; "json-file": { "max-size"?: string; "max-file"?: string | number; }; syslog: { "syslog-address...
import { useDispatch } from "react-redux"; import { useSelector } from "react-redux"; import { NavLink } from "react-router-dom"; import { logout } from "../reducers/userReducer"; import logo from '../images/logo.jpg'; import { useEffect, useState } from "react"; const Nav = () => { const dispatch = useDispatch();...
import { action, autorun, makeObservable, observable, runInAction, toJS, } from "mobx"; import { KVStore, PrefixKVStore } from "@keplr-wallet/common"; import { simpleFetch } from "@keplr-wallet/simple-fetch"; import Joi from "joi"; interface VersionHistory { version: string; scenes: { title: string...
<script> import API from './../../api' export default { data: () => ({ dialog: false, valid: true, titre: '', description: '', musique: null, musiqueUrl: '', image: null, imageUrl: '', champs: [(v) => !!v || 'Merci de remplir le champs'] }), props: { musique: { type:...
--- title: "[Updated] Drafting Dynamic Denouements for 2024" date: 2024-06-05T12:52:05.604Z updated: 2024-06-06T12:52:05.604Z tags: - ai video - ai youtube categories: - ai - youtube description: "This Article Describes [Updated] Drafting Dynamic Denouements for 2024" excerpt: "This Article Describes [Updated] ...
import { createCipheriv, createDecipheriv, randomBytes } from 'crypto'; import { Injectable, Module } from '@nestjs/common'; import { ConfigModule, ConfigService } from '@nestjs/config'; import { InvalidDataFormatException } from '../exceptions/invalid_data_format.exception'; export interface EncryptConfig { APP_ENC...
<?php namespace App\DataTables; use App\Models\Claim; use Illuminate\Database\Eloquent\Builder as QueryBuilder; use Yajra\DataTables\EloquentDataTable; use Yajra\DataTables\Html\Builder as HtmlBuilder; use Yajra\DataTables\Html\Button; use Yajra\DataTables\Html\Column; use Yajra\DataTables\Html\Editor\Editor; use Yaj...
import PostsService from '../services/posts.service' // const user = JSON.parse(localStorage.getItem('user')) const initialState = { posts: [], post: null } export const posts = { namespaced: true, state: initialState, actions: { getPosts({ commit }) { return PostsService.getPosts().then( ...
import argparse import json import random import logging import sys from typing import Dict, Callable import evaluate import numpy as np import pandas as pd import os from datasets import Dataset, DatasetDict from datasets import load_metric, concatenate_datasets from transformers import AutoModelForSequenceClassifi...
const Discord = require('discord.js') module.exports= { name: 'embed' , run: async(Client, message, args, config) => { if (!message.member.hasPermission('MANAGE_MESSAGES')) return message.channel.send('Vous n\'avez pas la permission d\'utiliser cette commande.') let embedBeforeEdit = new Disco...
import React, { useState, useEffect } from 'react'; import logoImg from '../../assets/logo.svg'; import { Link, useHistory } from 'react-router-dom'; import { FiPower, FiTrash2, FiEdit2 } from 'react-icons/fi'; import api from '../../services/api'; import './styles.css'; export default function Profile() { cons...
import axios from 'axios' import { useState, useContext } from 'react' import { Link, useNavigate } from 'react-router-dom' import { AuthContext } from '../../context/AuthContext' import './login.styles.scss' function Login() { const { dispatch, loading, error } = useContext(AuthContext) const navigate = useNavigat...
/* * Copyright 2016 Game Server Services, Inc. or its affiliates. All Rights * Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://www.apache.org/licenses/LICENSE-2.0 *...
package it.eng.catalog.model; import java.util.List; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.databind...
/* * Copyright 2023 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
package edu.hdu.variant1.utils; import org.springframework.boot.system.ApplicationHome; import java.util.UUID; /** * Singleton FilePathUtil */ public class FilePathUtil { private final String sourcePath = "\\src\\main\\resources\\static\\upload\\"; /** * applicationHome can get the absolute path pre...
import { MailerService } from '@nestjs-modules/mailer'; import { Injectable } from '@nestjs/common'; @Injectable() export class MailService { constructor(private mailerService: MailerService) { } async sendNotification(message: string) { try { await this.mailerService.sendMail({ to: process.en...
"""Тесты для проверки api для registration""" from http import HTTPStatus import pytest from src.entity.api_entity.user.api_func import UserApiFunc from src.entity.api_entity.user.api_func_positive import UserApiFuncPositive from src.entity.db_entity.user.db_func import UserDBFunc from tests.config import faker_ru ...
#![allow(unused)] use std::fmt::Display; fn main() { println!("Hello, world!"); let f: Thunk = Box::new(|| println!("hi")); f(); } type Thunk = Box<dyn Fn() + Send + 'static>; // instead of writing it in every function type Kilometer = i32; fn takes_long_type(f: Thunk) { // --snip-- } fn returns_l...
--- title: "Independent Study" author: Pito Salas date: 2020-12-14 --- ## FAQ **Context - **Faculty members have different approaches to independent studies. These are my guidelines for students doing independent studies under my direction. **How do I sign up?** There is no set procedure. Generally a student who i...
import { defineStore } from "pinia"; import { computed, ref } from "vue"; import { Utils } from "@/utils/response"; import { API_CLASS_ROOM } from "@/services/api"; export const StoreClassRoom = defineStore("StoreClassRoom", () => { // Các hàm khác const { onResponse } = Utils(); const API = API_CLASS_ROOM.API_C...
// // FullscreenImageView.swift // SOZIP // // Created by 하창진 on 2021/08/27. // import SwiftUI import SDWebImageSwiftUI struct FullscreenImageView: View { @Environment(\.presentationMode) var presentationMode @Binding var selectedIndex : Int @State private var offset : CGSize = .zero @Sta...