text
stringlengths
184
4.48M
import { MigrationInterface, QueryRunner, Table, TableForeignKey } from 'typeorm'; export class createSprintTable1620224309237 implements MigrationInterface { public async up(queryRunner: QueryRunner): Promise<void> { await queryRunner.createTable( new Table({ name: 'sprint', columns: [ ...
#include "binary_trees.h" /** * binary_tree_nodes - Function that counts the nodes with at least 1 child in * a binary tree * @tree: pointer to the root node of the tree * Return: 0 if the tree is null or other positive number otherwise */ size_t binary_tree_nodes(const binary_tree_t *tree) { int left, right; ...
import React, { useState } from "react"; import { Redirect, Link } from "react-router-dom"; import axios from "axios"; import { ToastContainer, toast } from "react-toastify"; import { isAuth } from "../auth/helpers"; import Layout from "../core/Layout"; import "react-toastify/dist/ReactToastify.min.css"; const Signup...
import dayjs from "dayjs"; const ProjectList = ({ data }) => { return ( <> <div className="space-y-2 pt-6"> {data?.map((item, index) => ( <ProjectListItem key={index} data={item} show={index == 0} /> ))} </div> </> ); }; const ProjectListItem = ({ data, show }) => { ...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="format-detection" content="telephone=no"/> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=n...
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Week12 Todo List</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <script src="https://code.jquery.com/jquery-3.5.1.js"></script> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootst...
<script setup lang="ts"> import { FormInstance, FormRules, ElNotification } from 'element-plus'; const loading = ref<boolean>(false) const My = ref<UserInfo>({ name: '', email: '', avatar: '', info: '' }) const form = ref<FormInstance>() // 从pinia中获取用户信息 import { useUserStore } from '@/stores' import { edit...
# Glossary ```{warning} Check sources before production. ``` ```{glossary} 8-bit With regard to image formats, 8-bits can describe up to 256 colors (28=256). ``` ## A ```{glossary} absolute positioning Removes the element from the document flow and positions it with respect to the viewport or other containing e...
<?php // File name : example_001.php // Begin : 2008-03-04 // Last Update : 2013-05-14 // // Description : Example 001 for TCPDF class // Default Header and Footer // // Author: Nicola Asuni // // (c) Copyright: // Nicola Asuni // Tecnick.com LTD // www....
import { Request, Response } from 'express'; import { MedicalConditionService } from '../services/MedicalConditionService'; class MedicalConditionController { private medicalConditionService: MedicalConditionService; constructor(medicalConditionService: MedicalConditionService) { this.medicalCondition...
import random from fastapi.encoders import jsonable_encoder from fastapi import FastAPI, HTTPException, Depends, status from fastapi.middleware.cors import CORSMiddleware from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm from sqlalchemy.exc import IntegrityError from sqlalchemy import Colum...
module Simpro # Simpro Notes OBJECT class Note def self.create_quote_notes(emails,notes,quote_id,deal_id) customer_notes = HTTParty.get("https://api.hubapi.com/crm/v4/objects/deals/#{deal_id}/associations/notes?properties",:headers => { 'Content-Type' => 'application/json',"Authorization" => "Bearer #{...
package optdec import ( "encoding/json" "math" "unsafe" "github.com/bytedance/sonic/internal/rt" ) type ptrStrDecoder struct { typ *rt.GoType deref decFunc } // Pointer Value is allocated in the Caller func (d *ptrStrDecoder) FromDom(vp unsafe.Pointer, node Node, ctx *context) error { if node.IsNull() { ...
=== Htaccess by BestWebSoft - WordPress Website Access Control Plugin === Contributors: bestwebsoft Donate link: https://bestwebsoft.com/donate/ Tags: access, allow directive, control access, deny directive, directive block, htaccess, htaccess plugin, website access, protection, lockdown, safety, website security Requ...
#!/usr/bin/env python # # Pretty printing dictionaries # Super useful because you often get a blob of data, and it can be hard # to understand the structure without pretty printing myd = {'key1': 'somevalue', 'a_list': [0,1,2,3,4 ], 'another_key': { 'subkey1': 'subvalue1', 'subkey2': 'subvalue2'}} # If you ju...
import "package:scouting_frontend/models/matches_model.dart"; import "package:scouting_frontend/models/team_model.dart"; import "package:scouting_frontend/views/mobile/hasura_vars.dart"; class MatchesVars implements HasuraVars { MatchesVars({ this.matchesIdToUpdate, this.matchNumber, this.blue0, this...
// 1. // Отримати відповідь з цього ресурсу відповідь, та вивести в документ як в прикладі на занятті // https://jsonplaceholder.typicode.com/users // кожному елементу юзера створити кнопку, при клику на яку в окремий блок виводяться всі пости поточного юзера. // Кожному елементу post створити кнопку, при клику...
import React, { useEffect, useState } from "react"; import DefaultLayout from "../components/DefaultLayout"; import { useDispatch, useSelector } from "react-redux"; import { Button, Modal, Table } from "antd"; import { DeleteOutlined } from '@ant-design/icons' import { PlusCircleOutlined, MinusCircleOutlined } from '@a...
# 引用 # 类和对象 ## 封装 ### 基本知识 **语法:** `class 类名{ 访问权限: 属性 / 行为 };` 结构体 **设置权限** 1. public 公共权限 2. protected 保护权限 3. private 私有权限 #### struct和class区别 struct默认成员**公有** class默认成员**私有** ### 对象初始化和清理 #### 构造函数和析构函数 放在对象里面,必须实现的,程序每次调用完以后,系统会自动调用 **构造函数语法:**`类名(){}` **析构函数语法:** `~类名(){...
/** * @copyright 한국기술교육대학교 컴퓨터공학부 객체지향개발론및실습 * @version 2023년도 2학기 * @author 김상진 * @file CoffeeTest.java * 테스트 프로그램 * 장식패턴을 사용하지 않고 커피 첨가물 추가에 따른 가격 계산 */ public class CoffeeTest { public static void main(String[] args) { Beverage beverage = new HouseBlend(); beverage.addCondiment(new Mocha()); beverage....
import {BotCommandInterface} from '../interfaces/bot.command.interface.js'; import {Telegraf} from 'telegraf'; import {DatabaseClass} from '../db/database.class.js'; import {BotResponse} from '../types/types.js'; import {CustomContext} from '../interfaces/custom.context.js'; export class CheckCommand implements BotCom...
/*************************************************************** * file: UserTotalVisitor.java * author: Colin Trotter * class: CS 356 – Object-Oriented Design and Programming * * assignment: Assignment 2 - Twitter * date last modified: 11/7/2016 * * purpose: Visitor implementation to count the total Users in a UserEle...
<?php namespace App\Library\Pricing; use App\Library\CalculationService; use App\Library\Season\SeasonCalculationService; use App\Library\Traits\WeekDayTypeFinder; class PricingCalculationService implements CalculationService { use WeekDayTypeFinder; /** * @var SeasonCalculationService */ pri...
import 'package:flutter/foundation.dart'; import './cart.dart'; import 'dart:convert'; import 'package:http/http.dart' as http; class OrderItem{ final String id; final double amount; final List<CartItem> products; final DateTime dateTime; OrderItem({ @required this.id, @required this.amount, @re...
Naming conventions in java In java uppercase letters will consider as different and lowercase letters will consider as different that's why we consider Java is a case sensitive programming. As java is a case sensitive we must and should follow naming conventions for following things. ex: classes interfaces varia...
import { Controller, Get, Post, Body, Patch, Param, Delete, } from '@nestjs/common'; import { ProductService } from './product.service'; import { CreateProductDto } from './dto/create-product.dto'; import { UpdateProductDto } from './dto/update-product.dto'; import { ResponseItem } from '../../common/types/Respo...
<template> <div class="container"> <div class="row"> <div class="col-6 my-2"> <h1>My collections</h1> </div> <div class="col-6 d-flex align-items-end justify-content-end my-2"> <router-link class="btn btn-primary" to="/collection"><i class...
#define SLUG_IMK_DIR_ROOT imklib #include "imklib/IMK_index_ref.slug" #include <pthread.h> #define USING_NAMESPACE_IMK_LOG #include SLUG_IMK_HEADER_LOG /* * This toy example shows how Log Level conditions are thread local * Here the main function disables any log that is less important than WARN * So it can not p...
/* eslint-disable react/prop-types */ import { Link} from "react-router-dom"; function Books({ values }) { return ( <section className="w-full grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3" data-aos="zoom-in" > {values.map((el, i) => { return ( <div ...
package main import ( "fmt" "os" "path" "strings" "github.com/maxgio92/pomscan/cmd" "github.com/maxgio92/pomscan/internal/options" log "github.com/rs/zerolog" "github.com/spf13/cobra/doc" ) const ( cmdline = "pomscan" docsDir = "docs" fileTemplate = `--- title: %s --- ` ) var ( filePrepender...
import configparser import json import re def yaml_config_to_dict(yaml_text): config = configparser.ConfigParser() config.read_string(yaml_text) return {section: dict(config.items(section)) for section in config.sections()} def seconds_to_readable_duration(seconds: int): hours = seconds // 3600 ...
import { Component, OnInit } from '@angular/core'; import { MatToolbarModule } from '@angular/material/toolbar'; import { MatButtonModule } from '@angular/material/button'; import { CurrentUrl } from '../card-profile/card-profile.component'; import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'; impor...
<script setup lang="ts"> import TopNav, { type MenuOption } from '@/components/TopNav.vue' import type { IconType } from '@/icons/BaseIcon.vue' import Button from 'primevue/button' import { onMounted, onUnmounted, ref } from 'vue' import { useAuthStore } from '@/stores/auth' import SignedInTopNav from '@/components/Sig...
'use strict'; const { COMPANIES, USERS, LOCATIONS, EQUIPMENT, DIVISIONS, APPRTYPE } = require('../constants/tables.constants'); /** @type {import('sequelize-cli').Migration} */ module.exports = { async up(queryInterface, Sequelize) { await queryInterface.createTable(EQUIPMENT, { id: { type: Sequeliz...
package org.zerock.springex.controller; import lombok.extern.log4j.Log4j2; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.an...
// Copyright (c) 2012-2019, Jeffrey N. Johnson // All rights reserved. // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include "core/array.h" #include "core/exch...
/********************************************************************** Copyright (c) 2002-2020 Daz 3D, Inc. All Rights Reserved. This file is part of the Daz Studio SDK. This file may be used only in accordance with the Daz Studio SDK license provided with the Daz Studio SDK. The contents of this file may not ...
import { BadRequestException, HttpException, HttpStatus, Injectable, NotFoundException } from "@nestjs/common"; import { UsersService } from "./users.service"; import { randomBytes, scrypt as _scrypt } from "crypto"; import { promisify } from "util"; import { JwtService } from "@nestjs/jwt"; import { User } from "./use...
package com.stripe.hcaptcha import android.animation.Animator import android.animation.AnimatorListenerAdapter import android.content.DialogInterface import android.graphics.Color import android.graphics.drawable.ColorDrawable import android.os.BadParcelableException import android.os.Bundle import android.os.Handler ...
<?php /* * This file is part of the the Twig extension Twi18n. * URL: http://github.com/jhogervorst/Twi18n * * This file was part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * (c) 2012 Jonathan Hogervorst * * For the full copyright and license information, please view the LICENSE *...
import React from "react"; import { MemoryRouter, Route, Routes } from "react-router-dom"; import { act, render, screen } from "@testing-library/react"; import { userEvent } from "@testing-library/user-event"; import { StoreProvider } from "easy-peasy"; import { Either, getShortUuidFromRaw } from "@/Core"; import { Q...
<html> <head> <title>Disaster strikes</title> <script src="https://unpkg.com/vue@next"></script> <script src="https://unpkg.com/vuex@4"></script> <script src="https://unpkg.com/vue-router@4"></script> <script src="/socket.io/socket.io.js"></script> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/d...
--- import { getProject } from '../../actions/getProject'; import { getProjects } from '../../actions/getProjects'; import Layout from '../../layouts/Layout.astro'; import SectionContainer from '../../components/SectionContainer.astro'; import Tag from '../../components/Tag.astro'; import { fade } from 'astro:transiti...
"use client"; import { useRouter } from "next/navigation.js"; import { useState } from "react"; export default function TotalSaved({ goal }) { const [addGoal, setAddGoal] = useState(false); const [goalAmount, setGoalAmount] = useState(""); const [error, setError] = useState(""); const router = useRouter(); ...
import { Injectable, NotFoundException } from '@nestjs/common' import { InjectRepository } from '@nestjs/typeorm' import { QueryRunner, Repository } from 'typeorm' import { OrganizationEntity } from './entities/organization.entity' import { UpdateOrganizationDetailsRequestDto } from './dtos/update-organization-details-...
// If the functions with names that start with an uppercase letter will be exported to other packages. If the function name starts with a lowercase letter, it won't be exported to other packages, but you can call this function within the same package. package main import ( "fmt" ) func sum(a, b int) int { return a...
/* (303852) & (307874) Data Structure [Project] -> Mental Health Patient Monitor and Recommendations System */ import java.awt.*; import java.util.LinkedList; import java.util.Queue; import javax.swing.*; import javax.swing.table.DefaultTableModel; //interface for patient operation interface PatientOperations { ...
# [643]. Maximum Average Subarray I **Status**: [Solved ✅] **Difficulty**: [Easy] **Last Attempted**: 2024-12-21 ## Problem Statement You are given an integer array nums consisting of n elements, and an integer k. Find a contiguous subarray whose length is equal to k that has the maximum average value and return ...
This document outlines the architecture and components used to build a highly available, scalable web application on AWS. The project aims to improve the performance of a student records web application during peak admissions periods by leveraging AWS services. overview of the key AWS components used to build a hi...
#include "wifi.h" #if 01 // 定义事件标志组和标志位 EventGroupHandle_t wifi_event_group; #define WIFI_SCAN_DONE_BIT BIT0 // 扫描完成标志 #define WIFI_CONNECTED_BIT BIT1 // 连接成功标志 #define WIFI_FAIL_BIT BIT2 // 连接失败标志 #define DEFAULT_SCAN_LIST_SIZE 8 network_connet_info network_connet; static const char *TAG = "scan_connect"...
import { Injectable } from '@angular/core'; import {HttpClient, HttpHeaders} from '@angular/common/http'; import {Observable} from 'rxjs'; @Injectable({ providedIn: 'root' }) export class FavoriteService { private apiUrl = '/api/favorites'; constructor(private http: HttpClient) {} // Ajouter un favori ad...
// Load project data from projects.json fetch("./projects.json") .then(response => response.json()) .then(data => { const projectContainer = document.querySelector(".container.skillsdelt"); let projectsHTML = ''; data.forEach(project => { const projectHTML = ` ...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* pipex.c :+: :+: :+: ...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link href="https://fonts.go...
#prereq stuff---- #this file assumes the data being read in is finalized i.e. the relevant variables have been defined reqPaq <- c('tidyverse', 'ggthemes', 'sf') installPaq <- reqPaq[!reqPaq %in% installed.packages()] if(length(installPaq) > 0) install.packages(installPaq) library(tidyverse) #because you'd be insane n...
package br.com.lecom.storemanager.loja.dto; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import java.io.Serial; import java.io.Serializable; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; @Data @Builder @AllArgsConstructor @NoArgsConstructor @EqualsAndHashCod...
library(shiny) library(readxl) library(ggplot2) library(plotly) shinyServer(function(input, output) { data<- read_xlsx("BDempresas1.xlsx") output$hist1 <- renderPlot({ reg <- subset(data, data$Region==input$regiones) hist(reg$Utilidad_neta, col = 'darkgray') }) output$disp_puesto_util_neta <- re...
import React, { useState,Fragment,useEffect } from "react"; import {Link, NavLink,useNavigate } from 'react-router-dom' import "./Header.css"; import { BiMenuAltRight, BiUser, BiNote, BiLogOut, BiTab, BiArchive } from "react-icons/bi"; import { getMenuStyles } from "../../utils/common"; import useHeaderColor from "../....
//Estrutura de dados por uma Array const perguntas = [ { pergunta: "Qual é a finalidade do comando 'useState()' em React?", respostas: [ "Exibir uma mensagem de erro", "Gerenciar estado em componentes funcionais", "Criar uma variável global" ], correta: 1 }, { pergunta: "Qual...
Topologias de redes - Centralizada(Vários computadores ligados em apenas um nó); - Distribuida(Vários computadores ligados em diversos nós). Tiers de conexão da Web Tier 1 - É uma rede IP que pode alcançar todas as outras redes pelo meio de interconexão livre; Tier 2 - É a rede que emparelha com algumas redes, mas ...
"use strict"; /** * Copyright (c) 2020-2022 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ Object.defineProperty(exports, "__esModule", { value: true }); exports.SliceRepresentationProvider = exports.SliceRepresentation = exports.Sl...
{% extends 'base.html' %} {% load humanize %} {% block title %} | Features {% endblock title %} {% block content %} <!-- Showcase --> <section id="showcase-inner" class="py-5 text-white"> <div class="container"> <div class="row text-center"> {% comment %} update hard code data {% endcommen...
package com.example.coroutine import android.os.Bundle import android.util.Log import androidx.appcompat.app.AppCompatActivity import androidx.fragment.app.FragmentActivity import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.async import kotlinx.coroutines.delay imp...
<?php namespace App\Filament\Resources\UserResource\Pages; use App\Filament\Imports\UserImporter; use App\Filament\Resources\UserResource; use App\Models\Branch; use App\Models\User; use App\Notifications\WelcomeEmail; use Filament\Actions; use Filament\Facades\Filament; use Filament\Resources\Pages\ListRecords; use ...
<!DOCTYPE html> <html> <head lang="en"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta charset="utf-8"> <title>Single Page App без фреймворков</title> <link href="http://fonts.googleapis.com/css?family=Open+Sans:400" rel="stylesheet"> <link href="css/main.css" rel="stylesheet"> </head> <body> <h...
Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle in the histogram. Example 1: Input: heights = [2,1,5,6,2,3] Output: 10 Explanation: The above is a histogram where width of each bar is 1. The largest rectangle is shown...
import React, { useState, useEffect } from "react"; import LogInNavBar from "../components/LogInNavBar"; import pie from "../assets/pie.png"; import profit from "../assets/profit.png"; import revenue from "../assets/revenue.png"; import data from "../assets/data.png"; function About() { const [message, setMessage] =...
const { Telegraf } = require('telegraf'); const Groq = require('groq-sdk'); const groq = new Groq({ apiKey: process.env.GROQ_API_KEY }); const bot = new Telegraf('7458392614:AAHtMw4vexDqW6bxczx2UIZDR1i1F1CcfN4', { telegram: { webhookReply: true, }, }); let conversationLog = []; bot.use((ctx, next) =>...
package com.example.celldata_android_v2.data import android.content.Context import androidx.room.Room object DatabaseProvider { private var INSTANCE: AppDatabase? = null // Get a singleton instance of the database fun getDatabase(context: Context): AppDatabase { return INSTANCE ?: synchronized(th...
import { NgModule, ErrorHandler } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { RouterModule } from '@angular/router'; import { AngularFireModule } from 'angularfire2'; import { AuthService } from 'shared/services/auth.service'; import { SharedModule } from 'shared/shared.mod...
@model PagedList.IPagedList<LabSem3.Models.Equipment> @using PagedList.Mvc; @using Microsoft.AspNet.Identity @{ ViewBag.Title = "Index"; } <h2 style="font-weight: bold;">Index</h2> <p> @Html.ActionLink("Create New", "Create") </p> <div style="margin-left: 10px; margin-bottom:20px"> <form action="/Equipm...
package com.nucleus.floracestore.hateoas; import com.nucleus.floracestore.controller.LikeController; import com.nucleus.floracestore.model.view.LikeViewModel; import org.springframework.hateoas.EntityModel; import org.springframework.hateoas.server.RepresentationModelAssembler; import org.springframework.stereotype.Co...
<?php namespace App\Http\Controllers\Apps; use Inertia\Inertia; use App\Models\Service; use Illuminate\Http\Request; use App\Http\Controllers\Controller; class ServiceController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public f...
import { describe, expect, test } from "vitest"; import { Company } from "../entities/company"; import { makeFakeCompany } from "../entities/mocks/company"; import { InMemoryCompanyRepository } from "../repositories/in-memory/in-memory.company.repository"; import { BadRequestError, NotFoundError } from "../shared/api-e...
import { Grid, Typography, Box, Container } from "@mui/material"; import Link from "next/link"; import styles from "./Footer.module.css"; const Footer = () => { return ( <Container> <footer> <Box className={styles.footer}> <Grid container className={styles.footer_container}> <G...
#include <iostream> #include "mylib/chrono/Game_timer.h" #include "self_animated.hpp" /* Author : Kadda Aoues Object : Self animated object Date : 6 / 03 / 2024 */ class Motion : public cgu::ISpriteVisitor { public: bool _is_moving{false}; virtual void visit(cgu::AnimatedSprite* anime...
<?php /* * Copyright 2014 Google Inc. * * 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 agreed t...
import { auth } from "@clerk/nextjs"; import { NextResponse } from "next/server"; import OpenAI from 'openai'; const openai = new OpenAI({ apiKey: process.env['OPEN_AI_SECRET_KEY'], }); export async function POST( req: Request ) { try { const { userId } = auth(); const body = await req.j...
<template> <div class="flex flex-col gap-3 | w-full min-w-[200px] | border rounded-lg | p-2 lg:p-3" :class="storageStore.getThemeClass('', 'border-slate-700')"> <Skeletor v-if="loadingStore.todoLoading" class="w-1/4 h-[24px]" /> <h3 v-else class="flex items-center"> <span class="font-bol...
import * as React from 'react'; import './BatchReportForm.css' import { PlusIcon } from '@heroicons/react/24/outline'; import { Earning, Expense } from '../../../../types/report/report'; import BatchTransactionInput from './batchTransactionInput/BatchTransactionInput'; import { v4 as uuidv4 } from 'uuid'; import { Sett...
/* * (C) Copyright 2023 TheOtherP (theotherp@posteo.net) * * 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 ...
/// \file CladDerivator.h /// /// \brief The file is a bridge between ROOT and clad automatic differentiation /// plugin. /// /// \author Vassil Vassilev <vvasilev@cern.ch> /// /// \date July, 2018 /************************************************************************* * Copyright (C) 1995-2018, Rene Brun and Fons...
import { BadRequestException, Body, Controller, DefaultValuePipe, Delete, Get, HttpException, InternalServerErrorException, Param, ParseIntPipe, Patch, Post, Query, Request, UploadedFile, UseFilters, UseGuards, UseInterceptors, } from '@nestjs/common'; import { PostsService } from '....
package com.entity.model; import com.entity.ChongzhixinxiEntity; import com.baomidou.mybatisplus.annotations.TableName; import java.util.Date; import org.springframework.format.annotation.DateTimeFormat; import com.fasterxml.jackson.annotation.JsonFormat; import java.io.Serializable; /** * 充值信息 * 接收传参的实体类 *(...
import React, { useState } from 'react'; interface NotificationProps { title: string; message: string; } export const Notification = ({ title, message }: NotificationProps) => { const [isClickedClose, setIsClickedClose] = useState(false); return ( <> {!isClickedClose ? ( <div className='fle...
describe('Note app', function() { beforeEach(function() { // to reset the testing db cy.request('POST', `${Cypress.env('BACKEND')}/testing/reset`) const user = { name: 'Junaid Ansari', username: 'junaid', password: 'hehe' } cy.request('POST', `${Cypress.env('BACKEND')}/use...
from app import db from werkzeug.security import generate_password_hash, check_password_hash class User(db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(64), index=True, unique=True) email = db.Column(db.String(120), index=True, unique=True) password_hash = db.Colu...
import { cva } from "../../../styled-system/css"; const root = cva({ base: { borderRadius: "borderRadiusMedium", position: "relative", color: "neutralForeground", backgroundColor: "neutralBackground", display: "flex", alignItems: "center", whiteSpace: "nowrap", cursor: "pointer", ...
package main import ( "bufio" "fmt" "os" ) type Pos struct { row int col int } type State struct { reached bool isStart bool } type QueueElement struct { pos Pos step int } func main() { fmt.Println(P1("AOC2023-21/ex.txt", 6)) fmt.Println(P1("AOC2023-21/input1.txt", 64)) fmt.Println(P2("AOC2023-21/inp...
## Steps: 1. **Generate OTP:** - **Endpoint:** `/api/authentication` - **Description:** This endpoint generates an OTP, saves it to the database associated with the phone number, and sends the OTP to the client. - **Request Body:** JSON ```json { "phone": "+123456" } ``` ...
--- title: Configuring Gantt Chart Timescale Tiers in Aspose.Tasks linktitle: Configuring Timescale Tiers in Aspose.Tasks second_title: Aspose.Tasks .NET API description: Explore Aspose.Tasks for .NET to configure timescale tiers in your Gantt Chart view for precise project timeline visualization. #Aspose.Tasks #MS Pro...
package put_request; import base_urls.DummyRestApiBaseUrl; import io.restassured.http.ContentType; import io.restassured.response.Response; import org.junit.Test; import pojos.DummyRestApiDataPojo; import pojos.DummyRestApiResponsePojo; import utils.ObjectMapperUtils; import static io.restassured.RestAssured.given; i...
module Features def create_category(title, description) #1º Sign in sign_in parent_category = FactoryBot.create(:category, order: 1) #visit root_path click_on 'Add a new category' fill_in 'Title', with: title select(parent_category.title, from: 'Parent') fill_in 'Description', with: de...
import { NotificationsService } from 'src/app/core/services/notifications.service'; import { Injectable } from '@angular/core'; import { AngularFirestore, AngularFirestoreCollection, } from '@angular/fire/compat/firestore'; import { Observable } from 'rxjs'; import { Comment } from 'src/app/core/models/comment'; im...
import React, { useEffect, useState } from 'react'; import AccountInfo from '../components/accountInformationPanel/index'; import TransactionInfo from '../components/transactionInformationPanel/index'; import usePostBalanceData from '../hooks/usePostBalanceData'; import Spinner from '../components/spinner'; import { Ap...
<br> <div class="container"> <form [formGroup]="enseignantFormGroup" *ngIf="enseignantFormGroup"> <div class="form-group"> <label>Nom</label> <input type="text" formControlName="nom" class="form-control" [ngClass]="{'is-invalid':submitted && enseignantFormGroup.controls.nom.errors, 'is-va...
Based on the provided information, here's an analysis of CVE-2020-20446: **Root Cause of Vulnerability:** * The vulnerability is caused by a division-by-zero error in the `libavcodec/aacpsy.c` file within the FFmpeg library. Specifically, the code attempts to divide by a variable `norm_fac` which can be zero in cer...
#include <iostream> class ICommand { public: virtual void execute() = 0; virtual ~ICommand() = default; }; class Receiver { public: void turnOnLights() { std::cout << "Turning on the lights.\n"; } void turnOffLights() { std::cout << "Turning off the lights.\n"; } }; class Tur...
import Image from 'next/image'; import { Box, Button, Grid, Typography } from '@mui/material'; import { PropsWithChildren, useEffect, useState } from 'react'; import { Product } from '@/src/types/productTypes'; import Link from 'next/link'; import FavoriteBorderIcon from '@mui/icons-material/FavoriteBorder'; import Hea...
import { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; import { Project } from '../types/project'; import { api } from '../services/api'; export default function DashboardPage() { const [projects, setProjects] = useState<Project[]>([]); const [isLoading, setIsLoading] = useState(true...