text
stringlengths
184
4.48M
import React from 'react'; import { BrowserRouter, Routes, Route } from 'react-router-dom'; import Home from './pages/Home'; import Films from './pages/Films'; import FilmID from './pages/FilmID'; import People from './pages/People'; import PersonID from './pages/PersonID'; import Navbar from './components/Navbar'; ...
import Teoria from 'teoria' import { NOTES, SCALES, COLOR_CLASSNAMES, COLOR_NAMES, COLOR_CODES, GUITAR_TUNINGS, TUNING_NAMES, DURATION_CHARS, INTERVAL_CHARS, DURATIONS, } from './constants' const { random } = Math // TODO Please refactor this... export class Random { static arrayDouble = (arr) =...
# Looping Statement: > for loop > while loop # Branching Statement: > if-else # JavaScript Arrays: - Collection of element which are stored in continuous memory location. eg., let array = [] let array = [10, 'Rohit', true] Assignment 1: Accept a number from user and print if it is odd number or an even number? As...
import React, { useContext, useEffect, useState } from 'react'; import icon from '../assets/icon.png'; import CartContext from '../context/cart/CartContext'; import './SideDrawer.scss'; const SideDrawer = ({ isToggle, open }) => { const { addProductToCart, removeProductFromCart,deleteProductFromCart, carts } = ...
import * as enums from "./enums"; import * as pulumi from "@pulumi/pulumi"; /** * Generates version number that will be latest based on existing version numbers. */ export interface DistributeVersionerLatestArgs { /** * Major version for the generated version number. Determine what is "latest" based on versi...
<?php namespace Database\Factories; use Illuminate\Database\Eloquent\Factories\Factory; /** * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\blogCategory> */ use App\Models\User; class BlogCategoryFactory extends Factory { /** * Define the model's default state. * * @retur...
/* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template */ /* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs:/...
import { createError } from "../error.js"; import User from "../models/User.js"; import Video from "../models/Video.js"; export const updateUser = async (req, res, next) => { if (req.params.id === req.user.id) { try { const updatedUser = await User.findByIdAndUpdate( req.params....
package main.com.kv.leetcode.easy; import com.sun.management.MissionControlMXBean; /** * An array is monotonic if it is either monotone increasing or monotone decreasing. * * An array A is monotone increasing if for all i <= j, A[i] <= A[j]. * An array A is monotone decreasing if for all i <= j, A[i] >= A[j]. * ...
import { useState, useEffect, Fragment } from "react"; import styled from "styled-components"; import moment from "moment"; import { getOrdersApi } from "../../../api"; export const Transactions = () => { const [orders, setOrders] = useState([]); const [isLoading, setIsLoading] = useState(false); useEffect(() ...
<template> <Line v-if="loaded" :data="chartData" :options="options"/> </template> <script> import { Chart as ChartJS, CategoryScale, LinearScale, PointElement, LineElement, Title, Tooltip, Legend } from 'chart.js' import {Line} from 'vue-chartjs' import axios from "axios"; ChartJS.register( Cat...
// React Profiler is a built-in tool in React that allows developers to analyze the performance ' // of their React applications, specifically tracking how long it takes for components to render. // It helps identify performance bottlenecks and optimize the rendering process. import "./App.css"; import { Profiler }...
#include <iostream> #include <fstream> #include <vector> #include <algorithm> #include <map> std::vector<std::string> getStrings() { std::vector<std::string> strings; std::string line; std::ifstream input_file("input.txt"); if (!input_file.is_open()) { std::cerr << "Error opening file" << std:...
# base_pretrain """ 预训练 目前针对80w 的 wiki 预训练; """ import os import sys sys.setrecursionlimit(10000) from pathlib import Path from typing import Optional from dataclasses import dataclass, field import numpy as np from nltk.translate.bleu_score import corpus_bleu import distance from rouge import Rouge import pickle...
import React, { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; import { useTracker } from 'meteor/react-meteor-data'; import { makeStyles, withStyles } from '@material-ui/core/styles'; import { Card, CardHeader, CardContent, Button, Tab, Tabs, Typography, Box, TextField } f...
% Course: Control Systems % Author: Jhon Charaja % List number: 3 % Question: 5 (c) % Info: sisotool G(s) clc, clear all, close all; % laplace operator s = tf('s'); kp = 0.09; kv = -0.532; T = kp*65/(s*s + (37 + 65*kv)*s + kp*65); % step response of open-loop system dt = 0.001; t = 0:dt:5; len = length(t); u = one...
const Joi = require('joi'); const { GENDERS } = require('../user/user.constant'); const { phoneNumberFormat, emailFormat } = require('../utils/messageCustom'); const { password } = require('../utils/validateCustom'); const editUser = { body: Joi.object().keys({ phone_number: Joi.string().custom(phoneNumberFormat...
import React from "react"; import Card from "./Card"; import QRCodeModal from "@walletconnect/qrcode-modal"; import { MdSpaceDashboard } from "react-icons/md"; import { AiOutlineMenu, AiOutlineClose } from "react-icons/ai"; import { FaWallet } from "react-icons/fa"; import { SiMarketo, SiBitcoinsv } from "react-icons/s...
import { createAsyncThunk } from '@reduxjs/toolkit'; import { ThunkConfig } from 'app/providers/StoreProvider'; import { Article, ArticleSortType, ArticleType } from 'entities.entities/Article'; import { SortOrder } from 'shared/types'; import { getArticleSort } from 'features/ArticleSort/model/selectors/getArticleSort...
<!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Modelo de Caixas</title> <style> h1 { /* box-level */ /* display: inline; posso t...
#include <QCoreApplication> #include <QDebug> class Book { private: QString title; QString author; QString ISBN; public: Book() : title(""), author(""), ISBN("") {} Book(const QString& title, const QString& author, const QString& ISBN) : title(title), author(author), ISBN(ISBN) {} v...
import { useState } from "react"; import axios from "axios"; import Button from "../Button"; import NavBar from "../Navbar"; import { BASE_URL } from "../../util/baseurl"; import "./styles.css"; type FormData = { name: string; }; type User = { url: string; followers: number; location: string; name: string...
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(gene...
// let num: number = undefined // console.log('==', num) // let some: any = 'test' // some = 7 // // some.setName("hah") // console.log(some) // let myFavoriteNumber; // myFavoriteNumber = 'seven'; // myFavoriteNumber = 7; // console.log('myFavoriteNumber' + myFavoriteNumber) // interface Person { // name: string;...
package com.sparta.movieplanner.justwatch.service; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind....
#include <TinyGPS++.h> #include <HardwareSerial.h> #include <WiFi.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include <BlynkSimpleEsp32.h> float latitude , longitude; String latitude_string , longitiude_string; #define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 64 Ad...
import React from 'react'; import { Link } from 'react-router-dom'; import {CardContent, CardMedia, Box} from '@mui/material'; import {CheckCircle} from '@mui/icons-material'; import {demoProfilePicture} from '../utils/constans' const ChannelCard = ({channelDetail, marginTop}) => ( <Box sx={{ width: '300px', heig...
/* * Copyright (C) 2021 Alonso del Arte * * 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) any later * version. * * This program is...
<template> <TheHeader /> <div v-for="obj in todos" v-bind:key="obj.id" class="todosItem"> {{ obj.title }} </div><br> <h2>Todos em aberto</h2> <div v-for="todo in uncompleted" :key="todo.id" class="todosItem"> {{ todo.title }} </div><br> <h2>Todos completos</h2> <div v-for="todo in completed" :ke...
import Image from "next/image"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { useUser } from "@/actions/useUser"; interface UserHeroProps2 { userId: string; } export default async function UserHero({ userId }: UserHeroProps2) { const user = await useUser(userId); return...
import React, { useState } from 'react'; import axios from 'axios'; import Sidebar from '../Sidebar'; import '../styles/crudStyles.css'; // Ensure this import is here const AddConferenceInfo = () => { const [info, setInfo] = useState({ title: '', address: '' }); const [successMessage, setSuccessMessage] = use...
import { createContext, useState } from 'react'; import { SnacksProps } from './interfaces'; import { useNavigate } from 'react-router-dom'; import { PaymentUserFormProps as CustomerData } from '../pages/pagamento/paymentUserFormValidation'; interface SnackCart extends SnacksProps { quantity: number; subtotal: numbe...
import copy import pytest from taxi import discovery @pytest.mark.config( TVM_ENABLED=True, BILLING_ORDERS_USE_STQ_RESCHEDULE=True, BILLING_DO_NOT_FINISH_SUBSCRIPTION_DOC=True, BILLING_ORDERS_EVENT_LIMIT_KIND_HOURS={'__default__': 10 ** 6}, ) @pytest.mark.parametrize( 'test_data_path', [ ...
package com.lakesidehotel.app.room.controller; import com.lakesidehotel.app.room.dto.BookRoomDto; import com.lakesidehotel.app.room.dto.BookRoomRequest; import com.lakesidehotel.app.room.dto.GuestInfoResponse; import com.lakesidehotel.app.room.exception.LakeSideHotelException; import com.lakesidehotel.app.room.model....
<i18n locale="zh-CN" lang="yaml"> Root: 根目录 File Service disabled: 文件服务已禁用 File Service enabled : 文件服务已启用 File Service deleted : 文件服务已删除 No File Service has ever been added: 从未添加过任何文件服务 Are you sure you want to disable the File Service?: 是否确认禁用此文件服务? Are you sure you want to delete the File Service?: 是否确认删除此文件服务? E...
<?php declare(strict_types=1); namespace App\Pattern\Creational\FactoryMethod\Factory; use App\Pattern\Creational\FactoryMethod\Ferrari; use App\Pattern\Creational\FactoryMethod\Bmw; use App\Pattern\Creational\FactoryMethod\FixFactoryInterface; use App\Pattern\Creational\FactoryMethod\Lada; class CarStaticFactory2 ...
import 'package:flutter/material.dart'; import 'greeting_widget.dart'; import 'counter_widget.dart'; import 'splash_screen.dart'; void main() { runApp(SplashScreenApp()); } class SplashScreenApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: SplashSc...
<!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>Responsive Education website using HTML,CSS & JavaScript</title> <link rel="style...
A story about a great project which resulted in the publication of a paper in the ISPRS and me travelling to Florence to present said paper at Foss4g. It all started with my former boss and mentor, Bertil Chapuis, suggesting I do a proof of concept project to render vector tiles using WebGPU. WebGPU is an emerging web...
<template> <div id="nav"> <div class="title"> <router-link to="/">Game highlights</router-link> </div> <div class="search-bar"> <input type="search" placeholder="username"/> </div> <div class="authentication"> <router-link v-if="!currentUser" id="login" to="/">Login</router-link>...
<script> import { useVuelidate } from "@vuelidate/core"; import { required, email } from "@vuelidate/validators"; /** * Forgot Password component */ export default { setup() { return { v$: useVuelidate() }; }, data() { return { email: "", submitted: false, error: null, title: "R...
const std = @import("std"); const utils = @import("utils"); const SplitIterator = std.mem.SplitIterator; const ArrayList = std.ArrayList; const ArrayListAligned = std.ArrayListAligned; const DirectoryNode = struct { name: []const u8, parent: ?*DirectoryNode, child: ?ArrayListAligned(*DirectoryNode, null), ...
{% extends 'films/base.html' %} {% block title %}{{ film.title }}{%endblock%} {% block content %} <h1>{{ film.title }}</h1> <div class="card mb-3" style="max-width: 540px;"> <div class="row g-0"> <div class="col-md-4"> <img src="{{ film.image.url }}" class="img-fluid rounded-star...
[assembly: WebActivatorEx.PreApplicationStartMethod(typeof(Store.Web.App_Start.NinjectWebCommon), "Start")] [assembly: WebActivatorEx.ApplicationShutdownMethodAttribute(typeof(Store.Web.App_Start.NinjectWebCommon), "Stop")] namespace Store.Web.App_Start { using System; using System.Web; using Microsoft.We...
'use client'; import { useTheme } from '@/components/ThemedHTMLClient'; import { Box } from '../../styled-system/jsx'; import { css, cx } from '../../styled-system/css'; import { icon } from '../../styled-system/recipes'; export const ThemeSwitcher = () => { const { theme, setTheme } = useTheme(); const nextTheme...
<script setup lang="ts"> import BlSidebar from './sidebar/sidebar.vue' import LayoutHeader from './bl-header.vue' import LayoutFooter from './bl-footer.vue' import BLContent from './bl-content.vue' import { useSidebar } from '../composables/sidebar' import { nextTick, onMounted, provide } from 'vue' import { rootKey } ...
// // Service.hh // #ifndef Service_hh #define Service_hh #include "../String/String.hh" #include "Query.hh" class Query::Service : private _Query_ { public: // Static methods // Get map of Ports->Services static const Query::Ports &Ports(); // Get map of Names->Service static const Query::Services &S...
#include <stdint.h> #include <stdio.h> #include "../../../include/helper.h" #include "../../../include/vga.h" #include "../../../include/interrupts.h" extern void irq0(); extern void irq1(); extern void irq2(); extern void irq3(); extern void irq4(); extern void irq5(); extern void irq6(); extern void irq7(); extern ...
--Pull these extensions and provide how many of each website type exist in the accounts table select distinct(RIGHT(website,3)) from accounts ; --Use the accounts table to pull the first letter of each company name to see the distribution of company names that begin with each letter select RIGHT(name,1), count(*) fr...
import 'package:flutter/material.dart'; import 'package:pmsn2023/widgets/counter.dart'; import 'package:pmsn2023/widgets/image_carousel_widget.dart'; class FruitAppScreen extends StatefulWidget { const FruitAppScreen({super.key}); @override State<FruitAppScreen> createState() => _FruitAppScreenState(); } class...
import torch import random from torchvision import transforms class flip: def __init__(self, p=0.5): self.p=p def __call__(self, x): # s h w use_flip = random.random() < self.p if use_flip: p = random.random() if p < 0.33: x = torch.flip(...
<?php namespace Database\Factories; use App\Models\CarBody; use App\Models\CarCarcase; use App\Models\CarClass; use App\Models\CarEngine; use App\Models\Image; use Illuminate\Database\Eloquent\Factories\Factory; /** * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Car> */ class CarFactory ext...
<!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> <link rel="stylesheet" href="./css/bootstrap.css" /> </head> <body> <di...
function [y,x_,tx] = simBackwardEuler(A,B,C,D,E,u,x,Ts,Ts_sample,isDescriptor) % simBackwardEuler - Integrates sss model using backward (implicit) Euler % % Syntax: % y = simBackwardEuler(A,B,C,D,E,u,x,Ts,Ts_sample,isDescriptor) % [y,x_] = simBackwardEuler(A,B,C,D,E,u,x,Ts,Ts_sample,isDescriptor) % [...
package org.example.data; import org.example.model.User; import java.util.ArrayList; import java.util.List; public class UserRepository { private static UserRepository instance = null; private List<User> users; private UserRepository() { users = new ArrayList<>(); } public static UserRe...
package com.example.shortstories import android.os.Bundle import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.Toast import androidx.lifecycle.ViewModelProvider import com.example.shortstories.databinding.FragmentSignUpBin...
<script setup> import StaticPageVue from "snippets/static-page.vue"; </script> # Rendering Basics Let's start by rendering a "non-interactive" page: ```ts $app([Basics], _ => { _.$css`color: red`; _.h1("Hello, Refina!"); _.$css`border: 1px solid yellow`; _.div(_ => { _.p("This is a paragraph."); _.p...
# Elaborado por: Fabian Vergel Ojeda # Colaborador: # Fecha elaboracion: 18/03/2022 # Fecha ultima modificacion: 18/03/2022 #Initial configuration rm(list = ls()) #limpiar entorno pacman::p_load(tidyverse,haven,readxl,WriteXLS) #cargar paquetes a=2 b='2' vector_c = c("hola",'a') # podemos usar ' o " para caracteres...
export function mediaFields() { return [ { type: "string", name: "title", label: "Titre", }, { type: "string", name: "description", label: "Description", ui: { component: "textarea", ...
library(tidyverse) library(dplyr) library("ggplot2") library(matrixStats) rg = read_csv("data/moistureVStime.csv") names(rg) # Graphs the soil moisture curves provided into a file, named after the treatments selected+ to plot. # Only plots the values for days between startDate and endDate. # @parameter ... : a vari...
<!DOCTYPE html> <html lang="zh-CN"> <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>获得时间戳的四种方式</title> <script> // 1. 通过valueOf() getTime() (需要实例化日期对象) var date = ne...
/* eslint-disable import/no-unresolved */ import Pokemon from './entidades/pokemon.js'; import { mapearPokemon } from './mapeadores/pokemon.js'; import { conseguirInformacionPokemonId } from './pokeapi.js'; export function crearElementosTarjeta(pokemon: Pokemon): string { const ELEMENTOS: string = ` <div cla...
<!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>Storm Center</title> <meta name="description" content="Weather center allows people to report a ...
%----------求解TSP问题----------% clc; clear all; close all; %给定城市坐标City_Coord,每一列代表一个城市 City_Coord = [0.4000, 0.2439, 0.1707, 0.2293, 0.5171, 0.8732, 0.6878, 0.8488, 0.6683, 0.6195; 0.4439, 0.1463, 0.2293, 0.7610, 0.9414, 0.6536, 0.5219, 0.3609, 0.2536, 0.2634]; %获取城市数量city_quantity n = size(City_Coord, 2); ...
# **************************************************************************** # @copyright 2023 e:fs TechHub GmbH (sdk@efs-techhub.com) # # @license Apache v2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtai...
{% load i18n static %} {% get_current_language as LANGUAGE_CODE %}{% get_current_language_bidi as LANGUAGE_BIDI %} <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>{% block title %} | ShareShed{% endblock ...
import { expect } from 'chai'; import { aUsersManagerFacade } from './base/aUsersManagerFacade'; import { aRegularUserRegistrationRequest } from './base/requests/aRegularUserRegistrationRequest'; import { ExceptionMessages } from '../../../main/core/domain/exceptions/ExceptionMessages'; import { NotFoundException } f...
/* eslint-disable no-console */ import { useSearchParams } from 'react-router-dom'; import { useEffect, useState } from 'react'; import moment from 'moment'; import 'moment/locale/ko'; import BottomBar from 'src/components/BottomBar'; import TodoList from 'src/screen/Main/TodoList'; import styled from 'styled-component...
import React from 'react' // 第一层封装:将 样式对象 和 UI 结构分类 // const itemStyle = { border:'1px dashed #ccc', margin: '10px', padding: '10px', boxShadow: '0 0 10px #ccc'} // const userStyle = { fontSize: '14px' } // const contentStyle = { fontSize: '12px' } // 第二层封装:合并成一个大的样式对象 //const styles = { // item: { border:'1px da...
import React, { useState, useEffect } from "react"; import * as planAPI from "../../utilities/plan-api"; import * as exercisesAPI from "../../utilities/exercises-api"; import { useParams } from "react-router-dom"; import CreateWorkoutExerciseCard from "./CreateWorkoutExerciseCard"; function AddExerciseToWorkoutPlan() ...
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateProgramDurationsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('progra...
import { useEffect, useMemo, useState } from 'react'; export const useForm = ( initialForm = {}, formValidations = {}) => { const [ formState, setFormState ] = useState( initialForm ); const [ formValidation, setFormValidation ] = useState({}); useEffect(() => { createValidators(); },[formS...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <style> .item{ background-color: red; color: white; font-size: 40px; displa...
import Layout from '../../components/Layout/Layout'; import React, { Suspense } from 'react'; import SearchForm from '../../components/SearchForm/SearchForm'; import Preloader from '../../components/Preloader/Preloader'; import styles from './Movies.scss'; function Movies({ movies, loggedIn, openPopup, setMov...
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using FilmLabBackEnd.Data; using FilmLabBackEnd.Helpers; using FilmLabBackEnd.Options; using FilmLabBackEnd.Data; using FilmLabBackEnd.Helpers; using FilmLabBackEnd.Options; using Microsoft.AspNetCore.Builder; using Microso...
import mimetypes import os import re import time from contextlib import nullcontext from itertools import islice from random import randint import numpy as np import torch from PIL import Image from einops import rearrange from ldm.util import instantiate_from_config from omegaconf import OmegaConf from pytorch_lightni...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9n...
//let numero = 0 // //while(isNaN(numero) || numero<1){ // numero = +prompt("Entre com um número inteiro maior do que 0") //} // // //const div = document.getElementById("resultado") // //const resultado = isPar(numero) // //const p = document.createElement("p") //p.textContent = resultado // //div.appendChild(p) // /...
import React, { useState } from "react"; import axios from "axios"; import { Link, useNavigate } from "react-router-dom"; import "./register.scss" import Navbar from "../../Components/Navbar/Navbar" import Footer from "../../Components/Footer/Footer" import { signup } from "../../auth"; const Register = () => { con...
import crypto from 'crypto'; import { NewbPayTradeInfo } from '../models/otherModel'; const NotifyURL = `${process.env.BACKEND_BASE_URL}/api/activities/spgateway_notify`; const { HASHKEY, HASHIV, MerchantID, Version, RespondType, ClientBackURL }: any = process.env; // 字串組合 function genDataChain(order: Newb...
package edu.yu.cs.com1320.project.stage3.impl; import edu.yu.cs.com1320.project.stage3.Document; import java.net.URI; import java.util.Arrays; import java.util.HashMap; import java.util.Set; import java.util.HashSet; //import edu.yu.cs.com1320.project.impl.HashTableImpl; public class DocumentImpl implements Documen...
import type { User } from "../db/users"; import * as usersDB from "../db/users"; import { getSalt, hashPassword } from "../helpers/hashPassword"; export async function createUser(user: { email: string, password: string }) { if (!user.email || user.email.length < 5 || !user.email.includes('@')) { throw new Error(...
import React, { createContext, useEffect, useState } from "react"; export const MyContext = createContext(); export const ContextProvider = ({ children }) => { const [categories, setCategories] = useState([]); const fetchCategories = () => { fetch("https://api.chucknorris.io/jokes/categories") .then((res...
<template> <div id="my_form"> <el-form ref="form" v-loading="loading" v-bind="$attrs" :label-position="options.labelPosition" :label-width="options.labelWidth" :model="formData" :rules="langRule" :disabled="disabled" size="mini" v-on="$listeners" > ...
from naff import listen from naff.api.events import RawGatewayEvent from extensions.template import Template class GuildMonitor(Template): def __init__(self, bot): self.known_fields = [ "id", "name", "icon", "icon_hash", "splash", "d...
#include <iostream> using namespace std; void PrintMessage(string message); template <typename T> void PrintMessage(string message, T number); template <typename T, typename... Args> T Add(T first, Args... args); template <typename T> T Add(T v); int main() { // func call int i = Add(1); float f = Add...
import VectorLayer from 'ol/layer/Vector'; import VectorSource, { Options as VectorSourceOptions } from 'ol/source/Vector'; import { Feature } from 'ol'; import { Circle, LineString, Point, Polygon } from 'ol/geom'; import { Coordinate } from 'ol/coordinate'; import { Fill, Stroke, Style, Icon } from 'ol/style'; import...
package com.example.madencigozlugu; import androidx.appcompat.app.AppCompatActivity; import android.bluetooth.BluetoothAdapter; import android.content.Context; import android.content.Intent; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.os.Bundle; im...
package wails import ( "io" "log" "os" "strings" "time" "github.com/wailsapp/wails/v2/pkg/logger" ) // MultiLogger is a utility to log messages to a number of destinations type MultiLogger struct { filename string logFile *os.File multiWriter io.Writer } // NewMultiLogger creates a new Logger. func ...
# SPDX-FileCopyrightText: © 2022 Foundation Devices, Inc. <hello@foundationdevices.com> # SPDX-License-Identifier: GPL-3.0-or-later # # health_check_flow.py - Scan and process a health check QR code in `crypto-request` format from flows import Flow from pages import ErrorPage, SuccessPage from pages.show_qr_page impor...
package com.joshuashields.helloworldapp; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; public class MainActivity extends AppCompatActivity { // used as a key to retrieve the message as an extra f...
import React, { useEffect, useState } from "react"; import { Chart } from "chart.js/auto"; import { useNavigate } from "react-router-dom"; function Dashboard() { const navigate = useNavigate(); const [username, setUsername] = useState('example'); const [user, setUser] = useState({}); const [repositorie...
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <html lang="pt"> <head> <%@ page contentType="text/html; charset=UTF-8" %> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="https://cdn.jsdelivr.net/np...
# DIMO Token and Governance ## Documentation - [Dimo documentation](https://docs.dimo.zone/docs) The contracts are organized into different files by network and purpose: ``` 📦 contracts ┗ 📂 Mainnet ┗ 📂 DimoV1 ┗ 📜 Dimo.sol ┗ 📂 DimoV2 ┣ 📜 DimoV2.sol ┗ 📜 StorageV1.sol ┗ 📂 Mumbai ┣ 📜 Omid.so...
package com.rumakin.universityschedule.dto; import javax.validation.constraints.*; import com.rumakin.universityschedule.validation.annotation.*; import io.swagger.annotations.ApiModel; @UniqueBuildingName @UniqueBuildingAddress @ApiModel public class BuildingDto { private Integer id; @NotBlank(message = ...
import compression from 'compression' import cors from 'cors' import express, { Application } from 'express' import helmet from 'helmet' import { Server } from 'http' import morgan from 'morgan' import { AddressInfo } from 'net' import path from 'path' import { useExpressServer } from 'routing-controllers' import { inj...
#include <stdio.h> #include <stdlib.h> #include <time.h> // For seeding the random number generator void generateRandomMatrix(int rows, int cols, int matrix[rows][cols]) { // Generate random values for the matrix for (int i = 0; i < rows; i++) { for (int j = 0; j < cols; j++) { matrix[i][j]...
import { Injectable } from '@angular/core'; import {HttpClient, HttpHeaders} from "@angular/common/http"; import {Observable} from "rxjs"; @Injectable({ providedIn: 'root' }) export class DataService { httOptions = { headers : new HttpHeaders({ 'Authorization': 'Basic ZGVtbzpkZW1vdXNlcg==' }) } ...
package com.example.crudJava.Repositories; import org.springframework.data.jpa.repository.JpaRepository; import com.example.crudJava.entities.Editora; public interface RepositorioEditora extends JpaRepository<Editora, Long> { /* RepositorioEditora é uma interface que estende JpaRepository, que é fornecida p...
/** * @author Mireya Sánchez Pinzón * @author Alejandro Sánchez Monzón */ package es.dam.adp03_springmongodb.mappers import es.dam.adp03_springmongodb.dto.UsuarioAPIDTO import es.dam.adp03_springmongodb.models.TipoUsuario import es.dam.adp03_springmongodb.utils.cifrarPassword import es.dam.adp03_springmongodb.util...