text
stringlengths
184
4.48M
<template> <div class="container page"> <main> <div class="sushi-select not-started"> <div class="not-started__title">管理者に招待されています</div> <div class="not-started__textbox"> <div class="not-started__textbox--title">{{ room.title }}</div> <div> {{ room.descriptio...
import java.util.*; /** * Classe concreta e immutabile utile a rappresentare un equazione chimica, * un equazione chimica descrive una reazione (o trasformazione) chimica e consiste di una lista di reagenti (le molecole di partenza) * e di una lista di prodotti (le molecole di arrivo) */ public class EquazioneChim...
using AutoMapper; using ClothesShop.DatabaseAccess.Entities.ItemsEntity; using ClothesShop.DatabaseAccess.Interfaces.ItemsRepository; using ClothesShop.Services.Interfaces; using ClothesShop.Services.Models.ItemsModels; using ClothesShopServices.WebAPI.Models; using System; using System.Collections.Generic; using Syst...
package ru.skillbranch.skillarticles.markdown.spans import android.graphics.Canvas import android.graphics.Color import android.graphics.Paint import android.text.Layout import android.text.style.LeadingMarginSpan import android.util.Log import androidx.annotation.ColorInt import androidx.annotation.Px import androidx...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>D3 Page Template</title> <script type="text/javascript" src="./d3.js"></script> <style type="text/css"> div.tooltip { position: absolute; text-align: center; width: 250px; height: 280px; ...
def is_pangram(s): s = set(s.lower()) alphabet = [chr(i) for i in range(ord("a"), ord("z")+1)] sentence = [i for i in s if i.isalpha()] return len(alphabet) == len(sentence) # Examples: ''' "The quick, brown fox jumps over the lazy dog!" => True "1bcdefghijklmnopqrstuvwxyz" => False ''' #...
const btn = document.querySelector('.custom-button'); // btn is our "fake" button let active = false; btn.addEventListener('mouseover', () => { // Add a class of "hover" to the button when the mouse is over it btn.classList.add('hover'); if (active) { // If the user's mouse comes back over the button w...
import React, { useEffect, useRef, useState } from "react" import { CopyToClipboard } from "react-copy-to-clipboard" import Peer from "simple-peer" //WebRTC api import io from "socket.io-client" import {Button, Col, Container, FloatingLabel, Row,Form} from "react-bootstrap"; const socket = io.connect('http://localhost:...
package com.example.board20231.question; import com.example.board20231.DataNotFoundException; import com.example.board20231.answer.Answer; import com.example.board20231.user.SiteUser; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest;...
const express = require("express"); const fs = require("fs"); const path = require("path"); const bodyParser = require("body-parser"); const app = express(); app.use(bodyParser.json()); const PORT = 3000; // Root route app.get("/", (req, res) => { // Read the content of the HTML file const filePath = path.join(__...
import {Directive, ElementRef, Input} from '@angular/core'; import {Task, TaskStatus} from "../model/Task"; @Directive({ selector: '[appColorByStatus]' }) export class ColorByStatusDirective { @Input() appColorByStatus: TaskStatus = TaskStatus.DONE; constructor(private el: ElementRef) { } ngOnInit() { ...
import * as React from "react"; import { styled } from "@mui/material/styles"; import Table from "@mui/material/Table"; import TableBody from "@mui/material/TableBody"; import TableCell, { tableCellClasses } from "@mui/material/TableCell"; import TableContainer from "@mui/material/TableContainer"; import TableHead from...
import express from "express" import { genPassword, createUser, getUserByName } from "../helper.js" import bcrypt from "bcrypt"; import jwt from "jsonwebtoken" const router = express.Router()//express router router.post('/register', async (req, res) => { const { username, password } = req.body console.log(us...
<!DOCTYPE html> <html> <head> <title>Purtova A</title> <meta charset="utf-8"> <meta name="description" content="Agency"/> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- CSS Files --> <link rel="stylesheet" href="css/style.css...
// Copyright 2023 RISC Zero, 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 to...
--- share: true --- ## Find number of objects created ```java // Java program Find Out the Number of Objects Created // of a Class class Test { static int noOfObjects = 0; // Instead of performing increment in the constructor // instance block is preferred to make this program generic. { noOfObjects += 1; } ...
"""website URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/4.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based...
import 'dart:convert'; import 'package:http/http.dart' as http; class GdgApi { // api call to check backend status static Future<Map<String, dynamic>> checkBackendStatus() async { final url = Uri.parse('https://gdgapp.swoyam.engineer/'); final response = await http.get(url); if (response.statusCode ...
import React from 'react' import PropTypes from 'prop-types' import { Link } from 'react-router-dom' export default function Navbar(props) { return ( <nav className={`navbar navbar-expand-lg navbar-${props.mode} bg-${props.mode}`}> <div className="container-fluid"> <Link className="navbar-brand" to="/...
import express from 'express'; import cors from 'cors'; import { createPost, deletePost, getPosts, updatePost, } from './controllers/posts.js'; import { changePwd, loginUser, registerUser, resetPassword, setPwd, } from './controllers/users.js'; import { authValidator } from './validations/authVerify.j...
import { List as DefaultList, Widget, ListItem as DefaultListItem } from "rayous"; import { Controller, mergeOptions, options } from "rayous/extra"; import { createClass } from "../utils/class"; import { mergeClassnameWithOptions } from "../utils/cssClass"; export interface ListItemOptions extends options { media?: ...
import React from "react"; import { Button } from "../../../shared/styled/button"; import { FlexContainerCol } from "../../../shared/styled/FlexContainerCol"; import { H1, H3, H6 } from "../../../shared/styled/Headers"; import { Img } from "../../../shared/styled/Img"; function APODDisplay({ explanation, link,...
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* addTwoNumbe...
import { Module } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { Pool } from 'pg'; import * as schema from './schema'; import { drizzle, NodePgDatabase } from 'drizzle-orm/node-postgres'; import { migrate } from 'drizzle-orm/node-postgres/migrator'; import { companies, insertItemSchema,...
# Object 모든 클래스의 최상위(root) 클래스 모든 클래스는 object 클래스를 상속 받는다. 왜 object 클래스를 상속 받을까? 가장 큰 이유는 Object 클래스에 있는 메소드를 통해서 클래스의 기본적인 행동을 정의할 수 있기 때문이다. 클래스라면 이정도의 메소드는 정의되어 있어야 하고, 처리해 주어야 한다는 것. 그 기본이 Object 이기 때문에 Object를 상속받는다. 이건 무엇을 의미하는가? 모든 클래스는 Object 참조변수로 생성할 수 있다는 뜻! [Java Development Kit Version 20 API Specific...
// Copyright (c) Corporation for National Research Initiatives // These are just like normal instances, except that their classes included // a definition for __del__(), i.e. Python's finalizer. These two instance // types have to be separated due to Java performance issues. package org.python.core; /** * A python...
<!-- The following are the few refferece websites from where the help was taken to buit the Milestone2_Navigations 1) https://www.youtube.com/channel/UC7pVho4O31FyfQsZdXWejEw 2) https://www.w3schools.com/howto/howto_js_topnav.asp --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name=...
import { match } from 'ts-pattern'; import { describe, expect, it, vi } from 'vitest'; import { VoiceClient } from './client'; import { defaultConfig } from './create-socket-config'; import { flushPromises } from '@/test-utils/flushPromises'; vi.mock('./message', () => { return { parseMessageType: vi.fn().mock...
from turtle import Turtle class Score(Turtle): def __init__(self): super().__init__() self.score = 0 self.color('red') self.penup() self.goto(0, 265) self.hideturtle() self.update_score() def increment_score(self): self.score += 1 self.up...
# SOLUTION # Version Control in Software Development ## Definition Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. It allows multiple developers to collaborate on a project, tracking changes made to the codebase, and provides a mecha...
<!-- //********************************************************* // // Copyright (c) Microsoft. All rights reserved. // This code is licensed under the MIT License (MIT). // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY // IMPLIED WARRANTIES OF FITNESS FOR A PAR...
package com.zerobase.storeReservation.member.domain.Form; import javax.validation.constraints.Email; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Pattern; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; @Getter @NoArg...
import React from 'react' import styles from './Header.module.css' import { Link, useLocation } from 'react-router-dom' function Header() { const [mobile, setMobile] = React.useState(false) const [title, setTitle] = React.useState(null) const location = useLocation(); React.useEffect(()=>{ ...
import Guest from "Components/Layouts/Guest"; import Image from "next/image"; import crocodileNFT from "images/crocodile-nft.png"; import styles from "styles/Pages/Mint.module.scss"; import { ISocialItem } from "types"; import { ChangeEvent, useState } from "react"; import ConnectWalletButton from "Components/Guest/Glo...
package mirecxp.aoc23.day02 import java.io.File //https://adventofcode.com/2023/day/2 class Day02(inputPath: String) { private val gameInputs: List<String> = File(inputPath).readLines() data class Game( val id: Long, val draws: List<Draw> ) { fun getMinimumDraw() = Draw( ...
const nql = require('@tryghost/nql'); const {BadRequestError} = require('@tryghost/errors'); const tpl = require('@tryghost/tpl'); const messages = { invalidVisibilityFilter: 'Invalid visibility filter.', invalidEmailSegment: 'The email segment parameter doesn\'t contain a valid filter' }; class PostsService ...
import React, { FunctionComponent, ReactElement } from "react"; import { Flex, Text, TextInput, ActionIcon } from "@mantine/core"; import { IconSettings, IconSearch } from "@tabler/icons-react"; import { useNavigate } from "react-router-dom"; const Navbar: FunctionComponent = (): ReactElement => { const navigate = us...
import type { NewPosEvent, Point } from './types'; type UserOptions = NewPosEvent & { isLocalUser?: boolean; }; type Shape = { points: Array<Point>; isClosed: boolean; color: string; }; const CHUNK_POINTS_THRESHOLD = 3; export class User { id: string; isLocalUser = false; name: string; trackerColor: string ...
// // RoomListView.swift // AgoraEntScenarios // // Created by FanPengpeng on 2022/11/3. // import UIKit class ShowRoomListView: UIView { var roomList = [ShowRoomListModel]() { didSet { collectionView.reloadData() emptyView.isHidden = roomList.count > 0 } } ...
import 'package:flutter/material.dart'; import '../../../../models/laporan_keuangan_models.dart'; import '../../../text_paragraf.dart'; import '../../isi-saldo-page/isi-saldo/isi_saldo.dart'; class DetailRiwayatDenda extends StatefulWidget { const DetailRiwayatDenda({Key? key, required this.riwayatDendaUser}) ...
/* * Copyright (C) 2004-2006 Autodesk, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of version 2.1 of the GNU Lesser * General Public License as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but W...
use sea_orm::entity::prelude::*; use serde::{Deserialize, Serialize}; use crate::domain::{ handler::AttributeSchema, types::{AttributeName, AttributeType}, }; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)] #[sea_orm(table_name = "user_attribute_schema")] pub struct Model { ...
import { Component, OnInit, ViewEncapsulation, ViewChild, AfterViewInit, OnDestroy } from '@angular/core'; import { FormGroup, FormControl, Validators, NgForm, AbstractControl } from '@angular/forms'; import { Constants } from 'src/providers/constants.service'; import { Router } from '@angular/router'; import { UserCon...
<?php namespace App\Entity; use Doctrine\ORM\Mapping as ORM; use App\Repository\UserRepository; use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\ArrayCollection; use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; use Symfo...
# ArangoProxy How To ## Build Compile the _arangoproxy_ web server (only when new code is available). **Go needs to be installed to perform the go build command** ``` toolchain/arangoproxy/cmd> go build -o arangoproxy ``` Go automatically detects the hardware and produces the right executable inside the `cmd` fold...
// // Copyright (c) 2023, Brian Frank // Licensed under the Academic Free License version 3.0 // // History: // 26 May 2023 Brian Frank Creation // using util using data using haystack using defc using xetoTools ** ** Generate JSON file for spec source ** class JsonSrc : XetoCmd { override Str name() { "json-sr...
package mysteryDungeon.cards.Squirtle; import static mysteryDungeon.MysteryDungeon.makeCardPath; import com.megacrit.cardcrawl.actions.common.ApplyPowerAction; import com.megacrit.cardcrawl.actions.common.MakeTempCardInDrawPileAction; import com.megacrit.cardcrawl.characters.AbstractPlayer; import com.megacrit.cardcr...
<?php namespace App\Controller; use App\Entity\User; use App\Form\UserType; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Security\Core\...
import { LitElement, html, css } from "lit" import { query } from "lit/decorators.js"; import { googleIcon, emailIcon, appleIcon, facebookIcon } from "@static/svg/brand-icons" import { signInPopup } from "/commons/firebase/authentication/signin-providers"; import { Dialogue } from "/components/elements/dia-logue.ts" ...
import React, { useEffect, useState } from "react"; import { Link, useNavigate } from "react-router-dom"; import { Users } from "../data"; import RootLayout from "./MainLayout"; import { AxiosPost } from "../Components/crud"; import Form from "../Components/Layouts/Form"; import FormContainer from "../Components/Layout...
import React from "react"; import { makeStyles } from "@material-ui/core/styles"; import Logo from "./res/logoimg.svg"; import masjidicon from "./res/masjidicon.svg"; import { Link } from "react-router-dom"; import shopicon from "./res/shopicon.svg"; import profileicon from "./res/profile.svg"; import FavoriteBorderIco...
import React, { useState, useEffect } from "react"; import axios from "./api"; import CircularWebcam from "./CircularWebcam"; const Employee = () => { const [employees, setEmployees] = useState([]); const [alertInfo, setAlertInfo] = useState({ show: false, message: "", type: "", }); const [showWebc...
@extends('layouts.app') @section('template_title') Tallere @endsection @section('content') <style> .row{ justify-content: center; } </style> <div class="container-fluid"> <div class="row"> @if (Auth::user()->rol_id === 1 || Auth::user()->rol_id === 2) <div class...
//--------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Windows.Controls; using System.Windows.Input; ...
/** * 产品看板-查看系列-系列产品 */ import React, { useContext, useEffect, useRef } from 'react'; import { Button } from 'antd'; import { Table } from '@/components'; import { connect, routerRedux } from 'dva'; import { errorBoundary } from '@/layouts/ErrorBoundary'; import MyContext from './myContext'; import { handleChangeLabe...
"use client" import useCases, { PostIdResponse } from "@/api/useCases" import { useParams, useRouter } from "next/navigation" import { useEffect, useState } from "react" import DOMPurify from "isomorphic-dompurify" import Image from "next/image" import PostDeailtsLoader from "@/components/ui/post-detail-loader" import...
const express = require("express"); const { json } = require("body-parser"); const morgan = require("morgan"); const cors = require("cors"); const session = require('express-session') const jwt = require('./SRC/helpers/jwt'); const errorHandler = require('./SRC/helpers/error-handler'); const { Database } = require('./...
import { Select, Input, Steps, Button, Spin, notification } from "antd"; import "./index.css"; import FloatLabel from "../../components/float_lable/"; import {useEffect, useMemo, useState, useContext} from "react"; import { useNavigate } from "react-router-dom"; import {useLoginState} from "../../hooks/loginState"; im...
using System; namespace hw3 { internal class Program { static void Main(string[] args) { exercise1(); exercise2(); exercise3(); exercise4(); exercise5(); exercise6(); exercise7(); ex...
import 'jest' import { nanoid } from 'nanoid' import { sign } from 'jsonwebtoken' import { ContentType } from 'allure-js-commons' import { FunctionsClient } from '@supabase/functions-js' import { Relay, runRelay } from '../relay/container' import { attach, log } from '../utils/jest-custom-reporter' import { getCustom...
import os from Bio import SeqIO from Bio.Seq import Seq import pandas as pd from io import StringIO from typing import Tuple, List from itertools import compress from torch.nn.utils.rnn import pad_sequence import pytest # Paths gencode_source_file_path = '../data/gencode/gencode.v44.pc_transcripts.fa' # Define bases ...
import request from 'supertest'; import app from '../../App'; it('should return the details of the current user', async () => { const signup = await request(app) .post('/api/users/signup') .send({ email: 'test@test.com', password: 'mypassword', }) .expect(201); const cookie = signup.g...
#ifndef CONCURRENTQUEUE_H #define CONCURRENTQUEUE_H #include <queue> #include <optional> #include <mutex> #include <condition_variable> template<typename T, class Container = std::deque<T>> class [[deprecated("Use lca::utils::ConcurrentQueue instead. This class will be deleted after 2022-01-31")]] ConcurrentQueue { p...
<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="rrn:org.xcbl:schemas/xcbl/v4_0/ordermanagement/v1_0/ordermanagement.xsd" xmlns:core="rrn:org.xcbl:schemas/xcbl/v4_0/core/core.xsd" xmlns:dgs="http://www.w3.org/2000/09/xmldsig#" targetNamespace="rrn:org.xcbl:schemas/x...
<!DOCTYPE html> <html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"> <head> <!-- Required meta tags --> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <title>Thanh toán</tit...
import queue import networkx as nx from Gen.AssignmentStatementListener import AssignmentStatementListener from Gen.AssignmentStatementParser import AssignmentStatementParser class ASTListener(AssignmentStatementListener): def __init__(self): self.ast = AST() # Data structure for holding t...
package ru.practicum.shareit.item; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.http.ResponseEntity; import org.springframework.http.client.HttpCompone...
// // Created by loumouli on 10/20/23. // #include "Course.hpp" #include <iostream> using namespace std; Lists<Student> &StudentList = Singleton<Lists<Student>>::instance(); //Lists<Room> &RoomList = Singleton<Lists<Room>>::instance(); //Lists<Course> &CourseList = Singleton<Lists<Course>>::instance(); Lists<Staff> ...
from django.contrib import admin from .models import Product, Client, Order class ProductAdmin(admin.ModelAdmin): """Список продуктов.""" list_display = ['title', 'price', 'date_add'] list_filter = ['price', 'date_add'] ordering = ['price', 'date_add'] search_fields = ['description'] readonly_...
import parse from 'html-react-parser'; import { useContext, useState } from 'react'; import { FormattedMessage, IntlShape, injectIntl } from 'react-intl'; import { Link, useParams } from 'react-router-dom'; import Combobox from '../components/base/Combobox'; import Header from '../components/common/Header'; import Navi...
-- (C) 2002 Roger Villemaire villemaire.roger@uqam.ca -- We model a window retrasmission protocol (Go-back-N). -- REMARK Acknowledge N is an ack for all frames of Id strictly before N -- in the window. -- The window beginning (WB) is the Id of the first non-acknowledge frame. -- The window end (WE) is one mor...
The EXPORT keyword generates a CMake file containing code to import all targets listed in the install command from the installation tree. EXPORT关键字生成一个CMake文件,该文件包含从安装树导入install命令中列出的所有目标的代码。 CMAKE_CURRENT_LIST_DIR:当 CMake 处理项目中的列表文件时,此变量将始终设置为当前正在处理的列表文件 (CMAKE_CURRENT_LIST_FILE) 所在的目录 这一章是为了导出自己的包以及进行配置 首先,设置需要安装...
import { Body, Controller, Get, NotFoundException, Param, Post, } from '@nestjs/common'; import { MessageCreateDto } from './dto/message-create.dto'; import { ISocketService } from '../../chats/services/socket/socket.service'; import { ApiMessage, toAPIMessage } from '../../serializers/messages'; import { ...
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> <script type="text/javascript"> class Animal{ move = '움직임'; constructor(name){ document.write(`<br>Animal 생성자`); this.name = name; this.speed = 0; } run(speed){ this.speed = speed; document.write(`<br>${this.name} : ...
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { HttpClientModule } from '@angular/common/http'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { BrowserAnimationsModule } from '@angular/platfor...
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { HerosComponent } from './heros/heros.component'; import { DashboardComponent } from './dashboard/dashboard.component'; const router: Routes = [ { path: '', redirectTo: "dashboard", pathMatch: 'full' }, { path...
import { Box, Checkbox, TableHead, TableSortLabel, } from '@mui/material'; import { ArrowDownward as ArrowDownwardIcon } from '@mui/icons-material'; import { visuallyHidden } from '@mui/utils'; import { HeadCell, StyledTableCell, StyledTableRow, TableProps, } from '..'; import { ShortUrl, User } from '...
from typing import Optional import subprocess import math import threading import sys import dataclasses from dataclasses import dataclass, field # import PIL from PyQt5.QtCore import Qt, QRectF from PyQt5.QtGui import QPainterPath, QFont, QPixmap from PyQt5.QtWidgets import (QGraphicsItem, QGraphicsTextItem, QGraphi...
import { useEffect, useState } from 'react'; import { Filters } from '../Filters'; import { useDispatch, useSelector } from 'react-redux'; import { CardCar } from '../CardCar'; import { Modal } from '../Modal/Modal'; import { getAdvert, selectFavorites, selectFilter, selectIsLoading, } from '../../redux/advert'...
//------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2021 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby grante...
package icon import ( "context" "fmt" "math/big" "github.com/icon-project/centralized-relay/relayer/chains/icon/types" "github.com/icon-project/centralized-relay/relayer/kms" "github.com/icon-project/centralized-relay/relayer/provider" providerTypes "github.com/icon-project/centralized-relay/relayer/types" "g...
import speech_recognition as sr import pywhatkit import pyttsx3 import datetime import wikipedia import pyjokes # Initialize the text-to-speech engine engine = pyttsx3.init() voices = engine.getProperty('voices') engine.setProperty('voice', voices[1].id) # Use a female voice; adjust the index if necessary def talk(t...
import clsx from 'clsx'; import React, { useEffect, useRef } from 'react'; interface CodeInputProps { value: (string | undefined)[]; onChange: (value: (string | undefined)[]) => void; disabled?: boolean; } export const CodeInput: React.FC<CodeInputProps> = ({ value, onChange, disabled, }) => {...
import { z } from 'zod'; import { messages } from '@/config/messages'; import { validateEmail, validatePassword, validateConfirmPassword, } from '@/utils/validators/common-rules'; // form zod validation schema export const signUpSchema = z.object({ firstName: z.string().min(1, { message: messages.firstNameRequ...
// @ts-check // // The line above enables type checking for this file. Various IDEs interpret // the @ts-check directive. It will give you helpful autocompletion when // implementing this exercise. /** * Determines how long it takes to prepare a certain juice. * * @param {string} name * @returns {number} time in m...
import { yupResolver } from "@hookform/resolvers/yup"; import { Alert, Box, Button, Grid } from "@mui/material"; import { type AxiosError, type AxiosResponse } from "axios"; import { type ReactElement } from "react"; import { Helmet } from "react-helmet"; import { FormProvider, type SubmitHandler, useForm } from "react...
require "rails_helper" RSpec.describe FarmersMarketsController, :type => :routing do describe "routing" do it "routes to #index" do expect(:get => "/farmers_markets").to route_to("farmers_markets#index") end it "routes to #new" do expect(:get => "/farmers_markets/new").to route_to("farmers_...
import React from "react"; type ButtonType = "button" | "submit" | "reset"; interface ButtonProps { children: React.ReactNode; classname: string; onClick: () => void; type?: ButtonType; } const Button = (props: ButtonProps) => { const { children, classname = "bg-black", onClick = () => {}, ...
# Table of patients, PCR result output$table_patients_pcr_res <- renderTable({ req(dengue_dta_filt()) req(dengue_dta_filt() %>% nrow() >= 1) dengue_dta_filt() %>% filter(pcr_result %in% c("Negative", "Equivocal", "Positive")) %>% pull(pcr_result) %>% table_method_results() }) # Plot of patients, P...
"""Module for endpoint routing and back-end process""" from flask import render_template, redirect, request, session, flash from app import app import users import budgets import user_budgets import category_search import services.budget_service import services.user_service @app.route("/") def index(): """Function...
import transIct from "../../assets/images/trans-ict.png"; import { SlLocationPin } from "react-icons/sl"; import { HiOutlineMail } from "react-icons/hi"; import { LuClock9 } from "react-icons/lu"; import { BsFillTelephoneFill } from "react-icons/bs"; import { FollowUsData } from "../../data/topNavbarData"; const Drawe...
package sql_connection import ( "context" "database/sql" "sync" db "git-codecommit.eu-central-1.amazonaws.com/v1/repos/pkgs/db" ) type Pool struct { connections map[string]*sql.DB locker *sync.RWMutex } func NewPool() *Pool { return &Pool{locker: &sync.RWMutex{}, connections: map[string]*sql.DB{}} } ty...
package com.gson.algo.leetcode.math; /** * https://leetcode.cn/problems/stone-game-vii/ */ public class 石子游戏VII { /** * 设置dp[i][j],表示 剩余石子范围i~j, 当前轮次中先手操作后,(先手的得分 - 后手的得分)的最大值。先手可能是A,有可能是B * * 本题,对于A,B来说,到自身局时,都是力争求得 (自己得分-对手得分)最大值,这才是自身的选择方案。 * * i >= j,dp[i][j]明显为0。 * 当 j - i = 1...
#ifndef CORE_GRAPHICS_RAY_H_ #define CORE_GRAPHICS_RAY_H_ namespace ml { template<class FloatType> class Ray { public: Ray(const point3d<FloatType> &o, const point3d<FloatType> &d) { m_Origin = o; m_Direction = d; m_InverseDirection = point3d<FloatType>((FloatType)1.0/d.x, (FloatType)1.0/d.y, (FloatType)1.0/...
# MongoDB Atlas Vector Search on Images # Atlas Vector Search on Images Ever wonder how you can search through images of products by simply describing what you're looking for? Well this little demo will help you understand how this is acheived by using a combination of the [HuggingFace Sentence Transformer framework]...
#![allow(dead_code)] use super::custom_error_repo::CustomErrors; use crate::landlord::domain_layer::landlord::Landlord; use crate::AppState; use uuid::Uuid; pub struct LandlordRepository { app_state: AppState, } impl LandlordRepository { pub async fn new() -> Self { LandlordRepository { a...
// See https://aka.ms/new-console-template for more information using Microsoft.EntityFrameworkCore; Console.WriteLine("Hello, World!"); ApplicationDbContext context = new(); #region One to One İlişkisel Senaryolarda veri ekleme //{principal : müdür, ana} #region 1. Yöntem -> Principal Entity üzerinden Depenent Ent...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <malloc.h> int N;//定义一个全局变量用来表示字符节点个数 //节点结构 typedef struct{ char data;//字符节点 int weight;//权重 int parent; //父亲 int lchild;//左孩子 int rchild;//右孩子 }hafuman; //编码数据结构 typedef struct{ char bits[53];//存放编码数据 int start; //标记开始存放...
import { Component, OnInit, ViewChild } from '@angular/core'; import { jqxLoaderComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxloader'; import { ApiService } from '../../api/api.service'; import { RequestHelper } from '../../api/request/request-helper'; import { StoreProcedures } from '../../api/request/st...
/** * If you are not familiar with React Navigation, refer to the "Fundamentals" guide: * https://reactnavigation.org/docs/getting-started * */ import { FontAwesome } from '@expo/vector-icons'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { NavigationContainer, DefaultTheme, Dark...