text
stringlengths
184
4.48M
const { Model, DataTypes } = require("sequelize"); const { sequelize } = require("../util/db"); class User extends Model {} User.init( { id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true, }, username: { type: DataTypes.TEXT, unique: true, allowNull:...
import 'package:betano/components/table_handall_body.dart'; import 'package:flutter/material.dart'; import '../constants/app_colors.dart'; import 'custom_button.dart'; import 'matches_handball_body.dart'; class TableMatchesHandballButton extends StatefulWidget { const TableMatchesHandballButton({super.key}); @ove...
import numpy as np import matplotlib.pyplot as plt from numpy.linalg import inv # Constants given in the problem beta = 0.0075 lambda_ = 0.08 Lambda_ = 6e-5 N0 = 1 C0 = beta * N0 / (Lambda_ * lambda_) alpha = 2.0 * beta Nref = 1.0 rho0 = -6.67 * beta + alpha * N0 / Nref # Reactivity function with negative feedback de...
import coffeImage from "../assets/coffe.png"; import { AdvantagePoints, AdvantagePointsProps } from "./AdvantagePoints"; import { Coffes } from "./Coffes"; import { Header } from "./Header"; const advantages: AdvantagePointsProps[] = [ { text: "Compra simples e segura", icon: "shopping", background: "bg-...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible_collections.manala.roles.tests.unit.compat import unittest from ansible.plugins.loader import lookup_loader from ansible.errors import AnsibleError class Test(unittest.TestCase): def setUp(self): self.m...
import './ToDo.css'; import { useState } from 'react'; import { useSelector, useDispatch } from 'react-redux'; //MUI import List from '@mui/material/List'; import Tooltip from '@mui/material/Tooltip'; //components import ToDoItem from "./ToDoItem"; function ToDo () { const dispatch = useDispatch(); const user_...
#include <Arduino.h> #include <PubSubClient.h> #include <Dps310.h> #include <Wire.h> #include "WiFiClientSecure.h" #include "certificates.h" const char* ssid = "-"; // your network SSID (name of wifi network) const char* password = "-"; // your network password //const char* mqtt_server = "clusterun...
import { HttpException, HttpStatus, Injectable, NotFoundException, } from '@nestjs/common'; import { UsersService } from 'src/users/users.service'; import { CreateStudentDto } from './dto/create-student.dto'; import { UpdateStudentDto } from './dto/update-student.dto'; import { InjectRepository } from '@nestjs/...
import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { TypeOrmModuleOptions, TypeOrmOptionsFactory } from '@nestjs/typeorm'; import { UserEntity } from 'src/user/entities/user.entity'; @Injectable() export class PostgresConfigService implements TypeOrmOptionsFactory { c...
from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response from django.shortcuts import redirect import json from rest_framework import status from .serializers import * from django.contrib.auth import authenticate from django.contrib.auth.models import U...
require 'rails_helper' RSpec.describe VpnApiResponse do subject(:service) { described_class.new(response) } let(:response_body) { {} } describe '#ip' do let(:ip_address) { Faker::Internet.ip_v4_address } let(:response_body) { { 'ip' => ip_address } } let(:response) { instance_double(Net::HTTPSuccess...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="/output.css" rel="stylesheet"> <title>Deepgram x {{ event.title }}</title> </head> <body class="bg-darkCharcoal text-white"> <header class="bg-fireEngine ...
import React, { useState, useEffect } from "react"; import styles from "./rc.module.css"; // Import CSS file for styling import img8 from "../pictures/user1.png"; import axios from "axios"; function StarRating() { const [rating, setRating] = useState(0); const [comment, setComment] = useState(""); const [comment...
import pygame from pygame.constants import QUIT, K_DOWN, K_UP, K_LEFT, K_RIGHT import random import os pygame.init() FPS = pygame.time.Clock() HEIGHT = 800 WIDTH = 1200 FONT = pygame.font.SysFont('Courier New', 20) COLOR_WHITE = (255, 255, 255) COLOR_BLACK = (0, 0, 0) COLOR_BLUE = (0, 0, 255) COLOR_GREEN = (0, 255,...
Title : Fundamentals of the *flutterbye* Author : Michael Lowell Roberts Copyright : (c) 2016, Michael Lowell Roberts License : Apache License 2.0 Logo : True [TITLE] ~ Center [this document is an early work-in-progress.]{ :red } ~ # Scope The purpose of this document is to infor...
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> <%-- <%@ taglib uri="http://www.springframework.org/security/tags" prefix="sec"%> --%> <jsp:include ...
'use client' import { useState } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faDownload } from '@fortawesome/free-solid-svg-icons'; import axios from 'axios'; export default function Download(props:{Id:string}) { const [isLoading, setIsLoading] = useState(false); const...
package nc.liat6.frame.xml; import nc.liat6.frame.xml.element.IXmlElement; import nc.liat6.frame.xml.parser.BeanParser; import nc.liat6.frame.xml.parser.XMLParser; import nc.liat6.frame.xml.wrapper.XMLWrapper; /** * XML转换器,默认开启严格模式 * <p> * 转换会遵循以下约定: * <ul> * <li>开启严格模式后,子节点为属性的,父节点设置type="bean"属性。</li> * <li>子...
#include "function_pointers.h" #include <stdlib.h> #include <stdio.h> /** * int_index - returns the index of the first element * for which the cmp function does not return 0 * @array: array of integers * @size: number of elements in array * @cmp: pointer to the function int_index * Return: index of first element...
from rest_framework import serializers from django.contrib.auth.password_validation import validate_password from user_profile.models import UserProfile class UserRegistrationSerializer(serializers.ModelSerializer): """ Serializer for user registration. Validates that the email is unique, passwords match...
import React, { useState } from "react"; import Form from "./components/form"; import "./App.scss"; import * as Yup from "yup"; interface Values { time: string; date: string; reminder: string; } // ensure reminder is not empty const valSchema: Yup.SchemaOf<Values> = Yup.object().shape({ time: Yup.string().req...
import React, { useState } from "react"; import "./Resister.css"; import {Link} from 'react-router-dom'; import resisterPic from '../../images/resister.jpg' import axios from 'axios'; const Resister = () => { const [resister_user,set_resister_user] = useState({name: '',username: '',email: '',password: ''}) const...
<script setup> /** * TakeLabSample */ import { ref, inject, computed } from 'vue' import { TextArea, Input, SelectCustomDate, ShowValue, Treeselect } from 'form' import { formatDate } from 'shared' import { Alert } from 'layout' const props = defineProps({ type: { default: () => null, type: Stri...
/**************************************************************************** ** ** Copyright (C) 2017 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ ** Commercial License Usage ** Licensees holding valid commerci...
<!-- <p>employee works!</p> <form #userForm="ngForm" (ngSubmit)="onSubmit(userForm)"> <div class="col-md-4 mb-2"> <div class="form-group"> <label class="form-label fs-1">EmployeeName</label> <input type="text" class="form-control" name="employeeName" #name="ngModel" pattern="^[A-Za-...
import 'package:matrimonial_app/components/common_widget.dart'; import 'package:matrimonial_app/components/my_images.dart'; import 'package:matrimonial_app/const/my_theme.dart'; import 'package:matrimonial_app/const/style.dart'; import 'package:matrimonial_app/main.dart'; import 'package:matrimonial_app/redux/libs/prof...
def caching_fibonacci(): #Створити порожній словник cache cache = dict() def fibonacci(n): # Якщо n <= 0, повернути 0 # Якщо n == 1, повернути 1 # Якщо n у cache, повернути cache[n] if n<=0: return 0 if n==1: return 1 if n in cache: return cache[n] cac...
import { useEffect, useState } from 'react'; import { Product as ProductType } from '../types'; import { PostgrestError } from '@supabase/supabase-js'; import { supabase } from '../auth/supabaseClient'; const useFetchProducts = () => { const [products, setProducts] = useState<ProductType[] | null>(null); const [er...
import logging from abc import ABC, abstractmethod import numpy as np from sklearn.metrics import accuracy_score, classification_report class Evaluation(ABC): """ Abstract class defining strategy for evaluation our models """ @abstractmethod def calculate_scores(self, y_true: np.ndarray, y_pred: np...
import { useInaccurateTimestamp } from "react-native-use-timestamp"; import * as Updates from "expo-updates"; import React, { useEffect, useRef, useState } from "react"; import { Modal, StyleSheet, View } from "react-native"; import { MyText } from "./MyText"; import { CustomButton } from "./CustomButton"; // How ofte...
# OCR Android 离线中国身份证识别 Demo 使用指南 # Offline OCR Android Chinese ID card identification Demo Usage guide ## 简介 Intro Android用离线身份证OCR识别. 包含了CV图像预处理, 以及OCR文字识别. 界面包含一个身份证拍摄框, 支持打开闪光灯. 会实时识别, 如果所需内容已完全识别, 就会跳转新的activity包含身份证信息. **注意: 在第一次运行会要权限, 取得权限后可能会闪退, 属正常现象. 以后打开就可以正常使用.** 安装包地址: [Release页面](https://github.com/B...
c Fortran version of AGNREF c Ref. Hagen and Done (in prep.) c c Combines AGNSED (Kubota & Done 2018) with PEXMON (Nandra er al. c 2007), and a thermal re-processor component. We assume a geometry c where both the reflection and additional thermal component c originate from the same region...
from shape import Shape class CollisionException(Exception): pass class NoShapeException(Exception): pass class Board: def __init__(self, cell_size: int, cols: int, rows: int): self.cell_size = cell_size self.cols = cols self.rows = rows # Last row of 1 at the bottom f...
<!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> <p id="innerText">이너텍스트</p> <input id="inputValue" type="text" value=...
import React from "react"; import Link from "next/link"; interface sideMenuProps { closeSideMenu: (close: boolean) => void; } const SideMenu = (props: sideMenuProps): JSX.Element => { const { closeSideMenu } = props; const handleCloseSideMenu = (toggle: boolean) => { closeSideMenu(toggle); }; return ( ...
package com.everis.base.task.MercadoLibreCristian; import com.everis.base.page.MercadoLibrePage; import net.serenitybdd.annotations.Step; import net.serenitybdd.screenplay.Performable; import net.serenitybdd.screenplay.Task; import net.serenitybdd.screenplay.Actor; import net.serenitybdd.screenplay.actions.Enter; imp...
import React from 'react' import { Form, FormGroup } from 'components' import { Typeahead } from 'react-bootstrap-typeahead' import options from './../exampleData' class BasicBehaviorsExample extends React.Component { constructor(props) { super(props) this.state = { disabled: false, dropup: fa...
from typing import Annotated from fastapi import FastAPI, Request, Form from fastapi.staticfiles import StaticFiles from fastapi.templating import Jinja2Templates from fastapi.responses import JSONResponse from paramiko.ssh_exception import SSHException from yaml import safe_load from sshcheck import CheckedServer from...
import PropTypes from 'prop-types'; const ConstellationList = ({ articles, selectedArticleIndex, handleArticleSelect }) => { if (!articles.length) { return <p>Нет статей для отображения.</p>; } return ( <ul className="constellation-list"> {articles.map((article, index) => ( ...
package stepdefinitions; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; import net.serenitybdd.annotations.Step; import pages.GooglePageObject; public class GoogleSearchSteps { GooglePageObject googlePageObject; @Step("{0} opens browser on Google Page") @Given...
import '@testing-library/jest-dom'; import { render, RenderResult } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import CountSelector from './count-selector'; vi.mock('../../primitives', async () => { return { Plus: vi.fn(() => <div data-testid="plus" />), Minus: vi.fn...
<%= form_for(@job) do |f| %> <% if @job.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@job.errors.count, "error") %> prohibited this product from being saved:</h2> <ul> <% @job.errors.full_messages.each do |msg| %> <li><%= msg %></li> <% end %> </ul> ...
package com.example.maskkotlin import android.graphics.Color import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.TextView import androidx.recyclerview.widget.RecyclerView import com.example.maskkotlin.model.Store import java.lang.String import java.util.* //...
/* * 작성자: 윤정도 * 생성일: 11/24/2022 5:39:23 PM * */ #pragma once #include <atomic> // [원자성 깨졌는지 테스트 용] #define BROKEN_ATOMICITY_TEST 0 // 1. 읽기락 획득시 쓰기락이 되어있는지 inline std::atomic<int> g_broken_read_atomicity; // 2. 쓰기락 획득시 읽기락이 되어있는지 inline std::atomic<int> g_broken_write_atomicity; class my_atomic_rwlock { pu...
--- import { round } from "culori" import { defaultColors } from "@utils/colors" const round0 = round(0) --- <section class=""> <div class="flex flex-col py-2 sm:flex-row sm:items-center sm:divide-x-2 dark:divide-neutral-600"> <label class="flex items-center gap-2 py-2 pr-3 sm:py-0" ><div class="text-sm">Select...
from random import randint class Dot: def __init__(self, x, y): self.x = x self.y = y # сравнение двух точек def __eq__(self, other): return self.x == other.x and self.y == other.y def __repr__(self): return f"Dot({self.x}, {self.y})" # Классы исключений class BoardE...
# Xhulia Turkaj SQL Bridge Course MSDS 2023 Week 2 Assignment # Question 1. Videos table. Create one table to keep track of the videos. # This table should include a unique ID, the title of the video, the length in minutes, and the URL. # Populate the table with at least three related videos from YouTube # or oth...
#### code/assembly_analysis/hgcA/clean_hgcA_coverage.R #### # Written by Benjamin D. Peterson # hgcA abundance normalized to the SCG coverage #### Get ready. Get set #### rm(list = ls()) setwd("/Users/benjaminpeterson/Documents/research/Everglades/") library(stringr) library(tidyverse) #### Read in normalization v...
<!DOCTYPE html> <html lang="en" xmlns:th="http://www.thymeleaf.org"> <head> <meta charset="UTF-8"> <title>Update Center Info</title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css"> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>...
type inputObject = { timeStamp: string; isQuery: boolean; speed?: number; distance?: number; }; const input: string = ` 6 00:00:01 100 00:15:01 00:30:01 01:00:01 50 03:00:01 03:00:05 140 `; let processedInput: inputObject[] = processInput(input); let calculatedInput: inputObject[] = calculateDistances(proces...
import React, { useEffect, useState } from 'react'; import { useDispatch } from 'react-redux'; import Layout from '../components/Layout'; import { showLoading, hideLoading } from '../redux/alertsSlice'; import { toast } from 'react-hot-toast'; import axios from 'axios'; import { DatePicker, Table } from 'antd'; import ...
<?php namespace App\Repository; use App\Entity\User; use App\Entity\Client; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\Persistence\ManagerRegistry; /** * @extends ServiceEntityRepository<User> * * @method User|null find($id, $lockMode = null, $lockVersion = null) * @metho...
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class Post extends Model { use HasFactory; protected $with = ['category', 'author']; public function comments() { return $this->hasMany(Comment::class); } publ...
# Hero Component The Hero Component directory contains a component that showcases the hero section of your web application. The hero section includes information about the counties served and contact options, allowing users to easily reach out to you via email or phone. ## Component: `Hero` The `Hero` component disp...
import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:todo_project/screens/log/login_tab.dart'; import 'package:todo_project/shared/firebase/firebaseFunctions.dart'; import 'package:todo_project/shared/styles/colors.dart'; import 'package:flutter_gen/gen_l1...
package com.mycompany.myapp.domain; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import java.io.Serializable; import java.util.HashSet; import java.util.Set; import javax.persistence.*; /** * A Ferme. */ @Entity @Table(name = "ferme") @SuppressWarnings("common-java:DuplicatedBlocks") public class F...
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> <html lang="en"> <head> <meta charset="UTF-8"> <title>Admin</title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJ...
import {gql} from "apollo-server-express"; import {DocumentNode} from "graphql"; export const typeDefs: DocumentNode = gql` type Query { tests: [Test] test(uid: String!): Test! shops: [Shop!]! shop(uid: String!): Shop! tag(uid: String!): Tag! tagsByShopId(shopUid: String!): [Tag!] item(ui...
#!/usr/bin/env python # # SPDX-FileCopyrightText: 2022 Buoyant, Inc. # SPDX-License-Identifier: Apache-2.0 # # Copyright 2022 Buoyant, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # ...
// // Created by Yancey on 2023/11/7. // #include "CPack.h" #include "../node/param/NodeNormalId.h" #include "../node/util/NodeAnd.h" namespace CHelper { CODEC(RepeatData, id, breakNodes, repeatNodes, isEnd) CPack::CPack(const std::filesystem::path &path) { #if CHelperDebug == true size_t stackSize ...
import java.util.Locale; import java.util.Scanner; public class Exercise06 { public static void run() { System.out.println("Exercise06"); Locale.setDefault(Locale.US); Scanner scanner = new Scanner(System.in); double a, b, c; a = scanner.nextDouble(); b = scanner.n...
// // AuthService.swift // Simplified // // Created by Jed Kutai on 6/1/24. // import Foundation import Firebase import FirebaseAuth import FirebaseFirestore struct AuthService { static func uploadUserData(uid: String, email: String) async { let user = User(id: uid, email: email.lowercased()) g...
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateGalleriesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('galleries', f...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package Controller.Helper; import View.ClienteView; import Model.Cliente; import java.text.ParseException; import java.text.SimpleDate...
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import axios from 'axios' import { useEffect, useState } from 'react' import { Link } from 'react-router-dom' import Swal from 'sweetalert2' import MainLayout from '../Layout/Layout.jsx' const Login = () => { const [email, setEmail] = useState('') cons...
// Copyright 2015 Open Source Robotics Foundation, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appli...
import { RouteObject } from "react-router-dom"; import { Typography } from "@mui/material"; import { MainLayout } from "@/components/layouts/MainLayout.tsx"; import { BoardView } from "@/features/boards/routes/BoardView.tsx"; import { BoardListView } from "@/features/boards/routes/BoardListView.tsx"; import { BoardSett...
#!/usr/bin/env python3 """This module contains functions for working with substitution ciphers. It allows for automatically solving monoalphabetic substitution ciphers. """ import fitness import frequency from typing import Callable from random import randint def hill_climb(ciphertext: str, decrypt: Callable[[str, dic...
import numpy as np from layer import Layer from activation import Activation class Tanh(Activation): def __init__(self): def tanh(x): return np.tanh(x) def tanh_prime(x): return 1 - np.tanh(x) ** 2 super().__init__(tanh, tanh_prime) class Sigmoid(Activation): ...
# import libraries import pandas as pd from sqlalchemy import create_engine import sys def load_data(messages_filepath, categories_filepath): """ INPUT: messages_filepath - csv file with the emergency messages categories_filepath - csv file with the labels of each emergency message OUTPUT: df -...
############################################################################### ### Libraries ### from kafka import KafkaConsumer, KafkaProducer from kafka.structs import OffsetAndMetadata, TopicPartition from kafka.coordinator.assignors.roundrobin import RoundRobinPartitionAssignor from os import getcwd from pprint im...
import {sum} from "./sum"; test("add two numbers" , ()=>{ expect(sum(1,2)).toBe(3) }); ////trying different matchers test("to be zero" , ()=>{ const value = 0; expect(value).not.toBeNull(); expect(value).toBeDefined(); expect(value).not.toBeUndefined(); expect(value).not.toBeTruthy(); //te...
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distribut...
import { createApi } from '@reduxjs/toolkit/query/react'; import { axiosBaseQuery } from 'shared/config/axios'; import { TodoModel } from 'shared/interfaces'; export const todoApi = createApi({ reducerPath: 'todoApi', baseQuery: axiosBaseQuery(), tagTypes: ['Todo'], endpoints: (builder) => ({ getAllTodo: ...
import React, { useState } from "react"; import Carousel from "../../components/carousel/carousel"; import { FaCheck } from "react-icons/fa"; import { IoCloseCircle } from "react-icons/io5"; import { RxDimensions } from "react-icons/rx"; import { differenceInDays } from "date-fns"; import { useDispatch, useSelector } f...
import React from 'react' const Education = ({education}) => { return ( <section> <h1>Educación</h1> <ul> { education.map( ({ institution, startDate, endDate, area }) => { const startYear = new Date(startDate).getFullYear() const endYear = endDate...
from rest_framework import serializers from .models import User class UserRegisterSerializer(serializers.ModelSerializer): password2 = serializers.CharField() class Meta: model = User fields = ['email', 'username', 'password', 'password2'] def save(self, *args, **kwargs): user = ...
<div class="row justify-content-center"> <div class="col-8"> <form name="editForm" role="form" novalidate (ngSubmit)="save()" [formGroup]="editForm"> <h2 id="jhi-camion-heading" data-cy="CamionCreateUpdateHeading" jhiTranslate="gestionStockLivraisonApp.camion.home.createOrEditLabel"> Create or edit ...
defmodule StarkInfra.IssuingHolder.Log do alias __MODULE__, as: Log alias StarkInfra.Utils.Rest alias StarkInfra.Utils.Check alias StarkInfra.User.Project alias StarkInfra.User.Organization alias StarkInfra.Error @moduledoc """ Groups IssuingHolder.Log related functions """ @doc """ Every time...
<!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>C4T3</title> </head> <body> <div> <h1>Aplikasi Ubah Warna</h1> <label>Warna Latar : </lab...
import { DndContext } from '@dnd-kit/core'; import { useState } from 'react'; import { Navbar, GameGridCell, Piece } from './components'; function App() { const gameGridCellIds = ["11", "21", "31", "41", "51", "61", "71", "81", "91"]; const playerOnePieceIds = ["112", "212", "312", "412", "512", "612", "712", "8...
// // LoginViewModel.swift // StudyForCombine // // Created by OpenObject on 2022/12/05. // import Foundation import Combine class LoginViewModel { @Published var login: String = "" @Published var password: String = "" @Published var isLoading = false let validationResult = PassthroughSubject<String, Error...
#ifndef PROFILER_H #define PROFILER_H #include <vector> #include <string> #include <functional> #include <iostream> #include <matplot/matplot.h> #include <unordered_map> #include <fstream> #include <algorithm> #include <iomanip> #include "Timer.h" template <typename T> class Profiler { private: std::vector<double...
# negotiator [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![Node.js Version][node-version-image]][node-version-url] [![Build Status][travis-image]][travis-url] [![Test Coverage][coveralls-image]][coveralls-url] An HTTP content negotiator for Node.js ## Installation ```sh ...
<nav class="navbar navbar-default"> <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> ...
<template> <div class="app-container"> 角色列表 <!--查询表单--> <div class="search-div"> <el-form label-width="70px" size="small"> <el-row> <el-col :span="24"> <el-form-item label="角色名称"> <el-input style="width: 100%" v-model="searc...
1.变形(transform) translate(x,y) 定义 2D 转换,沿着 X 和 Y 轴移动元素。 位移效果 translateX(n) 定义 2D 转换,沿着 X 轴移动元素。 translateY(n) 定义 2D 转换,沿着 Y 轴移动元素。 scale(x,y) 定义 2D 缩放转换,改变元素的宽度和高度。 缩放效果 scaleX(n) 定义 2D 缩放转换,改变元素的宽度。 scaleY(n) 定义 2D 缩放转换,改变元素的高度。 rotate(angle) 定义 2D 旋转,在参数中规定角度(-360deg - 360deg)。 旋转效果 ...
<?php namespace Database\Seeders; use Illuminate\Database\Seeder; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; class UsersTableSeeder extends Seeder { public function run() { DB::table('users')->insert([ [ 'name' => 'María', 'fir...
import React, { useState, useEffect } from "react"; import heart from "../../src/cardsIcons/heart-solid.svg"; import diamond from "../../src/cardsIcons/diamond-solid.svg"; import spade from "../../src/cardsIcons/spade.svg"; import clover from "../../src/cardsIcons/clover-solid.svg"; import CardContainer from "./CardCon...
import React, { useState } from "react"; import { MenuIcon, SearchIcon, XIcon } from "lucide-react"; import { Input } from "./ui/input"; import { Switch } from "./ui/switch"; import { useTheme} from "@/components/theme-provider"; import type { Theme } from "@/components/theme-provider"; import { Button } from "./ui/but...
function[perfSummary, onsets] = mental_learning(scr, stim, key, n_E_levels, n_to_reach, n_learningRepeats, timings) %[perfSummary, onsets] = mental_learning(scr, stim, key, n_E_levels, n_to_reach, n_learningRepeats, timings) % mental_learning will make the participant perform nXX repetitions of each % effort level to s...
import glob import os import pandas as pd import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split BASE_DIR = r"aug" TEST_SIZE = 0.10 VAL_SIZE = 0.10 RANDOM_STATE = 42 def extract_label_from_path(image_path, dir_position=-2, separator="/"): return image_path.split(separator)[dir_po...
import { defineStore } from 'pinia'; import { getDefaultProject, getProjects, updateDefaultProject } from '@/http/service/uniauth'; export interface Project { label: string; value: string; [propName: string]: any; } interface ProjectConfig { // 默认项目 defaultProject: string; // 项目列表 projects: Project[]; ...
# Audio Processor Application # # This file is part of the Audio Connector Getting Started repository. # https://github.com/industrial-edge/audio-connector-getting-started # # MIT License # # Copyright (c) 2022 Siemens Aktiengesellschaft # # Permission is hereby granted, free of charge, to any person obtaining a copy #...
# Copyright (C) 2019 Greenbone Networks GmbH # Text descriptions are largely excerpted from the referenced # advisory, and are Copyright (C) the respective author(s) # # SPDX-License-Identifier: GPL-2.0-or-later # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Gen...
import { Grid } from "@mui/material"; import { useState } from "react"; import { ItemCard } from "../item_card/ItemCard"; import "./ItemGrid.css"; export const ItemGrid = (props) => { const [selected, setSelected] = useState(null); const onSelect = (i) => { if (selected !== i.id) { setSelected(i.id); if (p...
<!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>Dapp</title> </head> <body> <div> <input type="text" id="counter"/> <button onclick="i...
#ifndef BANKING_FUNCTIONS_H #define BANKING_FUNCTIONS_H #include <iostream> #include <string> #include <map> // Structure to store account information struct Account { double balance{}; }; // Structure to store customer information struct Customer { std::string name{}; std::string address{}; std::str...
import React, { useRef, useState } from 'react' import ReactDOM from "react-dom"; import './Routes.css'; import { PRIVILEGES } from "../../helpers/constants" import { Link, useLocation } from 'react-router-dom'; import useAlert from '../../components/useAlert'; import useFetch from '../../components/useFetch'; import u...
import { Contract } from 'ethers'; import { Deployment } from 'hardhat-deploy/types'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; import { ethers } from 'hardhat'; import fs from 'fs'; import path from 'path'; /** * This deployment file will help to check for changes and set the address of the new cont...