text
stringlengths
184
4.48M
import './index.css'; import { openPopup, closePopup } from './components/modal.js'; import { enableValidation, clearValidation } from './components/validation.js'; import { pushInfo, getUserInfo, getCards, postCard, pushAvatar} from './components/api.js' import { createCard, handleLikeClick, handleDeleteClick } from '...
import styled, { css } from 'styled-components'; import { GlobalStyleType } from 'styles/global.styles'; export const StyledAnswerListHead = styled.div.attrs((props) => {})` ${(props) => { const Theme: GlobalStyleType = props.theme; const $font_title_big = Theme.font.$font_title_big; const $font_title_r...
from .dynamic_model import DynamicModel from track_model.track import Track import torch as th import numpy as np class BicycleModel2(DynamicModel): def __init__(self): super().__init__() self.max_steer = np.radians(15.0) # [rad] max steering angle self.L = 3.5 # [m] Wheel base of vehic...
import React, { Component } from "react"; import { Grid, IconButton, Icon, Input, InputAdornment, TablePagination, Button, Link, FormControl, Collapse, } from "@material-ui/core"; import MaterialTable, { MTableToolbar, Chip, MTableBody, MTableHeader, } from "material-table"; import { delet...
import java.util.HashMap; import java.util.Map; public class CustomerStorage { private final Map<String, Customer> storage; public CustomerStorage() { storage = new HashMap<>(); } public void addCustomer(String data) { final int INDEX_NAME = 0; final int INDEX_SURNAME = 1; ...
// - Return `false` if the input string is empty or contains only whitespace characters. // - Return `false` if the generated hashtag string is longer than 140 characters. // - Every word in the hashtag should start with a capital letter. // - The input string may contain leading/trailing whitespace characters. /** *...
$(document).ready(function () { const ckeditorName = $('.ckStudent').attr('name'); console.log(ckeditorName); CKEDITOR.replace(ckeditorName, { // Define the toolbar: https://ckeditor.com/docs/ckeditor4/latest/features/toolbar.html // The full preset from CDN which we used as a base provid...
**************************************************************************************************************************** --TO CREATE THE TABLE **************************************************************************************************************************** CREATE TABLE naresh_family ( S_NO varchar(1...
// SPDX-License-Identifier: UNLICENSED // Copyright (c) 2023 Tokemak Foundation. All rights reserved. pragma solidity 0.8.17; import { Test } from "forge-std/Test.sol"; import { Stats } from "src/stats/Stats.sol"; import { SystemRegistry } from "src/SystemRegistry.sol"; import { AccessController } from "src/security/A...
import "./userList.css" import { DataGrid } from "@material-ui/data-grid"; import { DeleteOutline } from "@material-ui/icons"; import { userRows } from '../../dummyData' import { Link } from 'react-router-dom' import React, { useState } from 'react' export default function UserList() { const [data, setData] = useSta...
<div class="container"> <div class="row text-center"> <span class="display-3">チーム登録</span> </div> <div class="row"> <div class="col"> <%= form_with model: [:team ,@team], local: true do |f| %> <% if @team.errors.any? %> <div> <div class="alert alert-danger"> <%= p...
import { Controller, Get, Post, Body } from '@nestjs/common'; import { AppService } from './app.service'; import { RavendbService } from './ravendb/ravendb.service'; import {ConfigService} from "@nestjs/config"; @Controller('app') export class AppController { constructor( private readonly appService: AppServic...
import { Button, Flex, FormControl, FormLabel, Grid, Input } from "@chakra-ui/react"; import React, { useEffect, useMemo, useState } from "react"; import Datatable from "../../components/data-table/DataTable"; import Layout from "../../components/layout.js/Layout"; import Loader from "../../components/loader/Loader"; i...
"""Tests for docq.manage_spaces module.""" import json import logging as log import sqlite3 import tempfile from contextlib import closing from typing import Generator, Optional from unittest.mock import MagicMock, Mock, patch import pytest from docq import manage_spaces from docq.access_control.main import SpaceAcces...
import { useEffect, useMemo, useRef, useState } from "react"; import type WebSocket from "./ws"; import type { Options } from "./ws"; /** When any of the option values are changed, we should reinitialize the socket */ export const getOptionsThatShouldCauseRestartWhenChanged = ( options: Options ) => [ options.sta...
import Transaction from '../models/Transaction'; interface CreateTransaction { title: string; value: number; type: 'income' | 'outcome'; } interface Balance { income: number; outcome: number; total: number; } class TransactionsRepository { private transactions: Transaction[]; constructor() { this...
class Matrix: def __init__(self, size): self.size = size self.data = [[0 for _ in range(size)] for _ in range(size)] def input_matrix(self): print("Nhập ma trận vuông kích thước", self.size, "x", self.size) for i in range(self.size): row = input(f"Nhập hàng thứ {i + ...
import React, {useCallback, useState} from 'react'; import {useNavigation} from '@react-navigation/native'; import LocationService from '../../../services/location/LocationService'; import {StackNavigationProp} from '@react-navigation/stack'; import {RootStackParamList} from '../../../screens'; import CustomButton from...
package com.devsimone.appointify.LecturerDash.Adapter import android.content.Context import android.content.Intent import android.os.Bundle import android.util.Log import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import com.bumptech.glide.Glide import co...
import { list } from "../handling/lists.mjs" import { api } from "../handling/api.mjs" import { addAttributes } from "../reading/attributes.mjs" import { cartContentTemplate } from "../templates/cartContent.mjs" import { compareByValue } from "./general.mjs" async function getCartProducts(){ const cartItems = awa...
<?php /** * Widget API: WP_Widget_Meta class * * @package WordPress * @subpackage Widgets * @since 4.4.0 */ /** * Core class used to implement a Meta widget. * * Displays log in/out, RSS feed links, etc. * * @since 2.8.0 * * @see WP_Widget */ class WP_Widget_Meta extends WP_Widget { /** * Sets up a n...
import 'package:flutter/material.dart'; import 'package:circular_countdown_timer/circular_countdown_timer.dart'; import 'Exercise.dart'; import 'db_helper.dart'; import 'main.dart'; var data = []; var next = 0; var exerciseType = ""; var startTime; class TakeRest extends StatelessWidget { TakeRest({super.key, requ...
<div class="control"> <p class="control-title">Kezelő felület</p> <mat-tab-group mat-align-tabs="center"> <mat-tab label="Kvízek"> <ng-template matTabContent> <div class="control-tab-content"> <table mat-table [dataSource]="quizzes" *ngIf="quizzes.length > 0;else quizzesNotAvailable"> ...
# # Window creation example # # This example creates a minimal "control" that just fills in its # window with red. To make your own control, subclass Control and # write your own OnPaint() method. See PyCWnd.HookMessage for what # the parameters to OnPaint are. # from pywin.mfc import dialog, window import win32ui i...
import React from "react"; import { clearDateValuesWhenStatusChanges, getCustomTheme, getEmptyBook, getPublishingYearRegexPattern, getTextFieldRegexPattern, } from "../util/helpers"; import { Box, Button, Form, FormField, Grommet, Select, Heading, DateInput, } from "grommet"; import { useStat...
import { Body, Controller, Get, HttpCode, HttpStatus, Post, Render, Request, Response, UseGuards } from '@nestjs/common'; import { AuthService } from '../services/auth.service'; import { JwtAuthGuard } from '../guard/auth.guard'; import { LocalAuthGuard } from '../guard/local.guard'; import { SocketGateway } from 'src/...
/** * Formats a SIREN number. * * @param str The string to format. * @returns The formatted string or `undefined` if the input is not valid. */ export const formatSiren = (str?: string): string | undefined => { if (!str || str.length !== 9) return str return `${str.slice(0, 3)} ${str.slice(3, 6)} ${str.sli...
"use strict"; exports.__esModule = true; exports.default = void 0; var _dom = _interopRequireDefault(require("../../shared/dom7")); var _utils = require("../../shared/utils"); var _class = _interopRequireDefault(require("../../shared/class")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? o...
=== Комбінаторика *Перестановками* з stem:[n] елементів називаються такі їх сукупності, що відрізняються одна від іншої тільки порядком входження елементів: [stem,reftext=({counter:eqs})] ++++ P(n)=n! ++++ *Комбінацією (сполученням)* з stem:[n] елементів по stem:[m] називаються такі сукупності m елементів, що відріз...
export interface IALTitleInfo { Media: Media; } interface Media { id: number; format: string; status: string; description: string; startDate: EndDateClass; endDate: EndDateClass; season: string; seasonYear: number; episodes: number; duration: number; trailer: Trailer; genres: string[]; aver...
import { User } from "@/types/user.ts"; interface StorageProxy<T> { getItem(): T | null; setItem(value: T | null): void; removeItem(): void; } export class Storage<T> implements StorageProxy<T> { constructor(private key: string) {} getItem(): T | null { const result = localStorage.getItem...
#!/usr/bin/env python # coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. All rights reserved. # # 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/LI...
### NBA-BubblePlayerLevelAnalysisProject ### This is a script for a webscraper to scrape data from Basketball-Reference player pages ### This is version 1.3 # Load libraries library(rvest) library(dplyr) library(tidyr) library(here) # Create a blank data frame with 2 empty columns for player names and links to be ...
<?php /* * Copyright 2008 Google 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 agre...
from __future__ import annotations from typing import Any, AnyStr, Callable, Dict, List, Optional, Tuple, Type, TYPE_CHECKING, Union from quart import Quart from quart.datastructures import FileStorage from quart.typing import ( HeadersValue as QuartHeadersValue, ResponseReturnValue as QuartResponseReturnValu...
import React, {Component} from "react"; import Profile from "./Profile"; import {connect} from "react-redux"; import {getUserThunk} from "../../redux/profileReducer"; import Preloader from "../Utils/Preloader"; import withAuthRedirect from "../../hoc/withAuthRedirect"; import {compose} from "redux"; import {withRouter}...
import { LineString } from "ol/geom"; import { getPoints } from "./api"; import { DistanceMemberPoint, MemberPoint, Point } from "./types"; import { useData } from "./useData"; import { getLength } from "ol/sphere"; import fromPoint from "./map/fromPoint"; import { useMemo } from "react"; const getDistance = (a: Point...
//{ Driver Code Starts // Initial Template for c++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution{ public: bool is_pal(string s, int left, int right) { while(left <= right) { if(s[left] != s[right]) return false; left++; ...
import "./App.css"; import { useEffect, useState } from "react"; import axios from "axios"; import { useSelector } from "react-redux/es/hooks/useSelector"; // import Header from "./components/layout/Header/Header"; import { BrowserRouter as Router, Route, Routes } from "react-router-dom"; import WebFont from "webfontlo...
// Time complexity: // Space complexity: // #include <vector> #include <algorithm> using namespace std; int getWays(int n, vector<int> &mem) { if (n == 0) return 0; if (n == 1) return 1; if (n == 2) return 2; if (find(begin(mem), end(mem), n) != end(mem)) { return mem...
import { NonexistentSurveyError } from '@/domain/use-cases/survey-result/save-survey-result' import { LoadSurveySummaryUseCase } from '@/domain/use-cases/survey/load-survey-summary' import { LoadSurveySummaryController } from '@/presentation/controllers' import { internalServerError, notFound, ok } from '@/presentation...
<template> <div> <h3 class="text-center"> {{ monthName }} {{ year }} <i class="fa fa-angle-left fa-border previous-month" v-on:click="() => {incrementMonth(-1)}"></i> <i class="fa fa-angle-right fa-border next-month" v-on:click="() => {incrementMonth(1)}"></i> </h3> <div class="container...
/* Name: Gowtham Prasad Email: gdprasad@crimson.ua.edu Course Section: Fall 2023 CS 201 Homework #: 3 Instructions to compile: g++ -std=c++20 hw3.cpp Instructions to run: ./a.exe <database file> <query file> */ #include <iostream> #include <string> #include <fstream> #include <vector> #...
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateAccFormatsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('acc_formats'...
import xarray as xr import numpy as np import matplotlib.pyplot as plt import seaborn as sns import src.utils import src.params import os def mod_ax(ax): """add vert/horiz lines, specify ticks, and add labels to ax""" ax.axhline(0, ls="-", c="gray", lw=0.7) ax.axvline(0, ls="-", c="gray", lw=0.7) ax.s...
<?php namespace App\Http\Controllers; use App\Models\LeaveType; use App\Models\TeacherLeave; use Illuminate\Http\Request; use Yajra\DataTables\Facades\DataTables; class TeacherApproveController extends Controller { public function allLeave() { if (request()->ajax()) { $query = TeacherLea...
--- title: "Replication in Parts" format: html filters: - include-code-files bibliography: inputs/references.bib --- This is a Quarto [@Allaire_Quarto_2022] Document. ## Includes ### Text {{< include inputs/_snippet.qmd >}} ### Scripts We can also include scripts using the [`include-code-files`](https://github...
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> <head> <meta charset="utf-8"/> <title>Quản Lý Đơn Hàng</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E...
use tch::{self, IndexOp, Tensor}; use std::path::{Path, PathBuf}; use punkt::{SentenceTokenizer, TrainingData}; use punkt::params::Standard; use fancy_regex::Regex; mod treebank_word_tokenizer; mod phonemizer; mod text_cleaner; use treebank_word_tokenizer::TreebankWordTokenizer; use phonemizer::text_to_phonemes; use ...
// // ViewController.swift // PictureThis // // Created by Harjyot Badh on 3/6/23. // import UIKit import Firebase import FirebaseAuth import FirebaseFirestore class ViewController: UIViewController { @IBAction func myUnwindAction(unwindSegue: UIStoryboardSegue) { // @TODO: Add signout stuff here ...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <script> let animal = { eats: true, walk() { console.log("Animal walk"); } }; let rabbit = { jumps: true, __proto__: animal }; let longEar = { earLength: 10, __proto...
The Modularization of HTMLDefinition in HTML Purifier WARNING: This document was drafted before the implementation of this system, and some implementation details may have evolved over time. HTML Purifier uses the modularization of XHTML <http://www.w3.org/TR/xhtml-modularization/> to organize the internals of HT...
<!DOCTYPE html> <html lang="pt-BR"> <head> <meta charset="utf-8"> <meta name="author" content="Guilherme Domingues Dworakowski"> <meta name="description" content="Portfólio de projetos do desenvolvedor front-end iniciante Guilherme Domingues Dworakowski."> <meta name="keywords" conte...
.. _stage_status: Stage and Status .. versionchanged:: 8.0 saas-2 state/stage cleaning Stage +++++ This revision removed the concept of state on project.issue objects. The ``state`` field has been totally removed and replaced by stages, using ``stage_id``. The following models are impacted: - ``project.issue`` ...
// // StringExtensions.swift // Marvel // // Created by Albert on 17/2/22. // import Foundation import var CommonCrypto.CC_MD5_DIGEST_LENGTH import func CommonCrypto.CC_MD5 import typealias CommonCrypto.CC_LONG extension String { func from(_ table: String) -> String { return NSLocalizedString(self, tableName:...
import React, { useEffect, useState } from 'react'; import { useRef } from 'react'; import './LoginSignUp.css'; import Loader from '../layout/Loader/Loader'; import { useDispatch, useSelector } from 'react-redux'; import { Link, useLocation, useNavigate } from 'react-router-dom'; import MailOutlineIcon from '@mui/icons...
import pool from '../db.js'; const conn = await pool.getConnection(); class poController { static getData = async (req, user) => { try { var user_role = user.user_role !== null && user.user_role !== undefined ? user.user_role : 'User'; var sqlCust = "Select a.customer_id,a.customer...
import { motion } from "framer-motion"; // staggerChildren: // https://www.framer.com/docs/transition/###staggerchildren const ThreeDotsLoader = ({ width = "2rem", height = "2rem", }: { width?: string; height?: string; }) => { return ( <motion.div className="flex justify-around" style={{ wid...
"use client"; import useUser from "@/app/hook/useUser"; import { PROTECTED_URLS } from "@/const"; import { createClient } from "@/lib/client"; import AdbIcon from "@mui/icons-material/Adb"; import MenuIcon from "@mui/icons-material/Menu"; import AppBar from "@mui/material/AppBar"; import Avatar from "@mui/material/Avat...
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import * as serviceWorker from './serviceWorker'; import { BrowserRouter as Router } from "react-router-dom"; //Redux import store from "./redux/store"; import { Provider } from "react-redux"; let WithStore = (...
/* This file is part of the KDE project * * SPDX-FileCopyrightText: 2017 Boudewijn Rempt <boud@valdyas.org> * * SPDX-License-Identifier: LGPL-2.0-or-later */ #ifndef TEXTNGSHAPECONFIGWIDGET_H #define TEXTNGSHAPECONFIGWIDGET_H #include <QWidget> #include <QTextEdit> #include <kxmlguiwindow.h> #include <KoColor.h...
import React, { useEffect, useState } from "react"; import { fr } from "@codegouvfr/react-dsfr"; import { useStyles } from "tss-react/dsfr"; import { z } from "zod"; import { cleanStringToHTMLAttribute, notEqual, OmitFromExistingKeys, validateMultipleEmailRegex, } from "shared"; const componentName = "im-filla...
import mongoose, {Document, model, Schema} from "mongoose"; export interface IUser { fullName: string; email: string; password: string; contactNumber: string; images: object; ageGroup: string; gender: string; country: string; state: string; city: string; maritalStatus: strin...
/* * Copyright 2023 Google 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...
var GroceryList = (props) => ( <ul> {props.groceries.map(groceries => <GroceryListItem groceries={groceries} /> )} </ul> ); class GroceryListItem extends React.Component { constructor(props) { super(props); this.state = { done: false } } onListItemClick() { this.setState({ done: !this.state...
# College Faculty Feedback Automation ## Overview This Python script automates the process of providing feedback on faculty members for each semester. The project was developed to simplify and streamline the time-consuming task of filling out lengthy feedback forms on the college portal, which typically consists of ov...
#ifndef ZRECTANGLE_H #define ZRECTANGLE_H /** * @package 3dogs * @file ZRectangle.h * @brief Unbeleuchtetes Rechteck * D.h. Licht wird fuer das Objekt * nicht berechnet ! * @author Rolf Hemmerling <hemmerling@gmx.net> * @version 1.00, * Entwicklungswerk...
import { ChevronLeft, ChevronRight } from "lucide-react"; import { DayPicker } from "react-day-picker"; import { cn } from "../../utils/cn"; import buttonVariants from "../Button/Button.styles"; import { CalendarProps } from "./Calendar.types"; /** * The function `Calendar` renders a calendar component using DayPicke...
import { InteractionType } from '@/interfaces/content.interface'; import { IsDateString, IsEnum, IsString } from 'class-validator'; export class CreateContentDto { @IsString() public title: string; @IsString() public story: string; @IsDateString() public datePublished: string; } export class UpdateConte...
% Load camera parameters (replace 'cameraParams.mat' with your file) load('../../Camera_Kalibrierung/calibrationSession_Nina.mat'); % Read the image of the checkerboard image = imread('./Images/checkerboard_Color.jpg'); % replace with your image file % Detect the checkerboard corners in the image [imagePoints, boardS...
# 如何在 Angular 中创建反应式表单 > 原文:<https://dev.to/enniob/how-to-create-a-reactive-form-in-angular-2c1d> 在这篇文章中,我将介绍如何创建一个角度反应形式。我们将制作一个登录表单。我还将演示如何轻松地在表单中添加验证。 **让我们建立我们的项目** 如果您的电脑上没有安装 Angular,请转到 [Angular.io](https://angular.io/) 并按照说明在您的电脑上安装 Angular。你还需要一个编辑。我更喜欢的编辑器是 Visual Studio 代码。 我们来做一个新的角度项目。打开命令提示符并运行以下命令: ...
package com.prac.react.model.dto; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; import co...
#ifndef TATO_LISTSET_H #define TATO_LISTSET_H #include <functional> //hash #include <string> #include <unordered_map> #include "sentence.h" NAMESPACE_START struct listset { listset() = default; listset & operator=( listset&& ) = default; // a list is a group of sentence::id typedef std::vector< sent...
<!DOCTYPE html> <html> <head> <title>Notifications</title> <style> body { font-family: Arial, sans-serif; background-color: #1e1e1e; color: #f7f7f7; padding: 20px; } h1 { text-align: center; } button { padding: 10px 20px; background-color: #0d47a1; color: #fff; border...
import React from "react"; import { connect } from "react-redux"; import { bindActionCreators } from "redux"; import * as courseActions from "../../redux/actions/courseActions"; import * as authorActions from "../../redux/actions/authorActions"; import propTypes from "prop-types"; import CourseList from "./CourseList...
import { useState } from "react"; import Gameboard from "./Components/Gameboard"; import Players from "./Components/Players"; import Log from "./Components/Log"; function App() { const [gamerTurn, setGameturn] = useState([]); const [activeplayer, setactiveplayer] = useState("X"); const handleSelectsquare = () =...
const express = require("express"), bodyParser = require("body-parser"), ejs = require("ejs"), _ = require('lodash'); const app = express(); const port = 3000; let homeText = "Lorem ipsum dolor sit amet, officia excepteur ex fugiat reprehenderit enim labore culpa sint ad nisi Lorem pariatur mollit ex ...
/// Geometry Interfaces Module Level 1 /// /// https://drafts.fxtf.org/geometry/ // ignore_for_file: unused_import @JS('self') @staticInterop library geometry_1; import 'dart:js_util' as js_util; import 'package:js/js.dart'; import 'package:meta/meta.dart'; import 'dart:typed_data'; import 'package:js_bindings/js_bi...
// // EditorStatusView.swift // MarkEditMac // // Created by cyan on 1/16/23. // import AppKit import AppKitControls import MarkEditKit /** To indicate the current line, column and length of selection. */ final class EditorStatusView: NSView, BackgroundTheming { private let button = TitleOnlyButton(fontSize: 1...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strjoin.c :+: :+: :+: ...
<!doctype html> <!-- Mozilla AI Guide | We need your help to make OSS AI best-in-class! Reach out to ai-guide@mozilla.com to contribute! This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain on...
<template> <div> <main id="main"> <section id="breadcrumbs" class="breadcrumbs"> <div class="container"> <ol> <li><router-link :to="{name: 'home'}" active-class="active">Home</router-link></li> <li>Edit Post</li> </ol> <h2>Edit Post ({{ this.$rou...
<?php declare(strict_types=1); namespace Impexta\Client\Presentation\Controller\CRM; use Impexta\Client\Domain\Factory\ClientFactory; use Impexta\Client\Infrastructure\Repository\ClientRepository; use Impexta\Client\Infrastructure\Service\UploadedFileService; use Impexta\Client\Presentation\Form\Model\ClientModel; u...
const User = require('../models/User') const Note = require('../models/Note') const asyncHandler = require('express-async-handler') const bcrypt = require('bcrypt') //@desc Get all users //@route GET /users //@access Private const getAllUsers = asyncHandler(async (req, res) => { const users = await User.find().s...
import React from "react" import { useDispatch } from "react-redux"; import { removeSingleFavoriteProduct } from "../store/favoriteSlice"; import { Link } from "react-router-dom"; import "../styles/favorite.scss"; const SingleFavoriteProduct = ( { product } ) => { const dispatch = useDispatch( ) return( <div cl...
Use Case: LibMesh is a framework for numerical simulations using finite element methods. You can use it for solving partial differential equations on serial and parallel architectures. The input files are generally cpp files containing problem assumptions, boundary conditions and solver details. Code details and examp...
import React from "react"; import { useFormik } from "formik"; import { useNavigate } from "react-router-dom"; import { useDispatch } from "react-redux"; import { addJobItem } from "../../../features/Job/JobSlice"; const AddJob = () => { const navigate = useNavigate(); const dispatch = useDispatch(); const init...
import type { MLElement } from './element.js'; import type { MLASTNode } from '@markuplint/ml-ast'; import type { PlainData, RuleConfigValue } from '@markuplint/ml-config'; import { MLNode } from './node.js'; export declare abstract class MLCharacterData<T extends RuleConfigValue, O extends PlainData = undefined, A ext...
import { useContext } from 'react' import { cartContext } from '../../contexts/cart.context' import { ReactComponent as ShoppingIcon} from '../../assets/shopping-cart.svg' import './cart-icon.styles.scss' const CartIcon = () => { const { isCartOpen, setIsCartOpen, cartCount } = useContext(cartContext) const t...
// Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { assert } from 'chai'; import * as sinon from 'sinon'; import { AudioDeviceModule, getAudioDeviceModule, } from '../../calling/audioDeviceModule'; describe('audio device module', () => { describe('getAudioDeviceModule', (...
const ObjectId = require('mongoose').Types.ObjectId const { Router } = require("express"); const { getAllGyms, postGyms, saveGyms, getGymById, getGymByName } = require("../../controlers/gyms"); const Gyms = require("../../models/Gyms"); const Users = require("../../models/User"); const Partner = require("../...
package rating import ( "os" "path/filepath" "gopkg.in/yaml.v3" ) // Config is a structure containing data from the config.yaml file type Config struct { Lichess struct { URL string `yaml:"url"` DefaultUser string `yaml:"defaultUser"` } `yaml:"lichess"` USCF struct { URL string `yaml:"ur...
<template> <!-- Search BTN --> <button class="btn btn-primary position-fixed" style="bottom: 20px; right: 20px; z-index: 1050;" data-bs-toggle="modal" aria-label="IP Check" data-bs-target="#IPCheck" @click="openQueryIP" v-tooltip="$t('Tooltips.QueryIP')"><i class="bi bi-search"></i></button> ...
from urllib.request import Request,urlopen import re from bs4 import BeautifulSoup import requests class Crawler(): def __init__(self, info_dict: dict = {}, url : str = ''): self.url = url self.info_dict = info_dict self.movie_name_list = [] self.movie_eng_name_list = [] sel...
<?php namespace App\Http\Controllers; use App\Models\User; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Storage; class LoginController extends Controller { // public function index(){ return view('auth.login'); ...
import './globals.css' import type { Metadata } from 'next' import { Poppins } from 'next/font/google' import {ClerkProvider} from '@clerk/nextjs' import ModalProvider from '@/providers/modal-provider' import { ToastProvider } from '@/providers/toast-provider' import { ThemeProvider } from '@/providers/theme-provider' ...
import { Injectable } from "@angular/core"; import { Movie } from "./movie.model"; import { Repository } from "./repository"; @Injectable() export class Cart { // ---------Properties---------------- selections: MovieSelection[] = []; itemCount: number = 0; totalPrice: number = 0; // ---------Constructor----...
#ifndef MQTT_SBC_H #define MQTT_SBC_H #include "display.h" #include <stdlib.h> #include <stdio.h> #include <string.h> #include <MQTTClient.h> // Configuracoes mqtt #define CLIENTID "sbc" //#define BROKER "mqtt://broker.emqx.io:1883" #define BROKER "tcp://10.0.0.101:1883" #define USERNAME "aluno" #define ...
const URL = require('../models/modelUrl'); /** * Handles the GET request for retrieving IDs. * * @param {Object} req - The request object. * @param {Object} res - The response object. * @return {Promise} The redirect response. */ async function handleGetIds(req, res) { // Extract the shortId from the URL ...
import React, { SetStateAction } from "react"; import { BackGroundContainer, ImageContainer, ModalContainer, TitleContainer, } from "./modalImageStyle"; interface ModaImageProps { img: string | null; setShowImage: React.Dispatch<SetStateAction<string | null>>; setShowModalImage: React.Dispatch<SetStateAc...