text
stringlengths
184
4.48M
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\File; use Illuminate\Support\Collection; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Auth; use Carbon\Carbon; use App\Models\Book; use App\Models\Favorite; use Illuminate\Support\Facades\Storage; us...
import threading import time import random # 创建一个锁对象 lock = threading.Lock() def producer(id): while True: lock.acquire() # 请求锁 try: print(f"----------------------\nProducer {id} is working!") time.sleep(0.5) # 模拟工作 print(f"Producer {id} is finished!\n----------...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="description" content="Jaime is a front-end engineer based in Fort Worth, TX." />...
import { Request, Response } from 'express' import { logger } from '../../../log' import { Address, ChainId } from '../../../types' import { providerByChainId } from '../../../utils/providers' import { MULTICALL_INTERFACE, ZKLINK_ABI, ZKLINK_INTERFACE, } from '../../../utils' import { extendAddress } from '../../...
<template> <div class="shop-info"> <div class="shop-top"> <img :src="shop.logo" alt=""> <span class="shop-name">{{shop.name}}</span> </div> <div class="shop-middle"> <div class="shop-middle-left"> <div class="sells-info"> <div class="sells-count">{{sh...
function solve(input) { let school = {}; for (let line of input) { if (line.includes(':')) addCourse(line); if (line.includes('joins')) addStudent(line); } let sortedSchool = Object.fromEntries(Object.entries(school).sort((a, b) => Object.keys(b[1].students).length - Object.keys...
<template> <div class="InputBox"> <p class="name"> {{ attributes.name }} </p> <input v-show="attributes.type !== 'avatar'" class="input" :type="attributes.type" :placeholder="attributes.hint" v-model="value" /> <input class="input-file" type="file" st...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> input{ box-sizing: border-box; width: 100%; ...
--- title: "E80: Experimental Engineering" --- ## Welcome! E80, Experimental Engineering, is a sophomore-level, semester-long required course, in which students conduct multiple experiments covering a number of engineering disciplines. These experiments are a training ground for a final project: a field deployment w...
package ru.kata.spring.boot_security.demo.service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFo...
<!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="bootstrap/bootstrap/css/bootstrap.min.css"> <link rel="styleshee...
const express = require("express"); const app = express(); const mongoose = require("mongoose"); const dotenv = require("dotenv"); const authRoute = require("./routes/auth"); const userRoute = require("./routes/users"); const postRoute = require("./routes/post"); app.use(express.json()); dotenv.config(); mongoose ...
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class CategoryRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * バリーデー...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Contact section project</title> <link href="/fontawesome-free-5.15.4-web/css/all.css" rel="stylesheet"> <...
<!DOCTYPE html> <html xmlns:th="http//www.thymeleaf.org"> <head th:replace="master/master :: head"> <meta charset="ISO-8859-1"> <title>Insert title here</title> </head> <body> <header th:replace="master/master :: header"></header> <div class="container"> <div> <form th:action="@{/suscripciones/guardar}" method...
// Declare global variables let numRows = 0; let numCols = 0; let colorSelected; // Add a row function addR() { let table = document.getElementById("grid"); // Check if there are no columns if(numRows == 0){ numCols = 0; } numRows++; // Creating a new row using "tr" which is a table ...
<?php namespace App\Http\Controllers; use App\Models\Hobi; use App\Models\HobiModel; use Illuminate\Http\Request; class HobiModelController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $hobi = ...
// // AlertDisplayer.swift // IMDB // // Created by Ramy Sabry on 29/04/2022. // import UIKit import RxSwift import RxCocoa protocol AlertDisplayerProtocol { func showAlert(with alertItem: AlertItem?) } extension AlertDisplayerProtocol where Self: BaseViewController { func bindAlert(to alertItem: Behavior...
import React, { useState, useId } from 'react' import { FaAngleRight, FaAngleDown } from 'react-icons/fa' export function Disclosure({ children, label, defaultIsOpen = false }) { const [isOpen, setIsOpen] = useState(defaultIsOpen) function onSelect() { setIsOpen(!isOpen) } // Notice how awful it is to bu...
package com.creatoo.hn.dao.model; import java.util.Date; import javax.persistence.*; @Table(name = "whg_supply_tra") public class WhgSupplyTra { /** * 培训ID */ @Id private String id; /** * 创建时间 */ private Date crtdate; /** * 创建人 */ private String crtuser; ...
# -*- coding: utf-8 -*- # Copyright (C) 2014-2015 by the Free Software Foundation, Inc. # # This file is part of HyperKitty. # # HyperKitty is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation, either version 3 of t...
from typing import Dict, List, Tuple import numpy as np import random import copy import torch import torchvision.transforms as T from data import transforms from tasks.refinement import T5LayoutSequence from utils import utils class T5CompletionLayoutSequence(T5LayoutSequence): def parse_seq(self, _, output_s...
/* * 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. */ package controller; import dao.UserDAO; import dto.UserDTO; import java.io.IOException; import java.security.NoSuchAlgorithmException;...
import Koa, { Context, Middleware } from 'koa' import Router from '@koa/router' import koaLogger from 'koa-pino-logger' import pino, { LevelWithSilent, Level } from 'pino' import cors from '@koa/cors' import etag from 'koa-etag' import responseTime from 'koa-response-time' import session from 'koa-generic-session' impo...
Chapter 2: The Soul of Italy - Naples Introduction to Campania Campania, with its vibrant streets and bustling markets, is the soul of Italy's pasta tradition. The region is home to Naples, the birthplace of many iconic Italian dishes, including pizza and spaghetti alla puttanesca. Campania's culinary scene is charact...
package com.demo.service; import com.demo.model.Bill; import com.demo.model.Book; import com.demo.repository.IBillRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util....
import dotenv from "dotenv"; import express, { Express, Request, Response } from "express"; import cors from "cors"; import connectToMongoDB from "./models"; import User from "./models/User"; import Post from "./models/Post"; import Resume from "./models/Resume" import Portfolio from "./models/Portfolio" import bcrypt ...
#if UNITY_2021_2_OR_NEWER using System; using System.Collections.Generic; using System.Reflection; using System.Threading; using LiteNetLib.Utils; using UnityEditor; using UnityEngine; namespace LiteEntitySystem.Extensions { [Serializable] public struct ResourceInfo : INetSerializable { public str...
package app.logorrr.docs import app.logorrr.{LogoRRRAppLauncher, OsxBridge} import app.logorrr.conf._ import app.logorrr.docs.Area._ import app.logorrr.io.Fs import app.logorrr.meta.AppMeta import app.logorrr.util.CanLog import app.logorrr.views.main.LogoRRRStage import javafx.embed.swing.SwingFXUtils import javafx.sc...
import { readInput } from "../util"; type Set = { red: number; green: number; blue: number; }; export type Game = { gameId: number; sets: Set[]; }; export const parseFile = (filepath: string): Game[] => { const gameIdRegex = /Game (?<gameId>\d+): (?<sets>.*)/; return readInput(filepath) .split("\n"...
import {getServerSession} from "next-auth/next" import {z} from "zod" import {authOptions} from "@/lib/auth" import {db} from "@/lib/db" import {userNameSchema} from "@/lib/validations/user" const routeContextSchema = z.object({ params: z.object({ userId: z.string(), }), }) export async function GET(req: Req...
Tree is Data Structure Non Linear Data Structute Node Root Parent Child Ancestor Descendant Sibling leaf Code: class Node { int data; node* left; node* rightl }; for nary class node { int data; vector<node*> child; } 1 / \ 2 3 / \ 4 5 Types Of question...
import { useCallback, useEffect, useState } from 'react'; import { apiSendSms } from 'src/services/api.services'; import useAppNavigation from './useAppNavigation'; import BackgroundTimer from 'react-native-background-timer-android'; let timeout: number; const setTimeoutFn = BackgroundTimer.setTimeout; const clearTim...
#' @title Functional cover summary plot #' #' @description For veg data, summarizes and plots mean cover of functional groups. #' @description Data are summarized for all years specified. #' @description Background data are supplied from the lpi data select. Data for a selected ranch are not used in the calculation of ...
/* * musicplayer.h * * Copyright 2017-2019 Dariusz Sikora <dev@isangeles.pl> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any ...
const fs = require('fs') const momentService = require('../service/moment.service') const commentService = require('../service/comment.service') const { PICTURE_PATH } = require('../constants/file.path') class MomentController { async create(ctx, next) { // 1.获取图像信息 const files = ctx.req.files const {ti...
import { create } from "zustand"; import { persist, createJSONStorage } from "zustand/middleware"; interface IntroState { isIntroDone: boolean; setIntroDone: (isDone: boolean) => void; } const useIntroStore = create<IntroState>()( persist( (set) => ({ isIntroDone: false, setIntroDone: (isDone) =...
<script lang="ts"> export let showModal: boolean; export let isLoading: boolean; export let saveText: string = "Save Changes"; export let onAccept: () => void; let dialog; // HTMLDialogElement $: console.log(dialog); $: if (dialog && showModal) dialog.showModal(); $: if (dialog && !showModal) dialo...
from app.system_db.models import TitleService from app.system_db import db_session,Base from sqlalchemy import text from pydantic import validate_call from app.system_db.basic import BasicCRUD class TitleServiceCRUD(BasicCRUD): @staticmethod def add(**params): with db_session() as session: ...
// src/components/Login/LoginScreen.tsx import React from 'react'; import { Text, Button, ActivityIndicator } from 'react-native'; import { BaseScreen, TextInput } from '../../../../globalComponents'; import Styles from "../../styles"; import LocalizedString from '../../../../utils/localization'; const LoginScreen: R...
// // ResponseHandler.swift // FindingFalcone // // Created by Pallab Maiti on 04/03/24. // import Foundation protocol ResponseHandlerProtocol { func parseData<T: Codable>(_ data: Data?) throws -> T? } let sharedDecoder: JSONDecoder = { let decoder = JSONDecoder() decoder.keyDecodingStrategy = .conver...
#pragma once #include "Repository.h" #include "RepositoryCSV.h" #include "RepositoryHTML.h" #include "RepositorySQL.h" #include "Comparator.h" class Service { private: Repository* dogsRepo; Repository* userAdoptionList; public: // Service constructor Service(Repository* _dogsRepo, Repository* _userAdoptionL...
function showError(inputElement, errorElement, errorMessage, props) { inputElement.classList.add(props.inputErrorClass); errorElement.textContent = errorMessage; errorElement.classList.add(props.errorClass); } function hideError(inputElement, errorElement, props) { inputElement.classList.remove(props.inputErro...
import './App.scss'; import React, { useEffect, useState } from 'react'; import { getCompaniesStatic } from './api/getCompanies'; import { Company } from './components/Company'; import { TimeslotState, useTimeslotsStore } from './stores/timeslotsStore'; import { getCompanyWithGroupedDates, ICompanyWithGroupedTimeslot...
using System; using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.EntityFrameworkCore; using TrashCollector.Data; using TrashC...
import "./App.scss"; import Navigation from "./components/Navigation"; import { BrowserRouter, Switch, Route } from "react-router-dom"; import ROUTES from "./utils/routes"; import Home from "./components/Home"; import Auction from "./components/Auction"; import Project from "./components/Project"; import Logo from "./c...
#ifndef SBPLATFORMER_H #define SBPLATFORMER_H #include <memory> #include <vector> #include <string> #include <SDL2/SDL.h> #include <SDL2/SDL_ttf.h> #include "SbMessage.h" #include "SbWindow.h" #include "SbObject.h" #include "SbFont.h" const int SCREEN_WIDTH = 800; const int SCREEN_HEIGHT = 600; const int LEVEL_WIDT...
""" Использование тайм-аутов в wait с. 127 """ import asyncio from aiohttp import ClientSession from util import async_timed from chapter_04 import fetch_status @async_timed() async def main(): async with ClientSession() as session: url = 'https://example.com' fetchers = [ asyncio.cre...
import { headers } from "next/headers"; import ProductCard from "@/Components/ProductCard"; import React from "react"; import Pagination from "@/Components/SharedUI/Pagination"; import { getServerSession } from "next-auth"; import { authOptions } from "../api/auth/[...nextauth]/route"; import { redirect } from "next/na...
import React, { useState } from "react"; import { Fade, Flip, Slide } from "react-awesome-reveal"; import CreditCardForm from "./CreditCardForm"; import UPIForm from "./UPIFrom"; const PaymentOptions = ({ setcheckOutstep }) => { const [selectedOption, setSelectedOption] = useState(""); const handleOptionChange ...
//***************************************************************************** // // uart_echo.c - Example for reading data from and writing data to the UART in // an interrupt driven fashion. // // Copyright (c) 2013-2020 Texas Instruments Incorporated. All rights reserved. // Software License Agreemen...
package com.nhatthanh.shopping.localData.dao import androidx.room.* import com.nhatthanh.shopping.product.model.Cart import kotlinx.coroutines.flow.Flow @Dao interface CartDao { @Insert(onConflict = OnConflictStrategy.IGNORE) suspend fun insertCart(cart: Cart) @Query("DELETE FROM cart WHERE id =:id") ...
package com.example.playlistmaker import android.content.Intent import android.net.Uri import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import com.example.playlistmaker.databinding.ActivitySettingsBinding import com.google.android.material.switchmaterial.SwitchMaterial class SettingsActivity ...
<html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Learn Codeql With L4yn3 | ch1e的自留地</title> <link rel="shortcut icon" href="https://ch1e.cn/favicon.ico?v=1693578748982"> <link href="https://cdn.jsdelivr.net/npm/remixicon@2.3.0/fonts/remixicon.css...
#include <iostream> #include <cmath> #include <random> #include <chrono> using namespace std; static default_random_engine generator; #define M_PI 3.14159265358979323846 double W(int N, double T, double r, double q, double sigma, double S0) { normal_distribution<double> dist(0, 1); double dt = T / N; vector<doubl...
/* * ClassiCraft - ClassiCraftMC * Copyright (C) 2018-2022. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * ...
import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; import { UserProvider } from '../context/UserContext'; import { useEffect } from 'react'; import axios from 'axios'; import Home from './Home'; import Search from './Search'; import PharmaLocator from './PharmLocator'; import BlogPostList from '...
import React from "react"; import { HashRouter, Route } from "react-router-dom"; import Navigation from "./components/Navigation"; import Home from "./routes/Home"; import About from "./routes/About"; import Detail from "./routes/Detail"; function App() { return ( <div> <HashRouter> <Navigation></Navigation>...
/* * $Id$ * * Authors: * Jeff Buchbinder <jeff@freemedsoftware.org> * * REMITT Electronic Medical Information Translation and Transmission * Copyright (C) 1999-2014 FreeMED Software Foundation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General...
{{Infobox Anatomy | Name = Pelvic cavity | Latin = Cavitas pelvis | GraySubject = | GrayPage = | Image = Scheme body cavities-en.svg | Caption = | Image2 = | Caption2 = | Precursor = | System = | Artery = | Vein = | Nerve ...
import torch import numpy as np import matplotlib.pyplot as plt import pytorch3d from pytorch3d.renderer import look_at_view_transform from pytorch3d.renderer import OpenGLPerspectiveCameras from pytorch3d.renderer import ( AlphaCompositor, RasterizationSettings, MeshRenderer, MeshRasterizer, Poi...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Title</title> </head> <body> <div id="app" class="main"> <aa></aa> <bb></bb> <p>hello vue</p> </div> <script src="./vue.js"></script> <script> var aa = { templa...
--- layout: post title: "자바스크립트 변수의 값 검사 방법" description: " " date: 2023-09-09 tags: [javascript] comments: true share: true --- 자바스크립트에서 변수의 값 검사는 매우 중요합니다. 정확한 값 검사를 통해 프로그램의 안정성과 신뢰성을 확보할 수 있습니다. 이 글에서는 다양한 자바스크립트 변수의 값 검사 방법을 알아보겠습니다. ## 1. typeof 연산자를 사용한 값 검사 자바스크립트에서는 `typeof` 연산자를 사용하여 변수의 타입을 확인할 수 있습니다. 다음...
package question1_31; class Main { public static void main(String[] args) { Person person1 = new Person("鈴木", "太郎", 20, 1.7, 60); Person person2 = new Person("山田", "花子", 22, 1.5, 40); // car,bicycleをインスタンス化 Car car = new Car(); Bicycle bicycle = new Bicycle(); /* 問題4:MainクラスからsetOwnerを用いて、Carクラスのインスタンス「...
import React, { Component } from 'react' import '../../css/Products.css' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faHeart, faPlusSquare } from '@fortawesome/free-solid-svg-icons' import solo1 from '../../assets/solo1.jpg' import solo2 from '../../assets/solo2.jpg' import { Modal } from ...
// // HomeViewModel.swift // NetworkApp // // Created by Lucas Neves dos santos pompeu on 02/01/24. // import Foundation protocol HomeViewModelProtocol: AnyObject { func success() func error(message: String) } class HomeViewModel { private var service: HomeService = HomeService() private var ...
import { setInformationModal } from "@/store/reducers/globalSlice"; import { QuestionMarkCircleIcon } from "@heroicons/react/20/solid"; import { useDispatch } from "react-redux"; const QuestionButton = ({ body, title }: { body: string; title: string }) => { const dispatch = useDispatch(); return ( <> <b...
import React from "react"; import { useSelector } from "react-redux"; import { Route, Redirect } from "react-router-dom"; export default function PrivateRoute({ component: Component, ...rest }) { const { isAuthenticated } = useSelector((state) => state.auth); return ( <Route {...rest} render={(pro...
let reloadBooksButton = document.getElementById('reloadBooks'); reloadBooksButton.addEventListener("click", reloadBooks) let booksContainer = document.getElementById("books-container"); function reloadBooks() { booksContainer.innerHTML = ''; fetch('http://localhost:8080/api/books') .then(rsp => r...
from dataclasses import dataclass from string import Template from src.general import Material, Boundary @dataclass(kw_only=True) class HeatFlowMaterial(Material): kx: float ky: float qv: float kt: float def __str__(self): cmd = Template("hi_addmaterial($materialname, $kx, $ky, $qv, $kt)"...
import { Injectable } from '@angular/core'; import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpErrorResponse } from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; import { OktaAuth } from '@okta/okta-auth-js'; import { Router } fr...
import { ComplexType, add, div, mul, sub } from "./index.ts"; describe("function add", () => { test("only real number", () => { const complexNumber1: ComplexType = { real: 1, imag: 0 }; const complexNumber2: ComplexType = { real: 10, imag: 0 }; expect(add(complexNumber1, complexNumber2)).toBe("11"); });...
<%-- Document : student Created on : 29 Oct 2023, 12:06:16 Author : user --%> <%@include file="header.jsp" %> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</t...
import React from 'react'; import { CodeEditor, Language } from '@patternfly/react-code-editor'; import { Text, Form, Title, Alert } from '@patternfly/react-core'; import { useAppDispatch, useAppSelector } from '../../../../store/hooks'; import { selectFirstBootScript, setFirstBootScript, } from '../../../../stor...
import express from 'express'; import cors from 'cors'; import bodyParser from 'body-parser'; import mysql from 'mysql2'; import { dirname, join } from 'path'; import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const app = express(); app.use(...
--- import Layout from "../../layouts/Layout.astro"; import { getProjectPageData, getNextProject } from "../../sanity/api"; import PortableText from "../../components/utils/portableText.astro"; import { Image } from "astro:assets"; import EpisodePlayer from "../../components/projects/episodePlayer.astro"; import Projec...
from abc import ABC, abstractmethod class AbstractStorage(ABC): @abstractmethod def add(self, name: str, amount: int) -> None: ... @abstractmethod def remove(self, name: str, amount: int) -> None: ... @abstractmethod def get_free_space(self) -> int: ... @abstract...
using System.ComponentModel; namespace MudBlazor { /// <summary> /// The flex-wrap CSS property sets whether flex items are forced onto one line or /// can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. /// </summary> public enum Wrap { ...
import java.util.ArrayList; import java.util.List; public class VirtualThreadsDemo { private static final int NUMBER_OF_VIRTUAL_THREADS = 20; public static void main(String[] args) throws InterruptedException { Runnable runnable = () -> System.out.println("내부 스레드 : " + Thread.currentThread()); ...
/*** * @Author: insbread * @Date: 2022-07-20 17:16:14 * @LastEditTime: 2022-07-20 17:16:15 * @LastEditors: insbread * @Description: 静态vector数组,数组大小固定 * @FilePath: /elsa-server/SDK/include/container/elsac_array_list.h * @版权声明 */ #pragma once #include <cstring> #include <assert.h> #include "container/elsac_vect...
package pokeregions.monsters.act1.allyPokemon; import com.megacrit.cardcrawl.actions.AbstractGameAction; import com.megacrit.cardcrawl.actions.defect.AnimateOrbAction; import com.megacrit.cardcrawl.actions.defect.ChannelAction; import com.megacrit.cardcrawl.actions.defect.EvokeOrbAction; import com.megacrit.cardcrawl....
import { faAngleDown, faAngleRight } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import Link from "next/link"; export type sidebarProps = { state: [boolean, React.Dispatch<React.SetStateAction<boolean>>]; projects: Array<{ name: string; slug: string }...
package com.clay.springcloud.controller; import com.clay.springcloud.entities.CommonResult; import com.clay.springcloud.entities.Payment; import com.clay.springcloud.service.PaymentService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans...
// // 二叉树中和为某一个值的路径.swift // HT_LeetCode // // Created by 陈竹青 on 2020/11/25. // import Foundation /** 题目: 二叉树中和为某一个值的路径 题目分析: 要获取二叉树中路径之后为某值,我们就需要遍历所有路径,然后判断是否为指定某个值,如果是我们就保存到数组中。 利用二叉树的前序遍历的方法就可以 **/ func testSumEqualTo() -> Void { //构建一个二叉树用于测试 /* 1 / \ ...
import {CreateUserDTO} from "../../dtos/CreateUserDTO"; import {prisma} from "../../../../prisma/client"; import { User } from "@prisma/client"; import {AppError} from "../../../../errors/AppError"; const bcrypt = require("bcryptjs"); export class CreateUserUseCase { async execute( { nome, email, password }:Creat...
--- title: Schema management in Kafka date: 2020-05-27 --- Kafka stores records as binary data. When stored on the broker, it is simply a stream of bytes. There needs to be a contract between publishers and subscribers to know how to encode/decode a message in a topic. The encoding/decoding is also known as serializat...
# Diabetic Management Mobile App ![image](https://github.com/octorose/D-one2/assets/48595123/dc63dda6-7071-4fb4-8bba-ba151c8ccf17) Welcome to the Diabetic Management Mobile App project! This mobile app is designed to help individuals with diabetes manage their condition more effectively. The app provides users with t...
# Standard-Setup-Win10 Powershell script wich configures some general settings on a windows 10 system ### Version: 5.0 - First Mature Release ### Usage: This script runs multiple functions that configure a computer as described in the Standard-Configuration of Root Service AG. You can get more Details with the "Get-...
/** * ByteBuffer * ------------------------------------------------------------------ * Copyright (c) Chi-Tai Dang * * @author Chi-Tai Dang * @version 1.0 * @remarks * * This file is part of the Environs framework developed at the * Lab for Human Centered Multimedia of the University of Augsburg. * http://hc...
require('dotenv').config(); const express = require('express'); const app = express(); const mongoose = require('mongoose'); const cookieParser = require('cookie-parser'); const seedDB = require('./seed'); const cors = require('cors'); const quotesRoutes = require('./api/quoteRoutes'); const authRoutes = require('./...
#include "Form.hpp" #include "Bureaucrat.hpp" #include <iostream> Form::~Form() {} Form::Form() : _name("<No-Name>"), _isSigned(false), _gradeRequiredToSign(1), _gradeRequiredToExecute(1) {} Form::Form(std::string name, int gradeRequiredToSign, int gradeRequiredToExecute) : _name(name), _isSi...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>vCard to Qrcode Vue.js</title> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> ...
use super::errors::StorageError; use crate::{ rest_server::errors::InvalidParam, types::database::{DatabaseReadError, DatabaseReader}, utils::Unexpected, }; use anyhow::Error; use serde::Serialize; use warp::{http::StatusCode, Rejection, Reply}; pub(super) async fn get_latest_block<Db: DatabaseReader + Clo...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Webcam BMI Prediction</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/tensorflow/4.3.0/tf.min.js" integrity="sha512-X00OiLKFsrh2ogo5R/0KNAxplnmE4DS1uYu...
#ifndef __bingo_ptr__ #define __bingo_ptr__ #include "base_cpp/obj_array.h" #include "base_cpp/exception.h" #include "base_cpp/tlscont.h" #include "bingo_mmf.h" #include "base_cpp/profiling.h" #include "base_cpp/os_sync_wrapper.h" #include <new> #include <string> #include <thread> using namespace indigo; namesp...
import React from "react"; import { useForm } from "react-hook-form"; export default function App({ addTodo, removeDuplicate }) { const { register, handleSubmit, watch, formState } = useForm({ mode: "onChange" }); const onSubmit = ({ newTodo }) => { addTodo(newTodo); }; const removeDuplicates = () ...
import { StatusBar } from 'expo-status-bar'; import { KeyboardAvoidingView, ScrollView, Text, TextInput, View } from 'react-native'; import { estilo } from './style'; import { Icon } from 'react-native-elements'; import Cidades from '../../Cidades.json' import { useState } from 'react'; export default function Home() ...
// // ViewController.swift // LoginScreenUI // // Created by 奈木野諭吉 on 2023/08/18. // import UIKit import SwiftUI class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } } struct ContentView: View { ...
var db = require('@utility/database'); /** * Checks if user of a given email and password exists and returns their data. * @param {string} email - The user's email. * @param {string} pass - The user's password. * @returns {Promise<Object>} - A promise that resolves to the user object if login is successful. * @th...
package conjuntos; import java.util.HashSet; import java.util.Set; /* CONJUNTOS Os conjuntos são implementados com a interface Set e uma das classes que implementamesta interface e a HahSet. A maioria das coleções possuem os mesmos métodos já conhecidos e utilizados com as listas, mas o comportamento desses ob...