text stringlengths 184 4.48M |
|---|
import 'dotenv/config'
import { z } from 'zod'
const envSchema = z.object({
NODE_ENV: z.enum(['dev', 'test', 'production']).default('dev'),
SERVER_PORT: z.coerce.number().default(3333),
JWT_SECRET: z.string(),
AWS_REGION: z.string(),
AWS_ACCESS_KEY_ID: z.string(),
AWS_SECRET_ACCESS_KEY: z.string(),
AWS_B... |
import React, { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useHistory } from 'react-router-dom';
import Modal from 'react-bootstrap/Modal';
import Tooltip from 'react-bootstrap/Tooltip';
import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
import { toast... |
// import { useEffect, useState } from "react";
import { useNavigate } from 'react-router-dom';
// components
import Header from '../components/Layout/Header';
import CategoryBox from '../components/RecommendMenu/CategoryBox';
import SelectButton from '../components/Common/SelectButton';
// styles
import classes from... |
import { useAppDispatch, useAppSelector } from 'app/hook';
import UserInfoWrap from 'components/Mypage/UserInfoWrap';
import UserTheme from 'components/Mypage/UserTheme';
import {
useGetUserImageQuery,
useGetUserInfoQuery,
useGetUserThemeQuery,
} from 'features/users/userApi';
import { logout, selectIsLogin } fro... |
import sqlite3
import subscriptionManager
subscription_info = "subscription_info.txt"
# Function to rent a game
def rent_game(database, customer_id, ID):
try:
conn = sqlite3.connect(database)
cursor = conn.cursor()
# Check if the customer exists in the database
cursor.execute("SEL... |
import React, { useEffect, useState } from "react";
import Cart from "../Cart/Cart";
import Youtuber from "../Youtuber/Youtuber";
const Developers = () => {
const [youtubers, setYoutubers] = useState([]);
const [cart, setCart] = useState([]);
useEffect(() => {
fetch("./youtubers.JSON")
.then((res) => ... |
from flask import Flask, render_template,request, redirect,session
import pymysql
import os
from werkzeug.utils import secure_filename
from sms import send_sms
app = Flask(__name__)
app.secret_key = "Strovold19."
APP_ROOT = os.path.dirname(os.path.abspath(__file__))
UPLOAD_FOLDERS = os.path.join(APP_ROOT, "static... |
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSepetUrunTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sepet_urun', ... |
<template>
<v-app>
<div v-if="getCurrentUser.userId !== undefined" >
<v-navigation-drawer
v-model="drawer"
app
>
<v-list-item>
<v-list-item-avatar>
<v-img
src="@/assets/logo.svg"
/>
</v-list-item-avatar>
<v-li... |
# Release Process
This document explains how to create releases in this project in each release scenario.
Currently there are 2 release procedures for this project:
- [Latest Release](#latest-release)
- [Non-Latest Release](#non-latest-release)
## Latest Release
This procedure is used when we want to create new re... |
#! /usr/bin/env python
import csv
import datetime
import json
import subprocess
import sys
import time
from config import MACHINES, WAIT_TIME, BENCHMARKS
def run_benchmarks() -> str:
print("Running benchmarks")
results = {}
for node, values in MACHINES.items():
results[node] = {}
for name... |
import { initialStateType, userInfoType } from "@/types/types";
import { createAsyncThunk, createSlice } from "@reduxjs/toolkit";
import cookie from "js-cookie";
const initialState: initialStateType = {
isAuthenticated: false,
error: null,
isLoading: false,
userCreated: null,
};
export const SignUpAction = cr... |
package murraco.service;
import javax.servlet.http.HttpServletRequest;
import lombok.RequiredArgsConstructor;
import murraco.model.AppUserRole;
import murraco.model.AuthResponse;
import org.springframework.http.HttpStatus;
import org.springframework.security.authentication.AuthenticationManager;
import org.springfram... |
<div *ngIf="identity" class="navigation col-lg-1 col-xs-2">
<h1 class="head-title">
<a [routerLink]="['/']"><span class="glyphicon glyphicon-music" aria-hidden="true"></span>{{title}}</a>
</h1>
<nav id="navigation">
<a [routerLink]="['/artistas', 1]">
<span class="glyphicon glyphicon-star" aria-hidden="true">... |
//
// Vector3.swift
//
//
// Created by David Green on 10/5/20.
//
import Foundation
/// Describes a 3D vector
public struct Vector3: Equatable, Codable, CustomDebugStringConvertible, Hashable {
// MARK: - Static properties
/// Returns a `Vector3` with components `0, 0, 0`.
public static let zero: Ve... |
import Image from 'next/future/image'
import { Container } from '@/components/Container'
import backgroundImage from '@/images/background-faqs.jpg'
const faqs = [
[
{
question: 'What exactly is Userowl?',
answer:
'It’s a widget that you can place on your website or web application. Your user... |
package com.callor.apps.service;
import java.util.Random;
// EvenServiceV1 코드를 복사해온것처럼 사용하겠다. 필요한 일부만 내 방식대로 변환해서 사용하고 싶다.
/*
* 자바프로그래밍에서 상속
* V2 클래스에서는 V1클래슬 상속했다.
* v1에 작성한(선언한) 변수, method 코드를 그대로 이어받아서 사용하겠다.
*
* V1에 작성된 method들의 코드를 그대로 사용하면서 일부 method의 코드를 변경, 확장, 기능개선을 하여
* 내 프로젝트에 적용하겠다. => 상속의 가장 큰 ... |
#!/usr/bin/node
// Define a recursive function to compute factorial
function factorial (n) {
// Base case: factorial of 0 is 1
if (isNaN(n) || n < 0) {
return 1;
} else if (n === 0) {
return 1;
} else {
// Recursive case: n * factorial(n-1)
return n * factorial(n - 1);
}
}
// Get the first a... |
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { Basket, AsteroidsList } from '@/components'
import { OptionDistance } from '@/components/OptionDistance/OptionDistance'
import { useGlobalContext } from '@/features/Context/store'
import { fetchAsteroidList } from '@/shared/api/ro... |
import chess
import pandas as pd
import numpy as np
import gc
import re
import random
import torch
from torch import nn
from torch.nn import functional as F
from torch.utils.data import Dataset, DataLoader
from tqdm import tqdm
import time
NUM_POSITIONS = 50000 # Change this to specify the number of chess positions fo... |
This is an attempt to create more structure for LAMMPS-Tools.
The focus will be much more around the C++ lib and much less around Python.
All data types will be pure C++ and C++ only. Manipulation of them from
Python will only be by passing a pointer to said data structures around to
a C-like interface. This way, the ... |
import { Component, OnInit } from '@angular/core';
import { ApiService } from '../api.service';
import { HttpHeaders, HttpParams } from '@angular/common/http';
import { GoogleAuthService } from 'ng-gapi';
import GoogleUser = gapi.auth2.GoogleUser
import { MyCookieService } from '../cookie.service'
import { NgForm } fro... |
import type { ITag } from '@/components/molecules/TagsInput'
import type { StateCreator } from 'zustand'
import { create } from 'zustand'
export type UserTeamType = {
id: number
team: {
id: number
name: string
}
}
interface UserSlice {
user_id: number
first_name: string
last_na... |
import * as React from 'react';
import {Text, StyleSheet, SafeAreaView, ScrollView, View} from 'react-native';
import CartItem from '../components/CartItem';
import {useCart} from '../shared/contexts/CartContext';
import {Dimensions} from 'react-native';
function Cart(): JSX.Element {
const cartProducts = useCart();... |
import 'package:equatable/equatable.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import '../../data/models/allProducts/all_products.dart';
import '../../data/services/homeServeice/home_serveices.dart';
part 'get_all_prouducts_state.dart';
class GetAllProuductsCubit extends Cubit<GetAllProuductsState> {
... |
import React, { useState, useEffect } from 'react'
import axios from 'axios';
import { Box, IconButton, Paper } from '@mui/material'
import ArrowBackIcon from '@mui/icons-material/ArrowBack'
import { Match, Ticket, MAIN_COLOR, User, DEBUG_SERVER } from '../utils/interfaces'
import TopBar from './TopBar'
import InfoMess... |
package com.starter.starter.service;
import java.util.HashSet;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event... |
#include <iostream>
#include <vector>
#include <list>
// hashtable function
class Ds_hashset{
private:
int table_size = 100;
float occ = 50;
int kmer;
int keys;
std::vector<std::pair<int, char>> table;
public:
// constructor
Ds_hashset(int t_size, float occup, int k);
// acce... |
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-md-12">
<div class="card">
<div class="card-header">Staff Employment History Details</div>
<div class="card-body">
<div class="form-row mt-sm-2">
... |
<div class="panel panel-primary">
<div class="panel-heading m-3">
<h2>Complaints List</h2>
</div>
<button class="btn btn-primary m-3" [routerLink]="[isProd ? '/manager/complaint-add' : '/complaint-add']"><strong>Add complaint</strong></button>
<div class="form-control form-control-lg">
... |
document.getElementById('find-me').addEventListener('click', function() {
const status = document.getElementById('status');
const bakeryLat = 40.50583747622529;
const bakeryLng = -78.38690023678137;
function success(position) {
const userLat = position.coords.latitude;
const userLng = p... |
/*
* Copyright (C) 2024 RollW
*
* 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... |
import Link from "next/link";
import { MdDelete, MdEditSquare } from "react-icons/md";
type Board = {
boardUuid: string;
price: string;
deposit: string;
title: string;
space: string;
};
type Props = {
board: Board;
id: string;
};
const Item = ({ id, board }: Props) => {
return (
<div className="i... |
package cz.judas.jan.advent.year2023
import com.google.common.collect.Range
import cz.judas.jan.advent.Answer
import cz.judas.jan.advent.Constant
import cz.judas.jan.advent.Fraction
import cz.judas.jan.advent.InputData
import cz.judas.jan.advent.Pattern
import cz.judas.jan.advent.SymbolicEquation
import cz.judas.jan.a... |
# coding=utf-8
# coding=utf-8
# Copyright 2019 The RecSim Authors.
#
# 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 ap... |
"""
Test the launcher runs the correct commands given the correct input
"""
from pathlib import Path
from unittest.mock import patch, MagicMock
from click.testing import CliRunner
from duckstore.config import db_name
from duckstore.scripts.launcher import launch
launcher_mod = "duckstore.scripts.launcher"
def te... |
import { useState, ChangeEvent, useEffect } from "react";
import {
StyledContainerModal,
StyledModal,
StyledMessage,
StyledContainerRepos,
StyledContainerSearch,
} from "./style";
import { Input } from "../Input";
import { CardRepository } from "../CardRepository";
import { getStorage, removeStorage } from ".... |
import csv
import matplotlib.pyplot as plt
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
# This function checks if point q1 lies online segment p1,r
# based on the 3 collinear points
def on_segment(p1, q1, r):
if max(p1.x, r.x) >= q1.x >= min(p1.x, r.x) and max(p1.y, r.y) >= q... |
import 'package:flutter/material.dart';
import 'package:explore/app_colors.dart';
import 'package:explore/screens/choose_avatar_screen.dart';
class ChooseRocketScreen extends StatefulWidget {
const ChooseRocketScreen({Key? key}) : super(key: key);
@override
_ChooseRocketScreenState createState() => _ChooseRocke... |
import { useState } from "react";
import { useHabbits } from "../context/HabbitsContext";
import EmojiPicker from "emoji-picker-react";
export default function Popup() {
const { openModal, setOpenModal, onAddHabbit } = useHabbits();
const [title, setTitle] = useState("");
const [step, setStep] = useState("");
... |
//
// ViewController.swift
// Word Garden
//
// Created by Zachary Moelchert on 2/14/21.
//
// App through Week 3 assignment
import UIKit
import AVFoundation
class ViewController: UIViewController {
@IBOutlet weak var wordsGuessedLabel: UILabel!
@IBOutlet weak var wordsMissedLabel: UILabel!
@IBOutlet ... |
import 'package:flutter/material.dart';
import 'package:rosella/models/user.dart';
import 'package:rosella/screens/Orientation/landscape.dart';
import 'package:rosella/screens/Orientation/portrait.dart';
import 'package:rosella/screens/login.dart';
class Home extends StatelessWidget {
const Home({Key? key}) : super(... |
package org.caicoders.domain.internet;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
public class InternetSpeed implements II... |
package com.palcas.poker.persistance;
import com.fasterxml.jackson.core.JsonParseException;
import com.palcas.poker.persistance.account.Account;
import com.palcas.poker.persistance.account.AccountRepository;
import com.palcas.poker.persistance.account.JacksonAccountRepository;
import com.palcas.poker.persistance.const... |
// Dart imports:
// Package imports:
import 'package:bloc/bloc.dart';
import 'package:equatable/equatable.dart';
import 'package:flowerstore/data/api_error.dart';
import 'package:flowerstore/data/datasource/invoice/invoice_datasource.dart';
import 'package:meta/meta.dart';
// Project imports:
import 'package:flowerst... |
//重建二叉树
/**
* Definition for a binary tree node.
* function TreeNode(val) {
* this.val = val;
* this.left = this.right = null;
* }
*/
/**
* 关于slice,slice返回的是新的数组,end不包括在内
*
*
* @param {number[]} preorder
* @param {number[]} inorder
* @return {TreeNode}
*/
var buildTree = function (preorder, inord... |
import React, { useState } from 'react';
import '../stylesheets/login.css';
import {useNavigate} from 'react-router-dom';
async function loginUser(credentials) {
return fetch('/api/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(credentials)
})
... |
#' Covariate-Adjusted-Sparse-Matrix-completion
#' Fit function
#'
#' @param y A sparse matrix of class Incomplete.
#' @param X covariate matrix
#' @param svdH (optional) A list consisting of the SVD of the hat matrix. see reduced_hat_decomp function.
#' @param Xterms (optional) A list of terms computed using GetXterms ... |
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import { Providers } from "@mussia33/node/shared";
export interface NetworkResourceProps {
region: string;
project: string;
provider?: Providers;
}
export class NetworkResource extends pulumi.ComponentResource {
constructor(
nam... |
import React, { ChangeEvent } from 'react';
import Select from '@components/UI/Select/Select.tsx';
import SearchField from '@components/UI/SearchField/SearchField.tsx';
import { useAppDispatch, useAppSelector } from '@/hooks/store.ts';
import {
setActiveCategory,
setActiveSorter,
setSearchQuery,
setStar... |
//
// MusicListViewCell.swift
// MusicPlayer
//
// Created by Nanda Wisnu Tampan on 20/09/21.
//
import Api
import UIKit
import Kingfisher
class MusicListViewCell: UITableViewCell {
// MARK: - Properties
var isPlaying = false
lazy var songNameLabel: UILabel = {
let view = UILabel()
... |
//
// CalendarDayCell.swift
// SobokSobok
//
// Created by taehy.k on 2022/01/15.
//
import UIKit
import FSCalendar
import SwiftUI
enum FilledType: Int {
case none
case all
case some
case today
}
enum SelectedType: Int {
case not
case single
}
final class CalendarDayCell: FSCalendarCell {... |
syntax = "proto3";
package proto;
option go_package = "github.com/ramyadmz/goauth/services/auth/pkg/pb";
message RegisterUserRequest{
string username = 1;
string password = 2;
string email = 3;
}
message RegisterUserResponse{
}
message UserLoginRequest{
string username = 1;
string password = 2;... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package javasorttest;
import java.util.Arrays;
import java.util.Scanner;
/**
*
* @author 18323
*/
public class JavaSortTest {
... |
<nav class="navbar navbar-expand-lg navbar-light bg-light font-weight-light">
<div class="container-fluid">
<%= link_to root_path, class: 'navbar-brand' do %>
<%= image_tag("logo/logo.png") %> TutorNow
<% end %>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#... |
package com.grl.propietaryapptfg.ui.components
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
i... |
import { component$, useStylesScoped$ } from "@builder.io/qwik";
import constructChallengeModifierFullText from "~/util/constructChallengeModifierFullText";
import DayButtons from "./dayButtons";
import styles from "./dayViewer.css?inline";
import DayNavigationButtons from "./dayNavigationButtons";
export interface Da... |
import React, { useState, useEffect } from 'react'
import PropTypes from 'prop-types'
import Footer from '../components/molecules/footer/footer'
import Header from '../components/molecules/header/header'
import { withPrefix } from 'gatsby'
import { isIOS, isAndroid } from 'react-device-detect'
import BreadCrumb from '.... |
import { React, useState, useEffect } from "react";
import Button from "@mui/material/Button";
import { Box } from "@mui/system";
import { DataGrid, gridClasses } from "@mui/x-data-grid";
import styles from "./style.module.css";
import { YMaps, Map, Placemark } from "react-yandex-maps";
import { api } from "../../../ax... |
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class SociedadAnonima extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sociedades_anonimas';
/**
* The attributes that should be hidden for arrays.
*
* ... |
#include <stdio.h>
#include <math.h>
#include <time.h>
#include "shared_array.h"
#include "initialize_array.c"
long long int mov=0;
long long int comp=0;
void bublesort(int A[], int n){ //algoritmo simple y estable, porque compara siempre 2 posiciones
int i, j, aux, troca;
for (i=0; i < n-1; i++){ //lazo... |
package com.example.metricscalculator;
import android.content.Intent;
import android.os.Bundle;
import android.view.Gravity;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.google.android.material.floatingac... |
<template>
<div>
<div class="mx-md-3 pb-2">
<div class="card px-3 pt-3 pb-4 mx-md-4">
<div class="px-3">
<div class="heading pb-2">
<img src="~/assets/icons/placeholder-icon.svg" alt class="mr-2" />
<h6 class="subheading d-inline-block">PERSONAL INFORMATION</h6>
... |
<!DOCTYPE html>
<html>
<head>
<style>
.large {
/*This class named "large" is defined with the specified styling*/
font-size: 200%;
text-align: right;
}
.center {
/*This center class is defined with the specified styling*/
text-ali... |
package com.burakozkan138.cinemabookingsystem.controller;
import java.util.List;
import org.apache.coyote.BadRequestException;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springfra... |
package com.scottlogic.filters;
import com.scottlogic.UserPost;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.util.Arrays;
import java.util.List;
import static org.junit.jupiter.api.Assertions.*;
class OrFilterTe... |
import { Link, useNavigate } from "react-router-dom";
import bg from "../assets/others/authentication.png";
import im from "../assets/others/authentication2.png";
import { useForm } from "react-hook-form";
import { useAuth } from "./../Hooks/useAuth";
import { GoogleLogin } from "../Component/GoogleLogin";
import Swal ... |
import 'package:awesome_dialog/awesome_dialog.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'dart:convert';
import 'package:log/core/constants/app_contants.dart';
import 'package:log/presentation/providers/auth_provider.dart';
import 'package:provider/provider.dart';
c... |
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
class CachedImage extends StatelessWidget {
CachedImage(
{super.key,
required this.imageUrl,
this.borderRadius,
this.boxFit,
this.width,
this.height});
final String imageUrl... |
#include "Router.hpp"
#include <map>
#include <string>
#include <Poco/URI.h>
#include <Poco/Net/HTTPResponse.h>
#include <Poco/Net/HTTPServerRequest.h>
#include <Poco/Net/HTTPServerResponse.h>
#include "RouteId.hpp"
struct Router::Impl
{
std::map<RouteId, handler_type> routes;
};
void Router::add(const std::str... |
import { Edit, Delete } from '@mui/icons-material'
import { ReactNode } from 'react'
import { MenuItems } from '../../components/DataTable/components/MenuItems'
import { ColumnProps } from '../../components/DataTable/types'
export type DataTableMenuItems = {
title: string
icon: ReactNode
onClick?: (evt?: any) =>... |
// Package main runs the MJS in Kubernetes controller
// Copyright 2024 The MathWorks, Inc.
package main
import (
"controller/internal/config"
"controller/internal/controller"
"controller/internal/logging"
"errors"
"flag"
"fmt"
"os"
"os/signal"
"syscall"
"go.uber.org/zap"
)
func main() {
config, err := lo... |
'use strict'
/** @type {import('@adonisjs/lucid/src/Schema')} */
const Schema = use('Schema')
class AlbumsSchema extends Schema {
up() {
this.create('albums', (table) => {
table.increments()
table
.integer('account_id')
.notNullable()
.unsigned()
.references('id')
... |
import offer from "../assets/offer.png";
import { motion } from "framer-motion";
const SpecialOffer = () => {
return (
<section className="my-36">
<div className="flex flex-col-reverse lg:flex-row gap-14">
<motion.div
initial={{ translateX: -50 }}
animate={{ translateX: 100 }}
... |
//
// ContentView.swift
// Recipe List App
//
// Created by Christopher Ching on 2021-01-14.
//
import SwiftUI
struct RecipeListView: View {
// Reference the view model
@EnvironmentObject var model: RecipeModel
var body: some View {
NavigationView {
ScrollView{
... |
import React, { useState } from "react";
import { FaUser, FaHeart, FaSearch } from "react-icons/fa";
import Modal from "react-modal";
import "react-datepicker/dist/react-datepicker.css";
import "./ProjectPage.css";
import Result from "../../Components/common/Result/Result";
Modal.setAppElement("#root");
const Semanto... |
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');
@import url("utilities.css");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-color: var(--white-color);
color: var(--black-color);
font-family: "Open Sans", sans-serif;
... |
import { Request, Response } from 'express';
import createHttpError from 'http-errors';
import Collection, { ICollection } from '../models/collection.model';
import { IVendor } from '../models/vendor.model';
export const createCollection = async (req: Request, res: Response) => {
try {
if (!(req.user as IV... |
<!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">
<link rel="stylesheet" href="CSS/styling.css">
<!-- add google font -->
<link rel="preconnect" href="https... |
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using WebChoThueXe.Models;
using WebChoThueXe.Repository;
namespace WebChoThueXe.Areas.Admin.Controllers
{
[Area("Admin")]
... |
import * as S from './style';
import * as I from '../../assets/svg';
import { Link, useNavigate } from 'react-router-dom';
import Input from 'components/Common/Input';
import { useForm } from 'react-hook-form';
import { SigninInterface } from 'types/auth';
import { useState } from 'react';
import auth from 'api/auth';
... |
package br.com.cadsma.gestormobileapi.entities;
import br.com.cadsma.gestormobileapi.entities.pks.SetorPk;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.p... |
/*
* Copyright 2021-2023 Nickid2018
*
* 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 agree... |
---
uid: mvc/overview/older-versions/getting-started-with-aspnet-mvc4/adding-a-controller
title: 新增控制器 |Microsoft Docs
author: Rick-Anderson
description: 注意:本教學課程的更新版本可在這裡使用 ASP.NET MVC 5 和 Visual Studio 2013。 更安全、更容易遵循和示範 。
ms.author: riande
ms.date: 08/28/2012
ms.assetid: 0267d31c-892f-49a1-9e7a-3ae8cc12b2ca
msc.lega... |
import React from 'react';
import { Route, Routes } from 'react-router-dom';
import './scss/app.scss';
import Downloading from './components/Downloading';
import Home from './pages/Home';
import Header from './components/Header';
const Cart = React.lazy(() => import(/*webpackChunkName: "Cart" */ './pages/Cart'));
con... |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function ... |
import { Route, Routes } from "react-router-dom";
import Layout from "./components/Layout";
import Home from "./pages/Home";
import About from "./pages/About";
import Courses from "./pages/Courses";
import OurTeam from "./pages/OurTeam";
import Contact from "./pages/Contact";
import Register from "./pages/Register";
im... |
import { Optional } from "./../types/optional";
import { Log } from "./log";
export abstract class FullscreenUtils {
public static async toggle(): Promise<void> {
try {
const element = document.getElementsByTagName("canvas")[0];
const fullscreenEnabled = window.getPrefixedProperty<boolean>(document, "fullscr... |
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
import { Dish } from "../../../interfaces/dish";
import { DishesInfoService } from "../../../services/dishes-info.service";
@Component({
selector: 'app-filters',
templateUrl: './filters.component.html',
styl... |
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import { AxiosError, AxiosResponse } from 'axios';
import axios from 'utils/axios';
import { Thunk } from 'redux/store';
import { Search } from 'interfaces';
const initialState: Search = {
searchUser: []
};
const searchSlice = createSlice({
name: 'se... |
class Solution {
// Function to determine if a list of integers contains any duplicates
bool containsDuplicate(List<int> nums) {
// Create an empty set to efficiently track unique elements
Set<int> seenNumbers = {};
// Iterate through each number in the list
for (int n in nums) {
// If the nu... |
import isEmpty from "lodash/isEmpty";
import { ref } from "vue";
import { useRoute } from "vue-router";
import {
CATEGORIES,
FIRST_PAGE,
MOVIE_DISCOVER_URL,
TRENDING_MOVIE_URL,
TRENDING_TV_URL,
TV_DISCOVER_URL,
SEARCH_TV_BY_TITLE,
SEARCH_MOVIE_BY_TITLE,
} from "@/constants";
/**
* Custom composition ... |
<?php
namespace Magpie\Routes;
use Exception;
use Magpie\General\Names\CommonHttpStatusCode;
use Magpie\General\Traits\StaticCreatable;
use Magpie\HttpServer\Concepts\WithHeaderSpecifiable;
use Magpie\HttpServer\Request;
use Magpie\HttpServer\Response;
use Magpie\Routes\Concepts\RouteHandleable;
use Magpie\Routes\Con... |
// components/ListComponent.tsx
import React from 'react';
import styles from './ListComponent.module.css';
interface ListItem {
id: number;
value: string;
}
interface ListComponentProps {
items: ListItem[];
onRemoveItem: (itemId: number) => void; // Add this line
}
const ListComponent: React.FC<ListCompone... |
using System;
namespace Delegates_Observer
{
public delegate void MyDelegate(object o);
class Source
{
public event MyDelegate Run;
public void Start()
{
Console.WriteLine("RUN");
if (Run != null) Run(this);
}
}
class Observer1 // Наблюдатель ... |
import { useMutation, useQueryClient } from '@tanstack/react-query';
import { AxiosError } from 'axios';
import toast from 'react-hot-toast';
import {
addFavouriteRecipe,
deleteFavouriteRecipe,
} from '../services/recipesApi';
const useFavouriteRecipes = () => {
const queryClient = useQueryClient();
const {
... |
#ifndef FCG_TRAB_FINAL_MODEL_H
#define FCG_TRAB_FINAL_MODEL_H
#include "glm/vec4.hpp"
#include "LoadedObj.h"
#include "SceneObject.h"
#include "Camera.h"
#include <string>
class Model {
private:
// Características do modelo
glm::vec3 scale;
std::string name;
LoadedObj obj;
... |
//
// AppointmentItemModel.swift
// QuickMeet
//
// Created by Bozidar Labas on 06.02.2024..
//
import Foundation
struct AppointmentItemModel {
var id: UUID
let details: String
let date: Date
let time: Date
let location: String
var saveToCalendar: Bool = false
var addNotification: ... |
(ns backend.user.read.user-read-test
(:require [ring.mock.request :as mock]
[datomic.api :as d]
[backend.support.db :refer :all]
[backend.router :refer :all]
[midje.sweet :refer :all]
[backend.test-support :refer :all]
))
(defn- create-request
... |
import { FALLBACK_SEO } from "./constants";
export const getMetaFromVideo = (
videoName = "",
subcategory = "",
subfolder = null
) => {
if (!subfolder) {
return {
title: `${videoName} | Cannabis Product and Strain Reviews, Tips and Recommendations | Moodi Day`,
description: null,
};
}
s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.