text
stringlengths
184
4.48M
import React, { useContext, useEffect, useState } from 'react' import CartIcon from '../Cart/CartIcon' import classes from './HeaderCartButton.module.css' import CartContext from '../../store/cartContext' const HeaderCartButton = (props) => { const [buttonIsHighlighted, setButtonIsHighlighted] = useState(false) ...
<!DOCTYPE html> <html> <head> <title>Clonebook</title> <meta name="viewport" content="width=device-width,initial-scale=1"> <%= csrf_meta_tags %> <%= csp_meta_tag %> <%= favicon_link_tag asset_path("favicon.ico") %> <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> <%=...
import { useEffect, useState } from "react"; const useFetch = (url) => { const [data, setData] = useState(null); const [isPending, setIsPending] = useState(true); const [error, setError] = useState(null); useEffect(() => { fetch(url) .then(res => { if(!res.ok){ ...
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Magento\GraphQl\Catalog; use Magento\TestFramework\TestCase\GraphQlAbstract; /** * Test for simple product fragment. */ class ProductFragmentTest extends GraphQlAbstract { ...
import numpy as np import seaborn as sns # for nicer plots sns.set(style="darkgrid") # default style import tensorflow as tf from tensorflow import keras import os import pickle import neuralNetwork as nn AccuracyList = [] def build_ANN(kernel_size=(5,5),strides=(1, 1),pool_size=(2, 2),learning_rate=0.001, cnn=Fa...
import { Injectable, UnauthorizedException } from '@nestjs/common'; import { PassportStrategy } from '@nestjs/passport'; import { ExtractJwt, Strategy } from 'passport-jwt'; import { Request } from 'express'; type JwtPayload = { sub: string; email: string; }; @Injectable() export class AcccessTokenStrategies...
package hw04lrucache import ( "math/rand" "strconv" "sync" "testing" "github.com/stretchr/testify/require" ) func TestCache(t *testing.T) { t.Run("empty cache", func(t *testing.T) { c := NewCache(10) _, ok := c.Get("aaa") require.False(t, ok) _, ok = c.Get("bbb") require.False(t, ok) }) t.Run("s...
import type { ISignature, MaybeElement } from '../types' import { insertElement } from '../event/insertElement' import { removeElement } from '../event/removeElement' import { useEventListener } from '../event/useEventListener' import { useKeyBoard } from '../event/useKeyBoard' export class CreateSignatureCanvas implem...
// components/RegisterForm.js "use client" import React, { useState } from 'react'; import { useRouter } from "next/navigation"; import { toast } from "react-toastify"; import { useForm } from "react-hook-form"; import { yupResolver } from "@hookform/resolvers/yup"; import * as yup from "yup"; const FormEduc = () =>...
import { Injectable } from '@angular/core'; import { Observable, of, from } from 'rxjs'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { catchError, map, tap } from 'rxjs/operators' import { User } from './user'; import { MessageService } from './message.service'; import { Guid } from 'guid-ty...
<template> <section :style="`background-image: url(${Image})`" class="h-full bg-no-repeat bg-cover bg-center"> <div class="text-white h-full w-full bg-black/20 backdrop-brightness-50"> <div class="flex flex-col items-center justify-center"> <h1 class="text-6xl mx-12...
import DBService from '../db/DBService' import supabase from '../config/supabase' import { PacientePayload, PacienteResponse } from '../types/paciente' export default class PacienteService implements DBService { async getOne(id: string): Promise<PacienteResponse | null> { const { data: pacientes, error } = await...
# Explore the data as follows: import pandas as pd # Downloading the file and loading it into a Pandas dataframe url = 'https://e.centennialcollege.ca/content/enforced/1010634-COMP309401_2023F/Misissagua_dealer.txt?_&d2lSessionVal=AJOR2OlmrARDauUz5Y2Dwd7cB' df2_fatimah = pd.read_csv(url, delimiter='\t') # Explore t...
import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders } from "@angular/common/http"; import { map } from 'rxjs/operators'; import { tokenNotExpired } from "angular2-jwt"; @Injectable({ providedIn: 'root' }) export class AuthService { authToken: any; user: any; constructor(private http:...
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>자바스크립트</title> <body> <h1>함수 객체와 메서드</h1> <script> "use strict" function f1(){ console.log("Hello!"); } //함수 = 객체 + 함수 몸체(코드) // => 함수 호출을 통해 함수 코드를 실행할 수 있다. f1(); // => 또한 함수도 객체이기 때문에 프로퍼티를 마음껏 추가할 수 있다. //같은 소속 동료 = this f1.value=100; f1.plus=funct...
<template> <div class="bg-white dark:bg-black dark:text-white py-12"> <div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8"> <div class="lg:text-center"> <h2 class="text-lg font-semibold text-secondary">Benefits</h2> <p class="mt-2 text-3xl font-bold leading-8 tracking-tight text-pri...
import 'package:flutter/material.dart'; import 'package:quizapp/models/question.dart'; import 'package:quizapp/screens/check_answer.dart'; class QuizFinishedPage extends StatefulWidget { final List<Question> questions; final Map<int, dynamic> answers; QuizFinishedPage({Key? key, required this.questions, required...
import React from 'react'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { useTranslation } from 'react-i18next'; import HomeNavigator from './home'; import ShoppingCartNavigator from './shoppingCart'; import FriendListNavigator from './friendList'; import { Image } from 'react-native...
import { useQuery, useMutation } from '@apollo/client' import { Box, Container, FormControl, FormErrorMessage, FormHelperText, FormLabel, Input, Modal, ModalBody, ModalCloseButton, ModalContent, ModalHeader, ModalOverlay, Text, useDisclosure, Button, ModalFooter, InputRightElement, InputGroup } from '@chakra-ui/react' ...
package com.maxpri.common.network; import com.maxpri.common.entities.Person; import java.io.Serializable; import java.util.Collection; import java.util.stream.Collectors; public class Response implements Serializable { private String message; private Collection<Person> persons; public Response(String m...
<template> <div> <!-- <div id="move-ball-one" class="move-ball"> <i class="el-icon-cold-drink"></i> </div> --> <div class="flex"> <el-card class="to-do-list-card" shadow="hover" v-for="item in cardData" :key="item.title"> <template #header> <div class="card-header"> ...
import { useEffect } from "react"; import { type ActionFunctionArgs, json } from "@remix-run/node"; import { useFetcher } from "@remix-run/react"; import { DescriptionList } from "~/components/custom/DescriptionList"; import { getDescriptions } from "~/services/get-descriptions.server"; import { updateDescription } fro...
/******************************************************************************* * Welcome to the pedestrian simulation framework MomenTUM. * This file belongs to the MomenTUM version 2.0.2. * * This software was developed under the lead of Dr. Peter M. Kielar at the * Chair of Computational Modeling and Simulat...
// TortoiseSVN - a Windows shell extension for easy version control // Copyright (C) 2007-2009, 2011-2012 - TortoiseSVN // 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 2 // o...
import 'package:flutter/material.dart'; import 'package:tutachef_project/core/app_core.dart'; import 'package:tutachef_project/core/widgets/custom_button.dart'; import 'package:tutachef_project/views/categories/card_categorie.dart'; import '../../controllers/home_controller.dart'; import '../../core/widgets/custom_app...
const express = require("express"); const router = express.Router(); const Note = require("../models/Note"); const fetchuser = require("../middleware/fetchuser"); const { body, validationResult } = require("express-validator"); // Route-1: Fetch all notes: GET "/api/notes/fetchallnotes". login required router.get("/fe...
################ Additional Data Tools ################ ############## Currently not being used ############### #' Landscape Index Main #' #' The landscape index main calls all required function and produces the rating #' for landscape over the study site. #' @param slopePercent Slope percentage. #' @param slopeLength ...
use api_servico; CREATE TABLE setor ( id INT AUTO_INCREMENT PRIMARY KEY, nome VARCHAR(100) NOT NULL, codigo VARCHAR(50) UNIQUE NOT NULL )ENGINE=INNODB; -- Criar a tabela equipamento com o novo atributo setor CREATE TABLE equipamento ( id INT AUTO_INCREMENT PRIMARY KEY, nome VARCHAR(100) NOT NULL, ...
require 'rails_helper' RSpec.describe Admin::UsersController, type: :controller do let!(:user) { FactoryBot.create(:user) } let!(:manager) { FactoryBot.create(:user, role: :manager) } let!(:admin) { FactoryBot.create(:user, role: :admin) } describe 'GET #index' do before do sign_in_as(resource) ...
import React, { useState } from 'react'; import { Flex, Rate, Typography, ConfigProvider, Tooltip } from 'antd'; import { useTranslation } from 'react-i18next'; import './CustomRate.less'; const { Text } = Typography; const CustomRate = ({ onRateChange }) => { const [value, setValue] = useState(0); const { t } = ...
前面的几个小节,我们从 Vite 双引擎的角度了解了 Vite 的整体架构,也系统学了双引擎本身的基础知识。从本小节开始,我们正式学习 **Vite 高级应用**。 这一模块中,我们将深入应用 Vite 的各项高级能力,遇到更多有挑战的开发场景。你不仅能学会一系列有难度的**解决方案**,直接运用到实际项目中,还能系统提高自己的**知识深度**,体会复杂项目场景中构建工具如何提供高度自定义的能力,以及如何对项目进行性能优化。 说到自定义的能力,你肯定很容易想到`插件机制`,利用一个个插件来扩展构建工具自身的能力。没错,这一节中我们将系统学习 Vite 的插件机制,带你掌握 Vite 插件开发的基本知识以及实战开发技巧。 虽然 ...
/* Copyright (c) 2001-2002, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list...
/*--------------------------------------------------------------------------*\ | | | Copyright (C) 2017 | | | | ...
**AreaMobile & OpenPicus** is glad to present you: DooIP Firmware & AreaPICs APIs A few weeks ago we were wondering about the fact that Android, the Google operating system for Smartphones which is now a huge ecosystem with hundreds of thousands of daily activations,become too important. Then we should to have an e...
import React, { useState } from "react"; import { changeEmailProfessional } from "../../../../features/apiPetitions"; import style from './ChangeEmail.module.css' function ChangeEmail() { const [emailData, setEmailData] = useState({ currentEmail: "", newEmail: "", }); const [verifyNewEmail, setVerifyNewE...
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1. Example: Given the sorted array: [-10,-3,0,5,9], One possibl...
import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common'; import { Reflector } from '@nestjs/core'; import { Role } from '../enum/role.enum'; import { jwtDecode } from 'jwt-decode'; @Injectable() export class RolesGuard implements CanActivate { constructor(private reflector: Reflector) {} canAc...
<!DOCTYPE html> <html lang="en" layout:decorate="~{layout.html}"> <head> <title>Students Page</title> </head> <body> <div layout:fragment="content"> <!-- DELETE WARNING MODAL --> <div class="modal fade" id="deleteModal" tabindex="-1" aria-labelledby="deleteModalLabel" aria-hidden="true"> <div class...
import { Pane } from 'tweakpane'; import type { View } from '../view.ts'; import type { GameObject } from '../components'; const createToggleGuiButton = (pane: Pane) => { const button = document.createElement('button'); button.innerText = '⚙️'; button.style.position = 'absolute'; button.style.zIndex = ...
//################################################################################################## // // Custom Visualization Core library // Copyright (C) 2011-2013 Ceetron AS // // This library may be used under the terms of either the GNU General Public License or // the GNU Lesser General Public License a...
require 'minitest' require 'minitest/autorun' require './lib/attendee' class AttendeeTest < MiniTest::Test def test_it_exists attendee = Attendee.new assert_kind_of Attendee, attendee end def test_it_is_initialized_from_a_hash_of_data data = { :first_name => 'George', :last_name => 'Washington', :p...
import { defaultCommands } from './commands'; import { defaultKeybindings } from './keybindings'; /** * Defaults that a new Unixorn component will * be initialized with if its props are not set. */ export const defaultConfiguration: UnixornConfiguration = { autoFocus: false, commands: defaultCommands, keybind...
/*----------------------------------------------------------------------------*/ /* * PropertySphere.h * * Created on: 22 mars 2012 * Author: ledouxf */ /*----------------------------------------------------------------------------*/ #ifndef PROPERTYSPHERE_H_ #define PROPERTYSPHERE_H_ /*---------------------...
<?php namespace Drupal\yamlform; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Routing\RouteMatchInterface; /** * Handles YAML form requests. */ class YamlFormRequest implements YamlFormRequestInterface { /** * The entity manager. * * @var \Drupa...
/* * Copyright (c) 2022. HW Tech Services, LLC * * 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 appl...
from django.shortcuts import render from django.views.generic import ListView, CreateView, UpdateView, DeleteView from todo.models import Task # Create your views here. class TaskListView(ListView): model = Task template_name = "todo_task_list.html" context_object_name = "tasks" class TaskCreateView(Creat...
/* eslint-disable no-console */ /** * Teleport * Copyright (C) 2023 Gravitational, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at...
import 'dart:ui'; import 'package:flutter/material.dart'; class BigCard extends StatelessWidget { final temp; final weather; final icon; const BigCard( {super.key, required this.temp, required this.weather, required this.icon}); @override Widget build(BuildContext context) { r...
const Sequelize = require("sequelize"); const PostModel = require("../models/post.model"); const UserModel = require("../models/user.model"); const CommentModel = require("../models/comment.model"); const fs = require("fs"); const { where } = require("sequelize/dist"); // POST exports.createPost = (req, res, next)...
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // #include <algorithm> // } Driver Code Ends class Solution { public: // arr: input array // n: size of array // Function to sort the array into a wave-like array. void convertToWave(int n, vector<int> &arr) { // Your cod...
// Based on Radix Tooltip (https://www.radix-ui.com/docs/primitives/components/tooltip) import { keyframes } from '@emotion/react' import styled from '@emotion/styled' import * as TooltipPrimitive from '@radix-ui/react-tooltip' import { ReactNode } from 'react' import { Text, theme } from 'ui' type Props = { message...
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
package com.example.waypoint.database.dao; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import com.example.waypoint.database.DBOpenHelper; import com.example.waypoint.database.model.HospedagemModel; import java.util.ArrayList; public class HospedagemDAO exten...
import styled from 'styled-components'; export interface InputProps { title: string; type?: string; name?: string; value: string | number | readonly string[]; onChange: React.ChangeEventHandler<HTMLInputElement>; onFocus?: React.FocusEventHandler<HTMLInputElement>; onBlur?: React.FocusEventHandler<HTMLIn...
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>add_user</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvT...
<template> <div> <div v-if="user"> <section class="recipes-section lg:mt-5 px-5 lg:px-0"> <ProfileHeader :user="user" /> <div class="max-w-6xl xxl:max-w-screen-xl mx-auto"> <div class="channel-recipies-wrapper mb-6 md:mb-12"> <div class="grid grid-cols-1 m...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.18; contract Twitter { uint16 constant MAX_TWEET_LENGTH = 280; struct Tweet{ address author; string content; uint256 timestamp; uint256 likes; } mapping(address => Tweet[]) public tweets; function createTweet(stri...
/* eslint-disable material-ui/no-empty-box */ import * as React from 'react'; import { styled } from '@mui/zero-runtime'; declare module '@mui/zero-runtime/theme' { interface ThemeArgs { theme: { palette: { primary: Record<string, string>; }; mixins: { toolbar: Record<string, st...
import React from 'react'; // Import Components import { Row, Col, Card, Media } from "react-bootstrap"; //Import Data Table import DataTable from 'react-data-table-component'; import DataTableExtensions from 'react-data-table-component-extensions'; import 'react-data-table-component-extensions/dist/index.css'; // Impo...
#Problem APEX 2.4.18 DOCUMENT(); # Load whatever macros you need for the problem loadMacros( "PGstandard.pl", "PGchoicemacros.pl", "MathObjects.pl", "PGcourse.pl" ); ## DBsubject(Calculus - single variable) ## DBchapter(Differentiation) ## DBsection(Quotient rule (with trigonometric functions)) ## Institutio...
<template> <div> <!-- 服务器API --> </div> </template> <script> import axios from 'axios' export default { name: "myApi", methods: { // sj--未完成 对接接口 async getAllBooks(){ /** * 从服务器获取所有书籍信息 * @return: {Promise} { code, msg, data {Array} } * */ let option = { url: 'http://127.0....
mod map; use std::{ fmt::{Debug, Display, Formatter, Result as FmtResult}, marker::PhantomData, num::NonZeroU64, }; use rkyv::{ out_field, with::{ArchiveWith, DeserializeWith, SerializeWith}, Archive, Archived, Deserialize, Fallible, }; use twilight_model::id::Id; pub use self::map::{Archived...
import React from "react"; import { Box, Heading, Text, Input, Button, FormControl, FormLabel, InputGroup, InputRightElement, Link, ScaleFade, } from "@chakra-ui/react"; import { AiOutlineEyeInvisible, AiOutlineEye } from "react-icons/ai"; import { authAPI } from "utils/api"; import { useCallback,...
import { ConfigModule } from '@nestjs/config'; import { JwtModule } from '@nestjs/jwt'; import { Test, TestingModule } from '@nestjs/testing'; import { databaseProviders } from '@/database/database.providers'; import { MailModule } from '@/mail/mail.module'; import { UsersModule } from '@/users/users.module'; import ...
/* eslint-disable @next/next/no-img-element */ import { ArrowDown2, Clock } from "iconsax-react"; import TimeAgo from "react-timeago"; import useSWR from "swr"; import { Review, TMDBResponse } from "../../../typing"; import fetchData from "../../utils/fetchData"; import { config } from "../../utils/tmdb"; import trunca...
import { Component, OnInit, PLATFORM_ID } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import { ActivatedRoute } from '@angular/router'; import { Select, Store } from '@ngxs/store'; import { OrcamentoState } from 'apps/app-web/src/app/data/store/state'; import { Orcamento, Pedido } f...
import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import {AuthContainerComponent} from 'src/app/auth-container/auth-container.component'; import {LoginComponent} from 'src/app/login/login.component'; import {RegisterComponent} from 'src/app/register/register.component'; ...
<?php namespace App\Http\Controllers\API; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use App\Models\Product; use App\Models\ProductCategory; use App\Models\ProductGallery; use App\Helpers\ResponseFormatter; class ProductController extends Controller { // index public function index(Re...
#include "../../lv_examples.h" #if LV_USE_OBSERVER && LV_USE_ARC && LV_USE_LABEL && LV_USE_BUTTON && LV_USE_SPINNER && LV_BUILD_EXAMPLES typedef enum { FW_UPDATE_STATE_IDLE, FW_UPDATE_STATE_CONNECTING, FW_UPDATE_STATE_CONNECTED, FW_UPDATE_STATE_DOWNLOADING, FW_UPDATE_STATE_CANCEL, FW_UPDATE_STA...
from bibgrafo.grafo_lista_adjacencia import GrafoListaAdjacencia from bibgrafo.grafo_errors import * class MeuGrafo(GrafoListaAdjacencia): def vertices_nao_adjacentes(self): ''' Provê um conjunto de vértices não adjacentes no grafo. O conjunto terá o seguinte formato: {X-Z, X-W, ...} ...
NAME Catalyst::Controller::BindLex - Stash your lexical goodness. SYNOPSIS package MyApp::Controller::Moose; use base qw/Catalyst::Controller::BindLex/; sub bar : Local { my ( $self, $c ) = @_; my $x : Stashed; my %y : Stashed; $x = 100; ...
'use strict'; const express = require('express'); const router = express.Router(); const { body, param, matchedData } = require('express-validator'); const { validateRequest } = require('../middleware/validate-request'); const { checkJwt } = require('../middleware/authentication'); const { isEmptyObject, isValidMong...
// Example for library: // https://github.com/Bodmer/TJpg_Decoder // This example is for an ESP8266 or ESP32, it fetches a Jpeg file // from the web and saves it in a LittleFS file. You must have LittleFS // space allocated in the IDE. // Chenge next 2 lines to suit your WiFi network #define WIFI_SSID "Your_SSID" #de...
package uniandes.isis2304.epsandes.persistencia; import java.util.List; import javax.jdo.PersistenceManager; import javax.jdo.Query; import uniandes.isis2304.epsandes.negocio.Medico; public class SQLMedico { /* **************************************************************** * Constantes *******************...
<p align="center"> <a href="https://laravel.com" target="_blank"><img src="https://www.azapfy.com.br/wp-content/uploads/2020/07/logo_Prancheta-1-1536x1022.png" width="200" alt="Laravel Logo"></a> <h3 align="center">velocidade para fazer!</h3> </p> <p align="center"> <img src="https://img.shields.io/badge/Larav...
from django.db import models from django.db.models import Count, Max, Min, Avg class RealEstateListingManager(models.Manager): def by_property_type(self, property_type): return self.filter(property_type=property_type) def in_price_range(self, min_price, max_price): return self.filter(price__...
<link rel="stylesheet" href="../../../stylesheet.css"> # Story_01 — Naïve Bayes ## Contexte > Découvrir naïve Bayes et se familiariser avec son fonctionnement. ## Mots clefs - <def-of>Théorème de Bayes</def-of> : *permet de déterminer la probabilité qu'un événement arrive à partir d'un autre évènement qui s'est réal...
import 'package:admin/blocs/admin_bloc.dart'; import 'package:admin/configs/config.dart'; import 'package:admin/services/firebase_service.dart'; import 'package:admin/utils/content_preview.dart'; import 'package:admin/utils/dialog.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:firebase_st...
const express = require('express'); const winston = require('winston'); const app = express(); const port = 3000; // Winston logger configuration const logger = winston.createLogger({ level: 'info', format: winston.format.json(), defaultMeta: { service: 'calculator-microservice' }, transports: [ ...
import 'package:chat_app/helper/constants.dart'; import 'package:chat_app/helper/helperfunctions.dart'; import 'package:chat_app/services/auth.dart'; import 'package:chat_app/services/database.dart'; import 'package:chat_app/widgets/widget.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:fl...
package data import ( "project-common/encrypts" "project-common/tms" "project-project/pkg/model" ) // Project 数据库类型 type Project struct { Id int64 Cover string Name string Description string AccessControlType int WhiteList string Sort ...
package neural_network.functions; import java.util.ArrayList; import java.util.List; import java.util.stream.IntStream; /** A class to represent the transfer function of a neural network, which * creates a linear combination of {@code weights} from {@code values} of * {@code Neurons}. * */ public class TransferFu...
import numpy as np import torch from torch import nn import pdb from progress import Progress, Silent from helpers import ( cosine_beta_schedule, extract, apply_conditioning, Losses, ) device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') class GaussianDiffusion_jayaram(nn.Module): ...
//! Configure tracing subscribers for Arti use anyhow::{anyhow, Context, Result}; use derive_builder::Builder; use educe::Educe; use fs_mistrust::Mistrust; use serde::{Deserialize, Serialize}; use std::path::Path; use std::str::FromStr; use tor_config::impl_standard_builder; use tor_config::{define_list_builder_access...
import router from '../../router/router' const app = { namespaced: true, state: { routesTree: [], // 路由数据原始的关系树 menuList: [], pageOpenedList: [{ title: '欢迎页demo', name: 'home', selected: true }], currentPath: [], currentMenuOpenNames: [], asyncRoutesCompleted: false, /...
# # Copyright EndlessOS Foundation # # 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 ...
// Copyright 2022 Dynatrace LLC // // 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 wr...
// const Product = require('../model/product'); const User=require('../model/user'); const bcrypt = require("bcrypt"); const jwt = require("jsonwebtoken"); // Create Product ---ADMIN exports.createUser = async (req, res) => { console.log("hit the create user api") try { let user = await User.findOne({...
module Solution where import qualified Data.ByteString.Lazy.Char8 as B import Utils (Solution) import D1 (day1part1, day1part2) import D2 (day2part1, day2part2) import D3 (day3part1, day3part2) import D4 (day4part1, day4part2) import D5 (day5part1, day5part2) runSolution :: [String] -> IO () runSolution args = let ...
package com.praim.inventory.product.dtos; import java.math.BigDecimal; import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import jakarta.validation.constraints.DecimalMin; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; import lombok.EqualsAndHashCo...
import React, {useEffect, useState} from 'react'; import '../App.css'; import RecommenderInput from "../RecommenderInput"; import Box from '@mui/material/Box'; import Paper from '@mui/material/Paper'; import {Button, Card, CardActions, CardContent, Typography} from "@mui/material"; import {Authentication} from "../App"...
from django.db import models from django.core.validators import MaxValueValidator from django.utils import timezone # Função para obter o ano atual def current_year(): return timezone.now().year # Validador para garantir que o ano é menor ou igual ao ano atual def max_value_current_year(value): return MaxValu...
% ------------------------------------------------------------------------------ % Print dates in output CSV file. % % SYNTAX : % print_dates_in_csv_file_215_216( ... % a_cycleStartDate, ... % a_descentToParkStartDate, ... % a_firstStabDate, a_firstStabPres, ... % a_descentToParkEndDate, ... % a_descent...
package uk.gov.esos.api.web.controller.authorization; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; import io....
import React from "react"; import { motion } from "framer-motion"; import { QUICK_ACCESS_FEATURES } from "../../utils/constants"; import QuickAccessCard from "./QuickAccessCard"; import Underline from "../Underline"; import { XIcon } from "@heroicons/react/outline"; export type QuickAccessProps = { shown: boolean; ...
import 'package:flutter/material.dart'; import 'package:rupee_elf/common/common_image.dart'; import 'package:rupee_elf/component/home/product_item_cell.dart'; import 'package:rupee_elf/models/product_model.dart'; import 'package:rupee_elf/models/space_detail_model.dart'; import 'package:rupee_elf/network_service/index....
use std::{ net::{IpAddr, ToSocketAddrs, SocketAddr}, str::from_utf8, time::{Duration, Instant}, }; use argh::FromArgs; use pnet::{ datalink::NetworkInterface, packet::{ip::IpNextHeaderProtocols, udp::{self, UdpPacket}, Packet}, transport::{transport_channel, udp_packet_iter, TransportChannelTy...
import { Zoho } from "@trieb.work/zoho-ts"; import { ILogger } from "@eci/pkg/logger"; import { PrismaClient, Prisma, ZohoApp } from "@eci/pkg/prisma"; import { id } from "@eci/pkg/ids"; import { normalizeStrings } from "@eci/pkg/normalization"; type ZohoAppWithTenant = ZohoApp & Prisma.TenantInclude; export interfac...
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_RECORDS 100 #define MAX_DATA_LENGTH 50 struct Record { char data[MAX_DATA_LENGTH]; }; struct File { struct Record records[MAX_RECORDS]; int current_position; }; void initializeFile(struct File *file) { file->current_position = 0;...
# Copyright 2018-2021 Xanadu Quantum Technologies 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 applicable law or...