text
stringlengths
184
4.48M
import { Injectable } from "@angular/core"; import { NgToastService } from 'ng-angular-popup'; @Injectable({ providedIn: 'root' }) export class ToastService { constructor( private ngToastService: NgToastService, ) { } showSuccess(message: string) { this.ngToastService.success({ detail...
import Countdown from 'react-countdown'; import './styles.css'; const natalGif = 'https://i.pinimg.com/originals/e8/0c/f3/e80cf36f4eb13dca261438a58d39b390.gif'; const Header = () => { // Defina a data de destino para o Natal de 2023 (ano, mês - 1, dia) const targetDate = new Date(2023, 11, 25); const renderer ...
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; import { HttpModule } from '@angular/http'; import { MaterialModule } from '@angular/material'; import { routing } from './app.routing'; import { HttpService } from ...
package PageObjects; import java.time.Duration; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.PageFactory; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.suppor...
/** * Copyright (C) 2015 The Gravitee team (http://gravitee.io) * * 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 requ...
""" Language Models are Multilingual Chain-of-Thought Reasoners https://arxiv.org/abs/2210.03057 Multilingual Grade School Math Benchmark (MGSM) is a benchmark of grade-school math problems, proposed in the paper [Language models are multilingual chain-of-thought reasoners](http://arxiv.org/abs/2210.03057). The same ...
package web import ( "fmt" "github.com/gorilla/websocket" "net" "sync" "time" ) type Client struct { mu sync.RWMutex hub *hub conn *websocket.Conn Send chan []byte ID uint8 Metadata struct { RemoteAddr string UserAgent string Username string } avgLatency uint16 connect...
import React, { createContext, useEffect, useState } from 'react'; import {createUserWithEmailAndPassword, getAuth, onAuthStateChanged, signInWithEmailAndPassword, signInWithPopup, signOut, updateProfile} from 'firebase/auth' import app from '../../firebase/firebase.config'; export const AuthContext = createContext...
import type { Metadata } from "next"; import { Montserrat } from "next/font/google"; import "./globals.css"; import "@fontsource/roboto/300.css"; import "@fontsource/roboto/400.css"; import "@fontsource/roboto/500.css"; import "@fontsource/roboto/700.css"; import Header from "@/components/Header/Header"; import Footer ...
#include <iostream> #include <cmath> using namespace std; #include <cuda.h> #include <cuda_runtime.h> #include <helper_cuda.h> int main() { //Declare a CUDA Device property structure variable cudaDeviceProp prop; //An integer variable to store the number of GPUs int nCountDevices{}; //Query the RT system about ...
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_METRICS_METRICS_LOG_MANAGER_H_ #define COMPONENTS_METRICS_METRICS_LOG_MANAGER_H_ #include <stddef.h> #include <memory> #include <stri...
<template> <section class="contactus"> <div class="contactus__wrapper"> <div :class="{ roow: true, inview: screenSize > 992 }"> <div :class="{ 'cool-3': true, inview: screenSize > 768 }"> <div class="contactus__wrapper__list"> <ul> <contact-cart v-...
import React, { Component } from 'react'; import { FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap'; import { emitter } from '../../utils/emitter'; class ModalUser extends Component { constructor(prop) { ...
import { Uri, UriResolutionContext } from "@polywrap/core-js"; import { expectHistory } from "../helpers/expectHistory"; import { PolywrapCoreClient } from "@polywrap/core-client-js"; import { UriResolverAggregator } from "../../aggregator"; import { ResultOk } from "@polywrap/result"; jest.setTimeout(20000); describ...
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' // Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' Shader "Unlit/Volume1" { Properties { _MainTex ("Texture", 2D) = "white" {} } SubShader { Tags { "RenderType"="Opaque" } LO...
// // OnboardingView.swift // Restart // // Created by Ashish Yadav on 06/02/22. // import SwiftUI struct OnboardingView: View { //MARK: - PROPERTY WRAPPER @AppStorage("onboarding") var isOnboaringViewActive = true //Its primary purpose to establish some constraints to the button horizontal moment...
#!/usr/bin/env python # Greedy algorithm for coin change problem import click def greedy_coin(amount): """ Greedy algorithm for coin change problem """ print(f"Your change for {amount} is:") coins = [0.25, 0.10, 0.05, 0.01] coin_lookup = {0.25: "quarter", 0.10: "dime", 0.05: "nickel", 0.01: ...
import React from 'react'; import * as PropTypes from 'prop-types'; import Heading from '../atoms/Heading'; import Image from '../atoms/Image'; import Spacer from '../layouts/Spacer'; import Subtitle from '../atoms/Subtitle'; import Text from '../atoms/Text'; import styles from './PortfolioItemCard.module.css'; impor...
import { SVGProps } from 'react'; export function Spinner(props: SVGProps<SVGSVGElement>) { return ( <svg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24' {...props} > <g> <rect width='2' height='5' x='11...
import { Component } from "react"; import SomethingWentWrong from "../pages/error-boundary-page/SomethingWentWrong"; class ErrorBoundary extends Component { constructor(props) { super(props); this.state = { hasError: false, errorMessage: "", }; } static getDerivedStateFromError() { ...
******************** CHAPTER: 43 ******************** ## Automatic Numbering With Counters To work with CSS counters we will use the following properties: counter-reset - Creates or resets a counter counter-increment - Increments a counter value content - Inserts generated content counter() or counters() function ...
examine Usage: examine [player1 [player2, game_number] This command starts a game in the examine mode where you, as the examiner, can move the pieces for both white and black, take moves back and analyze side variations. You can examine a new game from scratch, a stored (adjourned) game, a finished game from "his...
<?php declare(strict_types=1); namespace FSMS\Chronopost\StructType; use InvalidArgumentException; use WsdlToPhp\PackageBase\AbstractStructBase; /** * This class stands for resultMonoParcelExpeditionValue StructType * @subpackage Structs */ #[\AllowDynamicProperties] class ResultMonoParcelExpeditionValue extends...
--- id: bad82fee1322bd9aedf08721 title: Diferenciar entre unidades absolutas e relativas challengeType: 0 videoUrl: 'https://scrimba.com/c/cN66JSL' forumTopicId: 301089 dashedName: understand-absolute-versus-relative-units --- # --description-- Todos os últimos desafios definiram a margem ou preenchimento de um eleme...
#include "../base_types.h" #include "../basic_functions.h" #include "../image.h" #include "../image_operations.h" template<typename ElementT> void print3(std::vector<TinyDIP::Image<ElementT>> input) { for (std::size_t i = 0; i < input.size(); i++) { input[i].print(); std::cout << "*******************\n"; } } t...
const express = require("express"); const mongoose = require("mongoose"); const annoucementModel = require("../models/announcement.model.js"); const createAnnoucementController = async(req, res) => { const data = req.body; data.createdBy = req._id try { const newData = await annoucementModel.create...
/* * Copyright (C) 2005-present, 58.com. 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/LICENSE-2.0 * * Unless required...
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { Permissions } from '@shared/types'; import { AuthGuard } from '../auth'; import { AddEmployeeComponent, EditEmployeeComponent, ListEmployeeComponent } from './pages'; const rootRoutes: Routes = [ { path: ''...
# -*- encoding: utf-8 -*- ''' @Author : hesy @Contact : hesy519@gmail.com @Desc : [hard] ''' from typing import Dict, List from util import * from loguru import logger as log #ipdb.set_trace=blockIpdb blockPrint() enablePrint() from collections import deque, defaultdict class Solution: res = 0 ...
import React from "react"; interface BrandInputProps { className?: string; placeholder: string; name: string; type: string; } const BrandInput: React.FC<BrandInputProps> = ({ className, placeholder, name, type, }) => { return ( <input type={type} name={name} placeholder={placeh...
// global constants const nextClueWaitTime = 1000; //how long to wait before starting playback of the clue sequence //Global Variables var pattern = [6, 5, 3, 5, 3, 1, 4, 2, 5, 6, 4, 2]; var progress = 0; var gamePlaying = false; var tonePlaying = false; var volume = 0.5; var guessCounter = 0; var clueHoldTime = 1000...
# Class Notes ## Table of Contents - [Class Notes](#class-notes) - [Resources](#resources) - [Python_5](#python_5) - [封装的概念](#封装的概念) - [Function 的优势](#function-的优势) - [模块化](#模块化) - [Function Calls and Definition](#function-calls-and-definition) - [Positional Arguments](#positional-ar...
<div class="row mb-3"> <div class="mb-3 mb-sm-0"> <div class="card"> <div class="card-header"> <h4>Карточка товара</h4> </div> <div class="card-body"> <div class="row mb-3"> <div class="col-6"> <h6>id</h6> <p>{{ electroItem.id }}</p> ...
part of '../ecs.dart'; class Vector3Component extends ComponentInstance<Vector3> { Vector3Component(super.type); Vector3? _data; @override void set(Vector3? data) { _data = data; } @override Vector3? get() { return _data; } } class Vector3ComponentFactory extends ComponentFactory<Vector3> { ...
package com.starwacki.budgettracker.expense; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.time.LocalDate; import java.time.LocalTime; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; class ExpenseMapperUnitTest { @Test vo...
import React from 'react'; import parse from 'html-react-parser'; import Button from '@mui/material/Button'; import Dialog from '@mui/material/Dialog'; import DialogContent from '@mui/material/DialogContent'; import Stack from '@mui/material/Stack'; import Box from '@mui/material/Box'; import Typography from '@mui/mate...
"use client" import React from "react"; import EndpointContent from './endpointContent'; import { SlArrowDown, SlArrowUp } from "react-icons/sl"; import Link from "next/link"; export default function Endpoint({ status, path, desc, payload, response }: { status: string, path: string, desc: string, payload: Object | nu...
--- ## Front matter title: "Отчёт по лабораторной работе №4" subtitle: "НКНбд-00-21" author: "Самигуллин Эмиль Артурович" ## Generic otions lang: ru-RU toc-title: "Содержание" ## Bibliography bibliography: bib/cite.bib csl: pandoc/csl/gost-r-7-0-5-2008-numeric.csl ## Pdf output format toc: true # Table of contents t...
<template> <div> <div class="text-h3">CSR Management Panel</div> <!-- CSR Table --> <v-data-table :headers="csrHeaders" :items="items" :expanded.sync="expanded" item-key="name" show-expand id="csr-table" class="elevation-1" > <!-- Title --> <templ...
import { Component, ViewEncapsulation } from '@angular/core'; import { AppComponent } from '../app.component'; import { MatDialog } from '@angular/material/dialog'; @Component({ selector: 'app-heading', encapsulation: ViewEncapsulation.None, template: ` <div class="left"> <img src="assets/images/logo-mobil...
import './style.css' import type { WithElementProps } from '../types.tsx' import type { JSX, ComponentChildren } from 'preact' import classnames from 'classnames' type RadioProps = WithElementProps<'input', { label?: ComponentChildren, size?: 'small'|'medium'|'large', fill?: boolean, block?: boolean, onChange?: (...
import React, {useEffect, createContext, useReducer,useContext} from 'react' import Navbar from './components/Navbar' import "./App.css" import {BrowserRouter, Route, Switch, useHistory} from 'react-router-dom' import Home from './components/screens/Home' import Signin from './components/screens/Signin' import Signup f...
!----------------------------------------------------------------------! ! metropolis.f90 ! ! ! ! Module containing routines relating to the Metropolis algorithm ! ! using Kawasaki dynamics. ...
package models; public class Segurado extends Veiculo implements ISeguroService{ private double seguro; public Segurado(double seguro){ this.seguro = seguro; } /** * Retorna o resultado do valor a pagar para o estacionamento através do cálculo * super.doTotal() - doDesconto(). ...
import "./App.css"; import { useSelector, useDispatch } from "react-redux"; import { renderGame } from "./redux/slices/gameSlice"; import Grid from "./components/Grid"; import "./App.css"; import Winner from "./components/Winner"; function App() { const { winner, started } = useSelector((state) => state.game); ...
const Category = require('../models/category'); const Instrument = require('../models/instrument'); const asyncHandler = require('express-async-handler'); const { body, validationResult } = require('express-validator'); exports.index = asyncHandler(async (req, res, next) => { const allCategories = await Category.f...
<!DOCTYPE html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <!-- https://source.unsplash.com/random/1400x900/?nature --> <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm...
import React from "react"; import { BrowserRouter as Router, Routes, Route, Navigate, } from "react-router-dom"; import Home from "./components/Home"; import Login from "./components/Login"; import Signup from "./components/Signup"; import OrderParts from "./components/OrderParts"; import Service from "./compon...
### 服务器内部转发: - 1.`req.getRequestDispatcher("...").forward(req,resp);` - - 一次请求响应的过程,对于客户端而言,内部经过了多少次转发,客户端是不知道的 - 地址栏url没有变化 - 2.客户端重定向:`resp.sendRedirect("...");` - - 地址栏url有变化 - 在浏览器的network也可以看到原来访问的页面上有302状态码(转发) - ![image-20221124222550097](./images/image-20221124222550097.png) `req.getRequestDispatcher(...
package de.rieckpil.ppp; import java.math.BigDecimal; import java.util.Map; import de.rieckpil.ppp.db.postgresql.tables.records.PppRecord; import org.springframework.stereotype.Component; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Mono; @Component public class Op...
<template> <main class="post-page"> <section v-if="post" class="container mx-auto p-4"> <img :src="CreateURL(post.image, 1280, 300)" class="w-full mb-8"> <button @click="$router.back()" class="flex items-center text-lg text-green-500 hover:text-green-600 duration-300 mb-4"> <span class="material...
import{useForm} from 'react-hook-form'; import { useAuth } from '../context/AuthContext'; import {useNavigate,Link} from 'react-router-dom' import { useEffect } from 'react'; const RegisterPage = () => { const {register, handleSubmit,formState:{errors}}=useForm(); const {singup,isAuthenticated,errors:registerError...
"use client" import { Search } from 'lucide-react' import { FormEvent, useState } from "react"; import { receitas } from "./data/recipe"; import { LogoChef } from './assets/logoChef'; import Link from 'next/link'; import { EmptySearch } from './utils/emptysearch'; import { SearchBarr } from './components/searchbarr'; ...
Vue 3を学ぶ上で、さまざまな機能を追加して実践的な経験を積むことは非常に有益です。以下に、初心者から中級者レベルのVue開発者が取り組むのに適したプロジェクトのアイデアをいくつか提案します。 ### 1. ToDoリストの拡張 - **状態管理の追加**: PiniaやVuexを使用して、ToDoリストの状態管理を実装します。 - **データの永続化**: Local Storageを使用して、ToDoアイテムの状態をブラウザに保存し、リロード後も維持します。 ### 2. ブログまたはニュースフィード - **API統合**: JSONPlaceholderや他の公開APIを使用してデータを取得し、ブログポストやニュー...
package org.example.Paneller.Hoca.HocaMesajlar; import org.example.Kisiler.Hoca; import org.example.Kisiler.Kullanici; import org.example.Kisiler.Mesaj; import org.example.Kisiler.Ogrenci; import org.example.Paneller.Hoca.HocaPaneli; import org.example.Veritabani.Sorgular; import javax.swing.*; import java.awt.*; imp...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <script> let obj={ name:'dingding', age:23, id:3000 } ...
import { MutableRefObject, useEffect, useRef } from "react"; import { useSelector } from "react-redux"; import { selectPage } from "store/pagination/selectors/selectPage/selectPage"; export interface UseInfiniteScrollOptions { callback?: () => void; triggerRef: MutableRefObject<HTMLElement>; wrapperRef: Mu...
export const relativeTime = (date: string): string => { const rtf = new Intl.RelativeTimeFormat('en', { numeric: 'auto' }) const pastDate = new Date(date) const userTimezoneOffset = pastDate.getTimezoneOffset() * 60000 const UTCTimeRightNow = new Date(pastDate.getTime() - userTimezoneOffset) const currentDa...
import { Avatar, Card, Select, Space } from "antd"; import React from "react"; import { useRecoilState } from "recoil"; import { loadingAtom } from "../../atoms/atom"; import RenderIf from "../../utils/RenderIf"; import { handleLoad, handleUserSelection } from "./UserPermissionAnalysisView.util"; import UserPermissionV...
function FFT_NNLS_result = FFT_NNLS(DAS_result, PSF, maxIter) % % This code implements the FFT-NNLS algorithm % % More information about FFT-NNLS can be found in the paper: % Ehrenfried, Klaus and Koop, Lars, % "Comparison of iterative deconvolution algorithms for the mapping of acoustic sources", % AIAA jour...
import React, { Component } from 'react'; import { Redirect } from 'react-router-dom'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import Header from './components/Header'; import Footer from './components/Footer'; import DrinkCard from './components/DrinkCard'; import { cocktailsAPIOnLoa...
import 'package:flutter/material.dart'; import '../data/product.dart'; class Cart extends ChangeNotifier { Map<Product, int> cartMap = {}; int itemsInCart = 0; void addToCart(Product product) { if (cartMap.containsKey(product)) { cartMap[product] = cartMap[product]! + 1; } else { cartMap[produ...
// DetailsViewModel.swift // Copyright © DmitrievSY. All rights reserved. import RealmSwift import UIKit protocol DetailsViewModelProtocol { var filmDescription: FilmDescription? { get set } var reloadData: (() -> ())? { get set } var repository: RealmRepository? { get set } } final class DetailsViewMode...
# frozen_string_literal: true require 'faraday' require 'git' module LCSP # Cache that applies a Language # and download solutions from GitHub # if repository exists. class LCSPCache # @param {String} user # @param {String} lang def initialize(user, lang) @user = user @lang = lang ...
import { db } from "."; import { Product } from "../models"; import { IProduct } from "../interfaces/products"; export const getProductBySlug = async ( slug: string ): Promise<IProduct | null> => { await db.connect(); const product = await Product.findOne({ slug }).lean(); await db.disconnect(); if (!produc...
import 'package:flutter/material.dart'; import 'package:flutter_pdf_library/presentation/ui_component/app_colors.dart'; class BookListCard extends StatelessWidget { final String bookName; final String bookAuthorName; final String imageUrl; const BookListCard({ super.key, required this.bookName, re...
import { Button, Dialog, Input, TLShapePartial, TLUiDialogProps, uniqueId, useEditor, } from "@tldraw/tldraw"; import React, { useMemo, useState } from "react"; import { flexColumnStyle, flexRowStyle, shuffleArray } from "../common"; import { FaAlignRight, FaArrowLeft, FaArrowRight, FaBackspace, ...
/* eslint-disable react-hooks/rules-of-hooks */ import { useMutation } from '@apollo/client' import { useRouter } from 'next/router' import React, { useContext, useEffect } from 'react' import HeaderComponent from '../components/HeadComponent' import LoginRegister from '../components/LoginRegister' import { Context } f...
import clsx from "clsx"; import data from "@/schemas/footer-menu.json"; import Link from "next/link"; export type FooterMenuItemType = { title: string; link: string; is_link: boolean; rel?: string; target?: string; }; type FooterMenuColumnType = { main_title: string; item: FooterMenuItemType[]; }; expo...
class UserInterface { constructor() { //element selectors this.gameDisplay = document.querySelector(".maingame-display"); this.nameDisplay = document.querySelector(".player-name"); this.errorDisplay = document.querySelector(".error-display"); this.timeDisplay = document.querySelector...
package org.example; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Random; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); Random random = new Random(); L...
<mat-toolbar color="primary" class="mat-elevation-z8"> <span class="span">Réserver une salle pour une réunion </span> </mat-toolbar> <mat-card class="example-card"> <mat-progress-bar mode="indeterminate"></mat-progress-bar> <br> <form [formGroup]="meetingForm" (ngSubmit)="meetingForm.valid && onSubmitForm()" cl...
# Iris Keyboard Layout This is an example for the Iris keyboard. - The core layout is 2x(3x5 + 3) = 36 ```options layoutFn = LAYOUT ``` ```aliases lock = c+g+q ``` ```combos q+w = esc ``` ## Keyboard Structure ```structure 37 38 39 40 41 42 || 43 44 45 46 47 48 49 1 2 3 4 5 || 6 7 8 9 10 50 ...
--- x: Lua title: Try Lua in Y minutes image: /try/cover.png lastmod: 2024-05-12 original: https://learnxinyminutes.com/docs/lua/ license: CC-BY-SA-3.0 contributors: - ["Tyler Neylon", "http://tylerneylon.com/"] - ["Sameer Srivastava", "https://github.com/s-m33r"] --- [Lua](https://www.lua.org/) is designed to...
import 'package:ecom_ass/server/api_handler.dart'; import 'package:ecom_ass/server/models/my_course.dart'; import 'package:flutter/material.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart'; class MyCoursesScreen extends StatefulWidget { const MyCoursesScreen( {super.key, required this.student...
# grunt-csproj-integrity > Grunt plugin of [csproj-integrity](https://github.com/mantovanig/csproj-integrity) ## Getting Started This plugin requires Grunt `~0.4.5` If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it exp...
import PropTypes from "prop-types"; import { useState, useRef } from "react"; import ReactDom from "react-dom"; import CloseTimer from "../UI/CloseTimer"; import ErrorModal from "./ErrorModal"; const AddFormItemRequestInfoModal = ({ isShowModal, setIsShowModal, newItemRequest, formStructureList, setFormStruc...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Title</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" ...
import React, { useEffect } from "react"; import "./hs.css"; // Importing the HubSpot CSS globally import HubSpotConfig from "@site/hubspot.config"; const ContactFormHS = () => { useEffect(() => { // Create a script element const script = document.createElement('script'); script.src = 'https://js.hsforms...
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
package managers; import tasks.*; import java.util.*; public class InMemoryTaskManager implements TaskManager { // Добавляем счетчик-идентификатор задач private static int idCounter = 1; // хэш-мап с задачами для внешнего использования public static HashMap<Integer, Task> tasks = new HashMap<>...
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { SignInComponent } from '....
package com.mateuszmedon.app.mobileappws.ui.controller; import com.mateuszmedon.app.mobileappws.exceptions.UserServiceException; import com.mateuszmedon.app.mobileappws.service.AddressService; import com.mateuszmedon.app.mobileappws.service.UserService; import com.mateuszmedon.app.mobileappws.shared.dto.AddressDto; im...
package com.paya.paragon import android.annotation.SuppressLint import android.app.Application import com.google.firebase.crashlytics.FirebaseCrashlytics import com.google.firebase.iid.FirebaseInstanceId import com.paya.paragon.di.networkModule import com.paya.paragon.di.viewModelModule import com.paya.paragon.utiliti...
import { Button, Checkbox, Form, Input, Modal, Space, Table, message, } from "antd"; import { Fragment, useEffect, useState } from "react"; import { request } from "../server"; import { Link } from "react-router-dom"; const TeachersPage = () => { const columns = [ { title: "FirstName", ...
'use client'; import { useEffect, useState } from 'react'; import Link from 'next/link' export default function QueryTxSetTokenConfig() { const [queryFunctionResults, setQFR] = useState<any[]>([]); useEffect(() => { queryFunction('0x3c5a6e35'); }, []); const queryFunction = async (re...
import { useContext, useEffect, useState } from 'react' import { View, Text, ActivityIndicator } from 'react-native' import ChatList from '../../components/ChatList' import { heightPercentageToDP as hp, widthPercentageToDP as wp } from 'react-native-responsive-screen' import { AuthContext } from '../../context/authCont...
// Copyright 2024 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_VISITED_URL_RANKING_PUBLIC_URL_VISIT_H_ #define COMPONENTS_VISITED_URL_RANKING_PUBLIC_URL_VISIT_H_ #include <memory> #include <optional> #include <set> #inc...
import React, { Component } from 'react'; import { Text, View, ScrollView, StyleSheet, Picker, Switch, Button, Alert } from 'react-native'; import { Card } from 'react-native-elements'; import DatePicker from 'react-native-datepicker'; import * as Animatable from 'react-native-animatable'; import { Notifications } from...
package gitlet; import java.io.File; import java.util.ArrayList; import java.util.Set; import java.util.Collections; import java.util.List; public class DoCommands { public static void doInit() { Stage theStage = new Stage(); Remove theRemoval = new Remove(); File gitletDir = new File("...
from django.test import TestCase from django.core.urlresolvers import resolve from lists.views import home_page from django.test import Client from lists.forms import TaskForm from lists.models import Task class SimpleAdditionTest(TestCase): def test_basic_addition(self): """ Tests that 1 + ...
"use strict"; const inquirer = require("inquirer"); const cmLogger = require("@coremedia/cm-logger"); const themeImporter = require("@coremedia/theme-importer"); const { workspace: { Env, getEnv, setEnv }, } = require("@coremedia/tool-utils"); const { isValidURL, isValidStringValue } = require("../../lib/validators...
import { useEffect, useMemo, useState } from "react"; import { toast } from "react-hot-toast"; import { useSupabaseClient } from "@supabase/auth-helpers-react"; import { Song } from "../../types_incl_stripe"; const useSongById = (id: string) => { const [isLoading, setIsLoading] = useState(false); const [song, setS...
from playwright.sync_api import sync_playwright import json MAX_RETRIES = 3 def crawl_website(url, retry_count=0): try: with sync_playwright() as p: browser = p.chromium.launch() page = browser.new_page() page.goto(url) # Find all the paper elements ...
package io.efdezpolo import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.ValueSource import kotlin.test.assertFalse import kotlin.test.assertTrue class ValidParenthesesTest { @ParameterizedTest(name = "{index} \"{0}\" should be valid") @ValueSource(strings = ["(((((((((...
package controller.usuario; import java.io.IOException; import java.util.List; import jakarta.servlet.RequestDispatcher; import jakarta.servlet.Servlet; import jakarta.servlet.ServletException; import jakarta.servlet.annotation.WebServlet; import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServl...
/* - - - - - - - - */ class fetchForecastApi { constructor() { this.baseApiUrl = 'https://www.metaweather.com/api/location'; this.searchApiUrl = `${this.baseApiUrl}/search`; this.addCorsHeader(); } addCorsHeader() { $.ajaxPrefilter(options => { if (options.crossDo...
<!DOCTYPE html> <html lang="pt-br"> <head> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Formulário Intermediá...
import React, { useState } from "react"; import PropTypes from "prop-types"; import Box from "@mui/material/Box"; import { AiOutlineEye, AiOutlineEyeInvisible } from "react-icons/ai"; import IconButton from "@mui/material/IconButton"; import { Typography } from "@mui/material"; import { StyledFormGroup } from "../style...
import "./globals.css"; import type { Metadata } from "next"; import Link from "next/link"; import { Control } from "./Control"; import Header from "./Header"; import { fetchPostsList } from "@/api/posts/PostsListApi"; export const metadata: Metadata = { title: "Nextjs 13", description: "Generated by hjy", }; exp...