text
stringlengths
184
4.48M
// // Copyright © Uber Technologies, Inc. All rights reserved. // import Foundation enum Parameter: CaseIterable { case clientID case codeChallenge case codeChallengeMethod case redirectURI case resposeType var identifier: String { switch self { case .clientID: return "c...
import React from "react"; import SearchBar from "../components/ui/SearchBar"; import PokemonList from "../components/pokemon/PokemonList"; import RegionFilter from "../components/ui/RegionFilter"; import { PokemonProvider } from "../context/PokemonContext"; import { QueryClient, QueryClientProvider } from "react-query...
val f = (_: Int) + (_: Int) f(2, 4) def sum(a: Int, b: Int) = a + b val b = sum _ b.apply(1, 2) b(1, 2) def sum2(a: Int)(b: Int) = a + b val b2 = sum2(2) _ b2.apply(1) b2(1) def sum3(a: Int, b: Int, c: Int) = a + b + c val b3 = sum3(1, _: Int, 2) b3(0) b3(1) def x(f: Int => Int) = f(2) x(sum2(3)) //closure var ...
import { AfterViewInit, Component, EventEmitter, Input, OnInit, Output, } from '@angular/core'; import { FormBuilder, FormControl, FormGroup, Validators, } from '@angular/forms'; import { MsFormalFeature } from '../ms-formal-features-part'; @Component({ selector: 'tgr-ms-formal-feature', templa...
#' @title Clean up reference address tables #' #' @description \code{deduplicate_addresses} removes duplicate addresses in the ref tables and synchronize. #' #' @details This function brings in all addresses currently in the reference tables #' and deduplicates them. Because there is a stage -> final workflow, the s...
import { CustomScalar, Scalar } from '@nestjs/graphql' import { Kind, ValueNode } from 'graphql' export class LowerCase extends String {} @Scalar('LowerCase', () => LowerCase) export class LowerCaseScalar implements CustomScalar<string, LowerCase> { description = 'Lower string custom scalar type' parseValue(valu...
package org.patterns.behavioral.state.states; import org.patterns.behavioral.state.ui.Player; public class PlayingState extends State { /** * Контекст передаёт себя в конструктор состояния, чтобы состояние могло * обращаться к его данным и методам в будущем, если потребуется. * * @param player...
;;; fibs.el --- Play backgammon with FIBS in Emacs -*- lexical-binding: t; -*- ;;; Commentary: ;; FIBS (The First Internet Backgammon Server) is a popular server for playing ;; backgammon online. Its interface is driven through telnet, which Emacs has ;; included in its distribution. This package includes a number ...
import { motion } from 'framer-motion' import { fetchPokemon } from '../utils' import { useRequest } from '../useRequest' const Pokemon: React.FC<{ name: string; timeout: number }> = ({ name, timeout }) => { // NOTE: timeout can vary per Pokemon, but we'll always wait for the last request to complete // before...
package cli_test import ( "errors" "strings" "testing" "github.com/golang/mock/gomock" "github.com/greenplum-db/gpdb/gp/cli" "github.com/greenplum-db/gpdb/gp/hub" "github.com/greenplum-db/gpdb/gp/idl" "github.com/greenplum-db/gpdb/gp/idl/mock_idl" ) func TestWaitAndRetryHubConnect(t *testing.T) { setupTest(...
package com.atguigu.gmall.order.config; import com.atguigu.gmall.common.constant.SysRedisConst; import com.atguigu.gmall.rabbit.constant.MqConst; import org.springframework.amqp.core.Binding; import org.springframework.amqp.core.Exchange; import org.springframework.amqp.core.Queue; import org.springframework.amqp.core...
<!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>Order</title> <style> .container{ display: flex; max-width: 350px; ...
import { useState } from "react"; import { useParams, Link, useNavigate } from "react-router-dom"; import { useDispatch, useSelector } from "react-redux"; import { toast } from "react-toastify"; import { useTranslation } from "react-i18next"; import { useGetProductDetailsQuery, useCreateReviewMutation, } from "../...
# RAII ## 背景:资源管理问题 操作系统的资源是有限的,当我们使用完资源后必须将该资源归还操作系统,因此使用资源的步骤包括: * 获取资源 * 使用资源 * 释放资源 ### 1. 堆内存 ```c++ void foo() { int *pBuf = new int[256]; if (!condition1) { return; // 提前 return 存在内存泄漏风险 } if (!condition2) { bar(); // bar()抛出异常时可能导致资源未及时释放 } delete []pBuf; } ``` #...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Yarno Bruggink</title> <link rel="stylesheet" href="assets/css/styles.css" /> </head> <body> <nav class="navbar"> <div class="navbar-container">...
/* * This file is part of ACE View. * Copyright 2008-2009, Attempto Group, University of Zurich (see http://attempto.ifi.uzh.ch). * * ACE View is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free Software Foundation, * eithe...
import React from "react"; import styled from "styled-components"; const Wrap = styled.div` display: grid; width: 280px; height: 280px; grid-template-columns: 1fr 1fr 1fr; border: solid 2px black; `; const InnerBox = styled.div` border: solid 1px black; display: flex; justify-content: center; align-...
from dataclasses import dataclass, field from ts3l.utils import BaseConfig from typing import Any, List, Optional @dataclass class DAEConfig(BaseConfig): """ Configuration class for initializing components of the DAELightning Module, including hyperparameters of Denoising AutoEncoder, optimizers, learning rat...
import { effect, stop } from "../src/effect" import { reactive } from "../src/reactive" import { vi } from 'vitest' describe('effect', () => { it('happy path', () => { const obj = reactive({ foo: 1 }) let num let doubleNum // init effect(() => { num = obj.foo + 1 }) effect(() => { ...
import { createContext, useReducer, useState } from "react"; export const cartContext = createContext({ items: [], totalAmount: 0, }); export const CartProvider = ({ children }) => { const [cartState, setCartState] = useState([]); const amount = cartState.reduce((prev, current) => prev + current.amount, 0); ...
<div class="form_title text-center"> {% if section.settings.title != blank %} <h1 class="text-5xl text-center py-40 mb-8 bg-gray-700 text-white"> {{ section.settings.title }} </h1> {% endif %} </div> <div class="container mx-auto flex flex-col items center my-9 h-full justify-center "> {% f...
/* eslint-disable */ import React, {Component, Fragment} from 'react'; import PropTypes from 'prop-types' import vmsg from 'vmsg'; import {FontAwesomeIcon} from '@fortawesome/react-fontawesome' import {faMicrophone, faFileUpload, faStop, faTrashAlt} from '@fortawesome/free-solid-svg-icons' import {isEmpty} from 'lodash...
/* Filename: MainMenuScreen.h Author: Miguel Angel Quinones (mikeskywalker007@gmail.com) Description: Implementation of a screen in game - MAINMENUSCREEN Comments: Dependant of IndieLib Graphics library - derived from abtract class "GameScreen" Attribution: License: You are free to use as you want... but it can ...
import { Injectable, OnDestroy } from '@angular/core'; import { Subject } from 'rxjs'; /* observe destroy服务*/ /* 使用方式:*/ /* @Component({ selector: 'app-search-route', templateUrl: './search-route.component.html', styleUrls: ['./search-route.component.less'], changeDetection: Chang...
import { ButtonHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from "react" interface ButtonProps { children?: ReactNode className?: String onClick?: () => void disabled?: boolean buttonProps?: DetailedHTMLProps< ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement > } ...
import org.junit.Test; import static org.junit.Assert.*; public class BenutzerPoolTest { @Test public void testAddBenutzer() { BenutzerPool benutzerPool = new BenutzerPool(); Spieler spieler = new Spieler("Benutzer1"); benutzerPool.addBenutzer(spieler); assertEquals(1, benutz...
-- Passwort-Check fuer BA-User gemaess BA-Richtlinien -- gsi 29.7.2015 -- -- mindestens 8 Zeichen -- mindestens 1 Zahl -- mindestens 1 Sonderzeichen -- mindestens 1 Grossbuchstabe -- mindestens 1 Kleinbuchstabe -- Add_on: -- Passwort nicht gleich User-Id --> funktioniert nicht weil create/alter user die User-ID in G...
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Assignment15 { internal class Program { public static void BubbleSort(int[] arr) { int n = arr.Length; int noSwap = 0; for (int i...
import { useMemo, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { actions as eventActions } from "../../features/events"; import { actions as selectedActions } from "../../features/selected"; import { Button, IconButton, TextField, Typography } from "@mui/material"; import { Lo...
import React from "react"; import { View, Text, StyleSheet } from "react-native"; import { useDispatch } from "react-redux"; import { resetResponse, setResponse } from "../redux/appReducer"; import { IResponse } from "../models/interfaces/Response"; interface SnackbarProps { response: IResponse; } const Snackbar: R...
import Banner from "@/components/Banner"; import SectionName from "@/components/SectionName"; import OurTeam from "@/components/aboutpage/OurTeam"; import OurValues from "@/components/aboutpage/OurValues"; import Image from "next/image"; import React from "react"; import { FaArrowRight } from "react-icons/fa6"; const ...
// Import necessary Truffle libraries and the contract artifacts const LendingContract = artifacts.require("LendingContract"); contract("LendingContract", (accounts) => { let lendingContract; const user = accounts[1]; const borrowAmount = web3.utils.toWei("15", "ether"); // Borrow more than the deposited balance...
import { useState } from 'react' export const useLocalStorage = <T>(keyname: string, defaultValue: T): [T, (value: T) => void] => { const [storedValue, setStoreValue] = useState<T>(() => { try { const value = window.localStorage.getItem(keyname) if (value) { return JSON.parse(value) } ...
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <title>reveal.js</title> <link rel="stylesheet" href="dist/reset.css"> <link rel="stylesheet" href="dist/reveal.css"> <link rel="stylesheet" hre...
/*! @file AgentContainer.H \brief Contains #AgentContainer class and related structs */ #ifndef AGENT_CONTAINER_H_ #define AGENT_CONTAINER_H_ #include <array> #include <AMReX_BoxArray.H> #include <AMReX_DistributionMapping.H> #include <AMReX_Geometry.H> #include <AMReX_GpuDevice.H> #include <AMReX_IntVect.H> #inc...
import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get_it/get_it.dart'; import '../../../../core/widgets/custom_card_movement_widget.dart'; import '../../../../core/widgets/empty_widget.dart'; import '../....
<?php /** * The main template file * * This is the most generic template file in a WordPress theme * and one of the two required files for a theme (the other being style.css). * It is used to display a page when nothing more specific matches a query. * E.g., it puts together the home page when no home.php file ex...
# 1.用栈实现队列 [力扣题目链接](https://leetcode.cn/problems/implement-queue-using-stacks/) ## 题目 请你仅使用两个栈实现先入先出队列。队列应当支持一般队列支持的所有操作(`push`、`pop`、`peek`、`empty`): 实现 `MyQueue` 类: - `void push(int x)` 将元素 x 推到队列的末尾 - `int pop()` 从队列的开头移除并返回元素 - `int peek()` 返回队列开头的元素 - `boolean empty()` 如果队列为空,返回 `true` ;否则,返回 `false` **说明:**...
/** * @description Locates the first matching elements on the page, even within shadow DOMs, using a complex n-depth selector. * No need to specify all shadow roots to a button; the tree is traversed to find the correct element. * * Author: Roland Ross L. Hadi * GitHub: https://github.com/rolandhadi/shadow-dom-sel...
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.AI; using UnityEngine.UI; using SuperTiled2Unity; [System.Serializable] public class CustomerMove { public bool Cu_Move; public string[] direction; [Range(1, 5)] public int frequency; } public class ...
# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fi...
# Java BitSet |交集() > 原文:[https://www.geeksforgeeks.org/java-bitset-intersects/](https://www.geeksforgeeks.org/java-bitset-intersects/) [位集](https://www.geeksforgeeks.org/bitset-class-java-set-1)是在 [java.util](https://www.geeksforgeeks.org/java-util-package-java/) 包中定义的一个类。它创建了一个由 0 和 1 表示的位数组。 **语法** ```java publi...
--- import { type CollectionEntry, getCollection } from "astro:content"; import Layout from "@layouts/Layout.astro"; import PageTitle from "@components/ui/PageTitle.astro"; import { toSlug } from "@utils/page"; export const prerender = true; export const getStaticPaths = async () => { const projects = await getColle...
<?xml version="1.0" ?> <!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [ <!ENTITY kappname "&okular;"> <!ENTITY latex "L<superscript>A</superscript>T<subscript>E</subscript>X"> <!ENTITY package "kdegraphics"> <!ENTITY kpdf "<application>KPDF</application>"> <!ENTITY ...
import { render } from '@testing-library/react'; import { createMemoryHistory } from 'history'; import React from 'react'; import { Router } from 'react-router-dom'; import RecipeProvider from '../../context/RecipeProvider'; function renderWithRouterAndContext(component, path = '/') { const history = createMemoryHis...
/** * クラス名:CRMDPUpdAccountIndustryBatchTest * クラス概要:取引先.業種の更新バッチテストクラス ------------------------------------------------------------------------------------------------------ * Project Name: デジタルセールス高度化Ph4 ------------------------------------------------------------------------------------------------------ * Created Da...
import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; class RegisterPage extends StatefulWidget { @override _RegisterPageState createState() => _RegisterPageState(); } class _RegisterPageState extends State<RegisterPage> { TextEditingController nameController = ...
// Copyright (c) 2002-2004 Brian Wellington (bwelling@xbill.org) package org.xbill.DNS; import java.util.*; import java.io.*; import java.net.*; /** * The Lookup object issues queries to caching DNS servers. The input consists * of a name, an optional type, and an optional class. Caching is enabled * by default...
import {Drawer, Input, Col, Select, Form, Row, Button, Upload, message} from 'antd' import React, {useEffect, useState} from "react"; import axios, {toFormData} from "axios"; import {LoadingOutlined, PlusOutlined} from "@ant-design/icons"; import {useNavigate} from "react-router-dom"; const {Option} = Select; functio...
package Games::Bettor::Martingale; use warnings; use strict; use Carp; use Data::Dumper; sub new{ my ( $class, %args ) = @_; $args{'percent'} = 0 unless exists $args{'percent'} && defined $args{'percent'}; bless{ name => 'Martingale', amount => $args{'amount'}, percent => $ar...
--- title: "clean_this_is_me" output: html_document date: "2024-05-02" --- ## Purpose Prepare This is Me transcript data for narrative identity coding and other types of future analyses. Note that this script should _not_ rewrite the files once training is underway! ## Inputs - .csv files created by copying and pasti...
/** @license * * Copyright (c) Shawn P. Gilroy, Louisiana State University. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import { AuthorizationContextStateInterface, FirebaseLoginAction, } from '../interfaces/AuthorizationInt...
import { MainCartList } from '@components/MainCartList/MainCartList'; import { List, Typography, Button } from 'antd'; const { Paragraph, Link, Text } = Typography; import { AndroidFilled, AppleFilled } from '@ant-design/icons'; import styles from './main-page.module.css'; import { useDispatch, useSelector } from 're...
package com.francle.hello.feature.profile.data.response import com.francle.hello.feature.profile.domain.model.User data class UserProfileResponse( val userId: String, val email: String, val username: String, val hashTag: String, val age: Int?, val profileImageUrl: String?, val bannerImageU...
import { useEffect, useState } from "react"; import PropTypes from "prop-types"; import { ThreeDots } from "react-loader-spinner"; import UserCard from "../UserCard/UserCard"; import fetchUsers from "../../api/fetchUsers"; import { normalizeData } from "../../helpers/normalizeData"; import styles from "./UserSection.mo...
import React, { createContext, useContext, useState } from "react"; // useContext는 리액트에서 제공해주는 내장 hook함수이다. // 전역 상태 관리를 도와주는 함수 // react는 데이터의 흐름이 단방향 자식에게 props로 전달 하기 때문에 불편하다 // props로 데이터를 넘겨주지 않아도 컴포넌트들이 데이터를 공유 할 수 있도록 export const Global = createContext(); // createContext 함수를 호출해서 Global객체 생성 context 객체 생성 c...
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { HomeComponent } from './home.component'; import {FormsModule, ReactiveFormsModule} from '@angular/forms'; import { WeatherService } from 'src/app/services/weather.service'; import { HttpClient, HttpHandler } from '@angular/common/http'; descri...
{% extends 'base.html' %} {% block title %} Добавление новости {{ block.super }} {% endblock %} {% block sidebar %} {% include 'inc/_sidebar.html' %} {% endblock %} {% block content %} <h1>Добавление новости</h1> <form action="{% url 'add_news' %}" method="post"> {% csrf_token %} {{ form.non_field.errors ...
@if (status==null) { <section class=" py-16 bg-gray-900 text-center"> <div class="flex justify-center mt-12 -mb-12"> <p-paginator class="text-center" (onPageChange)="onPageChang($event)" [first]="oPaginatorState.first!" [rows]="oPaginatorState.rows!" [totalRecords]="oPage?.totalElements || 0"> </p-pagin...
The DPLA Ingestion System ------------------- Build Status ------------------- [![Build Status](https://travis-ci.org/dpla/ingestion.png?branch=develop)](https://travis-ci.org/dpla/ingestion) Documentation ------------------- Please see the [release notes](https://github.com/dpla/ingestion/wiki/Release-History) reg...
using System; using System.IO; using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Serilog; using Serilog.Events; namespace chess.webapi { public class Program { public static IConfigurationRoot Configuration { get; } = new ConfigurationBuilde...
package com.employeemanagement.emsbackend.serviceImpl; import com.employeemanagement.emsbackend.dto.EmployeeDto; import com.employeemanagement.emsbackend.entity.Employee; import com.employeemanagement.emsbackend.exception.ResourceNotFoundException; import com.employeemanagement.emsbackend.mapper.EmployeeMapper; import...
library(readxl) library(dplyr) library(MMWRweek) library(tidyr) library(ggplot2) library(ggpubr) library(lubridate) library(R2jags) load("R/parameters_linear_scen1.RData") load("R/parameters_exp_scen1.RData") # load("R/parameters_linear_scen2.RData") # load("R/parameters_exp_scen2.RData") # load("R/parameters_linear_sc...
# Additional data collection #' getRaceWeather #' #' @description given a race url from ergast (to wikipedia) get the weather #' #' @param race_url a wikipedia url for a grand prix (in english) #' #' @return a weather, as character (one of `warm`, `cold`, `dry`, `wet`, or `cloudy`) #' #' @examples #' f1model:::getWeat...
import { useState } from "react"; import Logo from "./Logo"; import Form from "./Form"; import PackingList from "./PackingList"; import Stats from "./Stats"; // const initialItems = [ // { id: 1, description: "Passports", quantity: 2, packed: false }, // { id: 2, description: "Socks", quantity: 12, packed: false }...
import { Component, OnInit, Input, OnChanges, ViewChild, ElementRef } from '@angular/core'; import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling'; import { fromEvent } from 'rxjs'; import { filter, debounceTime, distinctUntilChanged, tap } from 'rxjs/operators'; import { NgbModal } from '@ng-bootstrap/ng-bo...
import { Component, Input, OnInit, Output, EventEmitter, OnChanges, SimpleChanges, ViewChild, ElementRef } from '@angular/core'; import { FormControl } from '@angular/forms'; import { Observable, of } from 'rxjs'; import { map, startWith, debounceTime } from 'rxjs/operators'; import { isEqual } from 'lodash'; @Compone...
--- title: "Metrics Library for iOS Performance Debugging Using OSLog and Xray" description: "A step-by-step guide for using Xray programmatically." --- ## Setup In your `ClientConfig` (`PROClientConfig`) object, set the `xrayEnabled` and `osLogEnabled` flags to true (YES). This must be done before service startup. F...
package com.project.taskmanager.ui.feature.home.composables import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth i...
package main import ( "bytes" "context" "encoding/json" "flag" "fmt" "log" "net/http" "os" "os/exec" "strings" "time" ) var timeout = flag.Int("timeout", 3, "Ex: 3") var webhook = flag.String("webhook", "", "Ex: example.com/webhook") var host = flag.String("host", "", "Ex: example.com") type Notifier func...
<template> <b-card> <b-row class="justify-content-between"> <b-col class="pr-md-32 pr-md-120"> <h4>Basic</h4> <p class="hp-p1-body">Tooltip will show on mouse enter.</p> </b-col> <b-col class="hp-flex-none w-auto"> <b-button @click="codeClick()" vari...
import 'package:flutter/material.dart'; import 'package:flutter_dotenv/flutter_dotenv.dart'; import 'package:flutter_markdown/flutter_markdown.dart'; import 'package:google_generative_ai/google_generative_ai.dart'; void main() async { await dotenv.load(fileName: ".env"); runApp(const MyApp()); } class MyApp exten...
import ddf.minim.*; float facing=0, delta=0; float x=300, y=200, dx=1, dy=0; AudioPlayer player; Minim minim; void setup () { size(400, 400); minim = new Minim(this); player = minim.loadFile ("sound.mp3"); player.loop(); } void draw () { background(200); ellipse (200, 200, 10, 10); ellipse (x, y, 10, 10); ...
import time import board import digitalio import busio from rainbowio import colorwheel import neopixel from adafruit_lsm6ds.lsm6ds33 import LSM6DS33 from adafruit_mcp230xx.mcp23017 import MCP23017 # UART Init uart = busio.UART(board.GP0, board.GP1, baudrate=115200) # Neopixel Init num_pixels = 3 pixels = neopixel.Ne...
<!-- Objectives 1. Using the mobile first approach - Explore what makes for responsiveness and how they work across different platforms and devices - Build our own responsive web page using CSS media queries and viewport tag 2. Have basic knowledge of CSS flexbox and animations How - 1. Set view por...
@extends('layouts.main', ['activePage' => 'users', 'titlePage' => 'Nuevo Usuario']) @section('content') <div class="content"> <div class="container-dluid"> <div class="row"> <div class="col md-12"> <form action="{{ route('users.store')}}" method...
using System.IO; using System.Web.Mvc; namespace OnlineTestApp.UI { public static class ControllerExtensions { /// <summary> /// this.RenderView("ViewName", model); /// </summary> /// <param name="controller"></param> /// <param name="viewName"></param> /// <par...
import React, { createContext, useState, useContext } from 'react'; // Create context const SelectedProductsContext = createContext(); // Custom hook to use selectedProducts context export const useSelectedProducts = () => { return useContext(SelectedProductsContext); }; // Context Provider export const SelectedPr...
import { useForm } from "react-hook-form"; import "./Login.css"; import { CredentialsModel } from "../../../Models/CredentialsModel"; import { useNavigate } from "react-router-dom"; import { authService } from "../../../Services/AuthService"; import { notify } from "../../../Utils/Notify"; export function Login(): JSX...
package com.example.artworksharingplatform.controller; import java.sql.Timestamp; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAutho...
<?php namespace core\services; use core\daoimpl\CopsAutopsieDaoImpl; use core\domain\CopsAutopsieClass; /** * Classe CopsAutopsieServices * @author Hugues * @since 1.22.10.09 * @version v1.23.08.12 */ class CopsAutopsieServices extends LocalServices { // CONSTRUCT /** * Class constructor * ...
import { useState } from 'react' import PropTypes from 'prop-types' import { Switch, makeStyles } from '@material-ui/core' import Button from 'components/CustomButtons/Button.js' import imagine1 from 'assets/img/sidebar-1.jpg' import imagine2 from 'assets/img/sidebar-1.jpg' import imagine3 from 'assets/img/sidebar-1...
<?php namespace Drupal\university\Entity; use Drupal\Core\Entity\RevisionLogInterface; use Drupal\Core\Entity\RevisionableInterface; use Drupal\Core\Entity\EntityChangedInterface; use Drupal\user\EntityOwnerInterface; /** * Provides an interface for defining Course entities. * * @ingroup university */ interface ...
function output=getGlobalParameters(var_name_str,field_name_str) % gets global parameters for more flexible config file setups. % function output=getGlobalParameters(var_name_str,:field_name_str) % (: is optional) % % This function returns the global parameter or its field value(s). % The returned value(s) can be used...
/** * _strstr - a function that locates a substring * * @haystack: input string to search for similar * substrings * @needle: subtring to search for * * Return: a pointer to the beginning * of the located substring or * NULL if substring wasn't found */ char *_strstr(char *haystack,...
#include <stdio.h> #include <stdlib.h> #include "dog.h" /** * print_dog - prints the details of an instance of a dog * @d: the dog in question */ void print_dog(struct dog *d) { if (d == NULL) { return; } if (d->name == NULL) { printf("Name: (nil)\n"); } else { printf("Name: %s\n", d->name); } printf...
package com.example.cocina.JWT; import java.io.IOException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.context.SecurityConte...
package com.fa.sonagi.record.health.repository; import static com.fa.sonagi.record.health.entity.QFever.*; import java.time.LocalDate; import java.util.Map; import java.util.stream.Collectors; import com.fa.sonagi.record.health.dto.FeverResDto; import com.querydsl.core.types.Projections; import com.querydsl.core.typ...
* { box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; } body { background: linear-gradient(112deg,rgb(1, 85, 129) 30%,rgb(238, 47, 47) 100%); height: 100vh; display: flex; align-items: center; justify-content: center; } .container { width: 80%; heig...
package com.santechture.api.security; import io.jsonwebtoken.Claims; import io.jsonwebtoken.JwtException; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springf...
package tobyboot.helloboot; import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; import org.springframework.boot.web.server.WebServer; import org.springframework.boot.web.servlet.server.ServletWebServerFactory; import org.springframework.context.annotation.Bean; import org.springframework...
import {Command} from "../abstract/command"; import {Mediator} from "./mediator"; //Colega Concreto export class TurnOnAllLightsCommand implements Command { private mediator: Mediator; constructor(mediator: Mediator) { this.mediator = mediator; } public execute(): void { this.mediator...
import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:provider/provider.dart'; import 'package:travel_booking/constants/app_colors.dart' as appcolors; import 'package:travel_booking/providers/holiday_package_view_model.dart'; import 'pack...
var crypto = require('crypto'); var async = require('async'); var util = require('util'); var mongoose = require('libs/mongoose'), Schema = mongoose.Schema; var user = new Schema({ username: { type: String, unique: true, required: true }, hashedPassword: { type: String,...
import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:gap/gap.dart'; import 'package:get/get.dart'; import 'package:tickets/utils/app_styles.dart'; import 'package:tickets/widgets/thick_container.dart'; import '../utils/app_layout.dart'; class TicketView extends StatelessWid...
package io.locarro import grails.rest.* import grails.converters.* import grails.validation.ValidationException import static org.springframework.http.HttpStatus.* class PagamentoController extends RestfulController<Pagamento> { PagamentoService pagamentoService static responseFormats = ['json', 'xml'] ...
import { CssBaseline } from '@material-ui/core'; import { ThemeProvider } from '@material-ui/styles'; import App, { Container } from 'next/app'; import Head from 'next/head'; import React from 'react'; import theme from '../theme'; class MyApp extends App { componentDidMount() { // Remove the server-side injecte...
#pragma once #include <glew.h> #include <glm/glm.hpp> #include <vector> #include <stack> using namespace glm; struct Vertex { vec3 position; vec2 uv; Vertex(vec3 pos, vec2 u) : position(pos), uv(u) { } }; struct Material { int materialID; GLuint shader; GLuint texture; }; struct Sprite { Material* mat...
import { yupResolver } from '@hookform/resolvers/yup'; import React from 'react'; import './style.scss'; import { Controller, useForm, useFormState } from 'react-hook-form'; import { ContentWrapper } from '../../../../components'; import { EditSchema } from '../../../../validates'; import { FormTitle } from '../../../H...
#include <stdlib.h> /* * matrix manipulation. * * types defined : matrix * prefix used for functions : matrix_. * */ typedef struct matrix { size_t lines; size_t cols; double *values; } matrix; matrix *matrix_new(size_t lines, size_t cols, double init_value); matrix *matrix_new_id(size_t n); void matrix_fre...