text
stringlengths
184
4.48M
# https://leetcode.com/problems/fair-distribution-of-cookies/ """ How to solve: Check all the possible distributions and return the minimum of max of each distribution """ class Solution: def distributeCookies(self, cookies: List[int], k: int) -> int: if k == len(cookies): # each studen...
package br.edu.ifsp.aluno.garagecarroom.ui import android.os.Bundle import android.view.LayoutInflater import android.view.Menu import android.view.MenuInflater import android.view.MenuItem import android.view.View import android.view.ViewGroup import androidx.core.view.MenuHost import androidx.core.view.MenuProvider ...
# -*- coding: utf-8 -*- # # This file is part of the invenio-remote-user-data package. # Copyright (C) 2023, MESH Research. # # invenio-remote-user-data is free software; you can redistribute it # and/or modify it under the terms of the MIT License; see # LICENSE file for more details. from flask import current_app as...
import "bootstrap/dist/css/bootstrap.min.css"; import { Route, Routes } from "react-router-dom"; import Login from "./pages/Login"; import Profile from "./pages/Profile"; import Users from "./pages/Users"; import NavBar from "./components/NavBar"; import PrivateRoute from "./utils/PrivateRoute"; import PublicRoute from...
Question: Given an integer numRows, return the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers directly above it as shown: Test Case 1: Input: numRows = 5 Output: [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]] Test Case 2: ...
import logging from datetime import datetime from typing import List from fastapi import Query from pydantic import BaseModel from sqlalchemy import text import models from helpers.exceptions import ValidationError, NotFoundError, AuthorizationError from helpers.permissions import permission_access from helpers.respo...
package leetcode.editor.cn; //给定一个整数数组 nums,其中恰好有两个元素只出现一次,其余所有元素均出现两次。 找出只出现一次的那两个元素。你可以按 任意顺序 返回答案。 // // // // 进阶:你的算法应该具有线性时间复杂度。你能否仅使用常数空间复杂度来实现? // // // // 示例 1: // // //输入:nums = [1,2,1,3,2,5] //输出:[3,5] //解释:[5, 3] 也是有效的答案。 // // // 示例 2: // // //输入:nums = [-1,0] //输出:[-1,0] // // // 示例 3: // // /...
import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:test_msib1/auth/view/login.dart'; import 'package:test_msib1/core/dependency/dependency.dart'; import 'package:test_msib1/core/widget/custom-error-alert.dart'; import 'pack...
import { useDispatch } from 'react-redux'; import { RiDeleteBinLine, RiEdit2Line } from 'react-icons/ri'; import { addCurrentTodo, deleteTodo } from 'reduxTodo/todoSlice'; import { Text } from 'components'; import style from './Todo.module.css'; export const Todo = ({ id, counter, text }) => { const dispatch = use...
import React from 'react' import "./ProjectContainer.css"; import { Element } from 'react-scroll'; import Project from '../Project/Project'; const ProjectContainer = () => { const projects=[ { img:"https://i.pinimg.com/originals/7f/b1/f1/7fb1f193435815a86c8484f82b9589e1.jpg", title:"Instagram", ...
package ru.eco.automan.dao import androidx.room.Dao import androidx.room.Query import ru.eco.automan.models.Brand import ru.eco.automan.models.Paragraph /** * Интерфейс, позволяющий получить доступ к пунктам правил ПДД, хранящихся в базе данных * @see Paragraph */ @Dao interface ParagraphDao { /** * Метод ...
package edument.perl6idea.annotation; import com.intellij.lang.annotation.AnnotationHolder; import com.intellij.lang.annotation.Annotator; import com.intellij.lang.annotation.HighlightSeverity; import com.intellij.psi.PsiElement; import com.intellij.psi.util.PsiTreeUtil; import edument.perl6idea.psi.Perl6PackageDecl; ...
import React, { Component } from 'react'; /* import MyList from "./MyList"; */ import Button from './Button'; import Alert from './Alert'; class App extends Component { constructor(props) { super(props) this.state = { showModal: false, isDisableButton: false, } } changeTitle = (value) ...
/* * Copyright 2020 SIA Joom * * 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 ...
import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router" import NProgress from 'nprogress' // Layouts import Default from '../layouts/Default.vue' import Error from '../layouts/Error.vue' // Pages import Home from '../page/Home.vue' // routes import accountRoute from "./account" import application...
public class ThisDetail { public static void main(String[] args) { T t1 = new T(); } } //1、this关键字可以用来访问本类的属性、方法、构造器 //2、this用于区分当前类的属性和局部变量 //3、访问成员方法的语法:this.方法名(参数列表) //4、访问构造器语法:this(参数列表);注意只能在构造器中使用(即只能在构造器中调用访问另外一个构造器) //5、this不能在类定义的外部使用,只能在类定义的方法中使用。 class T{ public T(){ //注意:如果有访...
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using static System.Runtime.InteropServices.JavaScript.JSType; namespace _03_OOP2_cv_060_Utvary { //Vytvořte třídu PlechovkaBarvy //bude v konstruktoru dostávat deseti...
'use client'; import React, { useState } from 'react'; import { useRouter } from 'next/navigation'; import { DataTable } from '@/components/ui/data-table'; import { Button } from '@/components/ui/button'; import { Separator } from '@/components/ui/separator'; import SectionHeading from '@/components/sectionHeading'; ...
<manpage uramdb(5) "URAM Database File Format"> <section SYNOPSIS> <itemlist> <toproject {package require simlib [version]}> <section DESCRIPTION> uramdb(5) defines a database format used for initializing instances of <xref uram(n)>. Note that <xref uram(n)> does not require that uramdb(5) be used; it is a conven...
import React, { useState, useEffect, useContext } from 'react'; import axios from 'axios'; import { useNavigate } from 'react-router-dom'; import { useData } from '../UserContext'; // import { UserContext } from '../UserContext'; function Quiz() { // app state const { data, updateData } = useData(); const [activ...
package com.devsuperior.assistencia.recources; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.spring...
import '../styles/styles.css' import { useMap } from '@vis.gl/react-google-maps'; // Function to get the price sign based on the locale function getLocalePriceSign() { switch(navigator.language) { case "en-GB": return "£"; case "en-US": return "$"; case "de-DE": ...
use object::player; use sdl2::event::Event; use sdl2::keyboard::Keycode; use sdl2::pixels::Color; use sdl2::rect::Rect; mod view; use view::board_view; mod object; use object::rays; mod settings; use settings::*; // importing all constants fn main() -> Result<(), String> { let sdl_context: sdl2::Sdl = sdl2::ini...
import glob import os import platform import time import librosa import numpy as np import pandas as pd from pydub import AudioSegment from tqdm import tqdm def get_emotions_dictionary(): return { '01': 'neutral', '02': 'calm', '03': 'happy', '04': 'sad', '05': 'angry', ...
from PySide6.QtWidgets import ( QVBoxLayout, QWidget, QPushButton, QTextEdit, QLabel, QFileDialog, ) from PySide6.QtGui import QPalette, QColor from PySide6.QtCore import Qt import base64 class CriptografarScreen(QWidget): def __init__(self, parent): super().__init__() self...
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <html> <head> <link rel="stylesheet" href="<c:url value="/resources/css/bootstrap.min.css"/>"> <link rel="stylesheet" href="<c:url value="/resources/fonts/JosefinSans-Thin.ttf"/>"> ...
<div class="container"> <div class="row"> <div class="col-xs-12"> <button class="btn btn-primary" (click)="onlyOdd = !onlyOdd">Only show odd numbers</button> <br><br> <ul class="list-group"> <div *ngIf="onlyOdd"> <li class="list-group-item" ...
package com.buurbak.api.trailers.model; import com.buurbak.api.images.model.Image; import com.buurbak.api.users.model.Address; import com.buurbak.api.users.model.Customer; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import org.hibernate.annotations.CreationTimestamp; import org.hiberna...
#pragma once #include <d3d11.h> #include "Vertex.h" #include <wrl/client.h> // Used for ComPtr - a smart pointer for COM objects using namespace DirectX; class Mesh { private: // ComPtr's to the vertex and index buffers and device Microsoft::WRL::ComPtr<ID3D11Buffer> vertexBuffer; Microsoft::WRL::ComPtr<ID3D11Buff...
require 'httparty' require 'benchmark' namespace :load_test do desc 'Make API requests and measure performance' task :test_performance do api_url = 'http://127.0.0.1:3000/articles?query=error' # Replace with your API endpoint num_requests = 1000 # Adjust as needed def make_api_request(api_url) ...
const express = require("express"); // Importa o framework Express const uuid = require("uuid"); // Importa o pacote uuid para gerar IDs únicos const port = 3001; // Define a porta em que o servidor irá escutar const app = express(); // Cria uma instância do aplicativo Express app.use(express.json()); // Habilita o uso...
"use client"; import { FaFilter } from "react-icons/fa"; import { IoIosClose } from "react-icons/io"; import { CiSearch } from "react-icons/ci"; import ProjectTile from "@/components/project-tile"; import React, { useEffect, useState } from "react"; import { api } from "@/trpc/react"; import { useRouter, useSearchPara...
<% content_for(:whole_page) do %> <h2 class="text-center">My Workouts (past 7 days)</h2> <div class="col-md-7 col-xs-12"> <% unless @exercises.empty? %> <table class="table tabel-striped"> <thead> <tr> <th>Duration (min)</th> <th>Workout Details</th> <th>Activity ...
package com.geek.entity; import org.springframework.format.annotation.DateTimeFormat; import javax.persistence.*; import java.util.Date; import java.util.HashSet; import java.util.Set; @Entity @Table(name = "actors") public class Actors { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE) private Long id; ...
import { executeQuery } from "@/app/nextauth/MySQLConnection"; import { NextResponse } from "next/server"; import path from "path"; import { writeFile } from "fs/promises"; export async function POST(req) { const body = await req.formData(); const dataString = body.get('data'); const { product_name, produc...
/* * clientlistmodel.cpp * Copyright (C) 2016 Michał Garapich <michal@garapich.pl> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option...
// @ts-check export function Size(width,height) { this.width=width ?? 80; this.height=height ?? 60; }; Size.prototype.resize = function(newWidth,newHeight) { this.width=newWidth; this.height=newHeight; }; export function Position(x,y) { this.x=x ?? 0; this.y=y ?? 0; }; Position.prototype.move = function...
import React, { useState } from 'react'; import { View, Text, StyleSheet, TouchableOpacity, ScrollView } from 'react-native'; import { COLORS, FONTS } from '../../constant/theme'; type DiscountCategory = 'all' | 'ewamall' | 'shop' | 'partner'; interface TabNavigationProps { onSelectTab: (tab: DiscountCategory) => v...
package com.example.userlib.Services; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import com.example.userlib.Impl.Booking.Booking; import com.example.userlib.Impl.GiveAway.BookGivenAway; import com.example.userlib.Impl....
import argparse import pandas as pd def csv_to_fasta(csv_file, output_fasta_file): """ Function to convert a CSV file to a FASTA file """ # The FASTA file is stored at the same directoey as the csv file # The FASTA file has the same name (different extension) as the csv file df = pd.read_csv(csv_file...
# This file is copied to spec/ when you run 'rails generate rspec:install' require 'spec_helper' ENV['RAILS_ENV'] ||= 'test' require_relative '../config/environment' # Prevent database truncation if the environment is production abort("The Rails environment is running in production mode!") if Rails.env.production? requ...
package M_sort; // N개의 수가 주어졌을 때, 이를 오름차순으로 정렬하는 프로그램을 작성하시오. // 첫째 줄에 수의 개수 N(1 ≤ N ≤ 1,000)이 주어진다. 둘째 줄부터 N개의 줄에는 수가 주어진다. 이 수는 절댓값이 1,000보다 작거나 같은 정수이다. 수는 중복되지 않는다. // 첫째 줄부터 N개의 줄에 오름차순으로 정렬한 결과를 한 줄에 하나씩 출력한다. import java.util.Scanner; public class Main_2750_2 { private static int[] mergeSort(int[] arr){ ...
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Localization; using OrchardCore.DisplayManagement.Notify; using OrchardCore.Email; using OrchardCoreContrib.Email.Hotmail.Drivers; using OrchardCoreContrib.Email.Hotmail.ViewModels; using System.Threading.Tasks; n...
(ns chord.keys (:require [hollow.util :as u] [clojure.set :refer [subset?]])) (def key->offset {"C" 0 "C#" 1 "Db" 1 "D" 2 "D#" 3 "Eb" 3 "E" 4 "F" 5 "F#" 6 "Gb" 6 "G" 7 "G#" 8 "Ab" 8 "A" 9 "A#" 10 "Bb" 10 "B" 11}) (def major-note-differences '(4 3)) (def ...
import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:kebut_kurir/core/theme/app_theme.dart'; import 'package:kebut_kurir/core/widgets/asset_image_widget.dart'; import 'package:kebut_kurir/core/widgets/button_custom_widget.dart'; enum ButtonDirection { VER...
<!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"> <script src="https://cdn.tailwindcss.com"></script> <link href="https://fonts.googleapis.com/css2?family=Roboto:...
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_g...
[TOC] ##### 简要描述 - 获取用户信息,可以获取普通用户、群聊、公众号的信息。 - 可以传入单个wxid或wxid列表,单次调用不应超过20个wxid。 - 请注意,参数为string和参数为list时的返回结构有差别。 ##### 请求URL - ` http://127.0.0.1:8000/api/` ##### 请求方式 - POST ##### 参数 |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |type |是 |int | 接口编号 | |userName |是 |string, list | 用户wxid或wxid列表...
import * as React from "react"; import Box from "@mui/material/Box"; import { DataGrid } from "@mui/x-data-grid"; import axios from "axios"; import { useAuth } from "../../context/User"; import dayjs from "dayjs"; // import "./summary.css"; const columns = [ { field: "leaveid", headerName: "ID", width: 90 }, { ...
#define _CRT_SECURE_NO_WARNINGS #include <cstring> #include "fridge.h" namespace seneca { Fridge::Fridge() { m_capacity = 0; m_model = nullptr; m_food = nullptr; m_cntFoods = 0; } Fridge::Fridge(const char* model, int capacity) { *this = Fridge(); setModel(model, capacity); } Fridge::Fridge(const...
\section{Neural estimation of mutual information} \label{sec.mine} In this section, we recall the neural estimation of mutual information following \cite{BBROBCH18mut}. Let $\spaceX \subset \Rd$ and $\spaceY \subset \R^{e}$ represent sample spaces. Let $X$ and $Y$ be random variables taking values in $\spaceX...
// _foundation /*MAIN STYLES*/ //mix-ins @mixin flexandcenter { display: flex; justify-content: center; } body { background-image: radial-gradient(#fff, #c2c2c2); font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; display: flex; flex-directio...
#ifndef VERTEX_ARRAY_H #define VERTEX_ARRAY_H #include <glad/glad.h> #include <glfw/glfw3.h> #include "VertexBuffer.hpp" namespace engine { /** * @class VertexArray * @brief OpenGL Vertex Array Object. */ class VertexArray { private: /// ID of the Vertex Array Object. GLuint...
import { createSlice } from '@reduxjs/toolkit' import blogService from '../services/blogs' const blogSlice = createSlice({ name: 'blogs', initialState: [], reducers: { createBlog(state, action) { //receives blog object as payload state.concat(action.payload) }, ...
import { useRouter } from 'next/router' import { ApiService } from '@/services/ApiService' import { CookieService } from '@/utils/CookieService' import { createContext, ReactNode, useCallback, useState } from 'react' interface IUserLoginDTO { username: string password: string } interface IUserGetResponse { id: ...
import { BasicApiResponse } from '@src/api/types'; import { IProfileData, ProfileModuleState } from '@src/store/profile/types'; import StoreModule from '../module'; /** * Детальная информация о пользователе */ class ProfileState extends StoreModule<ProfileModuleState> { initState(): ProfileModuleState { retur...
<html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin...
--- alias: Successive Over Relaxation (SOR) --- This is the preq: [Jacobi, Gauss Sediel Iterations](../AMATH%20581%20Scientific%20Computing/Jacobi,%20Gauss%20Sediel%20Iterations.md). Here is more advanced coverage of the same topic. --- ### **Intro** You must read the document listed above to proceed. Stationary i...
import React, { useState, useEffect } from "react"; import axios from "axios"; import "./App.css"; import image from './img/linear_reg_img.png'; function App() { const [squareFeet, setSquareFeet] = useState(""); const [bedrooms, setBedrooms] = useState(""); const [bathrooms, setBathrooms] = useState(""); const...
// // UITextFieldViewRepresentable.swift // OTUS_HW01 // // Created by Александр Касьянов on 02.09.2022. // import UIKit import SwiftUI struct UITextFieldViewRepresentable: UIViewRepresentable { @Binding var text: String func makeUIView(context: Context) -> some UIView { let textField...
import React, {useState, useEffect} from 'react' import {Link ,useNavigate,useParams} from 'react-router-dom'; import { Row, Col, Button, Card, ListGroup, Image, Form} from 'react-bootstrap'; import Rating from '../components/Rating'; import {useDispatch, useSelector} from 'react-redux' import { createProductReview, li...
class VersionCode: def __init__(self, version_str: str): try: splits = version_str.split('.') if len(splits) != 3: raise RuntimeError('Not a valid version code') self._major = int(splits[0]) self._minor = int(splits[1]) self._patch ...
import { defineManifest } from '@crxjs/vite-plugin'; import pkg from '../package.json'; export default defineManifest({ manifest_version: 3, name: "__MSG_appName__", default_locale: "en", description: "__MSG_appDescription__", version: pkg.version, content_scripts: [ { js: ["src/content-script/i...
// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer) // SPDX-License-Identifier: Apache-2.0 import { Checkbox, Radio, Tooltip, chakra } from "@open-pioneer/chakra-integration"; import { ChangeEvent, useId, useMemo } from "react"; export interface SelectComponentProps { mode?: "che...
import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'filter', pure: false // just needs to be used when the data change. The pure pipe works when input change, but the inpure // pipe change on every change detection / source data change. }) export class FilterPipe implements PipeTransform { tr...
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="http://www.zkoss.org/jsp/zul" prefix="z" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <z:component name="mywindow" extends="window" class="org.zkoss.jspdemo.MyWindow" title="test" border="norma...
document.addEventListener("DOMContentLoaded", function () { var IngredientTracker = []; const ingredientSelect = document.getElementById("ingredientSelect"); const trackMealForm = document.getElementById("trackMealForm"); const intakeRecordsContainer = document.querySelector(".intake-records"); fu...
import os from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription from launch.actions import IncludeLaunchDescription from launch.launch_description_sources import PythonLaunchDescriptionSource from launch_ros.actions import Node def generate_launch_description(): ...
part of 'user_bloc.dart'; class UserState extends Equatable { final ResultStatus status; final List<UserData?> users; final String message; const UserState({ this.status = ResultStatus.none, this.users = const [], this.message = '', }); UserState update({ ResultStatus? status, List<Us...
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Database\Eloquent\Model; class Customer extends Authenticatable { use HasFactory; protected $table = 'customers'; protected $fillable = [ 'firs...
import * as THREE from 'three' export class MeshLineGeometry extends THREE.BufferGeometry { isMeshLine = true override type = 'MeshLine' positions: number[] = [] previous: number[] = [] next: number[] = [] side: number[] = [] width: number[] = [] indices_array: number[] = [] uvs: number[] = [] cou...
package com.example.demo.models; import jakarta.persistence.*; import lombok.*; import java.util.HashSet; import java.util.Set; @Data @Entity @Setter @Getter @RequiredArgsConstructor @AllArgsConstructor public class User { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer user_id; ...
// ZeugnisFormularServiceImpl.java // // Licensed under the AGPL - http://www.gnu.org/licenses/agpl-3.0.txt // (c) SZE-Development-Team package net.sf.sze.service.impl.zeugnis; import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.Comparator; import java...
<script setup> import { ref, reactive } from "vue"; import { useDefaultStore } from "@/stores"; import { useRouter } from "vue-router"; import { ElMessage } from "element-plus"; const defaultStore = useDefaultStore(); const msg = ref("login"); const formRef = ref(null); const router = useRouter() const form = reactive(...
import { AnyAction, applyMiddleware, createStore } from 'redux'; import { PoemDto } from '../sound-poems.models'; import * as spActionTypes from './sound-poems-actionTypes'; import SpEffects from './sound-poems.effects'; export type SpState = { currentSearchResults: PoemDto[]; currentPoem: PoemDto | null, searc...
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateGradesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('grades', functio...
@extends('admin.layout') @section('content') <meta name="csrf-token" content="{{ csrf_token() }}"> {{-- <link rel="stylesheet" href="{{ asset('css/admin/administrativo/usuarios.css') }}"> --}} @section('tab_title') <div id="date"></div> <script> function updateClock() { const mo...
import 'package:flutter/material.dart'; import 'package:primeiro_projeto/components/task.dart'; import 'package:primeiro_projeto/data/task_dao.dart'; import 'package:primeiro_projeto/data/task_inherited.dart'; class FormScreen extends StatefulWidget { const FormScreen({super.key, required this.taskContext}); fina...
from datetime import date from flask_login import login_required from app.models.category import Category from app.models.supplier import Supplier from app.product import bp from flask import flash, render_template, request, redirect, url_for from app.models.product import Product from app import db, update_qty_on_expi...
<template> <div> <div v-if="isFormOpen" class="container"> <div class="input-container"> <div class="input-text">Your post</div> <textarea v-model="wallPostContent" class="custom-text-area" spellcheck="false" /> </div> <div class="buttons-row"> <button class="cancel-button" @c...
/// basically a person type. Note: the From<T> trait is implemented /// with a tuple of (Username(String), Age(i32), Timestamp(String), Comment(String)), IN THIS ORDER! use std::fs::OpenOptions; use std::io::{Read, Write}; use serde::{Serialize, Deserialize}; ///```markdown ///# A person struct ///Should only be use...
// @ts-ignore import React, {memo, useCallback} from 'react'; import styled from 'styled-components/native'; import {TextInputProps} from 'react-native'; interface Props extends TextInputProps { title: string; keyName: string; onChangeValue: (keyName: string, value: string) => void; } const InputInfo = (props: P...
import { useSelector, useDispatch } from 'react-redux'; import { getAllContacts } from 'redux/contacts/contacts-selectors'; import { getFilter } from 'redux/filter/filter-selectors'; import { deleteContact } from 'redux/contacts/contacts-slice'; import Notiflix from 'notiflix'; import css from './contactList.module.cs...
from typing import Any, Dict, Tuple import numpy as np from qulacs import QuantumCircuit, QuantumState from qulacs.converter import convert_qulacs_circuit_to_QASM from qulacs.state import inner_product from mnisq.internal.generator.aqce import AQCE_program, AQCE_python from mnisq.internal.generator.cifar_10.downloade...
/** * Sample React Native App * https://github.com/facebook/react-native * * @format */ import React from 'react'; import { SafeAreaView, StatusBar, StyleSheet, useColorScheme, View, Text, TouchableOpacity, } from 'react-native'; import {Colors} from 'react-native/Libraries/NewAppScreen'; import {...
import React from 'react'; import { StyleSheet } from 'react-native'; import styled from 'styled-components/native'; interface NoteInputProps { setBody: (newBody: string) => void; body: string; } const NoteInputComponent = styled.TextInput` height: 250px; width: 250px; margin: 12px; border-wid...
import { Injectable } from '@angular/core'; import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http'; import { Observable, of, throwError } from 'rxjs'; import { LocalStorageManagerService } from '@services/local-storage-manager.service'; import { catchError } fro...
import rospy from pymodbus.register_read_message import ReadInputRegistersResponse try: from pymodbus.client import ModbusTcpClient except Exception as e: print("pymodbus does not seem to be installed.\n") print(e) exit() from .post_threading import Post from threading import Lock from copy import deepc...
import { Link, useLocation, useNavigate } from "react-router-dom"; import { useAuth, useVideos } from "../../context"; import "./navbar.css"; const Navbar = ({ setNavAside }) => { const { authState: { userDetails: { token }, }, logout, } = useAuth(); const...
package com.dexciuq.android_services import android.content.Context import android.content.Intent import androidx.core.app.JobIntentService import timber.log.Timber class MyJobIntentService : JobIntentService() { override fun onCreate() { super.onCreate() Timber.i("onCreate") } override ...
import { NavigationContainer } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; import * as SplashScreen from 'expo-splash-screen'; import IntroView from './components/views/IntroView'; import LoginNav from './components/views/LoginNav'; import SignUpNav fr...
import PropTypes from 'prop-types'; import { Link as RouterLink } from 'react-router-dom'; // material import { Button, Box, Card, Link, Typography, Stack, CircularProgress } from '@mui/material'; import EditIcon from '@mui/icons-material/Edit'; import DeleteIcon from '@mui/icons-material/Delete'; import { useDeletePr...
<div fxLayout="row" fxLayoutGap="20px" fxLayoutAlign="space-between end" class="px-24 pt-12" *ngIf="tipo !== 'correos-recibidos'"> <div fxFlex="40" fxLayoutGap="10px" fxLayoutAlign="start end" *ngIf=" _auth.existeRol(aclsUsuario.roles, 'superadmin') || ( tipo === 'recibidos' && ...
//card class using material ui card component //import all necesarry import * as React from 'react'; import Card from '@mui/material/Card'; import CardActions from '@mui/material/CardActions'; import CardContent from '@mui/material/CardContent'; import CardMedia from '@mui/material/CardMedia'; import Button from '@mu...
<!DOCTYPE html> <html xmlns:th="http://www.thymeleaf.org" lang="es"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <title>Formulario</title> <link th:rel="stylesheet" type="text/css" th:href="@{/webjars/bootstrap/css...
<?php namespace App\Http\Controllers; use App\Http\Requests\StorePedidoRequest; use App\Http\Requests\UpdatePedidoRequest; use App\Models\Pedido; use App\Models\Proveedor; use App\Models\LineaPedido; use App\Models\User; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; class PedidoController...
from typing import List, Dict from datasets import Dataset, DatasetDict import glob import json import argparse def load_all_json_files(path): all_json_files = glob.glob(f"{path}/*json") all_json_dicts = [] for json_file in all_json_files: with open(json_file) as f: all_json_dicts.appe...
import 'package:alquila_tu_hobby/core/utils/app_style/app_style.dart'; import 'package:alquila_tu_hobby/core/utils/color_constants/color_constants.dart'; import 'package:alquila_tu_hobby/core/utils/scaling_util/scaling_utility.dart'; import 'package:alquila_tu_hobby/widgets/common_appbar.dart'; import 'package:alquila_...
import { Box, type BoxProps, Button, type ColorScheme, Divider, Paper } from "@mantine/core"; import { useLocalStorage } from "@mantine/hooks"; import React, { useState } from "react"; import { InputPrice, SelectCategory } from "../../components"; import { keys } from "../../constants"; import type { FilterFeedProps }...
#include "testing/testing.h" #include "MEM_guardedalloc.h" #include "LIB_listbase.h" #include "LIB_string.h" #include "KERNEL_idtype.h" #include "KERNEL_lib_id.h" #include "KERNEL_main.h" #include "structs_ID.h" #include "structs_mesh_types.h" #include "structs_object_types.h" namespace dune::kernel::tests { stru...