text stringlengths 184 4.48M |
|---|
import React, { createContext, useCallback, useState, useContext } from "react";
import api from '../services/api'
interface ISignInCredentials {
email: string;
password: string;
};
interface IUser {
name: string;
email: string;
id: string;
avatar_url: string;
}
interface IAuthState {
token: string;
... |
/*
* Copyright (c) 2017 Stuart Boston
*
* This file is part of the Board Game Geek API Wrapper.
*
* This API wrapper 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 versi... |
<?php
class Alunno implements JsonSerializable
{
protected $nome;
protected $cognome;
protected $eta;
public function __construct($nome, $cognome, $eta)
{
$this->nome = $nome;
$this->cognome = $cognome;
$this->eta = $eta;
}
public function jsonSerialize(){
$... |
//*Swiper
// *Import base
import styles from './slider.module.scss';
import './slider.scss';
//*Import images
import specialist1 from './../../assets/image/specialist1.png';
import specialist2 from './../../assets/image/specialist2.png';
import specialist3 from './../../assets/image/specialist3.png';
import specialis... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>gen4 - Doom</title>
<!-- put your name here -->
<meta name="author" content="Enrico Di Pietro">
<!-- put page info here -->
<meta name="date" content="1993-12-10"> <!-- the date the product was launched -->
<meta name="... |
import React, { useState } from 'react';
import MoviesList from './components/MoviesList';
import './App.css';
function App() {
const [movies, setMovies] = useState([]);
function fetchMoviesHandler() {
fetch('https://swapi.dev/api/films/')
.then((response) => response.json())
... |
:tower_url: https://your-control-node-ip-address
:license_url: http://ansible-workshop-bos.redhatgov.io/wslic.txt
:image_links: https://s3.amazonaws.com/ansible-workshop-bos.redhatgov.io/_images
= Exercise 1.5 - Creating and Running a Job Template
---
A job template is a definition and set of parameters for running ... |
import { Link } from "react-router-dom";
const Phone = ({phone}) => {
const {id, phone_name, brand_name, rating, price, image} = phone || {}
return (
<div>
<div className="relative flex w-96 flex-col rounded-xl bg-white bg-clip-border text-gray-700 shadow-md">
<div classN... |
/*
* Copyright (c) 2020-2022 Mauro Trevisan
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, mer... |
package com.budgettracking.controller;
import java.util.List;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotatio... |
"use client";
import React, { useEffect, useState } from "react";
import { useFormState, useFormStatus } from "react-dom";
import {
AlertDialog,
AlertDialogContent,
AlertDialogDescription,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import {
Select,
S... |
//
// HomeGoalHeader.swift
// Fitness Tracker
//
// Created by Ben Gavan on 25/08/2017.
// Copyright © 2017 Ben Gavan. All rights reserved.
//
import Foundation
//import LBTAComponents
class GoalsHeader: DatasourceCell {
override func setupViews() {
super.setupViews()
self.backg... |
import React from "react";
import { View, Dimensions, TouchableOpacity, StyleSheet, Text } from "react-native";
import { Avatar } from "react-native-elements";
import Feather from 'react-native-vector-icons/Feather';
const styles = StyleSheet.create({
container: {
width: '100%',
flex: 1,
al... |
const {promisify}=require('util');
const jwt=require('jsonwebtoken');
const User=require('../models/userModel');
const catchAsync=require("../utils/catchAsync");
const AppError=require("../utils/appError");
const sendEmail=require("../utils/email");
const crypto=require('crypto');
const signToken=id=>{
return jwt... |
The Date Time Javascript Library
Author(copyright): Edward Macnaghten <eddy@edlsystems.com>
Version 2.0 - 17-March-2019
License: GPL-V3.0
INTRODUCTION
This is maninly a wrapper around the Javascript "Date" object to make it easier
to incorporate.
Dates are complex. If you do not think so, then imagine the differenc... |
import React, { useEffect } from 'react';
import { Routes, Route, useLocation } from 'react-router-dom';
import { HomePage } from './pages/HomePage/HomePage'
import { NotFoundPage } from './pages/NotFoundPage/NotFoundPage'
import { LoginPage } from './pages/LoginPage/LoginPage'
import appStyles from './app.module.css';... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQ... |
import React, { useContext, useState } from "react";
import axios from "axios";
import { useEffect } from "react";
import { useRef } from "react";
// import { usernameContext, passwordContext } from "../../../App";
const Community = () => {
// const [array, setArray] = useState([{ username: "Krish", message: "Hi" ... |
<?php
namespace CrazyFactory\SpapiClient;
class Authentication
{
/**
* ## Signature Version 4 signing process
*
* Signature Version 4 is the process to add authentication information to AWS requests sent by HTTP.
* For security, most requests to AWS must be signed with an access key,
* whi... |
[discrete]
[[esql-to_integer]]
=== `TO_INTEGER`
Converts an input value to an integer value.
The input can be a single- or multi-valued field or an expression. The input
type must be of a boolean, date, string or numeric type.
Example:
[source.merge.styled,esql]
----
include::{esql-specs}/ints.csv-spec[tag=to_int-l... |
/* eslint-disable @typescript-eslint/no-this-alias */
import mongoose from "mongoose";
import User, { IUser } from "./user";
export interface ITransaction {
patientId: mongoose.PopulatedDoc<IUser>;
doctorId: mongoose.PopulatedDoc<IUser>;
amount: number;
transactionId: string;
status: string;
dateTime: stri... |
import { ApiProperty } from "@nestjs/swagger";
import {
IsDate,
IsNumber,
IsOptional,
IsString,
Min,
MinDate,
} from "class-validator";
export class UpdateCleaningSubscriptionBookingDto {
@ApiProperty({
required: false,
description: "Date of the cleaning",
})
@IsOptional()
@IsDate({ message... |
import matplotlib.pyplot as plt
import numpy as np
from sklearn import datasets, linear_model
from sklearn.neighbors import KNeighborsClassifier
def nearest_neighbour_curse_of_dimensionality() -> None:
"""
Classification with 3 different types of irises
(Setosa, Versicolour, and Virginica) from their
... |
import React from 'react';
// 컨텍스트 가져오기
import {ViewProductContext} from '../../context/ViewProductContext';
export default function Section4SlideWrapSlide({상품}) {
// 컨텍스트 사용 등록
const {setViewProductFn} = React.useContext(ViewProductContext);
const [state, setState] = React.useState({
H:0, /... |
import streamlit as st
from pytube import YouTube
from dotenv import load_dotenv
load_dotenv()
import os
import google.generativeai as genai
from youtube_transcript_api import YouTubeTranscriptApi
genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
prompt="""You are Yotube video summarizer. You will be taking the ... |
//
// Copyright (C) 2012-2023 Jack Araz, Eric Conte & Benjamin Fuks
// The MadAnalysis development team, email: <ma5team@iphc.cnrs.fr>
//
// This file is part of MadAnalysis 5.
// Official website: <https://github.com/MadAnalysis/madanalysis5>
//
// MadAnalysis 5 is free software: you can redistribute it and... |
import 'Cliente.dart';
import 'Tecnico.dart';
import 'ParteTecnico.dart';
import 'ParteTrabajo.dart';
class Trabajo {
Cliente cliente;
Tecnico tecnico;
ParteTrabajo parteTrabajo;
ParteTecnico parteTecnico;
String descripcion;
bool hecho;
double presupuesto;
Trabajo(String desc, Cliente clienteCreador... |
import { TextField } from "@mui/material";
import html2canvas from "html2canvas";
import jsPDF from "jspdf";
import React, { useEffect, useRef, useState } from "react";
import { sendInventory } from "../services/orderService";
import Card from "../UI/Card";
import style from "./AdminInventory.module.css";
import SaveAl... |
#!/usr/bin/env python3
"""Compile a summary of latest dictionary data to accompany a release."""
from rich import print
from db.get_db_session import get_db_session
from db.models import PaliWord, PaliRoot, Sandhi, DerivedData
from tools.pali_sort_key import pali_sort_key
from tools.tic_toc import tic, toc
from tool... |
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.Tokens;
using Soda.AutoMapper;
using Soda.Ice.Domain;
using Soda.Ice.Shared.ViewModels;
using Soda.Ice.WebApi.Auth;
using Soda.Ice.WebApi.Opti... |
{%- liquid
assign default_color = 'rgba(0,0,0,0)'
assign items_resp = section.settings.items_resp | default: '3,2,1'
assign enable_menu = section.settings.enable_menu
assign sectionID = '#section-' | append: section.id
assign block_bg_color = section.settings.block_bg_color | default: default_col... |
import { useState } from "react";
import { StyleSheet, View, FlatList, Button } from "react-native";
import { StatusBar } from "expo-status-bar";
import GoalItem from "./components/GoalItem";
import GoalInput from "./components/GoalInput";
export default function App() {
const [courceGoal, setCourceGoal] = useState... |
import { SanityDocument } from 'next-sanity';
import { PortableTextBlock } from 'sanity';
export interface ImageType {
caption?: string;
asset: {
_ref: string;
_type: string;
};
_type: string;
alt?: string;
}
export type ShoppingCartProviderProps = {
children: any;
};
export interface ShoppingCart... |
<!DOCTYPE html>
<html lang="PT-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Calcule seu Índice de Massa Corporal (IMC) e descubra os benefícios de estar dentro do IMC adequado.
Melhore sua saúde, fortaleça o ... |
############ Function ####################
[T, V, U, H, S] = Super_Water_Table(label, value, P)
############ Description #################
Super_Water_Table is a function that searches the Superheated Water Pressure Tables
and outputs the values associated with an input value. The function automatically
interpolate... |
<?php
use App\Models\Enums\OrderStatusEnum;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
use HasUuids;
/**
* Run the migrations.
... |
import { HardhatRuntimeEnvironment } from "hardhat/types"
import { DeployFunction } from "hardhat-deploy/types"
// Deployment names
const META_POOL_NAME = "SaddleSUSDMetaPoolV3"
const META_POOL_LP_TOKEN_NAME = `${META_POOL_NAME}LPToken`
const META_POOL_DEPOSIT_NAME = `${META_POOL_NAME}Deposit`
const TARGET_META_SWAP_D... |
package org.example;
import lombok.Getter;
import lombok.Setter;
import java.util.Scanner;
@Setter
@Getter
public class MazeGame {
private static final char STOP = 'B';
private static final char EMPTY = '.';
private static final char OBSTACLE = 'X';
private char[][] board;
private int rows;
pr... |
package pers.sg.kms.daos;
import java.util.List;
import org.hibernate.LockOptions;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;
import pers.sg.kms.model.Leaveschool;
/**
* A data access... |
import React, { useContext, useEffect, useState } from 'react'
import Axios from 'axios'
import Container from '@mui/material/Container'
import Paper from '@mui/material/Paper'
import Box from '@mui/material/Box'
import Card from '@mui/material/Card'
import CardContent from '@mui/material/CardContent'
import TextField ... |
#include <iostream>
using namespace std;
void argumentByValue(int n) {
n++;
cout << "Im Funktionsaufruf von argumentByValue hat das Argument " << "nach dem Inkrementieren den Wert " << n << endl;
}
void argumentByReference1(int* p) {
(*p)++; // int-Wert an der Speicherstelle p wird um 1 erhöht
cout << "Im Funkti... |
import { assert, describe, it, beforeAll } from 'vitest'
import { fireEvent, getByTestId, render } from '@testing-library/preact'
import { App } from '../src/App'
describe('App', () => {
let container
beforeAll(() => {
const render_result = render(<App />)
container = render_result.container
})
it('c... |
<?php
include 'functions.php';
$rawMessage = 'LEVKHWDKOXAESDXKHOHLHYLVEBIKXOWIHVIDKXOVHDKHOEKDWVDY OJDEOJIYDRIVDBDOJDXKDKODSIKLIKIWWHOIKLVHWIHLEQDOHSDCHG EVDCJCJDHEOOXGHLHSHDVXYYDGEOESEGEWDKDCDESIWWDKRHYD EKISXIHKKDBHKIWWIXWLDQIEVIDKBHLLDWDQGDHKLEYLHLEHLLHOOH LESHSDRIVYDSVEKDXKESIDMXHWDDKGHVLDOEWHVIJHDQGHLLHLEW... |
import { IconProp } from "@fortawesome/fontawesome-svg-core";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { FunctionComponent } from "react";
import { useRouter } from 'next/navigation';
type SidebarLinkProps = {
icon: IconProp,
redirectUrl: string
}
const SidebarLink: FunctionCom... |
import { useState } from "react";
import { daysOfWeek } from "../helpers/date";
import { IModal, IHabit } from "../helpers/types";
import { CloseSVG } from "../assets/SVG/CloseSVG";
interface ModalProps {
modal: IModal;
setModal: React.Dispatch<React.SetStateAction<IModal>>;
habits: IHabit[];
updateHabits: Rea... |
import ReactPlayer from "react-player";
import { Modal } from "antd";
import { useCurrentBreakpoint } from "../hooks";
/**
* VideoModal
*
* Modal for ReactPlayer compenent
*/
export const VideoModal: React.FC<{
url: string;
visible: boolean;
onCancel: () => void;
}> = ({ url, visible, onCancel }): JSX.Elemen... |
package com.test.poi.extract;
import java.io.IOException;
import java.util.List;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Row;
import org.apache.po... |
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
import { EVENT_FLOW_ADVANCE, EVENT_FLOW_INSPECTOR_TOGGLE } from "@goauthentik/common/constants";
import { AKElement } from "@goauthentik/elements/Base";
import "@goauthentik/elements/Expand";
import { msg } from "@lit/localize";
import { CSSResult, Templ... |
#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from Red Hat Security Advisory RHSA-2008:0038 and
# CentOS Errata and Security Advisory 2008:0038 respectively.
#
if (NASL_LEVEL < 3000) exit(0);
include("compat.inc");
if (description)
{
script_id... |
import asyncio
import random
from enum import Enum
from typing import Optional
from dataclasses import dataclass
from datetime import datetime, timedelta
class Response(Enum):
Success = 1
RetryAfter = 2
Failure = 3
class ApplicationStatusResponse(Enum):
Success = 1
Failure = 2
@dataclass
class Ap... |
// * Hooks
import { useState, useEffect } from 'react'
// * Cmps
import Home from '@/components/Home'
import Footer from '@/components/Footer'
import Collections from '@/components/Collections'
import ContactUs from '@/components/ContactUs'
import Portfolio from '@/components/Portfolio'
import MainHeader from '@/compo... |
<template>
<div class="item">
<input
type="checkbox"
name=""
id=""
@change="updateCheck()"
v-model="item.completed"
/>
<span :class="[item.completed ? 'completed' : '', 'itemText']">{{
item.name
}}</span>
... |
<template>
<APanel
:isOpen="isOpen"
contentClass="menu-mob__content"
class="menu-mob"
:class="{ [active]: true }"
@close="close"
>
<transition :name="transitionName">
<MenuMobMain v-if="active === 'main'" v-model="active" />
<MenuMobCategories v-if="active === 'categories'" @back... |
package the_bloater.large_class;
public class ExtractSubClass {
// todo: extract subclass PartsItem & LaborItem from JobItem
abstract class JobItem {
private int quantity;
public JobItem(int quantity) {
this.quantity = quantity;
}
public int getTotalPrice() {
return quantity * getUnitPrice();
}
... |
#!/usr/bin/python3
"""Defining a locked class"""
class LockedClass:
"""This class is used to create a dynamic creation
of attributes. only those mentioned in list can be
created"""
__slots__ = ['first_name']
def __init__(self, name=None):
"""This function is used to initialize the c... |
# source("app_server.R")
# Li-followings are variables needed for maps tab:
# ----------------------------------------------------------------------------
# read in the Jasper's table(subject to change)
map_df <- read.csv("OurData.csv", stringsAsFactors = FALSE)
# only use the county data, ignore city data(they are no... |
////给定一个 N 叉树,返回其节点值的 前序遍历 。
////
//// N 叉树 在输入中按层序遍历进行序列化表示,每组子节点由空值 null 分隔(请参见示例)。
////
////
////
////
////
//// 进阶:
////
//// 递归法很简单,你可以使用迭代法完成此题吗?
////
////
////
//// 示例 1:
////
////
////
////
////输入:root = [1,null,3,2,4,null,5,6]
////输出:[1,3,5,6,2,4]
////
////示例 2:
////
////
////
////
////输入:root = ... |
import React, {useState, useEffect} from 'react' // ES6
import './NavbarComp.css'
import {Navbar, Container, Nav, NavDropdown} from 'react-bootstrap'
import {Link} from 'react-router-dom'
import {
BrowserRouter as Router,
Routes,
Route
} from 'react-router-dom'
import Home from './Home'
import Contact from './Co... |
import { Table } from "docs-ui"
import ApiKeyEvents from "../commerce-modules/api-key/events/_events-table/page.mdx"
import AuthEvents from "../commerce-modules/auth/events/_events-table/page.mdx"
import CartEvents from "../commerce-modules/cart/events/_events-table/page.mdx"
import CurrencyEvents from "../commerce-mod... |
package main
import (
"fmt"
"log"
"net/http"
"time"
"github.com/ArtyomHov/go-booking/pkg/config"
"github.com/ArtyomHov/go-booking/pkg/handlers"
"github.com/ArtyomHov/go-booking/pkg/render"
"github.com/alexedwards/scs/v2"
)
const portNumber = ":8080"
var app config.AppConfig
var session *scs.SessionManager
... |
from ..config import *
from ..handler.timerConverter import TimeConverter
TC = TimeConverter(DB)
Animations = {
"Enemies":{},
"Friendly":{
"Chicken":{
'Walk':{
'left':[(96,145,16,16),(112,145,16,16),(128,145,16,16)],
'right':[(96,162,16,16),(112,162,16,16),(1... |
#include "variadic_functions.h"
/**
* sum_them_all - function that sums up arguments
* @n: size of array
*
* Return: Always 0 (Success)
*/
int sum_them_all(const unsigned int n, ...)
{
va_list ap;
int sum = 0;
unsigned int i;
if (n == 0)
{
return (0);
}
va_start(ap, n);
for (i = 0; i < n; i++)
{
s... |
<div class="container-fluid">
<div class="row no-gutter">
<div class="col-md-6 d-none d-md-flex bg-image"></div>
<div class="col-md-6 bg-light">
<div class="login d-flex align-items-center py-5">
<div class="container">
<div class="row">
... |
from subinterpreter_parallelism import parallel
from pure_cpp_parallelism import c_factorial
from random import randint
import isolated_benchmark
from multiprocessing import Process
from threading import Thread
import logging
import time
logging.basicConfig(
format='[%(asctime)s.%(msecs)03d] %(message)s',
... |
#%%
import numpy as np
from scipy.optimize import curve_fit
from scipy.special import assoc_laguerre
import math
#%% ------------------ Rabi Frequencies & Distributions ------------------
def rabi_freq(nStart, nDelta, LD_param):
"""
Calculates Rabi Frequency for nStart -> nStart + nDelta
Args:
nSt... |
from permutations import permutations
from itertools import accumulate
def iter2set(fn):
def wrapper(*args):
return set(fn(*args))
return wrapper
def is_matched(expr):
"""
Credit to Alain T.:
https://stackoverflow.com/questions/38833819/python-program-to-check-matching-of-simple-parenth... |
<?php
namespace App\Services\Polls;
use App\Models\Poll;
class PollVotesService
{
public $poll;
public function __construct($poll)
{
$this->poll = $poll;
}
/**
* Add a vote to the poll.
*
* @param string $name The name of the voter.
* @param array $selectedPollA... |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>BookFreak</title>
<!-- goole fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;400;90... |
import discord
from discord.ext import tasks
from discord import app_commands
from mcstatus import JavaServer
import time
from constants import discord_bot_token
intents = discord.Intents.default()
client = discord.Client(intents=intents)
tree = app_commands.CommandTree(client)
last_update_players = []
server_addres... |
// Global variables
float ballX, ballY;
float ballSpeedX = 6, ballSpeedY = 6;
float paddleX, paddleSpeed = 10, paddleWidth = 100, paddleHeight = 20;
boolean moveLeft = false, moveRight = false;
boolean isPaused = false;
String[] grid = {
"OOOOOOOOOOOOOOOOOOOO",
"OOOOOOOOOOOOOOOOOOOO",
"OOOOOOOOOXXOOOOOOOOO",
"... |
import { ApiProperty } from '@nestjs/swagger';
export class RegisterRequestDto {
@ApiProperty({
required: true,
type: String,
nullable: false,
description: 'fullName',
example: 'myfullName',
})
fullName: string;
@ApiProperty({
required: true,
type: String,
nullable: false,
... |
import "../styles/App.scss";
import { useEffect, useState, Suspense, lazy } from "react";
import { Route, Switch} from 'react-router-dom';
import axios from "axios";
import Fallback from './Fallback';
import Champions from "./Champions";
import InidividualChampInfo from './IndividualChampInfo';
import About from './Abo... |
// SPDX-License-Identifier: MIT
// Author: Emmanouil Kalyvas
pragma solidity ^0.8.0;
import "./Tools.sol";
contract Parameters {
Tools _tools;
address _owner;
uint256 public M; //Minimum minting rate
uint256 public B; //Maximum burning rate
uint256 public C; //Missing energy recover rate
uint2... |
import React from 'react';
import { Controller, useForm } from 'react-hook-form';
import { Keyboard } from 'react-native';
import { useMutationLogin } from 'common';
import { Button, Input, Text, View } from 'tamagui';
import * as z from 'zod';
const schema = z.object({
email: z.string().email(),
password: z.strin... |
// ******************************************************************************************
// *
// * AR MODELING (Burg and Yule-Walker method are implemented)
// *
// *
// * Main features :
// * - Prediction : calculate future datas based on past data, past volume and past low/high
// * - Spectral analysis : c... |
import React from 'react';
import Head from 'next/head';
import { seoData } from '../portfolio';
function SEO() {
return (
<Head>
<title>{seoData.title}</title>
<meta name="title" content={seoData.title} />
<meta name="author" content={seoData.author} />
<meta name="description" content={... |
<?php
use App\Http\Controllers\CommandeController;
use App\Http\Controllers\ProduitController;
use App\Http\Controllers\SuccursaleAmiController;
use App\Http\Controllers\SuccursaleController;
use App\Http\Controllers\UtilisateurController;
use App\Models\Succursale;
use Illuminate\Http\Request;
use Illuminate\Support\... |
import { useNavigate } from "react-router-dom";
import "../../components/Navbar/main.css";
import { useEffect, useState } from "react";
import { getIdData, getprofileData } from "../../config/firebasemethods";
import UserCard from "../../components/UserCard";
import { Spinner } from "react-bootstrap";
import { removeUs... |
import { Button, Card, Grid, InputAdornment, TextField, FormHelperText } from '@mui/material';
import { useCallback, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import HelperText from 'component/HelperText';
import ProgressDialog from 'component/ProgressDialog';
import { UnitForma... |
# This file is copied to spec/ when you run "rails generate rspec:install"
ENV["RAILS_ENV"] ||= "test"
require "simplecov"
SimpleCov.start
require File.expand_path("../../config/environment", __FILE__)
require "rspec/rails"
require "database_cleaner"
require "capybara/rspec"
require "ruby-debug" if Gem::Specification::... |
scilla_version 0
(***************************************************)
(* Associated library *)
(***************************************************)
import IntUtils ListUtils BoolUtils
library GiveawayMinter
(* Global variables *)
let max_mint_quantity = Uint32 10
let zero = Uint128 0
le... |
package org.mojodojocasahouse.extra.tests.service;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mocki... |
import { Alchemy, Network } from "alchemy-sdk";
import { useState, useEffect } from "react";
import { NavLink } from "react-router-dom";
const settings = {
apiKey: process.env.REACT_APP_ALCHEMY_API_KEY,
network: Network.ETH_MAINNET,
};
const alchemy = new Alchemy(settings);
export function ContractTransactions(a... |
# photo-manager-cli
## Build
```shell
go build
````
## Configure
`photo-manager-cli` requires a `config.yaml` to work.
The file consists on a list of actions to be performed.
### `config.yaml`
Create a configuration file:
```yaml
- action: "UPDATE_METADATA"
path: "/Users/scalvetr/Pictures/upload/2002 - 12 Des... |
<!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">
<title>Cores em CSS</title>
</head>
<body>
<!-- Representação por nomes -->
<h2 style="background-color: ... |
"use client";
import { Bubble, ColorRGBA } from "./bubble";
import React from "react";
export default function Bubbles({
quantity = 5,
blur = 100, // px
minSpeed = 5, // px/s
maxSpeed = 25, // px/s
minSize = 15, // window width %
maxSize = 55, // window width %,
colors,
className,
}: {
quantity?: nu... |
import { Component } from '@angular/core';
import { FormGroup,FormBuilder,Validators } from '@angular/forms'
import { validateEmployeeCodeWithParameter } from './custom.validators';
@Component({
selector: 'app-custom-validation-with-parameters-demo',
templateUrl: './custom-validation-with-parameters-demo.component... |
import React , { useState } from "react";
import { useDispatch } from "react-redux";
import { v4 as uuidv4 } from 'uuid'
import { addPost } from "./action";
const PostForm = () => {
const dispatch = useDispatch()
//Adding Some CSS to give a good look
const myStyle={
backgroundColor: "white",
... |
<template>
<div>
<div class="mb-6">
<div class="text-h6 mb-2">Адрес</div>
<v-text-field
v-model="address"
outlined
flat
disabled
hide-details="auto"
class="rounded-lg"
></v-text-field>
</div>
<div class="mb-8">
<v-row>
<v-col>... |
module FSMPack.Compile.Generator.Common
open System
open FSMPack.Compile.AnalyzeInputAssembly
let __ = " "
let indentLine count line = String.replicate count __ + line
let msgpackTypes = dict [
typeof<unit>, "Nil"
typeof<bool>, "Boolean"
typeof<int>, "Integer"
typeof<int64>, "Integer64"
typeo... |
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Route, Router } from '@angular/router';
import { FormControl, FormGroup, FormBuilder, Validators } from '@angular/forms';
import { ApPortalService } from '@app/@core/services/ap-portal.service';
import { MatDialog } from '@angular/material/dial... |
# 29CM_homework
---
### - 요구사항
- [x] 상품은 고유의 상품번호와 상품명, 판매가격, 재고수량 정보를 가지고 있습니다.
- [x] 한 번에 여러개의 상품을 같이 주문할 수 있어야 한다.
- [x] 상품번호, 주문수량은 반복적으로 입력 받을 수 있습니다.
- [x] 주문은 상품번호, 수량을 입력받습니다.
- 세부 요구사항
- [x] empty 입력(space + ENTER) 이 되었을 경우 해당 건에 대한 주문이 완료되고, 결제하는 것으로 판단합니다.
- [x] 결지 시 재고 확인을 하여야 하며 재고가 부족할 경우 결제 시도하면 S... |
import React from 'react';
import './Blog.css'
import { Button } from 'react-bootstrap';
import { FaDownload } from 'react-icons/fa';
import Pdf from "react-to-pdf";
const Blog = () => {
const ref = React.createRef();
const options = {
orientation: 'landscape',
unit: 'in',
format: [... |
<!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>
</head>
<body>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li... |
"use client";
import { COLORS } from "@/app/colors";
import {
Avatar,
Box,
Button,
Card,
CardBody,
CardHeader,
Divider,
FormControl,
FormLabel,
GridItem,
Heading,
Input,
Radio,
RadioGroup,
SimpleGrid,
Stack,
Text,
} from "@chakra-ui/react";
import { useRouter } from "next/navigation";
... |
package com.example.backend.controller.bookboardcontroller;
import com.example.backend.controller.Controller;
import com.example.backend.dao.BookBoardDao;
import com.example.backend.dao.BookDao;
import com.example.backend.model.Book;
import com.example.backend.model.BookBoard;
import com.fasterxml.jackson.core.JsonPro... |
import mongoose from "mongoose";
// Define a MongoDB schema for driver data
const DriverSchema = new mongoose.Schema(
{
// Name of the Driver
username: {
type: String,
required: [true, "Please add a name"],
},
// Email of the driver
email: {
type: String,
required: [true, ... |
package com.example.springapp.controller;
import java.util.List;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.anno... |
# app/models/genre.py
from app import db
from .base_model import BaseModel
class GenreModel(BaseModel):
__tablename__ = "genres"
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
name = db.Column(db.String(255), nullable=False, unique=True, index=True)
description = db.Column(db.Text... |
import { mkdirSync } from 'fs'
import path from 'path'
import type { BufferedWriteStream } from './stream'
import { createBufferedWriteStream } from './stream'
export type StringDictionary<T = unknown> = {
[index: string]: T
}
const crs = 'urn:ogc:def:crs:OGC:1.3:CRS84'
const geojsonStart = `{
"type": "FeatureCo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.