text
stringlengths
184
4.48M
<!DOCTYPE html> <html lang="es"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="author" content="Nicolas Huanca"> <meta name="description" content="Pagina Web ECommerce"> <meta name="keywords" content="HTML, CSS, Bootstrap, Javascript, ECommerce"> ...
''' Neste código é feita a aproximação dos ângulos do pêndulo duplo com o método RK3, que é comparada com a interpolação por splines cubicas de pontos selecionados dessa aproximação. ''' import numpy as np import math import matplotlib.pyplot as plt from tabulate import tabulate import cubic_splines as sp # Altere ...
import React, { useState } from "react"; import { OpenAI } from "openai"; import rawPrompt from "../src/prompt.txt"; function Chatbot() { const [input, setInput] = useState(""); const [messages, setMessages] = useState([]); const apiKey = import.meta.env.VITE_API_KEY; const openai = new OpenAI({ apiKey: apiKey...
---@class Opts ---@field name string: a string with the command name ---@field fargs table: containing the command arguments split by whitespace (see |<f-args>|) ---@field bang boolean: `true` if the command was executed with a `!` modifier (see |<bang>|) ---@field line1 number: starting line number of the command rang...
package se.sundsvall.precheck.api.model; import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanConstructor; import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanEquals; import static com.google.code.beanmatchers.BeanMatchers.hasValidBeanHashCode; import static com.google.code.beanmatchers....
# from abc import ABC, abstractmethod # class Person(ABC): # def __init__(self,name,age,gender): # self.name = name # self.age = age # self.gender = gender # def display_info(self): # return f"Name: {self.name} \nAge: {self.age} \nGender: {self.gender}" # @abstractmetho...
<?php /** * PHPMovieDB is a movie database program. * * PHP version 7.4 and 8.1 * * LICENSE: This source file is subject to version 3.01 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_01.txt. If you did not receive a copy of * the PHP Li...
// SelectorForm.js import React, { useState, useLayoutEffect, useEffect } from 'react'; import InputElement from './InputElement'; import ListSelectElement from './ListSelectElement'; import styles from './InputElementContainer.module.css'; function InputElementContainer ({ containerName, containerData, containerid, ...
import {createSlice, current, PayloadAction} from '@reduxjs/toolkit'; import {stat} from 'fs'; import {JokeCard} from '../components/Jokes/Joke/Joke'; import {Filter} from '../models/filter'; import {Joke} from '../models/joke'; import {ServerResponse} from '../models/serverResponse'; import {RootState} from './store';...
<template> <div> <van-nav-bar :left-text="$lang['返回']" left-arrow @click-left="onClickLeft" /> <div class="titleWrapper"> <h1 class="title">{{ $lang["高级商城"] }}</h1> <h2 class="methods" v-if="isShow">{{ $lang["登录"] }}</h2> <h2 class="methods" v-if="!isShow">{{ $lang["注册"] }}</h2> </div> ...
<?php namespace App\Integrations\Nafath; use App\Integrations\BaseIntegration; use App\Integrations\CustomResponseDto; class NafathIntegration extends BaseIntegration { public function __construct($accessToken = null) { $baseApiUrl = config('integrations.nafath.base_url'); $headers = [ ...
import { Test, TestingModule } from '@nestjs/testing'; import { INestApplication } from '@nestjs/common'; import * as request from 'supertest'; import { AppModule } from '../../src/app.module'; import { getRepositoryToken } from '@nestjs/typeorm'; import { ExtensionInstallationWebhook } from '@/modules/extension-instal...
import { compare, hash } from "bcryptjs"; import { sign, verify } from "jsonwebtoken"; import User from "../models/user_model"; import http_response from "../helpers/http_response"; const sign_up = async (body) => { try { let { name, email, password } = body; if (password.length <= 4) return http_respo...
import styles from "./alertbox.module.css"; import PropTypes from "prop-types"; import { useTranslation } from "react-i18next"; // import { useNavigate } from "react-router-dom"; import LoadingIndicator from "../../../components/doctors-div/components/loading-indicator/LoadingIndicator"; const AlertBox = (props) => { ...
import {Injectable} from "@angular/core"; import {HttpClient, HttpHeaders} from "@angular/common/http"; import {Observable} from "rxjs"; import {global} from "./global"; @Injectable() export class UserService{ public url: string; public identity; public token; constructor( public _http: HttpClient ) { ...
package kz.zhelezyaka.core; /* * Инвертирование строки при помощи рекурсии. * * Если длина входной строки input меньше или равна 1, * возвращается исходная строка. * Это базовый случай, который завершает рекурсию. * * Если длина входной строки больше 1, * метод вызывает сам себя с аргументом input.substring(1), * что о...
from model.Student import Student from model.Certification import Certification from validate.StudentValidate import StudentValidate class StudentC(Student): # constructor def __init__(self, citizenIdentity: int, candidateNumber: int, name: str, address: str, literatureScore: float, historyScor...
package day23_exceptions; import java.util.Scanner; public class C02Exceptions02 { /* Exceptions are strict rules inJava. They help developers not to do critical mistakes. for example you want to do division operation. you are not so good in Math. You think you can divide any two numbers. Indeed a...
#pragma once #include <algorithm> #include <cstdlib> #include <iostream> #include <limits> #include <list> #include <string> #include <vector> #include <Eigen/Dense> #include "Directory.hpp" #include "Entry.hpp" class Viewer_conic { public: // list of entries std::list<Entry> entries; bool m_show_axis = true;...
import React, { useState } from "react"; import { Card, CardContent, Box, Avatar, Typography, Divider, CardActions, Button, Badge, FormControlLabel, Switch, CardHeader, Fab, Collapse, IconButton, } from "@mui/material"; import { red } from "@mui/material/colors"; import FavoriteIcon from ...
import asyncWrapper from "../../utilities/async-wrapper"; import AWS from "../../library/aws"; import DataModel from "../../helpers/DataModel"; import { CodeExecution } from "../../models/codeExecution.model"; import { TestCases } from "../../models/testcases.model"; import { DB_COLLECTIONS, DB_CONSTANTS } from "../../...
interface User { age: number; name: string; } // 변수에 인터페이스 활용 var seho: User = { age: 10, name: "세호", }; // 함수에 인터페이스 활용 function getUser(user: User) { console.log(user); } // const capt = { // name: "캡틴", // age: 100, // }; // getUser(capt); // 함수의 스펙(구조)에 인터페이스 활용 interface sumFunc { (a: number, b:...
import { useState } from "react"; import reactLogo from "../assets/react.svg"; import viteLogo from "/vite.svg"; import { useParams } from "react-router-dom"; export default function About() { const [count, setCount] = useState(0); const { id } = useParams(); // const 변수명 return ( <> <div> <a ...
from django.shortcuts import render, redirect from django.core.mail import EmailMessage, get_connection from django.conf import settings from django.contrib import messages def send_email(request): """ Send email function connects the hosts details from settings.py and then set the details for the email t...
import { ChangeEvent, useState } from 'react'; export const useForm = <T extends object>(initialState: T) => { const [values, setValues] = useState(initialState); const handleInputChange = ({ target }: ChangeEvent<HTMLInputElement>) => { setValues({ ...values, [target.name]: target.value...
import React, { Component } from "react"; import { NavBar, List, InputItem, Grid, Icon } from "antd-mobile"; import { connect } from "react-redux"; import { sendMsg, readMsg } from "../../redux/actions"; // 进出场动画 import QueueAnim from "rc-queue-anim"; const Item = List.Item; class Chat extends Component { state = { ...
#include "GamePlatform.h" #include <iostream> void GamePlatform::addGame(const Game& game) { if (gamesAmount >= MAX_GAMES_AMOUNT) { std::cout << "Platform is full!" << std::endl; return; } games[++gamesAmount] = game; } void GamePlatform::removeGame(size_t index) { if (index >= gamesAmount) { std::cout <...
import { CommonModule } from '@angular/common'; import { Component } from '@angular/core'; import { FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms'; import { Celular } from '../../models/celular'; import { CelularService } from '../../services/celular.service'; @Component({...
### -------------------------------- ### ### --- Intercalibration Fish DB --- ### ### -------------------------------- ### # ------------------------------- # date written: 22.04.22 # date last modified: 09.06.22 # Project: Evaluating European Broad River Types for Diatoms, Fish and Macrophytes # Purpose: Clean inter...
#include "aileswhale.h" /** * reallocate - Doubles the space allocated for a pointer. * @pointer: Pointer to the original array. * @sizes: Pointer to the number of elements in the original array. * * Return: Pointer to the newly reallocated array. */ char **reallocate(char **pointer, size_t *sizes) { char **ne...
import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'satori_container.dart'; class SatoriCard extends ConsumerWidget { const SatoriCard({ super.key, required this.body, this.header, this.footer, this.onTap, this.cursor = MouseCursor.defer, ...
import React, { useState } from "react"; import Form from "./Form"; import Footer from "./Footer"; import Menu from "./Menu"; import Header from "./Header"; const animeData = [ { id: 1, name: "Naruto", genres: ["action", "adventure", "comedy", "drama", "shounen"], photoName: "poster/naruto.jpg", ...
package com.educacionit.ejercicio02.exception; public class DBManagerException extends Exception { /* * Error 1: conectar a la db * Error 2: buscar provincias por pais * Error 3: obtener paises * Error 4: insertar provincia * Error 5: modificar provincia * Error 6: eliminar provincia * Error 7: cerrar...
import React, {useEffect, useState} from 'react'; import {Button, Card,Form, Input, Layout, Radio,message} from "antd"; import { useNavigate } from "react-router-dom"; import axios from "axios"; import './index.css' const {Header} = Layout function Index(props) { const navgiate = useNavigate() const [form] = Form.u...
import { createContext, FC, PropsWithChildren, useContext, useEffect, useState, } from 'react'; import { createDefaultState, createWeb3State, loadContract, Web3State, } from './utils'; import { ethers } from 'ethers'; import { MetaMaskInpageProvider } from '@metamask/providers'; import { NftComple...
import React, { useState } from 'react'; import styled from 'styled-components'; import Categoria from './Categoria'; import Cliente from './Cliente'; import EntradaProduto from './EntradaProduto'; import Fabricante from './Fabricante'; import Fornecedor from './Fornecedor'; import Produto from './Produto'; import Ven...
import {DomCustomLib} from "./DomCustomLib"; export class Listener { constructor(private _rootElemInstance: DomCustomLib, private listeners: (keyof HTMLElementEventMap)[]) { if (!_rootElemInstance) { throw new Error('no root provided for dom listener!') } } addEventListeners() ...
# -*- coding: utf-8 -*- """Setup tests for this package.""" from collective.announcement.testing import COLLECTIVE_ANNOUNCEMENT_INTEGRATION_TESTING # noqa from plone import api import unittest class TestSetup(unittest.TestCase): """Test that collective.announcement is properly installed.""" layer = COLLECT...
import {TrashIcon} from '@heroicons/react/24/outline' import {MinusCircleIcon, ShoppingCartIcon} from '@heroicons/react/24/solid' import { ActionIcon, Anchor, Button, Input, Modal, Select, Textarea, } from '@mantine/core' import {cleanNotifications, showNotification} from '@mantine/notifications' import {OrderTy...
import { AppSyncClient, type AppSyncClientConfig, type EvaluateCodeCommand, type EvaluateCodeCommandOutput, } from '@aws-sdk/client-appsync'; // limiting to scope of commands currently used in this tooling type SupportedCommand = EvaluateCodeCommand; type SupportedOutput = EvaluateCodeCommandOutput; const runtime...
import Link from 'next/link' import React, { useEffect, useState } from 'react' import { GLOBAL_URL, getAlumniProfiles, searchAlumniByParameter } from '@/utils/fetch'; import toast from 'react-hot-toast'; function Author() { const searchAlumni = async (value) => { let finalValue = value; setLoading(true); ...
'use client'; import { Product } from '@prisma/client'; import { formatCurrency } from '@/lib/formatters'; import Link from 'next/link'; import { Card, CardContent, CardFooter, CardHeader } from './ui/card'; import { Button } from './ui/button'; type TProductDetailsCardProps = Product; export default function Produc...
package com.example.demo.services; import com.example.demo.entities.User; import io.jsonwebtoken.ExpiredJwtException; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.MalformedJwtException; import io.jsonwebtoken.UnsupportedJwtException; import io.jsonwebtoken.io.Decoders; import io.jsonwebtoken.security.Keys; impo...
import { Container } from "react-bootstrap"; import { useSelector, useDispatch } from "react-redux"; import { removeTodoAction, completeTodoTask, } from "../../redux/todo/todo.actions"; import "./TodoShow.component.scss"; const TodoShow = () => { const todo = useSelector((state) => state.todo); const di...
print("hello world!") # this command is going to display something on our screen # print here is a function- it carries out some task # need ("") this for print to read the command # ctrl+ enter is used to run the code or that specific line, select the whole command if it is more than a line ">" this greater than sym...
import React, { ComponentProps, useState } from 'react' import { TextInputProps } from 'react-native' import { Container, IconContainer, InputText } from './styles' import { Feather } from '@expo/vector-icons' import { useTheme } from 'styled-components' interface Props extends TextInputProps { iconName: ComponentP...
#ifndef COMOVERIP_TCP_SERVER_H #define COMOVERIP_TCP_SERVER_H #include <i_source.h> #include <common/data.h> #include <asio.hpp> namespace comoverip { /// @brief Tcp сервер class TcpServer : public ISource, public Actor< TcpServer > { public: struct Args: public ISource::Args { asio::ip...
import 'package:flutter/material.dart'; import 'package:project_x/utils/app_text_style.dart'; class AppFeedback { final String text; final Color color; AppFeedback({ required this.text, required this.color, }); void showSnackbar(BuildContext context) { ScaffoldMessenger.of(context).removeCurren...
import { useEffect, useState } from 'react'; import './App.css'; import Contracts from './components/Contracts/Contracts'; import '@fortawesome/fontawesome-free/css/all.min.css'; function App() { const [forecasts, setForecasts] = useState(); useEffect(() => { populateWeatherData(); }, []); // ...
package com.paj.project.bettingapp.jpa; import com.paj.project.bettingapp.bet.model.Ticket; import com.paj.project.bettingapp.util.TicketListCreator; import org.openjdk.jmh.annotations.*; import org.openjdk.jmh.infra.Blackhole; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.RunnerException; import...
import { ApiProperty } from '@nestjs/swagger'; import { IsNotEmpty, IsPhoneNumber, IsString } from 'class-validator'; export class CreateUserDto { @ApiProperty() @IsString() @IsNotEmpty() name: string; @ApiProperty() @IsString() @IsNotEmpty() @IsPhoneNumber() phone: string; @ApiProperty() @IsSt...
<!DOCTYPE html> <html> <head> <style> /* Modify this section to solve the homework. Uncomment the codes below. */ div p { background-color: yellow; } div > p { background-color: orange; } div ~ p { background-color: blue; } div + p { ...
package leetcode.editor.en; //You are given the root of a binary search tree (BST) and an integer val. // // Find the node in the BST that the node's value equals val and return the //subtree rooted with that node. If such a node does not exist, return null. // // // Example 1: // // //Input: root = [4,2,7,1,3]...
package Tim13.BackendAuth.controller; import Tim13.BackendAuth.util.ExistConnProperties; import org.exist.xmldb.EXistResource; import org.springframework.web.bind.annotation.RestController; import org.xmldb.api.DatabaseManager; import org.xmldb.api.base.Collection; import org.xmldb.api.base.Database; import org.xmldb....
// * Base import { Link } from 'react-router-dom'; import cn from 'classnames'; // * Styles import styles from './Button.module.css'; type TProps = { type?: 'button' | 'submit' | 'reset'; className?: string[]; color?: string; title: string; href?: string; text: string; }; function Button({ href, text, ty...
// // EditViewController.swift // Demo_Firebase_database // // Created by Артем Валерьевич on 06/10/2018. // Copyright © 2018 Артем Валерьевич. All rights reserved. // import UIKit import Firebase protocol EditObject { func editElements(numberZakaze: String?, adress: String?, numberDom: String?, numberPod: St...
<?php declare(strict_types=1); namespace Domain\Date; use Domain\Date\Dto\InputDto; use Domain\Date\Dto\ResultDto; use DateTime; use DateTimeZone; final class DateManager { private const SECONDS_IN_HOUR = 60; public function process( InputDto $inputDto ): ResultDto { $result = new Result...
import {Routes, RouterModule} from '@angular/router'; import { ModuleWithProviders } from '@angular/core'; import { CursoDetalheComponent } from './cursos/curso-detalhe/curso-detalhe.component'; import { CursoNaoEncontradoComponent } from './cursos/curso-nao-encontrado/curso-nao-encontrado.component'; import { Home...
import { useState } from "react"; import GridLayout from "react-grid-layout"; import "react-grid-layout/css/styles.css"; import "react-resizable/css/styles.css"; // eslint-disable-next-line react/prop-types function Card({ children, isSelected, onClick }) { return ( <div className={`border border-gray-400 ...
/* Custom validators to use everywhere. */ // SINGLE FIELD VALIDATORS import { FormGroup, FormControl } from '@angular/forms'; export function emailValidator(control: FormControl): { [key: string]: any } { var emailRegexp = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z...
package tests import ( "testing" "github.com/podocarp/goscript/machine" "github.com/stretchr/testify/require" ) func TestLoopsBasic(t *testing.T) { m := machine.NewMachine() // test loops stmt := ` func (A float64, B float64) { for i := 0; i < B; i++ { A += i } return A } ( 1 , 10) ` res, err := ...
#include <iostream> #include <set> using namespace std; /** * set 풀이 * multiset 이용 - set과 다르게 중복 값이 저장된다. & 정렬 * * set에서 삭제 - erase() * set의 맨 마지막 값(최댓값) 조회 - --ms.end() * set의 맨 앞 값(최솟값) 조회 - ms.begin() */ int main() { ios::sync_with_stdio(false); cin.tie(NULL); int t, k, n; char cmd; c...
import { useEffect, useState } from 'react'; const usePageTitle = (initialTitle: string): [string, (arg: string)=>void] => { const [title, changeTitle] = useState(initialTitle); useEffect(() => { document.title = title; }, [title]); return [title, changeTitle]; }; export default usePageTitle;
"""File Handling.""" from pathlib import Path import pandas as pd class FileHandling: """Handles Files.""" def read_csv_file(self, path_to_file: str) -> pd.DataFrame: """Read csv files. Parameters ---------- path_to_file : str path to file Returns ...
import { inject, Injectable } from '@angular/core'; import { ActivatedRouteSnapshot, RouterStateSnapshot, TitleStrategy, } from '@angular/router'; import { BehaviorSubject, tap } from 'rxjs'; import { Title } from '@angular/platform-browser'; import { LoggerService } from '@sandbox/logging'; @Injectable({ prov...
import { Suspense } from 'react' import { ErrorBoundary } from 'react-error-boundary' import { useQueryErrorResetBoundary } from '@tanstack/react-query' import dynamic from 'next/dynamic' import { StyledStakingDashboard } from './styled' import Image from 'components/Image' import Apr from './Apr' import Fallback from...
package com.rb.anytextwiget.jetpackUI import android.content.Context import android.content.Intent import android.provider.MediaStore import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import androidx.compose.foundation.Image import androidx.compose.foundation.layout.Box import androidx.compos...
import { Component, OnInit } from '@angular/core'; import { Store } from '@ngxs/store'; import { CountriesState, GetCountryCodes, GetCountryById, UpdateCountry } from './countries-state'; import { Country } from './country'; import { Observable } from 'rxjs'; @Component({ selector: 'app-root', templateUrl: './app....
<?php namespace App\Models\Formularios; use Carbon\Carbon; use App\Models\User; use App\Enums\EstadoType; use App\Models\Tipos\Estado; use App\Models\Tipos\TipoMoneda; use App\Models\Tipos\TipoEntidad; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Storage; use App\Models\Formularios\TipoFormu...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:p="http://primefaces.org/ui" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp...
package com.example.java; import jakarta.validation.Valid; import jakarta.validation.constraints.Email; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; import lombok.Data; import lombok.Getter; import org.springframework.http.Re...
# Using XAMPP with MySQL Database and phpMyAdmin ## Database Connection - To access MySQL database using XAMPP: ```bash mysql -u root -h localhost -p ``` - Enter your password when prompted. ## Basic MySQL Commands - Show available databases: ```sql show databases; ``` - Use a specific datab...
import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:test_teknikal_fan/cubit/auth_cubit.dart'; import 'package:test_teknikal_fan/cubit/email_varification_cubit.dart'; import 'package:test_teknikal_fan/screens/email_verification_screen.dart'; import 'package:test_tekni...
// // WorkViewDetails.swift // iosApp // // Created by Sergey Lee on 2022/01/26. // import SwiftUI struct WorkViewDetails: View { @State var adv: Adv @State var service: Service = Service(uid: "", name: "", category: "", city: "", address: "", phone: "", description: "", latitude: "", longitude: "", so...
<!-- myblog/templates/base.html --> <!DOCTYPE html> {% load static %} {% load static tailwind_tags %} <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.m...
<h1 align="center"> <a href="#">Q2 To dos</a> </h1> <p align="center">🚀 To dos</p> <p align="center"> <img src="https://img.shields.io/static/v1?label=react&message=Library&color=blue&style=for-the-badge&logo=react"/> <img src="https://img.shields.io/static/v1?label=expo&message=Run with&color=blue&style=for-t...
#include "main.h" /** * read_textfile - reads a text file and prints it to the standard output * @filename: file to be read * @letters: number of letters to read and print * * Return: the number of letters printed, or 0 if it failed */ ssize_t read_textfile(const char *filename, size_t letters) { int fd; int ...
Modulo bibliotecaImpl implementa Biblioteca{ var posicionLibro: dictLog<idLibro,nat> // nat es la posicion var librosSocios: dictDigital<socio, conjLog<idLibro>> // Acá cuando defino en el dictDigital. Estoy definiendo un conjLog también, o no? Esto me agrega el costo de insertar en un conjLog? var posicion...
from __future__ import annotations from django import forms from django.utils.translation import pgettext_lazy from . import models class MessageCreationForm(forms.ModelForm[models.Message]): class Meta: model = models.Message fields = ("content",) widgets = { "content": form...
"use strict"; let computerScore = document.querySelector(".computer-score"); let playerScore = document.querySelector(".human-score"); let outcome = document.querySelector(".outcome"); let rockBtn = document.querySelector(".rock"); let paperBtn = document.querySelector(".paper"); let scissorsBtn = document.querySelect...
<?php namespace App\Jobs; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Facades\Mail; use App\Mail\DetachedDevice; use App\Models\Customers\Cus...
### 思路 思路整体为先找到每个用户最大月份,然后过滤当前用户的最大月份,查询每个月最近前N月份的数据总和。 方法详情如下: ### 1.查询每个用户的最大月份 sql如下: * ``` SELECT e.Id , MAX(e.Month) AS Month FROM Employee e GROUP BY e.Id ``` 表别名为:e1 ### 2.过滤掉用户的最大月份数,查询用户月份薪水 根据题意需要 ID升序、月份降序,且不能为当前用户最近一个月数据,sql 如下: * ``` SELECT e1.Id,e1.Month,e1.Salary FROM Employee e1 , (SELECT e...
import os # import random import pickle import genomap as gp import genomap.genoNet as gNet import matplotlib.pyplot as plt import numpy as np import pandas as pd # Please install pandas and matplotlib before you run this example import scipy import seaborn as sns # import matplotlib import torch import torch.nn as n...
package api import ( "go-assignment-bootcamp/internal/app/http/requests" "go-assignment-bootcamp/internal/app/presenters" "github.com/gin-gonic/gin" "net/http" "strconv" ) type OrderUpdateController struct { useCase OrderUpdateUseCaseInterface presenter OrderUpdatePresenterInterface } func NewOrderUpdateCon...
import { test as setup } from "@playwright/test"; import { chromium } from "playwright-extra"; import stealth from "puppeteer-extra-plugin-stealth"; import dotenv from "dotenv"; dotenv.config(); chromium.use(stealth()); const TESTING_AUTH_EMAIL = process.env.TESTING_AUTH_EMAIL; const TESTING_AUTH_PASSWORD = process.e...
# Lesson 1 - | Irish | English | Phonetic | Sound | | ------| ------- | -------- | ----- | |Bhain mé sult as an lá. | I enjoyed the day. |Mhúscail mé ar a seacht a chlog. | I awoke at seven o’clock. |D’ith mé banana agus úll.| I ate a banana and an apple. |D’ol mé gloine uisce. | I drank a glass of water. |Shiúil mé ...
import { GetServerSideProps, InferGetServerSidePropsType, NextPage } from 'next'; import { useSession } from 'next-auth/react'; import Head from 'next/head'; import { BiError, BiImages } from 'react-icons/bi'; import { BsCodeSlash } from 'react-icons/bs'; import { MdOutlineVideoLibrary } from 'react-icons/md'; i...
/* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template */ package main; /** * * @author phatbui */ // Employee Class (subclass of Person) class Employee extends Person { ...
import React from "react"; import { Pressable, StyleSheet, Text, View } from "react-native"; const CategoryGridTile = ({ title, color, onPress }) => { return ( <View style={[styles.gridItem, { backgroundColor: color }]}> <Pressable style={styles.button} android_ripple={{ color: "#ccc" }} ...
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "UObject/NoExportTypes.h" #include "DataPlayer.generated.h" class AMyPlayer; class UItemData; class UItemBehavior; USTRUCT(BlueprintType) struct FInventorySlot { GENERATED_BODY() public: U...
import React from 'react'; import { ConversationMessages } from '../models/ConversationMessages'; import { useConversation } from '../hooks/useConversation'; import TimeAgo from 'react-timeago'; interface Props { own?: boolean; conversation?: ConversationMessages; } export const ChatMessage: React.FC<Props> = ({ ...
import { Logger, ValidationPipe } from "@nestjs/common"; import { ConfigService } from "@nestjs/config"; import { NestFactory } from "@nestjs/core"; import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger"; import { Config } from "config/configuration"; import helmet from "helmet"; import { AppModule } from "....
import { toSpaceCase } from './format' test('simple test toSpaceCase', () => { const cases: Array<{ input: string; expect: string }> = [ { input: 'cameCase', expect: 'came Case', }, { input: 'Capitalize the first letter', expect: 'Capitalize the first letter', }, { ...
import React from 'react' import { BarItem } from '../models' import styles from '../styles/ProgressBar.module.scss' interface Props { items: BarItem[] width: number height: number } const ProgressBar: React.FC<Props> = ({ items, width, height }) => { const total = items.reduce((acc, cur) => acc + cur...
<template> <!-- header --> <header class="common-header"> <div class="common-header__container"> <button type="button" class="btn-mobile-navigation" :class="{ nav_on: navigationOn }" @click="toggleNavigation" aria-label="헤더 메뉴 버튼(모바일 기기 전용)"><i></i><i></i><i></i></button> <h1 class="common-header__l...
<template> <md-card md-with-hover> <md-card-header> <md-card-header-text> <div class="md-title">{{item.name}}</div> <div class="md-subhead">{{item.owner.login}}</div> <p> <md-icon>star</md-icon> <strong>{{item.stargazers_count}}</strong> </p> <p> ...
package sia.tacocloud.model; import jakarta.persistence.*; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; import lombok.Data; import org.springframework.data.rest.core.annotation.RestResource; import java.util.Date; import java.util.List; @Data @Entity @RestResource(rel = ...
import React, { useContext, useState } from "react"; import { isInCart } from "../../helpers"; import { CartContext } from "../../context/cart-context"; import { withRouter } from "react-router-dom"; import "./featured-product.styles.scss"; import AddedToBagMessage from "../single-product/Popupmessage"; const Featured...
/* * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com * The software in this package is published under the terms of the CPAL v1.0 * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ package org.mule.module.apikit; import static com.jayway.r...
# -*- coding: utf-8 -*- """ Created on Thu Jan 4 15:21:29 2024 @author: Stefan Bernegger """ import numpy as np import matplotlib.pyplot as plt plt.rcParams['figure.dpi'] = 600 plt.rcParams['savefig.dpi'] = 600 from GIRF_models import get_patterns from GIRF_plot import save_plot # ********************************...