text stringlengths 184 4.48M |
|---|
const express = require('express');
const cors = require('cors');
const mongoose = require('mongoose');
const bcrypt = require('bcrypt');
const app = express();
const port = process.env.PORT || 3000;
// Enable CORS for all routes
app.use(cors());
// Express now includes built-in JSON parsing
app.use(express.json());
... |
#include<iostream>
using namespace std;
class ListNode {
public:
int val;
ListNode* next;
ListNode(int val) {
this->val = val;
this->next = NULL;
}
};
void insertAtHead(ListNode*& head, int val) {
ListNode* n = new ListNode(val);
n->next = head;
head = n;
}
void printLinkedList(ListNode* head) {
whil... |
import {
Image,
Box,
Center,
Stack,
Text,
TableContainer,
Table,
Thead,
Th,
Tbody,
Td,
Button,
Tr,
} from "@chakra-ui/react";
import React, { useRef, useState, useEffect } from "react";
import StudentDashBoard from "./studentDashBoard";
import "../../App.css";
import { useReactToPrint } from "... |
import React from 'react';
import PropTypes from 'prop-types';
import { ButtonList, ButtonElement } from './FeedbackOptions.styled';
const FeedbackOptions = ({ options, onLeaveFeedback }) => {
return (
<ButtonList>
{options.map(el => (
<li key={el}>
<ButtonElement type="button" name={el} ... |
package com.zhugalcf.kameleoon.entity;
import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta... |
import React, { useState, useRef } from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faTimes } from '@fortawesome/free-solid-svg-icons';
import './note.css';
import { RiAddCircleLine ,RiDeleteBin3Line,RiImage2Line} from "react-icons/ri";
const EditNote = ({ note, onClose, onSubmi... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
/*
https://learn.microsoft.com/en-us/dotnet/maui/xaml/fundamentals/data-binding-basics
*/
namespace Maui_in_Action;
public class NamedColor
{
public string Name { get; priv... |
/*
* Copyright © 2015 Integrated Knowledge Management (support@ikm.dev)
*
* 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 ... |
package Regexp::Sudoku::Quadruple;
use 5.028;
use strict;
use warnings;
no warnings 'syntax';
use experimental 'signatures';
use experimental 'lexical_subs';
our $VERSION = '2022062001';
use Hash::Util::FieldHash qw [fieldhash];
use Regexp::Sudoku::Utils;
fieldhash my %quadruple2cells;
fieldhash my %cell2quadrup... |
from django.shortcuts import render,get_object_or_404
from django.http import HttpResponse, Http404, HttpResponseRedirect
from django.template import loader
from django.shortcuts import render
from django.urls import reverse
from django.views import generic
from .models import Question, Choice
# Create your views her... |
import React from 'react';
import { Query } from 'react-apollo';
import PropTypes from 'prop-types';
import GraphQLErrors from '@twigeducation/react-graphql-errors';
import { Loading } from '@twigeducation/ts-fe-components';
const QueryHandler = ({
children,
ErrorComponent,
LoadingComponent,
NotFoundMe... |
import { formatarTexto } from 'common/animes'
import Button from 'components/Button'
import PopupRank from 'components/PopupRank'
import Title from 'components/Title'
import { useState } from 'react'
import { Link } from 'react-router-dom'
import { IAnimes } from 'types/anime'
import styles from './Card.module.scss'
... |
<?php
declare(strict_types=1);
namespace App\View\Cell;
use App\Model\Entity\StudentStage;
use App\Model\Field\AdscriptionStatus;
use App\Model\Field\StageField;
use Cake\View\Cell;
/**
* TrackingView cell
*/
class TrackingViewCell extends Cell
{
/**
* List of valid options that can be passed into this
... |
'use strict'
const Controller = require('egg').Controller
const fs = require('fs')
const path = require('path')
class FileController extends Controller {
// 上传
async upload() {
const {
ctx,
app,
service
} = this
const currentUser = ctx.authUser
console.log(ctx.request.files)
if (!ctx.request.files)... |
"""ModbusProtocol layer.
Contains pure transport methods needed to
- connect/listen,
- send/receive
- close/abort connections
for unix socket, tcp, tls and serial communications as well as a special
null modem option.
Contains high level methods like reconnect.
All transport differences are handled in transport, pro... |
import { useState, useContext } from 'react'
import { TaskContext } from '../context/TaskContext'
function TaskForm() {
const [title, settitle] = useState('')
const [description, setdescription] = useState('')
const { createTask } = useContext(TaskContext)
const handleSubmit = (e) => {
e.p... |
import { securityAPI } from "./../api/security-api";
import { ResultCodesEnum, ResultCodeForCaptchaEnum } from "./../api/api";
import { authAPI } from "./../api/auth-api";
import { BaseThunkType, InferActionsTypes } from "./redux-store";
const SET_USER_DATA = "social-network/auth/SET_USER_DATA";
const GET_CAPTCHA_URL_... |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="lib/vue.js"></script>
<link rel="stylesheet" href="https://unpkg.co... |
/*********************************************************************
* Copyright (c) Intel Corporation 2023
* SPDX-License-Identifier: Apache-2.0
**********************************************************************/
package ethernetport
import (
"encoding/xml"
"testing"
"github.com/stretchr/testify/assert"... |
/*
* Copyright (c) 2023 Airbyte, Inc., all rights reserved.
*/
package io.airbyte.integrations.source.singlestore;
import io.airbyte.cdk.db.factory.DatabaseDriver;
import io.airbyte.cdk.testutils.ContainerFactory.NamedContainerModifier;
import io.airbyte.cdk.testutils.TestDatabase;
import io.airbyte.integrations.so... |
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CreateUser extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that a... |
import * as path from 'path';
import * as vscode from 'vscode';
import * as logger from './lib/logger';
import { Device, Simulator, Target, TargetType } from './lib/commonTypes';
import { randomString } from './lib/utils';
import * as targetCommand from './targetCommand';
import { getTargetFromUDID, pickTarget, getOrPi... |
package GDT_JAVA_Train.Assignment7.src.com.infosys.dao;
import java.util.ArrayList;
import GDT_JAVA_Train.Assignment7.src.com.infosys.exceptions.UserNotFoundException;
import GDT_JAVA_Train.Assignment7.src.com.infosys.pojo.User;
public class UserDAO {
private ArrayList<User> userList = new ArrayList<User>();
... |
Nome do Componente Curricular: Tópicos em Ressonância Magnética Nuclear
Pré-requisitos: Fenômenos Eletromagnéticos
Carga Horária Total: 72h
Carga Horária Prática: 0h
Carga Horária Teórica: 72h
Objetivos
Gerais:
Propiciar amplo conhecimento sobre os conceitos físicos e a instrumentação em
equipamentos de Ressonância Mag... |
import { UserProps } from './User';
export class Attributes<T> {
constructor(private data: T) {}
// this will bind this to context
get = <K extends keyof T>(key: K): T[K] => {
return this.data[key];
}
set(update: T): void {
Object.assign(this.data, update);
}
getAll(): T {
return this.dat... |
import { useContext } from "react";
//import { getRooms } from "../../api/rooms";
import { AuthContext } from "../../providers/AuthProvider";
import RoomDataRow from "../../components/Dashboard/RoomDataRow";
import EmptyState from "../../components/Shared/Navbar/EmptyState";
import useAxiosSecure from "../../Hooks/useA... |
package org.springframework.boot.ioc.demo.annotations;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.boot.ioc.demo.annotations.goods.FruitTea;
import org.spri... |
interface CaptureConf {
is_var:boolean;
is_array:boolean;
aliases: string[];
}
const AliasFormat = /(^[-]{1,2}[^-]+$)/u;
const OptionFormat = /^(-[^-=]+)$|^((--[^-=]+)(=.*)?)$/u;
const _Captures:WeakMap<CliPArgs, {
alias_map:{[alias:string]:string},
var_map:{[name:string]:CaptureConf}
}> = new WeakMap();
inter... |
import React, { useState, useEffect } from "react";
import PropTypes from "prop-types";
import InfiniteScroll from "react-infinite-scroll-component";
import Post from "./post";
export default function Index({ url }) {
/* Display image and post owner of a single post */
const [results, setResults] = useState([])... |
package com.chenlisa.springbootmall.controller;
import com.chenlisa.springbootmall.constant.ProductCategory;
import com.chenlisa.springbootmall.dto.ProductQueryParams;
import com.chenlisa.springbootmall.dto.ProductRequest;
import com.chenlisa.springbootmall.model.Product;
import com.chenlisa.springbootmall.service.Pro... |
import { DEFAULT_ERROR_CODES } from "./defaultErrorCodes.js";
import { HandlerName } from "../types.js";
import { SessionMiddlewareError } from "./SessionMiddlewareError.js";
export class SessionHandlerError extends SessionMiddlewareError {
public get status(): number {
if (this._status) {
return this._sta... |
using System.Text.Json;
using HackerNews.Application.Interfaces;
using HackerNews.Application.Models;
using HackerNews.Application.Models.Paging;
using Microsoft.Extensions.Caching.Memory;
namespace HackerNews.Application.Services;
public class HackerNewsService : IHackerNewsService
{
private IHttpClientFactory ... |
import {
Box,
Button,
IconButton,
InputAdornment,
OutlinedInput,
Stack,
Typography,
} from '@mui/material';
import React from 'react';
import { useEffect, useState } from 'react';
import { Visibility, VisibilityOff } from '@mui/icons-material';
import PersonIcon from '@mui/icons-material/Per... |
extends Node
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
signal avgStatsChanged
var rng = RandomNumberGenerator.new()
var spotScene = preload("res://Spot.tscn")
var unitScene = preload("res://units/Unit.tscn")
var player
var game
var stagesPerBiome = 2
var timer = Timer.new()
var tieredLi... |
<!DOCTYPE html>
<html>
<head>
<title>Flappy Educational Recreation</title>
<meta charset="UTF-8">
<script type="text/javascript" src="processing-1.4.1.js"></script>
<!--
This is a source-file-less sketch, loaded from inline source code in
the html header. This only works if the script... |
//
// RewardItemCell.swift
// MapleStoryGuide
//
// Created by brad on 2023/04/20.
//
import UIKit
class RewardItemCell: UICollectionViewCell {
static let id = "RewardItemCell"
private let horizontalStackView = UIStackView().then { stackView in
stackView.axis = .horizontal
stackView.di... |
import java.util.Scanner;
//강사님 문제풀이
public class Array04_01 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
boolean[] ar = new boolean[5];
// 5개 방을 만들었고, ar[0] ar[1] ~ar[4] 0부터 시작
int num;
while(true) {
System.out.println(); //줄바꿈용
System.out.println("주차관리 시스템");... |
<template>
<div>
<splide class="riseup-slider" :options="splideOptions" @splide:move="_onMove" ref="sliderRef">
<splide-slide v-for="slide in slidesData" :key="slide.key"
class="riseup-slider-slide" :style="{ '--pagination-padding': `${paginationPadding}px` }">
<slot v-bind:slide... |
package org.l3e.Boulanger.block.entity;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
import net.minecraft.world.Containers;
import net.minecraft.world.MenuProvider;
import net.minecraft.world.SimpleContainer;... |
<template>
<header class="app-header navbar">
<button class="navbar-toggler mobile-sidebar-toggler d-lg-none" type="button" @click="mobileSidebarToggle">
<span class="navbar-toggler-icon"></span>
</button>
<b-link class="navbar-brand" to="#"></b-link>
<button class="navbar-toggler sidebar-toggle... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Domain.Interfaces.Services;
using Domain.Interfaces.Repositories;
using Data.Repositories;
using Logic;
namespace WebApi.Configuration.Extensions
{
public static class RegisterDependencyInjectionExtension
{
... |
\ifndef{langchainAgent}
\define{langchainAgent}
\include{_software/includes/langchain-software.md}
\editme
\subsection{Langchain agent}
\notes{Now we should configure a Langchain `agent`. This agent is the interface between our code and the LLM. The `agent` receives our questions in natural language and will provi... |
<!DOCTYPE html>
<html>
<head>
<title>JS_DOM_개요</title>
<script>
/*
1 DOM 객체 (DOM, Document Object Model)
1.1 문서 객체 모델(DOM)이란?
웹 브라우저는 서버로부터 전달받는 Resource를 읽고 HTML 태그들을 분석하고 화면에 표시합니다.
이때 웹 브라우저가 HTML을 분석하고 표시하는 방식을 문서 객체 모델( DOM : Document Object Model ) 이라고 합니다.
1.2 DOM으로 할수 있는 작업
... |
import 'package:absoftexamination/model/user.dart';
import 'package:absoftexamination/util/shared_preferences_util.dart';
import 'package:flutter/material.dart';
class UserProvider extends ChangeNotifier {
User? _user;
// String? _token;
// User? get user => _user;
// String? get token => _token;
UserProvi... |
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouterModule } from '@angular/router';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { CustomerProfileComponent, DialogElementsDialog } from '.... |
import { Prisma } from "@prisma/client";
import DatabaseLib from "../libs/database.lib";
import { TFetchAllParams } from "../types/indexType";
export type TCreateWriterBody = {
name: string;
};
export type TGetWritersParams = {
term?: string;
};
class WriterRepository {
static writerSelect: Prisma.WriterSelect... |
package com.security.config;
import com.security.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.spring... |
package me.grgamer2626.service.users.registration;
import jakarta.servlet.http.HttpServletRequest;
import me.grgamer2626.model.users.User;
import me.grgamer2626.model.users.roles.Role;
import me.grgamer2626.model.users.roles.RoleRepository;
import me.grgamer2626.model.users.roles.RoleType;
import me.grgamer2626.model.... |
import axios from 'axios';
import React, { useState, useEffect } from 'react';
import ChatBot from 'react-simple-chatbot';
import { ThemeProvider } from 'styled-components';
const Chatbot = () => {
// const [userInput, setUserInput] = useState('');
// const [response, setResponse] = useState('');
// const [isLo... |
package leetcode.editor.cn;
//给定两个由一些 闭区间 组成的列表,firstList 和 secondList ,其中 firstList[i] = [starti, endi] 而
//secondList[j] = [startj, endj] 。每个区间列表都是成对 不相交 的,并且 已经排序 。
//
// 返回这 两个区间列表的交集 。
//
// 形式上,闭区间 [a, b](其中 a <= b)表示实数 x 的集合,而 a <= x <= b 。
//
// 两个闭区间的 交集 是一组实数,要么为空集,要么为闭区间。例如,[1, 3] 和 [2, 4] 的交集为 [2, 3] 。 ... |
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/metrics/structured/key_data_provider_ash.h"
#include "components/metrics/structured/key_data_provider_file.h"
#include "components/metrics/structured/... |
#pragma once
#include <boost/asio.hpp>
#include <functional>
namespace Sim::Common
{
struct ITimer
{
virtual ~ITimer() = default;
virtual void start(std::function<void()> const& callback) = 0;
virtual void stop() = 0;
};
class SimulantTimer : public ITimer
{
public... |
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HomeComponent } from './home/home.component';
import { Ab... |
<!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>TechNews</title>
<!--FontAwesome-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/li... |
# 功能整理
# 基础
## 1、版本错误,版本很多是老的
## 2、路径问题(一定要英文路径)
## 3、包下载、启动
```
flutter packages get
```
```
flutter run
```
## 4、flutter创建
```
flutter create weixin
```
## 5、命名规范问题

## 6、图片自... |
import { useNavigate } from 'react-router-dom';
import useSnackBar from '@/hooks/common/useSnackBar';
import useDeleteRefreshToken from '@/hooks/login/useDeleteRefreshToken';
function WithHooksHOC<F>(Component: React.ComponentType<F>) {
return function Hoc(props: F) {
const { showSnackBar } = useSnackBar();
cons... |
/*
* This file is part of AndroidIDE.
*
* AndroidIDE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* AndroidIDE is di... |
package util;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
import util.HttpRequestUtils.Pair;
import java.util.Map;
public class HttpRequestUtilsTest {
@Test
public void parseQueryString() {
String queryString = "userId=javajigi";
Map<String, String> parameters ... |
package com.procex.procexapp.presentation.screens.client.resumen
import androidx.compose.runtime.getValue
import androidx.compose.runtime.*
import androidx.compose.runtime.setValue
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.procex.procexapp.domain.model.Formulario
import co... |
package com.diplom.creo.ui.kit.input
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.fou... |
import Title from 'components/texts/Title'
import TimeLineItem from './TimeLineItem'
import {timeLineItem} from 'utility/listItems'
import styled from 'styled-components'
import {useEffect, useRef, useState} from 'react'
const AboutTimeLine = () => {
const top = useRef<HTMLDivElement>(null)
const bottom = useRef<H... |
const mocha = require("mocha")
const chai = require("chai")
const utils = require("../utils")
const expect = chai.expect
// NOTE: https://mochajs.org/#arrow-functions
// Passing arrow functions (“lambdas”) to Mocha is discouraged.
// Lambdas lexically bind this and cannot access the Mocha context.
it("should say ... |
import { expect, test } from "@playwright/test";
import { describe } from "node:test";
import { AUTH_MOCK_USER, AUTH_MOCK_USER_UPDATE } from "utils/mockData";
import { loginUser, signupUser } from "./utils/authentication";
describe("User Signup Tests", () => {
test("Signup with valid data: to Dashboard", async ({ pa... |
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
class Persona {
protected $dni;
protected $nombre;
protected $correo;
protected $celular;
public function __construct($dni, $nombre, $correo, $celular) {
$this->dni = $dni;
$this->nomb... |
<?php
/**
* CommentTest class file.
*
* @package HCaptcha\Tests
*/
namespace HCaptcha\Tests\Integration\WPDiscuz;
use HCaptcha\Tests\Integration\HCaptchaWPTestCase;
use HCaptcha\WPDiscuz\Comment;
use Mockery;
use tad\FunctionMocker\FunctionMocker;
/**
* Test Comment class.
*
* @group wpdiscuz
*/
class Commen... |
@extends('layouts.main')
@section('title', $title)
@section('container')
<main id="main" class="main">
<div class="pagetitle">
<h1>Ubah Data Siswa</h1>
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ route('dashboard') }}">Dashboard</a></li>
... |
package iotgin
import (
"bytes"
"encoding/json"
"strings"
"time"
"cloud_platform/iot_common/iotconst"
"cloud_platform/iot_common/iotlogger"
"cloud_platform/iot_common/iotnats/jetstream"
"cloud_platform/iot_common/iotutil"
"github.com/gin-gonic/gin"
)
type AppLog struct {
Id int64 `... |
import CreateProductDto from '@/core/products/dtos/CreateProduct.dto'
import { UpdateProductDto } from '@/core/products/dtos/UpdateProduct.dto'
import Products from '@/core/products/model/Products'
import { ProductsRepository } from '@/core/products/services/repository'
import ProductsModel, { ProductModelProps } from ... |
// React
import { useEffect, useState } from "react";
//React Router Dom
import {
Outlet,
Navigate,
useNavigate,
useRouteLoaderData,
} from "react-router-dom";
//Bootstrap
import Container from "react-bootstrap/Container";
const Home = (props) => {
// let flip = useRef(true); // Controls between creating a... |
module Byebug
module Helpers
#
# Utilities to assist command parsing
#
module ParseHelper
#
# Parses +str+ of command +cmd+ as an integer between +min+ and +max+.
#
# If either +min+ or +max+ is nil, that value has no bound.
#
# @todo Remove the `cmd` parameter. It ... |
/* eslint-disable quotes */
import { MigrationInterface, QueryRunner } from 'typeorm';
export class Default1685407876661 implements MigrationInterface {
name = 'Default1685407876661';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`CREATE TABLE \`employee\` (\`idEmployee\` ... |
/*
* Copyright (c) 2006-2007, AIOTrade Computing Co. and Contributors
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* o Redistributions of source code must retain the above copyrigh... |
package fpoly.namdhph34455.duanmau.fragment;
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appco... |
# Python program to create a simple GUI
# Simple Quiz using Tkinter
import pandas as pd
import numpy as np
import random
import json
#import everything from tkinter
from tkinter import *
# and import messagebox as mb from tkinter
from tkinter import messagebox as mb
#import json to use json file for data
import j... |
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Meo So</title>
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" href="https://use.typekit.net/dec4mzz.css" />
<link... |
package mycompiler.yufa;
import java.util.*;
import mycompiler.cifa.*;
class TokenType /****Token序列的定义*******/
{
int lineshow;
String Lex;
String Sem;
}
/********************************************************************/
/* 类 名 Recursion */
/* 功 能 总程序... |
import { Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs';
// *------- Model -------*/
import { recipeModel } from './../models/recipe.model';
import { ingredient } from '../models/ingredient.model';
// *------- Services -------*/
import { ShoppingListService } from './shopping-list.servi... |
package multiThreading.master.ch02.matrix;
/**
* 从start行到第end行
*
* @author chenyuqun
* @date 2021/1/12 2:33 下午
*/
public class GroupMultiplierTask implements Runnable {
private final double[][] result;
private final double[][] matrix1;
private final double[][] matrix2;
private int startIndex;
... |
import { BadRequestException, Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { EventEmitter2 } from '@nestjs/event-emitter';
import { InjectRepository } from '@nestjs/typeorm';
import axios from 'axios';
import { BaseService } from 'src/base/nestjsx.service';
import { Interna... |
import React from 'react';
import { Switch,Route } from 'react-router-dom';
import './App.css';
import HomePage from './pages/homepage/homepage.component'
import ShopPage from './pages/shop/shop.component'
import Header from './components/header/header.component'
import SignInAndSignUpPage from './pages/sign-in-and-sig... |
import React, { useEffect } from 'react';
import Box from '@mui/material/Box';
import Chip from '@mui/material/Chip';
import Grid from '@mui/material/Grid';
import Stack from '@mui/material/Stack';
import Typography from '@mui/material/Typography';
import Contributors from './contributors';
import ProfilePicture from '... |
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
<link rel="stylesheet" href="viewRooms.css">
</head>
<body>
... |
# frozen_string_literal: true
require "rails_helper"
describe ContactDetailsForm, type: :model do
let(:params) { {} }
let(:trainee) { build(:trainee) }
let(:form_store) { class_double(FormStore) }
subject { described_class.new(trainee, params: params, store: form_store) }
before do
allow(form_store).t... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<title>Document</title>
</head>
<body>
<main>
<header>
<h2 id="head-logo">Header Logo</h2>
... |
Master Data Management (MDM) is a method for defining and managing the critical data of an organization (also known as master data). Master data covers core business entities such as customers, products, employees, suppliers, and these often reside in siloed data repositories even within the same organization. MDM seek... |
package com.project.foodtracker.domain.use_case
import com.project.foodtracker.domain.repository.IFavoritesRepository
import javax.inject.Inject
/**
* Use case for adding a product to favorites.
*
* @property repository The repository to interact with favorites data.
*/
class AddToFavoritesUseCase @Inject constru... |
import 'package:flutter/material.dart';
import 'package:flutter_phone_number_field/flutter_phone_number_field.dart';
import 'package:get/get.dart';
import 'package:lhw/Login_SignUp/Login.dart';
import 'package:pin_code_fields/pin_code_fields.dart';
import '../controllers/signup_controller.dart';
class ForgotPasswordS... |
// IMPORTS ATOMS
import Link from "@/atoms/link/jsx/index.jsx"
import PrimaryButton from "@/atoms/button/primary/jsx/index.jsx"
// IMPORTS REACT
import { useState } from "react"
// IMPORTS FRAMER MOTION
import { motion, AnimatePresence } from "framer-motion"
const Accordion = ( props ) => {
// GET PROPS
con... |
/*
* Copyright (c) 1998-2010 Caucho Technology -- all rights reserved
*
* This file is part of Resin(R) Open Source
*
* Each copy or derived work must preserve the copyright notice and this
* notice unmodified.
*
* Resin Open Source is free software; you can redistribute it and/or modify
* it under the terms o... |
-- Assume you are given the table containing measurement values obtained from a Google sensor over several days. Measurements are taken several times within a given day.
-- Write a query to obtain the sum of the odd-numbered and even-numbered measurements on a particular day, in two different columns. Refer to the Exa... |
## [1663 具有给定数值的最小字符串](https://leetcode.cn/problems/smallest-string-with-a-given-numeric-value/description/)
+ `贪心`
+ Python3
```python
class Solution:
def getSmallestString(self, n: int, k: int) -> str:
ans = ['a'] * n
k -= n
idx = n-1
for i in range(k//25):
... |
from django.db import models
# from .models import Product
# Create your models here.
from django.contrib.auth.models import User
from django.core.validators import MaxValueValidator, MinValueValidator
STATE_CHOICE = (
('Andaman & Nicobar Islands', 'Andaman & Nicobar Islands'),
('Andhra Pradesh', 'Andhra Prades... |
// Copyright (C) 2023, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package builder
import (
"context"
"sync/atomic"
"time"
"github.com/ava-labs/avalanchego/snow/engine/common"
"github.com/ava-labs/avalanchego/utils/math"
"github.com/ava-labs/avalanchego/utils/timer"
"go.ub... |
import {
StyleSheet,
Text,
View,
ImageProps,
Image,
ImageBackground,
} from "react-native";
import React from "react";
const Card = (props: {
avatar: ImageProps;
title: string;
body: string;
imageBackground: ImageProps;
}) => {
const { avatar, title, body, imageBackground } = props;
return (
... |
//
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#pragma once
#include "td/utils/common.h"
#include "td/utils... |
<?php
namespace App\Http\Controllers\CMS;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Auth;
use Spatie\Permission\Models\Role;
use Spatie\Permission\Models\Permission;
use Session;
class PermissionController extends Controller {
public function __construct() {
$this->middlewa... |
import React from "react";
import Snackbar from "@mui/material/Snackbar";
import MuiAlert from "@mui/material/Alert";
import Slide from "@mui/material/Slide";
import { useDispatch, useSelector } from "react-redux";
import { snackbarNotificationClose } from "../../redux/snackbar.action";
// import { snackbarNotification... |
<template>
<div class="container text-center">
<h1 class="text-center">Buy a top-level domain</h1>
<div class="row mt-3">
<div class="col-md-8 offset-md-2">
<p class="text-center">
Punk Domains protocol allows anyone to create and own a top-level domain. As a TLD holder you have complete
... |
/*
* Copyright (c) 2022 Contour Labs, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { ApiProperty } from "@nestjs/swagger";
import {
IsEmail,
IsNotEmpty,
Matches,
MaxLength,
MinLength,
} from "class-validator";
export class CreateForgotPasswordResetTokenDto {
@ApiProperty({ description: "Emai... |
{% extends 'base/base_jp.html' %}
{% load static %}
{% load humanize %}
{% block main_area %}
<script src="{% static 'libs/js/jquery-3.6.3.min.js' %}"></script>
<div class="card mb-4">
<div class="card-body text-center">
<h4><i class="fa fa-shopping-cart mr-2"></i>ショッピングカート</h4>
</div>
</div>
{% incl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.