text
stringlengths
184
4.48M
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { DashboardComponent } from './dashboard.component'; import { ProjectComponent } from './projects/projects/projects.component'; import { ProfileComponent } from './Profile/Profile.component'; import { SupportCompone...
use itertools::Itertools; use ndarray::Array2; use num_integer::Integer; use std::{ collections::{HashMap, HashSet, VecDeque}, io, }; type Coord = (usize, usize); fn adjacents(y: usize, x: usize, h: usize, w: usize) -> impl Iterator<Item = Coord> { [ if x > 0 { Some((y, x - 1)) } else { None }, ...
<?xml version="1.0" encoding="UTF-8"?> <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="fr" xml:id="do">...
package sugoi.tools; /** * CSV Import-Export Tool * Based on thx.csv * * @author fbarbut<francois.barbut@gmail.com> */ class Csv { public var separator :String; var headers : Array<String>; //datas accessible in both forms public var datas : Array<Array<String>>; public var datasAsMap : Array<Map<String,Stri...
import axios from 'axios'; import React, { useState, useEffect,useRef } from 'react'; import { toast } from 'react-toastify'; function Pincode() { const [pin, setPin] = useState(['', '', '', '']); const [userId, setUserId] = useState(''); const inputRefs = useRef([]); useEffect(() => { const storedUserId...
class BinaryMaxHeap: def __init__(self): self.heap = [] self.size = 0 def parent(self, ind): return ind//2 def left_child(self, ind): return ind * 2 + 1 def right_child(self, ind): return ind * 2 + 2 def heapify(self, ind): if ind >= self.size: ...
;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; ;;; This file is part of GN...
package TTTinternet; import java.awt.*; import java.awt.event.*; import javax.swing.*; /** * Tic-Tac-Toe: Two-player Graphics version with Simple-OO */ @SuppressWarnings("serial") public class TTTGraphics2P extends JFrame { // Named-constants for the game board // Объявляем константы для игрового поля и иници...
import 'package:flutter/material.dart'; import '../class/ItemClass.dart'; import '../widgets/card_widget.dart'; //TODO: statelessW //* implement the code for statelessWidget class HomePage extends StatelessWidget { const HomePage({super.key}); @override Widget build(BuildContext context) { return Scaffol...
package com.example.service.aoc22; import com.example.service.AdventOfCode; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; import java.util.stream.Collectors; import lombok.AllArgsConstructor; import lombok.Data; @Service public cla...
//hook para controlar el ciclo de vida: useEffect import { useEffect, useState } from "react"; import { useSelector, useDispatch } from "react-redux"; import SearchBar from "../../components/SearchBar/searchBar"; import Loading from "../../components/Loading/loading"; import Cards from "../../components/Cards/cards";...
<a name="readme-top"></a> # <div align="center">🛰Doctor Appointment Booking App 🚀</div> # 📗 Table of Contents - [📗 Table of Contents](#-table-of-contents) - [📖 Doctor Appointment Booking App ](#-final-group-capstone---doctor-appointment-booking-app-) - [🛠 Built With ](#-built-with-) - [Tech Stack ](#te...
import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; class PoppinsText extends StatelessWidget { final String text; final double fontS; final Color? color; final FontWeight? fontWeight; final TextAlign? textAlign; const PoppinsText({ super.key, required this.tex...
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { HomeComponent } from './home/home.component'; import { AboutComponent } from './about/about.component'; import { NotFoundComponent } from './not-found/not-found.component'; import { PostsComponent } from './posts/...
const customError = require("../utils/customError"); const User = require("../models/employee.model"); class AuthController { // register handler static async register(req, res, next) { try { const { name, email, password } = req.body; const user = await User.create({ firstName: name, ...
/* * MIT License * * Copyright (C) 2021-2023 by wangwenx190 (Yuhang Zhao) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights...
import React from 'react'; import { ChargingStation } from '../api-station'; interface StationDropdownProps { stations: ChargingStation[]; onStationChange: (value: number) => void; } function StationsDropdown({ stations, onStationChange }: StationDropdownProps) { return ( <select name="selectSta...
Feature: Sign up feature involving DB layer Scenario: New User Sign Up from UI to DB flow Given I am on the sign up page and I am connected to the DB When I sign up with the following info |username| first | last | email | password| |bob.evans| Bob | Evans | bobevans@gmail.com| bobevans23|...
--- title: "Ubuntu 安装 MySQL8 并开启远程访问" author: "Charles" description: "" tags: - blog ogImage: "" postSlug: "ubuntu-mysql" pubDatetime: 2021-05-10T10:33:53.000Z upDatetime: 2022-06-28T18:24:00.000Z featured: false draft: false --- # 安装 MySQL ```bash # 到 https://dev.mysql.com/downloads/repo/apt/ 找到最新的 mysql apt 源配置文件...
package com.tangem.core.ui.screen import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.fragment.app.Fragment import androidx.transition.TransitionInflater import com.hasan.jetfasthub.R import com.hasan.jetfasthub.core.ui.screen.ComposeScreen...
import React from "react"; import useAutoComplete from "./useAutocomplete"; const getSplitText = ( suggestions: any, index: number, selectedValue: string ) => ({ startString: suggestions[index].label.substr( 0, suggestions[index].label.toLowerCase().indexOf(selectedValue.toLowerCase()) ), endString...
/* * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Softwa...
// This file is part of Frontier. // Copyright (C) Parity Technologies (UK) Ltd. // SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 // 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 Softwar...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # # Reference (https://ieeexplore.ieee.org/document/9625818) """Encoder m...
import Container from "@/components/map/panels/Container"; import ProjectLayerDropdown from "@/components/map/panels/ProjectLayerDropdown"; import { useActiveLayer } from "@/hooks/map/LayerPanelHooks"; import { useAppDispatch } from "@/hooks/store/ContextHooks"; import { useTranslation } from "@/i18n/client"; import { ...
import { Component, inject, OnInit } from '@angular/core'; import { HttpResponse } from '@angular/common/http'; import { ActivatedRoute } from '@angular/router'; import { Observable } from 'rxjs'; import { finalize, map } from 'rxjs/operators'; import SharedModule from 'app/shared/shared.module'; import { FormsModule,...
<!-- /* * Copyright 2018 Adobe. All rights reserved. * This file is licensed to you 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 applic...
import { createContext, useContext, useEffect, useState } from "react"; import {auth, db} from '../Firebase'; import { createUserWithEmailAndPassword, signInWithEmailAndPassword, signOut, onAuthStateChanged } from "firebase/auth"; import { setDoc, doc } from "firebase/firestore"; const AuthContext = createContext(); ...
#![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = :: js_sys :: Object , js_name = MediaConfiguration)] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `MediaConfiguration` dictionary."] #[doc = ""] ...
package by.bntu.backend.domain; import com.fasterxml.jackson.annotation.*; import lombok.Data; import lombok.EqualsAndHashCode; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.User...
/** * @description welcome banner: under the navbar */ import React from "react"; // mui components import { Button, Container } from "@mui/material"; // styled components import { WelcomeBannerWrapper, WelcomeBannerTextWrapper, WelcomeBannerTitle, WelcomeBannerMessageMarktSpan, WelcomeBannerText, ShopBu...
import React, { useEffect } from 'react'; function InfoTooltip(props) { const { name, isOpen, onClose, isSuccess, successIcon, failIcon } = props; function closeByOverlayClick(event) { if (event.target.classList.contains('popup')) { onClose(); } } useEffect(() => { ...
/* * 74Hx164 - Generic serial-in/parallel-out 8-bits shift register GPIO driver * * Copyright (C) 2010 Gabor Juhos <juhosg@openwrt.org> * Copyright (C) 2010 Miguel Gaio <miguel.gaio@efixo.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Pu...
<?php namespace app\models; use Yii; /** * This is the model class for table "fase_lap". * * @property int $id * @property string|null $st_descricao * @property int|null $orgao * @property int|null $bl_ativo * * @property Fase[] $fases */ class Faselap extends \yii\db\ActiveRecord { /** * {@inherit...
package com.gmail.pentominto.us.supernotes.repositories import com.gmail.pentominto.us.supernotes.data.Category import com.gmail.pentominto.us.supernotes.data.Note import com.gmail.pentominto.us.supernotes.database.NotesDao import javax.inject.Inject import javax.inject.Singleton import kotlinx.coroutines.flow.Flow @...
<div class="solution" acro="PEE.T50"> <h5 class="solution"> <span class="type">Solution</span> <span class="acro">PEE.T50</span> <span class="contributor"><a knowl="./knowls/contributor.robertbeezer.knowl">Robert Beezer</a></span> </h5>Since $\lambda$ is an eigenvalue of a nonsingular matrix, $\lambda\neq 0$ (<a class=...
import unittest from BankAccount import BankAccount class TestBankAccount(unittest.TestCase): def setUp(self): self.account = BankAccount(123) def test_initial_balance(self): self.assertEquals(self.account.balance, 0, msg="Initial balance should be 0") def test_deposit(self): self...
import { useState } from "react"; import PropTypes from "prop-types"; import { Menu } from "@material-ui/core"; import MoreVertIcon from "@material-ui/icons/MoreVert"; import ActionButton, { ACTION_BUTTON_TYPES } from "../action-button"; import { MenuItems } from "./components"; const Component = ({ actions, disable...
package com.tutorailsninja.demo.pages; import com.tutorailsninja.demo.utility.Utility; import org.apache.log4j.LogManager; import org.apache.log4j.Logger; import org.openqa.selenium.StaleElementReferenceException; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.CacheLookup; import org.openqa....
<div class="row"> <div class="col-md-6"> <form #f="ngForm" (ngSubmit)="save(f.value)"> <div class="form-group"> <label for="title">Название</label> <input #title="ngModel" [(ngModel)]="meditation.title" name="title" id="title" type="text" ...
using System; using System.Linq; using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; using Newtonsoft.Json; namespace Kukoo.Models { /// <summary> ...
/** * IPクラスを取得します * @param {string} ip - IPアドレス * @returns {string} IPクラス(A, B, C, D, Eまたは空文字列) */ export const getIpClass = (ip: string): string => { if (!ip) { return ""; } // IPアドレスの最初のオクテットを取得 const firstOctet = parseInt(ip.split(".")[0]); if (firstOctet < 128) { return "A"; } if (firstOc...
"use client"; import React, { useRef, useState } from 'react' import Icon, { DeleteOutlined, EditOutlined, ReloadOutlined, SearchOutlined, EyeOutlined, } from "@ant-design/icons"; import dayjs from "dayjs"; import Link from 'next/link'; import { Button, Input, message, Space } from 'antd'; ...
import Button from '@mui/material/Button'; import Dialog from '@mui/material/Dialog'; import DialogActions from '@mui/material/DialogActions'; import DialogContent from '@mui/material/DialogContent'; import DialogContentText from '@mui/material/DialogContentText'; import DialogTitle from '@mui/material/DialogTitle'; im...
"use client"; import Link from "next/link"; import React from "react"; import { usePathname } from "next/navigation"; import { MdOutlineTextFields } from "react-icons/md"; import { MdEmail } from "react-icons/md"; import { MdOutlineEmail } from "react-icons/md"; import { RiSpeakFill } from "react-icons/ri"; import { I...
import React, { FC, RefObject } from 'react' import { Table, Button, Switch, FormikInput, ImageSelectorModal, Pagination, BasicModal as CreateCategoryModal, } from '@pabau/ui' import { ServiceCategoriesDocument, ServiceCategoriesAggregateDocument, } from '@pabau/graphql' import { Formik } from 'formik...
package ar.edu.unq.obj1.c2.alimentos; import java.util.Collection; import java.util.HashSet; import java.util.stream.Collector; import java.util.stream.Collectors; import ar.edu.unq.obj1.c2.Alimento; public class Combo implements Alimento { Collection<Alimento> comidas = new HashSet<Alimento>(); public void agr...
import axios from "axios"; import React, { useEffect, useRef, useState } from "react"; import styled from "styled-components"; import { toast } from "react-toastify"; import {ToastContainer} from 'react-toastify' import 'react-toastify/dist/ReactToastify.css'; import img from "../../assets/images/loginImage.jpg" import...
import { useState, useEffect } from 'react'; import SetRep from './SetRep'; import Circuit from './Circuit'; import TimeDist from './TimeDist'; import axios from 'axios'; import { useHistory, useParams } from "react-router-dom"; import { TrashIcon } from "@heroicons/react/outline"; import NavBar from '../Navbar'; con...
#include <stdio.h> #include<stdlib.h> #include <assert.h> #include <time.h> #define LOWER 1 #define SIZE 10 typedef int song; typedef enum bool {false,true} bool; void test(void); song* make_empty(int num); void order_array(song arr[],int size); song* order_gen(int num); void swap(song* p, song* q); void print_arr(s...
import 'package:emos/components/RoundedButton/rounded_button.dart'; import 'package:emos/components/VerticalSpacing/vertical_spacing.dart'; import 'package:emos/view/FamilyView/widgets/add_family_card.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import '../../res/Globa...
import { useState, useEffect } from 'react' import Spinner from 'react-bootstrap/Spinner' import ListGroup from 'react-bootstrap/ListGroup' import { Link, useParams } from 'react-router-dom' import SWAPI from '../services/SW-API' import getIdFromUrl from '../helpers/index' const FilmPage = () => { const [Film,...
# BuySell-Backend The backend to the daysale day app using the MERN stack. Its purpose of this is to handle the database interation, authentication, and processing of the data as well as our api end points for a buying selling days app connecting with the front end here [Front end link](https://github.com/KirkWest/day...
import { AccountType } from "generated/graphql"; import { useState, useEffect } from "react"; const checkForDocumentVerificationRequired = (requirements: Array<string> | undefined) => { const result = requirements?.find((requirement: string) => requirement.includes(".verification.document")) || []; return res...
from functions import * def damerau_levenshtein_distance_recursive_cache(str1, str2, flag_output=False): n, m = len(str1), len(str2) matrix = create_levenshtein_matrix(n + 1, m + 1) for i in range(n + 1): for j in range(m + 1): matrix[i][j] = -1 recursive_cache(str1, str2, n, m, m...
// { Driver Code Starts // driver code #include <iostream> using namespace std; struct Node { int data; Node *next; Node(int val) { data = val; next = NULL; } }; void loopHere(Node *head, Node *tail, int position) { if (position == 0) return; Node *walk = head; ...
--- title: Creating a website with the academic theme in blogdown author: Kevin Zolea date: '2019-02-13' slug: Creating-a-website-with-the-academic-theme-in-blogdown categories: - blogdown - R - Hugo tags: - blogdown - R summary: My thoughts and some guidance on how to set up a free website with blogdown, Git...
<?php /** * HTTP response class * * Contains a response from Requests::request() * @package Requests */ /** * HTTP response class * * Contains a response from Requests::request() * @package Requests */ class Requests_Response { /** * Constructor */ public function __construct() { $this->headers = new...
--- layout: single title: Display the Background Grid while Drawing Graphics by LaTeX TikZ date: 2023-09-23 16:09:23 +0800 categories: - LaTeX - Graphic Design and Typography tags: - LaTeX TikZ --- While using LaTeX TikZ to draw diagrams, users maybe confused with determining the coordinate of each object. A backg...
import AppError from '@shared/errors/AppError'; import CustomersRepository from '@modules/customers/typeorm/repositories/CustomersRepository'; import { ICustomersRepository, IUpdate } from '@modules/customers/typeorm/repositories/CustomersRepositoryInterface'; class UpdateCustomerService { private customersRepositor...
/* Variable or function declared protected internal can be accessed in the assembly in which it is declared. It can also be accessed within a derived class in another assembly. */ using System; namespace AccessSpecifiers { class InternalTest { protected internal string name = "Shantosh Kumar...
import React, { useState, useEffect } from 'react'; import { Button, Modal as AntModal, Input, message, Select } from 'antd'; import { useSelector } from 'react-redux'; import axios from 'axios'; const { Option } = Select; const EditCategory = ({ showModal,categoryName, categoryId, parentName, parentId, fetchCategori...
############################################################################### # OpenVAS Vulnerability Test # $Id: gb_apache_tomcat_xee_info_disc_vuln.nasl 11402 2018-09-15 09:13:36Z cfischer $ # # Apache Tomcat XML External Entity Information Disclosure Vulnerability # # Authors: # Antu Sanadi <santu@secpod.com> # # ...
import random from django.core.management.base import BaseCommand, CommandParser from user.models import User from heart.models import Heart from product.models import Product class Command(BaseCommand): help = 'Generate fake hearts by users on products' def add_arguments(self, parser: CommandParser) -> N...
<page> <shortlink>report toc</shortlink> <topic>Report Table of Contents</topic> <description> <p>A live table of contents can be integrated into a report. Table of contents are fully customizable, allowing you to control both the contents and appearance of the table of contents.</p> </descripti...
/* * Copyright 2015 Austin Lehman * * 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...
# -*- coding: utf-8 -*- ################################################################################ # # Cybrosys Technologies Pvt. Ltd. # # Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). # Author: Vishnu KP (odoo@cybrosys.com) # # You can modify it under the terms of the GN...
``` open class Dog class Puppy : Dog() class Hound : Dog() fun takeDog(dog: Dog) {} takeDog(Dog()) takeDog(Puppy()) takeDog(Hound()) ``` ``` //1 open class Dog class Puppy : Dog() class Hound : Dog() class Box<in T> { private var value: T? = null fun put(value: T) { this.value = value } } ...
// Queue Linked List Header With Functions // Author Omar Mohammad #include <iostream> #include <string> using namespace std; template<typename Type> struct NodeType { Type info; NodeType<Type>* link; }; template<typename Type> class Queue { NodeType<Type>* first = NULL; NodeType<Type>* last = NULL; ...
import 'package:flutter/material.dart'; import 'package:loja_virtual/consts.dart'; import 'package:loja_virtual/models/cart_model.dart'; import 'package:loja_virtual/models/user_model.dart'; import 'package:loja_virtual/screens/loguin_screen.dart'; import 'package:loja_virtual/screens/order_screen.dart'; import 'packag...
import { useQuery } from '@tanstack/react-query'; import Slider from 'react-slick'; import useResume from '@/hooks/useResume'; import ResumeSliderItem from '@/components/slider/ResumeSliderItem'; import ResumeSlideLoader from '@/components/loader/ResumeSlideLoader'; import type { resumeType } from '@/types'; import 's...
package com.example.otlcse; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.ActivityCompat; import androidx.fragment.app.FragmentActivity; import android.content.pm.PackageManager; import android.location.Location; import android.os.Bundle; import android....
import React, { useState } from "react"; import { Navbar, Nav, Container, Button } from "react-bootstrap"; import { Link } from "react-router-dom"; import { CgGitFork } from "react-icons/cg"; import { ImBlog } from "react-icons/im"; import { AiFillStar, AiOutlineHome, AiOutlineFundProjectionScreen, } from "react-...
import type { Balances } from 'entities/balance' import type { ReserveName } from 'entities/reserve' import type { AllocationReport } from 'entities/allocation' export const allocateTestCases: Array<{ summary: string allocationRequested?: number allocationRealised?: number initialBalances?: Balances sources?...
<?php use App\Http\Controllers\Auth\ForgotPasswordController; use App\Http\Controllers\Auth\LoginController; use App\Http\Controllers\Auth\LogoutController; use App\Http\Controllers\Auth\RegisterController; use App\Http\Controllers\DashboardController; use App\Http\Controllers\ForgotController; use App\Http\Controller...
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { HttpHeaders, HttpResponse } from '@angular/common/http'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { of } from 'rxjs'; import { ImageStoreService } from '../service/image-store.service'; import { ImageStor...
/* This file is part of KDevelop * * Copyright 2010 Niko Sams <niko.sams@gmail.com> * Copyright 2010 Alexander Dymo <adymo@kdevelop.org> * Copyright (C) 2011-2015 Miquel Sabaté Solà <mikisabate@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lib...
<template> <aw-container> <template slot="header">多选</template> <aw-crud :columns="columns" :data="data" selection-row @selection-change="handleSelectionChange"> </aw-crud> <el-card shadow="never" class="aw-mb"> <aw-markdown :source="doc"/> </el-card> <el-card sha...
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; using System.Linq; using System.Text.Json; using System.Text.Json.Se...
;;; Sierra Script 1.0 - (do not remove this comment) ; ; Contains the Smopper cycler, which is used if you need to specify stopped, slowing and starting views in addition to in-motion views. (script# 17) (include sci.sh) (use Main) (use PFollow) (use Cycle) (use System) (public Smopper 0 ) (define SMOP_INMOTION 0) ...