text
stringlengths
184
4.48M
from enum import Enum class _AutoNumber(Enum): def __new__(cls): value = len(cls.__members__) + 1 obj = object.__new__(cls) obj._value_ = value return obj class ErrorCode(_AutoNumber): # Invalid data INVALID_DATA = () NO_CONFIG_PROVIDED = () INVALID_CERTIFICATE = ...
# Homework12 ## UML диаграмма авторизации ### код ```plantuml @startuml interface IController { + generateAuthToken(): string + getToken(): string } interface IManager { + authorizeUser(token: string): boolean + validateToken(token: string): boolean } interface IRepository { + saveToken(token: s...
\subsection{Running Streams - Quickstart} Designing a simple stream process does not require more than writing some XML declaration and executing that XML with the stream-runner as shown in the following figure: \begin{figure}[h!] \centering \includegraphics[scale=0.3]{graphics/quickstart-xml} \caption{\label{fi...
import { ReactNode, useCallback, useContext, useEffect } from "react"; import { useState } from "react"; import { createContext } from "react"; import { api } from "../services/api"; interface GenreResponseProps { id: number; name: "action" | "comedy" | "documentary" | "drama" | "horror" | "family"; title: strin...
import { Injectable } from '@angular/core'; import { CanActivate, Router } from '@angular/router'; import { KeyManagementService } from '../../services/key.service'; @Injectable({ providedIn: 'root' }) export class LoginGuard implements CanActivate { constructor(private router: Router, private keyManagementServic...
/* ** EPITECH PROJECT, 2024 ** Scene ** File description: ** Raytracer */ #pragma once #include <vector> #include <string> #include <memory> #include <iostream> #include <functional> #include <unordered_map> #include <libconfig.h++> #include "Lights/Point.hpp" #include "Lights/Ambient.hpp" #include "Primitives/Cone....
# Entity Framework Core Entity Framework (EF) Core is a lightweight, extensible, open source and cross-platform version of the popular Entity Framework data access technology. EF Core can serve as an object-relational mapper (O/RM), Which enables .NET developers to work with a database using .NET objects. And eli...
"""OpenFOAM input files .. rubric:: AST and parser .. autosummary:: :toctree: ast generators parser format .. rubric:: Helper to create input files .. autosummary:: :toctree: blockmesh control_dict fields fv_schemes constant_files fv_options decompose_par util...
package org.example.tree.BST; import org.example.tree.IndexInterface; import java.util.HashMap; import java.util.HashSet; import java.util.Map; public class BinarySearchTree implements IndexInterface<TreeNode> { public TreeNode root; public TreeNode getRoot() { return root; } public void s...
package com.pilipiknow.knowyouknow; import android.content.Context; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.FrameLayout; import androi...
import React, { useState } from 'react' import { Link, useNavigate } from 'react-router-dom'; import axios from 'axios'; import '../SignUp/SignUp.css'; import {BASE_URL} from '../../services/helper' const SignUp = () => { const [name, setName] = useState(''); const [email, setEmail] = useState(''); const [...
<template> <div v-if=isAuth class="swipekey-your-secrets-root"> <h4>Your Secrets</h4> <p> This page contains all of your application secrets for use within your applications. All of these are encrypted and can only be read with your SwipeKey master token. </p> <div v-if="isAuth" clas...
import { type NFTInfo } from '@btcgreen/api'; import { useTransferNFTMutation } from '@btcgreen/api-react'; import { Button, ButtonLoading, EstimatedFee, Form, Flex, TextField, btcgreenToMojo, useOpenDialog, useShowError, } from '@btcgreen/core'; import { Trans } from '@lingui/macro'; import { Alert, ...
class Node(): def __init__(self, data): self.data = data self.left = None self.right = None class BST(): def __init__(self): self.root = None def insert(self, data): self.root = self.insert_helper(self.root, data) def insert_helper(self, node, data): ...
import { FC } from "react"; import { useRouter } from "next/router"; import spotifyIcon from "../../static/spotify-icon.png"; import Image from "next/image"; interface ArtistInfoProps { artistName: string; url: string; artistID: string; position?: number; artistURL: string; } const ArtistInfo: FC<ArtistInfo...
import { Component, OnInit } from '@angular/core'; import { HttpClient, HttpHeaders} from '@angular/common/http'; import { Router } from '@angular/router'; import Swal from 'sweetalert2'; @Component({ selector: 'app-all-courses', templateUrl: './all-courses.component.html', styleUrls: ['./all-courses.component.c...
<?php /** * @file * The Out of stock notification module file * * It provides both client side and server side stock validation. */ /** * Implements of hook_form_alter() */ function uc_out_of_stock_form_alter(&$form, &$form_state, $form_id) { static $settings_js = array(); $forms = array('uc_product_add_t...
import React, { useEffect, useState } from "react"; import { Link, useParams } from "react-router-dom"; import SidebarGA from "../components/sidebar-ga"; function DetailInterviewGA() { const [interview, setInterview] = useState(null); const { id } = useParams(); function formatTime(datetimeString) { const da...
package org.thoughtcrime.securesms.util; import android.content.Context; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; import android.os.Build; import android.view.View; import android.widget.ImageView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androi...
--- date: 2024-02-03 19:03:17.132416-07:00 description: "How to: Working directly with YAML in Bash requires a bit of ingenuity\ \ since Bash does not have built-in support for parsing YAML. However, you can use\u2026" lastmod: '2024-03-13T22:45:00.262459-06:00' model: gpt-4-0125-preview summary: Working directly wit...
import { ApiProperty } from '@nestjs/swagger'; import { IsNumber, IsOptional, IsString, IsUUID, MinLength, } from 'class-validator'; export class CreateBookingLocationDto { @IsString() @MinLength(2) @ApiProperty() title: string; @IsUUID() @ApiProperty() cityId: string; @IsOptional() @IsNu...
/* * Copyright 2012-2015 the original author or authors. * * 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 appli...
export enum MessageError { CLIENT_TOKEN_NOT_GIVEN = 'Token not given', CLIENT_TOKEN_EXPIRED = 'Token expired.', CLIENT_TOKEN_INVALID_SIGNATURE = 'Token invalid signature.', CLIENT_TOKEN_NOT_FOUND = 'Token not found.', CLIENT_TOKEN_FK_USER_NOT_FOUND = 'Token foreign key user not found.', CLIENT_P...
from django.shortcuts import get_object_or_404 from django.core.exceptions import PermissionDenied from rest_framework import viewsets from posts.models import Comment, Group, Post from rest_framework.pagination import LimitOffsetPagination from .serializers import (CommentSerializer, GroupSerializer, PostSerializer) ...
<?php namespace Box\Spout\Common\Helper; /** * Class GlobalFunctionsHelper * This class wraps global functions to facilitate testing * * @codeCoverageIgnore */ class GlobalFunctionsHelper { /** * Wrapper around global function fopen() * @see fopen() * * @param string $fileName * @par...
from pydub import AudioSegment from pydub.silence import detect_nonsilent import argparse import os import csv def analyse_audio(file_path): # Load the audio file audio = AudioSegment.from_file(file_path, format="mp3") print(f"Channels Detected: {audio.channels}") bursts = [0] * audio.channels #...
package urltree_test import ( "testing" "github.com/stretchr/testify/assert" ) func TestGivenConstantEndpointURLTreeLookupReturnsResult(t *testing.T) { t.Parallel() wantValue := &TestStruct{Data: 1} urlTree := constantURLTree(wantValue) lookupResult := urlTree.Lookup("twitter.com/user/1234") assert.Equal(t, ...
package Automobile; import java.util.Objects; public class ElectricCar extends Automobile implements Vehicle { private double maximumSpeed; public ElectricCar(String brand, String model, double maximumSpeed) { super(brand, model); this.maximumSpeed = maximumSpeed; } public double get...
"use client"; import { setPath } from "@/GlobalRedux/path/pathSlice"; import { pushPathName } from "@/services/routes"; import Link from "next/link"; import { useRouter } from "next/navigation"; import React from "react"; import { useDispatch } from "react-redux"; interface Props { children: React.ReactNode; class...
package vn.edu.hcmuaf.fit.bean; import java.io.Serializable; public class User implements Serializable { private int id; private String fullName; private String email; private String phoneNumber; private String address; private String birthday; private String username; private String p...
--- title: OSO Spawners author: Braden Judson date: " `r Sys.Date()` " date-format: "YYYY-MM-DDTHH:mm:ssZ" format: pdf: documentclass: article toc: true editor: visual execute: cache: true --- # Osoyoos Lake Sockeye Spawners ```{r setup} #| echo: false #| include: false # getwd() options(show.signif.star...
---------------------- MODULE philosopher ---------------------- (* var waiter : boolean = true; fork : array [0..N-1] of boolean = [N of true]; function left(i : integer) : integer; begin left := i; end; function right(i : integer) : integer; begin right := mod (i-1) N; en...
// Copyright 2021, Google LLC, Christopher Banes and the Tivi project contributors // SPDX-License-Identifier: Apache-2.0 package app.tivi.common.compose.ui import androidx.compose.animation.Crossfade import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Text import androidx.com...
package com.tutorac.bookingapp.ui import android.widget.Toast import androidx.compose.foundation.layout.padding import androidx.compose.material.* import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.ArrowBack import androidx.compose.runtime.Composable import androidx.compose.runt...
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { AdminComponent } from './components/admin/admin.component'; import { AdminUserComponent } from './components/admin/user/admin-user/admin-user.component'; import { TransactionsComponent } from './components/admin/u...
package com.aditya.storyverse; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import androidx.activity.EdgeToEdge; import androidx.annotation.NonNull; import a...
import { AuthHttpInterceptor } from './auth/auth-http-interceptor'; import { AuthGuard } from './auth/auth.guard'; import { AuthService } from './auth/auth.service'; import { SharedModule } from './shared/shared.module'; import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'...
<!DOCTYPE html> <html lang="en"> <head> <script async src="../../lib/tagmng4.js"></script> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" type="text/css" href="../../lib/tools.css" /> <link rel="apple-touch-icon" s...
using Microsoft.Extensions.DependencyInjection; namespace MeetingOrganizer.Services.UserAccount; /// <summary> /// Bootstrapper for configuring services related to user accounts. /// </summary> public static class Bootstrapper { /// <summary> /// Adds the user account service to the service collection as a s...
<?php namespace App\Console\Commands; use App\Models\Customer; use App\Models\Order; use App\Models\Tracking; use App\Notifications\Customers\NotificationEmailTrackingLaPosteNumber; use App\Notifications\Customers\NotificationEmailTrackingNumber; use App\Notifications\Customers\NotificationSmsTrackingLaPosteNumber; u...
import { forwardRef } from "@nextui-org/system"; import { CheckboxGroupProvider } from "./checkbox-group-context"; import { UseCheckboxGroupProps, useCheckboxGroup } from "./use-checkbox-group"; export interface CheckboxGroupProps extends UseCheckboxGroupProps {} const CheckboxGroup = forwardRef<"div", CheckboxGroupP...
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateUsersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('users', function ...
package gitlet; import java.io.Serializable; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.util.TreeMap; public class Commit implements Serializable { /** * Constructor for a commit object. Assigns variables and * timestamp of commit. * * @param messag...
/* -------------------------------------------------------- On demand imports */ let viteModule; /* ------------------------------------------------------------------ Imports */ import { resolveConfigPath, resolveSrcPath, resolveLibPath, resolveDistPath, stripProjectPath, ...
from flask import Request, Response, jsonify from model.Model import Model from dao.DAO import DAO def model_post(model_object: Model, dao: DAO, request_json: dict[str, any]) -> Response: if dao.connect(): try: model_object.from_json(request_json) # Prepare the response data with ...
<template> <layout-content header="Custom Resource Definitions"> <div style="float: left"> <el-button type="primary" size="small" :disabled="selects.length===0" @click="onDelete()" v-has-permissions="{scope:'namespace',apiGroup:'apiextensions.k8s.io',resource:'customresourcedefinitions',verb:'delete'}"> ...
#-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2024 the OpenProject GmbH # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License version 3. # # OpenProject is a fork of ChiliProject, which is a fork ...
import React, { useState } from "react"; import { InputText } from "primereact/inputtext"; import { Button } from "primereact/button"; import { MdOutlineTitle } from "react-icons/md"; import { AiOutlineLink } from "react-icons/ai"; import { BiCategoryAlt, BiSolidImage } from "react-icons/bi"; import { Dropdown } from "...
from typing import Any import gradio as gr from langchain.embeddings.openai import OpenAIEmbeddings from langchain.vectorstores import Chroma from langchain.chains import RetrievalQA, ConversationalRetrievalChain from langchain.chat_models import ChatOpenAI from langchain.document_loaders import PyPDFLoader import f...
import { AntDesign, Ionicons } from "@expo/vector-icons" import { NavigationProp, useNavigation } from "@react-navigation/native" import { Box, HStack, IconButton, Image, VStack, DeleteIcon } from "native-base" import * as React from "react" import { TouchableOpacity } from "react-native" import { IconProps } from "./i...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Tommy Comeau | Full Stack Developer</title> <link rel="stylesheet" href="style.css"> <script src="https://kit.fontawesome.com/91ced6fe6d.js" crossorigin="anony...
<%= form_with(model: text) do |form| %> <% if text.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(text.errors.count, "error") %> prohibited this text from being saved:</h2> <ul> <% text.errors.each do |error| %> <li><%= error.full_message %></li> <% end %> ...
import React, { useState, useEffect } from "react"; import { useNavigate } from "react-router-dom"; import { useForm } from "react-hook-form"; import { Button, Checkbox, Form, Input, message, Select } from "antd"; import { getCategories } from "../../../api/category"; interface IProduct { id: number; name: string;...
# Metatags I wrote this out of annoyance at all the other metatag generation gems there are out there. They all, or all that I could find, either mess the attributes you're providing or limit the tags that you can create. What the hell? I just want to create some open graph tags. Use add_meta and pass a hash of whate...
# # This script was written by Tenable Network Security # # This script is released under Tenable Plugins License # desc["english"] = " Synopsis : Access the remote Windows Registry. Description : It was possible to access the remote Windows Registry using the login / password combination used for the Windows loca...
package com.project.board.post.controller; import com.project.board.post.dto.request.PostCreateRequestDto; import com.project.board.post.dto.request.PostGetListRequestDto; import com.project.board.post.dto.request.PostUpdateRequestDto; import com.project.board.post.dto.response.PostCreateResponseDto; import com.projec...
<!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"> <link rel="preconnect" href="https://fonts.gstatic.com"> <link href="https://fonts.googleapis.com/css2?family=Nunito&disp...
import {View} from 'react-native'; import type {Meta, StoryObj} from '@storybook/react'; import {MyButton} from './Button'; const MyButtonMeta: Meta<typeof MyButton> = { title: 'MyButton', component: MyButton, argTypes: { onPress: {action: 'pressed the button'} }, args: { text: 'Hello world' }, d...
import { Card, CardBody, Col, Row } from "reactstrap"; import Chart from "../../common_component/charts"; function Dashboard() { const data = [ { value: 1048, name: "Flexi Cap Fund 32.19%", color: "#75d6ff" }, { value: 735, name: "Small Cap Fund 26.40%", color: "#75ffff" }, { value: 580, name: "Sectoral ...
import os import pickle from PIL import Image import numpy as np import torch from torch.utils.data import Dataset from torchvision import transforms ROOT_PATH = './data/tiered-imagenet-kwon' class TieredImageNet(Dataset): def __init__(self, split='train', size=84, transform=None): split_tag = split ...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>putty - ai</title> <link rel="stylesheet" type="text/css" href="css/styles.css"> </head> <body> <header> <div class="navbar"> <nav> ...
#pragma once #include "Sprite.h" #include "FrameCounter.h" /** * @file SelectCursor.h * @brief 選択中のカーソルを表示やアニメーションさせるためのファイル */ class SelectCursor { public: /** * @fn Initialize() * 初期化関数 */ void Initialize(); /** * @fn LoadResources() * リソース読み込み用関数 */ void LoadResources(); /** * @fn Update() * 更新処理関数 *...
<head> <title>Wikinotes</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.0/semantic.min.css" /> <link rel="stylesheet" href="/static/styles.css" /> <meta name="viewport" content="width=device-width"> <script type="text/javascript" src="https://cdn....
<template> <q-page> <q-card flat :class="{ 'big-margin': isDesktop }" class="first-card"> <q-card-section class="text-center"> <MainLogo /> <h1 class="text-primary text-weight-bold">{{ appName }}</h1> Любите читать? Смотреть фильмы?<br /> Храните свою личную историю?<br /> ...
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class StudentStoreRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * G...
import React, {useState, useEffect} from 'react'; import {api, getErrorMessage} from 'helpers/api'; import {useHistory} from 'react-router-dom'; import {Button} from 'components/ui/Button'; import 'styles/views/Login.scss'; import BaseContainer from "components/ui/BaseContainer"; import PropTypes from "prop-types"; imp...
/* * $Id$ */ // $Workfile: ZipFile.h $ // $Archive: /ZipArchive_STL/ZipFile.h $ // $Date$ $Author$ // This source file is part of the ZipArchive library source distribution and // is Copyright 2000-2003 by Tadeusz Dracz (http://www.artpol-software.com/) // // This program is free software; you can redistribute i...
#include "../../Google_tests/googletest-main/googletest/include/gtest/gtest.h" #include "pcb.hpp" using namespace PCB_dynamic; TEST(ContactConstructor, Default) { contact c; EXPECT_EQ(0, c.p.x); EXPECT_EQ(0, c.p.y); EXPECT_EQ(0, c.type_contact); } TEST(ContactConstructor, Init) { contact c(1, 2, ...
"use client"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Carousel, CarouselContent, CarouselItem, } from "@/components/ui/carousel"; import messages from "@/messages.json"; import { Mail } from "lucide-react"; import Autoplay from "embla-carousel-autoplay" const Ho...
<?php namespace App\Models; use App\Concers\GenderEnum; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasOne; class Candidat extends Model { use HasFactory; prote...
package tester.srv.dao import io.github.gaelrenoux.tranzactio.doobie.{TranzactIO, tzio} import zio.schema.{DeriveSchema, Schema} import doobie.* import doobie.implicits.* import doobie.implicits.javasql.* import doobie.postgres.* import doobie.postgres.implicits.* import doobie.postgres.pgisimplicits.* import Abstrac...
import React, { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { increaseLike, showSidebar } from "../utils/appSlice"; import { useSearchParams } from "react-router-dom"; import { VIDEO_DATA_URL, YOUTUBE_CHANNEL_URL, commentData, } from "../utils/constants"; imp...
class Semaphore { constructor(count) { this.count = count; this.waiting = []; this.mutex = Promise.resolve(); } acquire() { if (this.count > 0) { this.count -= 1; return Promise.resolve(true); } // 현재 포크를 얻을 수 없으면, 대기 큐에 Promise를 추가합니다...
// // CoindeskAPIService.swift // Bitcoin Price // // Created by Juan carlos Faria santiago on 25/4/23. // import Combine import Foundation //http://api.coindesk.com/v1/bpi/currentprice.json struct CoindeskAPIService { public static let shared: CoindeskAPIService = CoindeskAPIService() public func fe...
<#macro title></#macro> <#macro main> <html> <#import "spring.ftl" as spring /> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title><@title/></title> <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,...
import React, { useContext, useState } from "react"; import { Link } from "react-router-dom"; import logo from "../../../assets/logo.png"; import { AuthContext } from "../../../context/AuthProvider/AuthProvider"; export const Header = () => { const [isMenuOpen, setIsMenuOpen] = useState(false); const { user, logo...
<div class="container"> <div class="card o-hidden border-0 shadow-lg my-5"> <div class="card-body p-0"> <!-- Nested Row within Card Body --> <div class="row"> <div class="col-lg-12"> <div class="p-5"> <div class="text-center...
<i18n> en: id: 'BlankDeckFrame' de: id: 'BlankDeckFrame' </i18n> <template lang="pug"> .deck-frame(:class="{'hide-thumbnail': !thumbnail}" oncontextmenu="return false") xy-hex-deck-map.hex-layer( v-if="!thumbnail && isLoaded" :props="mapProps" @hexClick="handleHexClick" @emptyClick="handleEmptyC...
#include <iostream> #include <vector> #include <string> using namespace std; // DO NOT CHANGE CODE ABOVE /** * Name: printArray * Print each element of the generic vector on a new line. Do not return anything. * @param A generic vector **/ // Write your code here // generic T data type template <typename T> ...
# create river network and measure distances among sampling locations. Stream # network "epsg3722_minnesota_stream_dispersal_5km2.shp" was created to connect # all sites with corridor for dispersal # setup ------------------------------------------------------------------- # clean objects rm(list = ls()) # load lib...
<!DOCTYPE html> <html> <head> <title>aboutGPT</title> <link rel="shortcut icon" type="image/x-icon" href="gpt.ico"> <meta charset="utf-8"> <style> a{ color: black; text-decoration: none; } h1 { font-size: 45px; text-align: cente...
import "./assets/styles/index.css"; import { Item } from "./components/Item"; import { List } from "./components/List"; import { useRef, useState } from "react"; import { ToastContainer, toast } from "react-toastify"; import "react-toastify/dist/ReactToastify.css"; const App = () => { const inputValue = useRef(); ...
--- title: 'La Cryogénisation' description: 'La cryogénisation, souvent perçue comme un concept de science-fiction...' tags: ["Cryogénisation", "science-fiction", "organisme", "humain"] slug: 'article3' thumbnail: '/img/cryogenisation.webp' date: '2024-06-26' draft: false --- # La Cryogénisation : Une Exploration de...
import React, { useEffect, useState } from 'react'; import { MDBCol, MDBContainer, MDBRow, MDBCard, MDBCardText, MDBCardBody, MDBCardImage, MDBBtn, MDBTypography } from 'mdb-react-ui-kit'; import { Link } from 'react-router-dom'; export default function Profile() { const [item,setItem] = useState([]); const [Post...
import React from 'react'; import { useMemo, useEffect } from 'react'; import TextField from '@mui/material/TextField'; import Autocomplete from '@mui/material/Autocomplete'; import Box from '@mui/material/Box'; import DynamicIcon from '../mui/DynamicIcon.jsx' import config from '../../config.json' export default fun...
"use client"; import { Disclosure } from "@headlessui/react"; import Image from "next/image"; import { FaRegStar, FaStar } from "react-icons/fa"; import { FaAngleUp, FaEllipsisVertical } from "react-icons/fa6"; import Rating from "react-rating"; const FeedbackSmallView = ({ feedbackData }) => { return ( <> ...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content=""> <title>@yield('title')</title> @include('frontend.layout.styles') <!-- All Javascripts --> @include('frontend....
# Simple Docker ## Part 1. Готовый докер В качестве конечной цели своей небольшой практики вы сразу выбрали написание докер образа для собственного веб сервера, а потому в начале вам нужно разобраться с уже готовым докер образом для сервера. Ваш выбор пал на довольно простой **nginx**. **== Задание ==** #### Взять о...
interface Item { name: string; price: number; img: string; } const Cards = ({ item, handleClick, }: { item: Item, handleClick: (item: Item) => void, }) => { const { name, price, img } = item; return ( <> <section className="flex flex-row px-6 py-4 lg...
import { PiecePropValueSchema, Property, createTrigger, } from '@activepieces/pieces-framework'; import { TriggerStrategy } from '@activepieces/pieces-framework'; import { DedupeStrategy, Polling, pollingHelper, } from '@activepieces/pieces-common'; import { sftpAuth } from '../..'; import dayjs from 'dayjs...
import RestraurantCard from "./RestraurantCard"; // import restrautList from "../utils/mockData"; import { useContext, useEffect, useState } from "react"; import Shimmer from "./Shimmer"; import { Link } from "react-router-dom"; import useOnlineStatus from "../utils/useOnline"; import WhatOnMind from "./WhatOnMind"; im...
const express = require('express') const app = express() const router = express.Router() const mongoose = require("mongoose") const Student = require("./models/student-mongo") const cors = require('cors') app.use(express.json()) app.use(express.urlencoded({extended: true})) app.use(cors()) mongoose.connect("mongodb:...
/* Scan Tailor - Interactive post-processing tool for scanned pages. Copyright (C) 2007-2008 Joseph Artsimovich <joseph_a@mail.ru> 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,...
import assert from 'assert'; import { ArrayType, generalizeType, SourceUnit, StructDefinition, TypeNode, UserDefinedType, } from 'solc-typed-ast'; import { AST } from '../../ast/ast'; import { CairoImportFunctionDefinition } from '../../ast/cairoNodes'; import { CairoFunctionDefinition } from '../../export'...
import { PropsWithChildren } from 'react'; import { Link as LinkComponent } from 'react-router-dom'; import styled from 'styled-components'; const Contents = styled.div` color: ${props => props.theme.railfg2}; font-weight: 500; font-size: 15px; text-align: center; margin: 0.25rem 0; cursor: pointer; t...
import React, { useEffect, useState } from "react"; import "./weatherApp.css"; const WeatherApp = () => { const [weatherData, setWeatherData] = useState({}); const [cityName, setCityName] = useState("Karachi"); const [locationCity, setLocationCity] = useState({}); const [searchCityState, setSearchCityState] = ...
<template> <div class="login-element forgot-page"> <img class="logo-login cursor-pointer" src="/assets/images/logo_white.svg" alt="" @click="changeLink('/')"> <div> <div class="login-title">{{ $t('forgot_pass.title') }}</div> <div id="forgot-des" class="text-center"> <div class="text-mobil...
#= Exercice de traitement d'image: Conversion Vert-Rouge Ton objectif pour cette mission verte est de transformer les pixels verts d'une image en rouge, enflamme cette verdure et fais-nous une belle tomate pixelisée! Voici ta mission photo-synthétique (sans code, pour préserver l'aventure) : Importation de l'image :...
###################################################### # Solved on Friday, 26 - 11 - 2021. ###################################################### ###################################################### # Runtime: 52ms - 92.02% # Memory: 14.1MB - 99.61% #################################################...
import React from 'react' import { useState, useEffect } from 'react'; import './Register.css'; import { Link, useNavigate } from 'react-router-dom'; import { toast } from 'react-toastify'; import axios from 'axios'; import { ApiRegister } from '../Utils/ApiRoutes'; const Register = () => { const navigate = useNav...