text stringlengths 184 4.48M |
|---|
import { ChangeEvent, useState } from 'react';
type InputProps = {
type: 'text' | 'number' | 'email' | 'password';
initialValue: string | number;
label: string;
name?: string;
placeholder?: string;
disabled?: boolean;
autoComplete?: 'on' | 'off';
onChangeValue?: (value: string) => void;
onBlur?: () =... |
import cv2
import numpy as np
import os
from PIL import Image, ImageDraw, ImageFont, ImageEnhance
import sys
import tensorflow as tf
import time
np.set_printoptions(threshold=sys.maxsize)
FONT_BOX_SIZE = 20
IMAGE_HEIGHT = 3672
IMAGE_WIDTH = 6500
USED_CHARCTERS = ([*"^*()_+=-=qwertyuiopasdfghjklzxcvbnm[]\;',./{}|:<>? "... |
import { useLoaderData, Link } from 'react-router-dom'
import axios from 'axios'
import styled from 'styled-components'
import H1 from '../H1'
import IssueCard from '../IssueCard'
import AddButton from '../AddButton'
import { useContext } from 'react'
import { TokenContext } from '../Root'
export async function loader... |
import React, { useState, useEffect } from 'react';
const CountdownTimer = ({ duration, results, category_count, time }) => {
const targetTime = new Date().getTime() + duration * 60 * 1000;
const [timeRemaining, setTimeRemaining] = useState(calculateTimeRemaining());
const [isRunning, setIsRunning] = useSt... |
#pragma once
#include <unordered_map>
#include <optional>
#include <random>
#include <limits>
#include <account.hpp>
namespace banking {
class Bank {
public:
using account_id_t = std::size_t;
using pin_code_t = std::size_t;
class Card {
private:
friend class Bank;
Card(account_id_... |
VARIABLES
La forma de definir las variables es con la palabra reservada Let o con la palabra reservada var
let f=90;
No se puede definir 2 veces la misma variable, eso da error
let nombre='Matias'
let nombre='Jaime'
Esto genera error
NO puede iniciarse el nombre de una variable con un NUMERO
NO puede c... |
/* Consider a file that contains a number of integers. Create two threads.
* Call them ‘producer’ and ‘consumer’ threads.
* Producer thread will be reading the integers from the file continuously while consumer thread will add them up.
* Use a proper synchronization mechanism if needed.
*/
package com.java;
cla... |
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any la... |
package java_standard.new_time;
import java.time.LocalDate;
import java.time.LocalTime;
import java.time.temporal.ChronoUnit;
import java.time.temporal.Temporal;
import java.time.temporal.TemporalAdjuster;
class DayAfterTomorrow implements TemporalAdjuster {
@Override
public Temporal adjustInto (Temporal temporal) ... |
package com.wxhl.tools.jdbc;
import java.sql.Connection;
import java.sql.SQLException;
import javax.sql.DataSource;
import com.mchange.v2.c3p0.ComboPooledDataSource;
/**
* 使用本类的方法,必须提供c3p0-copnfig.xml文件
*/
public class JdbcUtils {
// 饿汉式
private static final DataSource ds = new ComboPooledDataSource();
... |
import { Component, OnDestroy } from '@angular/core';
import { NavigationStart, Router } from '@angular/router';
import { filter, map, Subscription } from 'rxjs';
import { LoginServiceService } from 'src/app/services/login-service.service';
@Component({
selector: 'app-nav-bar',
templateUrl: './nav-bar.component.ht... |
package web.id.ramads.firebasesample
import android.app.ProgressDialog
import android.os.Bundle
import android.util.Log
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.google.android.gms.tasks.OnComplete... |
package com.aditya.project.recursion.combination;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Combination {
public static void main(String[] args) {
int n = 3;
int[] a = new int[]{3, 1, 2};
System.out.print("Array : ");
Arrays.stream(a)... |
# 1) Design model (input, output size, forward pass)
# 2) Construct loss and optimizer
# 3) Training loop
# - forward pass: compute prediction
# - backward pass: gradients
# - update weights
import torch
import torchvision
import numpy as np
import torch.nn as nn
import matplotlib.pyplot as plt
import... |
package stockhw7.resources;
import java.util.Calendar;
import java.util.GregorianCalendar;
/**
* The Index is meant to hold a string of the index
* of a stock, for ease of calling the index.
*/
public class IndexImpl implements Index {
private final String name;
private final String[][] separated;
Calendar ... |
package br.oficial.savestudents.debug_mode.view.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.LinearLayoutManager
import br.oficial.savestudents.databinding.A... |
//
// GridPhotoUploader.swift
// SwiftCamera
//
// Created by Kiarra Villaraza on 7/1/22.
//
/*
File to upload images to Firestore
*/
import Firebase
import UIKit
import FirebaseStorage
struct GridPhotoUploader {
//upload an image and return location of image with url
/*
method used to upload user... |
import { injectable, inject } from 'tsyringe'
import Product from '../infra/typeorm/entities/Product'
import IProductsRepository from '../repositories/IProductsRepository'
import IPaginationOptionsDTO from '../../dtos/IPaginationOptionsDTO'
import IWishRepository from '../repositories/IWishRepository'
import ICategori... |
<?php
declare (strict_types=1);
namespace Rector\Renaming\Rector\MethodCall;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\StaticCall;
use PhpParser\Node\Identifier;
use PhpParser\Node\Stmt\ClassLike;
use PhpParser\... |
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Answer to the quetions</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-gH2yIJqKdNHP... |
import React from "react";
const Css = () => {
return (
<div>
<h1> Css </h1>
<h3>Use of fontAwesome</h3>
<div>
{`<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
integrity="sha512-SzlrxWUlpfuzQ+pcUCosxc... |
import React, { PropTypes } from 'react';
import { cummulativeSeperation } from '../helpers';
import TimelineDot from './TimelineDot';
/**
* The markup Information for all the events on the horizontal timeline.
*
* @param {object} props The props from parent mainly styles
* @return {StatelessFunctionalReactCompo... |
.Dd $Mdocdate$
.Dt SNAC 8
.Os
.Sh NAME
.Nm snac
.Nd snac administration
.Sh DESCRIPTION
The
.Nm
daemon processes messages from other servers in the Fediverse
using the ActivityPub protocol.
.Pp
This is the admin manual. For user operation, see
.Xr snac 1 .
For file and data formats, see
.Xr snac 5 .
.Ss Installation
In... |
//
// EditCards.swift
// Flashzilla
//
// Created by Yi An Chen on 2022/3/22.
//
import SwiftUI
struct EditCards: View {
@Environment(\.dismiss) var dismiss
@State private var cards = [Card]()
@State private var newPrompt = ""
@State private var newAnswer = ""
let savedPath = FileManager.d... |
from django.forms import TimeInput
from clients.models import Client, Newsletter, Message
from django import forms
from django.contrib.auth.forms import UserCreationForm, UserChangeForm, AuthenticationForm
from clients.models import User
class StyleFormMixin:
def __init__(self, *args, **kwargs):
super(... |
package main
import (
"fmt"
"sync"
"time"
)
// Job represents the task to be executed by a worker
type Job struct {
ID int
}
// WorkerPool represents a pool of worker goroutines
type WorkerPool struct {
numWorkers int
jobQueue chan Job
results chan int
wg sync.WaitGroup
}
// NewWorkerPool creat... |
const socketio = require('socket.io');
const http = require('http');
const log = require('../utils/logUtil.js');
const ipUtil = require('../utils/ipUtil');
const cookieUtil = require('../utils/cookieUtil');
const config = require('./config');
const store = require('../store');//session容器
module.exports = function (app... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- displays site properly based on user's device -->
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png">
<link rel="stylesheet" href="styles.css... |
You just setup the perfect directory structure for your new project and now you
want to save it so you can use it again, but you don’t want to deal with all the
fuss of traditional methods. PowPow is here for you.
PowPow is a CLI written in JavaScript that makes managing tarballs dead simple.
To use PowPow you need [... |
import 'package:firebase_auth/firebase_auth.dart';
import 'package:b_finder/models/authUser.dart';
class AuthService {
final FirebaseAuth _auth = FirebaseAuth.instance;
AuthUser _userFromFirebaseUser(User user){
return user != null ? AuthUser(uid: user.uid): null;
}
Stream<AuthUser> get user{
return _auth.authS... |
//-------------------------------------------------------------------------------//
// Author: Stefan Lörwald, Universität Heidelberg //
// License: CC BY-NC 4.0 http://creativecommons.org/licenses/by-nc/4.0/legalcode //
//------------------------------------------------------------------... |
public static void main(String[] args) {
Log.printLine("Starting NetworkExample3...");
try {
// First step: Initialize the CloudSim package. It should be called
// before creating any entities.
// number of cloud users
int num_user = 2;
Calendar calendar = Calendar.getIns... |
// @ts-ignore
// @ts-nocheck
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
import '../../styles/App.scss'
import shoppingCart from '../../assets/Image/shopping_Cart.png';
import todoList from '../../assets/Image/Todo_List.png';
import Personnel from '../../assets/Image/Personnel_Info.png';
import { useE... |
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="CNIT 133a Homework" />
<!-- Bootstrap CSS -->
<link
href="https://cdn.jsdelivr.net/npm/bo... |
import 'package:flutter/material.dart';
import 'package:weather/model/weather_model.dart';
import 'package:weather/services/weather_client_api.dart';
import 'package:weather/views/current_weather.dart';
import 'views/additional_information.dart';
void main() {
runApp(const MaterialApp(
home: HomePage(),
debu... |
import React from "react";
import Card from "./Card";
import Pokeinfo from "./PokeInfo";
import axios from "axios";
import { useState, useEffect } from "react";
const Main = () => {
const [pokeData, setPokeData] = useState([]); // Estado para almacenar los datos de los Pokémon
const [loading, setLoading] = u... |
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Trademark>
*/
class TrademarkFactory extends Factory
{
/**
* Define the model's default state.
*
* @retur... |
import { useParams } from "react-router-dom";
import { useEffect, useState } from "react";
import { PebblePlayer, VideoCard } from "Components";
import { useAxiosCalls, useModal } from "Context";
import "./SingleVideo.css";
import { useDispatch, useSelector } from "react-redux";
import { modalActions, videoActions } fr... |
import React from "react";
import styled from "styled-components";
import { getCookie } from "../../shared/cookie";
import { useParams } from "react-router-dom";
import { useEffect, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { createComment } from "../../redux/modules/commen... |
import argparse
import socket
import shlex
import subprocess
import sys
import textwrap
import threading
# here we set up the functionality for the -e or --execute command
def execute(cmd):
cmd = cmd.strip()
if not cmd:
return
output = subprocess.check_output(shlex.split(cmd),
... |
//
// ProfileNameViewController.swift
// SeSACShopping
//
// Created by 민지은 on 2024/01/19.
//
import UIKit
enum ProfileSettingType {
case new
case edit
}
class ProfileNameViewController: UIViewController {
@IBOutlet var profileButton: UIButton!
@IBOutlet var cameraImage: UIImageView!
@IBOutl... |
import argparse
from pathlib import Path
import sys
import pytest
this_file = Path(__file__)
INPUT_TXT = this_file.parent / (this_file.stem + ".txt")
def solve_aoc(s: str) -> int:
d = {"L": 0, "R": 1}
pattern, rest = s.split("\n\n")
network = {l[:3]: (l[7:10], l[12:15]) for l in rest.splitlines()}
c... |
package study_abstract;
/*
abstract关键字的使用
1.abstract抽象的
2.abstract可以用来修饰的结构;类,方法
3.abstract修饰类;抽象类
此类不能实例化
抽象类中一定有构造器,便于子类实例化时候调用(涉及子类对象实例化全过程)
开发中都会提供抽象类的子类,让子类完成实例化,完成相关操作
4.abstract修饰方法;抽象方法
抽象方法只有方法声明,没有方法体
包含抽象方法的类一定是一个抽象类,反之,抽象类中可以没有抽象方法
若子类重写了父类中的抽象... |
// ignore_for_file: prefer_const_constructors
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:e_commerce/consts/consts.dart';
import 'package:e_commerce/controller/chats_controller.dart';
import 'package:e_commerce/services/firestore_services.dart';
import 'package:e_commerce/views/chat_screen/c... |
import React, { useEffect, useState } from 'react';
import Skeleton from 'react-loading-skeleton';
import './TvShow.css';
import { useParams } from 'react-router-dom';
const TvShow = () => {
const [shows, setShows] = useState([]);
const [loading, setLoading] = useState(true);
const { id } = useParams();
useEf... |
<?php
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Auth;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. T... |
import CreateUserModal from '../../../../src/components/Users/CreateUserModal.vue'
import {
defaultComponentMocks,
defaultPlugins,
mockAxiosReject,
mockAxiosResolve,
shallowMount
} from 'web-test-helpers'
import { mock } from 'jest-mock-extended'
import { AxiosResponse } from 'axios'
import { Modal, eventBus,... |
//
// LinkyAPI.swift
// LinkyAPI
//
// Created by Karim Angama on 13/06/2023.
//
import Foundation
import WebKit
import UIKit
/// Launch the authorization request
/// To access customer metering data APIs, the application must first obtain permission from the customer.
/// It requires the authentication of the end... |
import Button from "@/Components/Button";
import { CartContext } from "@/Components/CartContext";
import Center from "@/Components/Center";
import Header from "@/Components/Header";
import ProductImages from "@/Components/ProductImages";
import StyledTitle, { Title } from "@/Components/Title";
import WhiteBox from "@/C... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Weather App</title>
<link rel="stylesheet" href="styles.css">
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
margin: 0;
}
... |
import React from "react";
import PropTypes from "prop-types";
import Panel from "muicss/lib/react/panel";
import RainbowTableDetailTable from "./rainbow-table-detail-table";
import RainbowTableEfficiencyTable from "./rainbow-table-efficiency-table";
import RainbowTableSearchResultsTable from "./rainbow-table-search-r... |
import useAuthContext from "../../hook/useAuthContext";
import { useState } from "react";
import { Link } from "react-router-dom";
import { REGISTER } from "../../config/routes/paths";
import { validatePassword, validateEmail } from "../../helpers/Helpers";
import Layout from "../../components/Layouts/Layout";
import s... |
import {
PICK_INGREDIENT,
RESET_INGREDIENT,
SET_INGREDIENTS,
DELETE_INGREDIENT,
SET_INFO_INGREDIENT,
MAKE_ORDER,
DECREMENT_MAP,
INCREMENT_MAP,
SET_BUN,
SWITCH_INGREDIENT,
RESET_MAP,
ERROR_SET_INGREDIENTS,
ERROR_MAKE_ORDER,
UPDATE_USER,
NETWORK_CONNEC... |
# $browserV
<ContainerBox title="介绍">
<template #desc>
判断用户浏览器到没达到要求的版本,没达到让他升级
</template>
</ContainerBox>
<ContainerBox title="基础用法">
```js
console.log($browserV); //{browser:"",version:0}
```
<ShowCode>
<template #codes>
```js
export const $browserV = (() => {
const ua = navigator.userAgent;
let browser = 0... |
<?php
namespace App\Http\Requests\Admin\User;
use App\Rules\Phone;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class UserStoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function a... |
# C#/Rust Connection Prototype
I wrote a small prototype, which shows how Rust code can be called from C#.
It consists of a small Rust library and a C# console application.
## Basic structure and compilation
The root folder contains the C# project, the subfolder "rusttest" contains the
rust cargo crate. This crate h... |
import CardProductList from "../components/CardProductList";
import styles from "../styles/productList.module.css";
import React, { useState, useEffect } from "react";
import { useRouter } from "next/router";
import { trpc } from "../utils/trpc";
import {
Box,
Flex,
Highlight,
Button,
Menu,
MenuButton,
M... |
import React from 'react';
import {
usePockestContext,
} from '../../contexts/PockestContext';
import TargetMonsterSelect from '../TargetMonsterSelect';
import useEggs from '../../hooks/useEggs';
import getMonsterPlan from '../../utils/getTargetMonsterPlan';
import './index.css';
function EggControls() {
const {
... |
'''
Given an array arr of size n, the task is to check if the given array can be a level order representation of a Max Heap.
Example 1:
Input:
n = 6
arr[] = {90, 15, 10, 7, 12, 2}
Output:
1
Explanation:
The given array represents below tree
90
/ \
15 10
/ \ /
7 12 2
The tree follows... |
## Data Wrangling R - Prof. Wilson Tarantin Junior
## MBA DSA USP ESALQ
# Atividade de Análise nº 1 - Introdução ao pacote dplyr
# https://dplyr.tidyverse.org/
# O pacote dplyr está contido no tidyverse
# dplyr: contém muitas funções comuns na manipulação de dados
#--------------------Carregar os Pacotes------------... |
#ifndef _DICT_H_
#define _DICT_H_
#include <string>
#include <iostream>
#include <cassert>
#include <fstream>
#include <vector>
#include <set>
#include <unordered_map>
#include <functional>
class Dict {
typedef std::unordered_map<std::string, unsigned, std::hash<std::string> > Map;
public:
Dict() : b0_("<bad0>") ... |
export default class CodeEditorModal {
__html = `
<div class="modal-dialog modal-xl modal-fullscreen-sm-down modal-dialog-centered">
<div class="modal-content">
<div class="modal-header border-0">
<h1 class="modal-title fs-6">EDITOR DE CODIGO</h1>
<button type... |
package Arrays.ArrayAlgorithms;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
// MAJORITY ELEMENT (N/2, N/3)
public class MooreVoting_Algorithm {
public static int better(int arr[])
{
Map<Integer,Integer> map = new HashMap<>();
for(int i:arr... |
<?php declare(strict_types=1);
namespace Shopware\Storefront\Pagelet\Country;
use Shopware\Core\Framework\Log\Package;
use Shopware\Core\Framework\Script\Execution\Awareness\SalesChannelContextAwareTrait;
use Shopware\Core\System\SalesChannel\SalesChannelContext;
use Shopware\Storefront\Page\PageLoadedHook;
/**
* T... |
package com.example.aprendendospring.models;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.UUID;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
@Enti... |
using ContactsConsoleAPI.Business.Contracts;
using ContactsConsoleAPI.Data.Models;
namespace ContactsConsoleAPI.Business
{
public class Engine : IEngine
{
public async Task Run(IContactManager contactManager)
{
bool exitRequested = false;
while (!exitRequested)
... |
// Definition of the antenna-related geometry functions
#include "geometryfunc.h"
#include <isce3/core/Projections.h>
#include <isce3/core/Quaternion.h>
#include <isce3/core/Vector.h>
#include <isce3/except/Error.h>
#include <isce3/geometry/geometry.h>
#include <isce3/math/RootFind1dBracket.h>
// Aliases
using namesp... |
"use client";
import { MicroGrantsStrategy, Registry } from "@allo-team/allo-v2-sdk/";
import React, { useState } from "react";
import { MicroGrantsABI } from "@/abi/Microgrants";
import {
EProgressStatus,
ETarget,
TNewApplication,
TProgressStep,
} from "@/app/types";
import { getIPFSClient } from "@/services/... |
import cv2
import pyautogui
import numpy as np
import keyboard
import os
import time
import torch
import PIL
from torchvision import transforms
class ImageMatcher:
def __init__(self):
self.image_folder = 'C:/Users/Jordan/Desktop/Programming/GIT/PESBot/DATA_/images/templates_folder'
self.templates =... |
import React, {useEffect} from 'react'
import {AiOutlineMenu} from 'react-icons/ai'
import {FiShoppingCart} from 'react-icons/fi'
import {BsChatLeft} from 'react-icons/bs'
import {RiNotification3Line} from 'react-icons/ri'
import {MdKeyboardArrowDown} from 'react-icons/md'
import {TooltipComponent} from '@syncfusion/ej... |
package com.example.tourmanagement.filtration.impl;
import com.example.tourmanagement.exception.LogicException;
import com.example.tourmanagement.filtration.TourFilter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import jakarta.persistence.criteria... |
package part02.Exercise3;
public class MovableCircle implements Movable{
private int radius;
private MovablePoint center;
public MovableCircle(int x, int y, int xSpeed, int ySpeed, int radius){
this.radius = radius;
this.center = new MovablePoint(x,y,xSpeed,ySpeed);
}
public int get... |
## Refinanciamientos y pago sostenidos
Aplicación para recibir webhooks desde Mambu en los eventos de refinanciamientos y pagos a cuentas de préstamos que permite lo siguiente:
1. Para el evento de refinanciamiento (diagrama https://swimlanes.io/u/MWAfpHJFs):
- Validar la información del préstamo original y del r... |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class HierarchyOfException {
public static void main(String[] args) {
//int result = 7 / 0; //this throws an arithematic exception which is an unchecked exception
// System.out.println(result);
... |
import 'package:flutter/material.dart';
import 'package:movies_app/providers/movies_provider.dart';
import 'package:movies_app/screens/screens.dart';
import 'package:movies_app/theme/app_theme.dart';
import 'package:provider/provider.dart';
void main() => runApp(const AppState());
class AppState extends StatelessWidg... |
wd <- Sys.getenv("RWD")
if (!file.exists(wd)) {
stop(paste("O diretorio definido na variavel de ambiente RWD nao foi encontrado",wd, sep="="))
}
setwd(wd)
getwd()
rm(list = ls())
options(scipen=999)
options(width = 1024)
library(utils)
library(tseries)
#install.packages("tseries")
library(tseries)
serie <- rea... |
import * as z from "zod";
export const RegisterFormSchema = z.object({
name: z.string().min(2, {
message: "Full name must be at least 3 characters.",
}),
email: z.string().email({
message: "Please enter a valid email address.",
}),
phoneNumber: z.string().min(10, {
message: "Phone number must be ... |
# L21-04
Let’s first create a node running Nginx by using the imperative way.
## Create the pod
kubectl run mynginx --image=nginx
## Get a list of running pods
kubectl get pods
## Get more info
kubectl get pods -o wide
kubectl describe pod mynginx
## Delete the pod
kubectl delete pod myngin... |
import { NextApiRequest, NextApiResponse } from "next";
import { initFirebaseAdmin, initFirebase } from "../initFirebase";
import { getUser } from "../userUtils";
const admin = require("firebase-admin");
let db = admin.firestore();
const firebase = require("firebase/app");
initFirebaseAdmin();
initFirebase();
const { ... |
package db
import (
"context"
"order-status-log-service/core/models"
"os"
"github.com/google/uuid"
"github.com/uptrace/bun"
)
type IOrderStatusRepository interface {
Insert(os *models.OrderStatus) (err error)
Update(os *models.OrderStatus) (err error)
Get(orderId uuid.UUID) (orderStatus models.OrderStatus, e... |
package com.knits.assetcare.dto.data.inventory;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.knits.assetcare.dto.data.business.VendorDto;
import com.knits.assetcare.dto.data.common.AbstractAuditableDto;
import com.knits.assetcare.dto.data.location.LocationDto;
import com.knits.assetcare.dto.validati... |
//
// Copyright 2022 The GUAC 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 applicable law or agre... |
# Project 3
Nitu Girish Mohan
In this project, I will be looking at the Gradient Boosting Algorithm, testing the Boosted Locally Weighted Regressor on different datasets/kernels, and using complete KFold cross validations to compare with other regressors.
## Gradient Boosting
Let's start by discussing Gradient Boos... |
import 'package:contacts_hive/models/contact_model.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import '../cubit/contact_cubit.dart';
class EditContactScreen extends StatefulWidget {
const EditContactScreen({
super.key,
required this.contact,
required t... |
/**
* @jest-environment jsdom
*/
import { verify } from 'approvals/lib/Providers/Jest/JestApprovals';
import moment from 'moment';
import { Options } from 'approvals/lib/Core/Options';
import { Query } from '../../../src/Query/Query';
window.moment = moment;
/**
* Save an instructions block to disc, so that it can... |
import React from "react";
import { fireEvent, render, screen } from "@testing-library/react";
import App from "./App";
import { TodoListProps } from "./components/TodoList";
jest.mock("./components/TodoList", () => ({
TodoList: ({
deleteItemFromList,
updateItemFromList,
item,
}: TodoListProps) => {
... |
<template>
<div class="main-container">
<div class="form-title">
<md-icon class="form-title-icon">assessment</md-icon>
<span class="form-title-text">财务中心</span>
</div>
<div class="sub-container">
<div class="balance-container">
<div class="balance-main-container">
<span... |
**Crafting the Perfect Pitch: The Art of Persuasion in Sales**
Dive into the intricate world of sales pitches with this detailed guide. Crafting an impactful and persuasive pitch is more than just presenting a product; it's about connecting with your audience and addressing their unique needs. This lesson will take yo... |
/**
* $Id: writeabletoxml.h 680 2014-09-10 12:15:43Z klugeflo $
* @file writeabletoxml.h
* @brief Abstract class for serialising objects to XML
* @author Florian Kluge <kluge@informatik.uni-augsburg.de>
*/
#ifndef CORE_WRITEABLETOXML_H
#define CORE_WRITEABLETOXML_H 1
#include <string>
#include <libxml/xmlwriter.... |
import { Item } from "../models/item.model";
import { useItemStore } from "../store/useStore";
interface Props {
data: Item[];
}
const Card: React.FC<Props> = ({ data: items }) => {
const addItem = useItemStore(state => state.addItem);
const addItemToCart = (item: Item) => {
addItem(item);
};
... |
//
// Copyright © 2023 Zhiwei Sun. All rights reserved.
//
// File name: NumberofOrdersintheBacklog.swift
// Author: Zhiwei Sun @szwathub
// E-mail: szwathub@gmail.com
//
// Description:
// https://github.com/szwathub/LeetCode.swift/issues/486
// https://leetcode.cn/problems/number-of-orders-in-the... |
<!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" />
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" re... |
import React, { useEffect, useRef, useState } from 'react'
import style from './gymplans.module.css'
import axios from 'axios';
import ReactCardFlip from 'react-card-flip';
export default function Gymplans() {
const [todos, setTodos] = useState([]);
const inputRef = useRef();
const [isFlipped, setIsFlipped] = u... |
import pygame
import sys
from pygame.locals import *
class QuizGame:
def __init__(self):
# Initialize Pygame
pygame.init()
# Set up the display
self.WIDTH, self.HEIGHT = 800, 600
self.screen = pygame.display.set_mode((self.WIDTH, self.HEIGHT))
pygame.display.set_cap... |
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <omp.h>
int main()
{
int i, j;
int R1, C1;
int R2, C2;
printf("Ingresar el numero de R1: ");
scanf("%d", &R1);
printf("Ingresar el numero de C1: ");
scanf("%d", &C1);
printf("Ingresar el numero de R2: ");
scanf("%d",... |
import { Button, Tabs } from 'antd'
import styles from '@/styles/landing.module.css'
import TabPane from 'antd/es/tabs/TabPane'
import CourseCard from './CourseCard'
interface Course {
id: number
title: string
description: string
rating: number
price: number
imageUrl: string
category: string
}
const cour... |
import { PartialType } from '@nestjs/mapped-types';
import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString, IsBoolean, IsDate, IsNumber } from 'class-validator';
import { CreateOrderStatusDto } from './create-order-status.dto';
export class UpdateOrderStatusDto extends PartialType(CreateOrderStat... |
import React from 'react';
import JumboCardQuick from "@jumbo/components/JumboCardQuick";
import { Button, Grid, List, MenuItem} from "@mui/material";
import { useState } from 'react';
import { GetUsersListApi, UpdateUserPasswordApi } from 'backendServices/ApiCalls';
import SweetAlert from 'app/pages/components/mui/Ale... |
import { test, expect } from '@playwright/test';
test('homepage has title and links to intro page', async ({ page }, testInfo) => {
await page.goto('https://playwright.dev/');
// Expect a title "to contain" a substring.
await expect(page).toHaveTitle(/Playwright/);
// create a locator
const getStarted = pa... |
---
tags:
- Note_done
- Biologie
source: Biologie - Peter H. Raven - 4e édition
---
Link :
_Biologie : Introduction_
1. [[1.0.0 - Zoologie]]
2. [[1.0.13 - Phylogénie]]
3. [[1.0.13.1 - Arbre phylogénétique]]
# Définition
Un cladogramme est une représentation graphique qui montre les relations évolutives entre diff... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.