text stringlengths 184 4.48M |
|---|
package pl.niewadzj.moneyExchange.api.currencyAccount;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.GetMapping;
import org.springfram... |
package sectional.springsectional.aop;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.transaction.PlatformTransactionManager;
import o... |
import SideMenuAccountItem, { type SideMenuAccountItemProps } from './side-menu-account-item';
import { Meta, StoryObj } from '@storybook/react';
import { action } from '@storybook/addon-actions';
export default {
title: 'components/common/SideMenuAccountItem',
component: SideMenuAccountItem,
} as Meta<typeof Side... |
# week 1
# gm1 checkpoint system and lives 7
# bh1 scrolling background 4/3 - add extension
# bh2 destroy some rock obstacles - edit tilemap then code 3
# bh3 animate lava tiles 2/3
# week 2
# gm2 moving platforms 6 place on tilemap
# bh4 sharks that swin across the screen 6
# bh5 new level 4 - make tilemap
# bh6 leve... |
import 'dart:math';
class Solution {
int search(List<int> nums, int target) {
final minPoint = findMin(nums);
final left = binarySearch(nums, target, 0, minPoint - 1);
final right = binarySearch(nums, target, minPoint, nums.length - 1);
return max(left, right);
}
int findMin(List<int> nums) {
... |
#include "PolyACalculator.h"
#include "utils/sequence_utils.h"
#include <edlib.h>
#include <spdlog/spdlog.h>
#include <algorithm>
#include <array>
#include <cmath>
#include <limits>
#include <utility>
namespace {
struct SignalAnchorInfo {
// Is the strand in forward or reverse direction.
bool is_fwd_strand... |
<template>
<div class="home" style="width: 60%; margin-left: 20%">
<img alt="Vue logo" src="../assets/logo.png" />
<!-- <HelloWorld msg="Welcome to Your Vue.js App"/> -->
<p>{{ res }}</p>
<input v-model="text" />
<button @click="send()">发送</button>
</div>
</template>
<script>
// @ is an alias t... |
<template>
<div class="login">
<div class="loginidex">
<div>
<el-card class="logincard">
<div class="text">
<el-text class="title">登陆</el-text>
</div>
<el-card class="userinfo">
<el-input v-model="userinfo.name" placeholder="请输入用户名"/>
<el-input
... |
import Foundation
// トークンの種類を表す列挙型
enum TokenKind {
case punct(String)
case number(Int)
case eof
}
// トークンの構造体
struct Token {
let kind: TokenKind
let start: String.Index
let end: String.Index
}
// トークン化エラーのレポートとプログラムの終了
func error(_ message: String) -> Never {
fputs(message + "\n", stderr... |
import React from 'react'
import Box from "@mui/material/Box";
import IconButton from "@mui/material/IconButton";
import Typography from "@mui/material/Typography";
import MenuIcon from "@mui/icons-material/Menu";
import CarRentalIcon from "@mui/icons-material/EventAvailableSharp";
import { Toolbar } from '@mui/materi... |
const { model, Schema } = require("mongoose");
const { STATUS_ORDER } = require("../constants/status");
const DOCUMENT_NAME = "Order";
const COLLECTION_NAME = "Orders";
const orderSchema = new Schema(
{
order_user: { type: Schema.Types.ObjectId, ref: "User", required: true },
order_checkout: { type: Object,... |
import cx from 'classnames';
import { useFormik } from 'formik';
import Head from 'next/head';
import { useRouter } from 'next/router';
import { useEffect, useRef, useState } from 'react';
import { FaDownload, FaPlus } from 'react-icons/fa';
import { AccessControl } from '../app-state/accessControl';
import API_PATHS f... |
#include "main.h"
/**
* _strncat - concatenates n bytes from a string to another
* @dest: destination string
* @src: source string
* @n: number of bytes of str to concatenate
*
* Return: a pointer to the resulting string dest
*/
char *_strncat(char *dest, char *src, int n)
{
int c, j;
c = 0;
j = 0;
while ... |
// Copyright 2023 The Cross-Media Measurement 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 applic... |
<!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>Personal Portfolio</title>
<script
src="https://kit.fontawesome.com/81f1467af6.js"
cr... |
from pathlib import Path
from typing import List, Optional
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain_core.documents import Document
from logger import get_logger
from models.databases.supabase.supabase import SupabaseDB
from models.settings import get_supabase_db
from modules.br... |
<?php
namespace Drupal\Tests\test_helpers_example\Kernel;
use Drupal\Core\Datetime\Entity\DateFormat;
use Drupal\node\Entity\Node;
use Drupal\node\Entity\NodeType;
use Drupal\Tests\field\Kernel\FieldKernelTestBase;
use Drupal\test_helpers_example\Controller\TestHelpersExampleController;
use Drupal\user\Entity\User;
... |
@extends('layouts.app')
@section('content')
<div class="container register-container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header text-center px-4 py-3">
<h5 class="mb-0">Register your account an... |
import kotlin.math.abs
import kotlin.math.min
import kotlin.math.sqrt
import kotlin.random.Random
typealias Point = Vector
typealias Color = Vector
data class Vector(var x: Double, var y: Double, var z: Double) {
constructor() : this(0.0, 0.0, 0.0)
operator fun unaryMinus() = Vector(-x, -y, -z)
operator... |
import './App.css';
import React, {createContext, useEffect, useState} from 'react';
import Main from "../Main/Main";
import {BrowserRouter, Route, Routes} from "react-router-dom";
import Login from "../Login/Login";
import Register from "../Register/Register";
import Profile from "../Profile/Profile";
import Movies fr... |
/**
* @file JsonSerializer.h
* @author Thomas Saquet, Florent Poinsaut
* @date
* @brief File containing example of doxygen usage for quick reference.
*
* Alert - API is a part of the Alert software
* Copyright (C) 2013-2017
*
* This program is free software; you can redistribute it and/or modify
* it under t... |
import 'package:fitness_app/common_widget/round_gradient_button.dart';
import 'package:fitness_app/view/dashboard/dashboardScreen.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../widgets/app_colors.dart';
class WelcomeScreen extends StatelessWidget {
static Strin... |
import os
import cv2
from skimage.metrics import structural_similarity
def ssim(frame1, frame2):
"""Calculate Structural Similarity (SSIM) between two frames"""
frame1 = cv2.cvtColor(frame1, cv2.COLOR_BGR2GRAY)
frame2 = cv2.cvtColor(frame2, cv2.COLOR_BGR2GRAY)
frame1 = cv2.resize(frame1, (512, 512))
... |
import { RequestType } from "../../infrastructure/constant/RequestType";
import { config } from "../../application/variable/Config";
import type { RequestTypeImpl } from "../../interface/RequestTypeImpl";
interface Object {
type: RequestTypeImpl;
name: string;
path: string;
cache: boolean;
class: s... |
document.getElementById('input-form').addEventListener('submit', function(event) {
event.preventDefault();
// Get form data
const formData = new FormData(event.target);
const city = formData.get('city');
const totalFunding = parseFloat(formData.get('total-funding'));
const yearFounded = parseIn... |
package com.almostreliable.lib.datagen.recipe;
import com.almostreliable.lib.item.IngredientStack;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import net.minecraft.data.recipes.FinishedRecipe;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import net.minec... |
import React, { useEffect, useState } from 'react'
import Navbar from './Navbar'
import Footer from './Footer'
import { UserAuth } from '../contexts/AuthContext'
import { db } from '../firebase'
import { updateDoc, doc, onSnapshot } from 'firebase/firestore'
import { Link } from 'react-router-dom'
const Account = ()... |
/*
Copyright (c) 2014 Marco Martin <mart@kde.org>
Copyright (c) 2014 Vishesh Handa <me@vhanda.in>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is ... |
/* eslint-disable no-unused-vars */
import React, { useState } from "react";
import ImageProductOne from "../images/image-product-1.png";
import ImageProductTwo from "../images/image-product-2.jpg";
import ImageProductThree from "../images/image-product-3.jpg";
import ImageProductFour from "../images/image-product-4.jp... |
# Software Engineering Lab 3: Unity Simulation
Welcome to our Unity project used in simulating the RL environment our agent will be trained on in order to learn to fold a piece of fabric. The project itself consists of a number of components, separated using different namespaces. For the interaction between Unity and ... |
<h3>Add Hotel Room</h3>
<form action="hotel/add_room.php" method="POST">
<div class="form-group">
<label for="roomDescription">Description</label>
<input type="text" class="form-control" id="roomDescription" name="roomDescription" required>
</div>
<div class="form-group">
<label for=... |
/*
* Copyright 2020-2023 IEXEC BLOCKCHAIN TECH
*
* 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 la... |
<div class="mainContent">
<div class="subLContent">
<div class="header">
Categoies
</div>
<div *ngFor="let cat of categories; let index = index" class="element">
<!-- <span
[ngClass]="{ selectedCat: selectedCatId === cat.Id }"
(click)="selectedCatId = cat.Id"
>{{ cat.na... |
import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import {
Router,
RouterLink,
RouterModule,
RouterOutlet,
} from '@angular/router';
import { HousingService } from '../housing.service';
import { Listing } from '../listing';
import {
FormControl,
FormGroup,
Reactive... |
import { ExtendedRoutesConfig, ExtendedSpecConfig, generateRoutes, generateSpec } from 'tsoa'
import { getEnv } from '../src/utils/get-env'
const HOST = getEnv('HOST', 'string', 'localhost')
const PORT = getEnv('PORT', 'number', 9000)
const globalOp = {
entryFile: 'src/main.ts',
controllerPathGlobs: ['src/contro... |
@page "/student/save"
@page "/student/save/{Id:int}"
@inherits Bases.StudentInfo.StudentSaveBase
@if(Id == null)
{
<h3>Add New Student</h3>
}
else
{
<h3>Edit @student.Name</h3>
}
<br />
<hr />
<a href="student/list" class="btn btn-info">Back</a>
<EditForm Model="@student" OnValidSubmit="HandleValidSubmit">
... |
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable, catchError, of, throwError } from 'rxjs';
import { Country } from '../interfaces/Country.interface';
import { City } from '../interfaces/City.interface';
import { Weather } from '../interfaces/Weather.int... |
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<meta http-equ... |
var express = require('express');
var router = express.Router();
var promocionesModel = require('../../models/promocionesModel');
var util = require('util');
var cloudinary = require('cloudinary').v2;
const uploader = util.promisify(cloudinary.uploader.upload);
const destroy = util.promisify(cloudinary.uploader.destro... |
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Model;
use App\Models\Document;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Document>
*/
class DocumentFactory extends Factory
{
/**
* Define the model's... |
window.onload = () => {
let search = document.getElementById("usernameForm");
search.addEventListener("submit", searchUser);
}
const searchUser = (event) => {
event.preventDefault();
let nameInput = event.target.querySelector("#usernameInput").value;
let response;
fetch('https://api.github.com... |
using BindOpen.Kernel.Data;
using BindOpen.Kernel.Logging.Tests;
using NUnit.Framework;
using System.IO;
using System.Linq;
namespace BindOpen.Kernel.Logging
{
[TestFixture, Order(400)]
public class IOTests
{
private readonly string _filePath_xml = GlobalVariables.WorkingFolder + "Log.xml";
... |
package com.zimbra.cs.service.util;
import com.zimbra.common.util.StringUtil;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
/**
* Utility class for parsing Content-Disposition headers following RFC-6266 specifications. This
* class provides methods to extract filenames from Content-Dispositi... |
<template lang="pug">
.applications
TableDisplaySettings(
:sort_select_items="sort_select_items"
@input_search="onSearchInput( { $event } )"
@sort_select_change="handlers().onSortSelectChange( { $event } )"
)
.table-applications
.table-list-style
v-data-table(
:headers="headers"
... |
import { useEffect, useState } from 'react'
import { KTSVG } from '../../../../_metronic/helpers'
import { useForm } from "react-hook-form";
import { yupResolver } from "@hookform/resolvers/yup";
import * as yup from "yup";
import { ContributorModel, UpdateRoleContributorMutation, optionsRoles } from '../core/_models';... |
import { FC, useState } from 'react'
import classes from './Layout.module.scss'
import editBtn from '../../assets/icons/edit.svg'
import ToggleIcon from '../../assets/icons/nav-toggle.svg'
import quitBtn from '../../assets/icons/quit.svg'
import SettingsIcon from '../../assets/icons/settings.svg'
import testAvatar fr... |
@extends('layout')
@section('metaTitle', 'Key areas')
@section('metaDesc', preg_replace( "/\r|\n/", "", strip_tags('TEKTELIC is a premier provider of Best-in-Class IoT Gateways and Devices. Utilizing the LoRaWAN® technology, TEKTELIC prides itself on building hardware designed for Carrier-Grade performance, reliability... |
<?php
namespace App\Http\Controllers\Assets;
use App\DataTransferObjects\Assets\AssetData;
use App\Excels\Assets\Asset as AssetsAsset;
use App\Helpers\CarbonHelper;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Http\Requests\Assets\AssetRequest;
use App\Http\Requests\Assets\ImportRequest;
use A... |
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Session;
class LocalMiddleware
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next... |
from synthesizer.preprocess import preprocess_dataset
from synthesizer.hparams import hparams
from utils.argutils import print_args
from pathlib import Path
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Procesa archivos de audio de conjuntos de datos, los codific... |
import { Router, Response, Request } from 'express';
import { PrismaClient } from '@prisma/client';
const router = Router();
const prisma = new PrismaClient();
//GET /test/add/[address]
router.get('/add/:address', (req: Request, res: Response) => {
createUser(req.params.address)
.then((result) => {
res.js... |
package com.example.zelda.scene;
import com.example.zelda.engine.GObject;
import com.example.zelda.engine.Game;
import com.example.zelda.engine.Scene;
import com.example.zelda.items.GuiHeart;
import com.example.zelda.items.GuiRupee;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.... |
# -*- coding: utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
# Copyright (c) 2012 dput authors
#
# 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 Software Foundation; either version 2 of the License... |
#!/bin/bash
# NFS health monitor plugin for Nagios
#
# Written by : Steve Bosek (steve.bosek@gmail.com)
# Release : 1.0rc4
# Creation date : 8 May 2009
# Revision date : 7 Oct 2012
# Package : BU Plugins
# Description : Nagios plugin (script) to NFS health mon... |
package com.persival.realestatemanagerkotlin.data.local_database.property_with_photos_and_pois
import androidx.room.Embedded
import androidx.room.Relation
import com.persival.realestatemanagerkotlin.data.local_database.photo.PhotoEntity
import com.persival.realestatemanagerkotlin.data.local_database.point_of_interest.... |
const { Usuario, Producto, Categoria } = require("../models");
const {ObjectId} = require("mongoose").Types;
const coleccionesPermitidas = [
"categoria",
"productos",
"roles",
"usuarios",
];
const buscarCategorias = async (termino,res)=>{
const isMongoId = ObjectId.isValid(termino);
if(isMongoI... |
package io.github.ilnurnasybullin.math.mip;
import io.github.ilnurnasybullin.math.simplex.FunctionType;
import io.github.ilnurnasybullin.math.simplex.Simplex;
import io.github.ilnurnasybullin.math.simplex.SimplexAnswer;
import java.util.concurrent.locks.ReentrantLock;
class SingleAnswerAccumulator implements Answers... |
#Region Movement
;~ Description: Move to a location.
Func Move($aX, $aY, $aRandom = 50)
;returns true if successful
If GetAgentExists(-2) Then
DllStructSetData($mMove, 2, $aX + Random(-$aRandom, $aRandom))
DllStructSetData($mMove, 3, $aY + Random(-$aRandom, $aRandom))
Enqueue($mMovePtr, 16)
Return True
Else
... |
<!DOCTYPE html>
<html lang="en">
{% load static %}
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>wh.gg</title>
<meta content="" name="description">
<meta content="" name="keywords">
<!-- Favicons -->
<link href="{% static 'summoner_dashboar... |
package org.fawry.Week5.DesignPattern3.Task3.singletonLogger;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.time.LocalDateTime;
public class logger {
private static logger instance;
FileWriter fileWriter;
private logger() {
File file = new File("./src/mai... |
'use client';
import * as z from 'zod';
import { zodResolver } from '@hookform/resolvers/zod';
import { useForm } from 'react-hook-form';
import axios from 'axios';
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog';
import {
For... |
// final welcome = welcomeFromJson(jsonString);
import 'dart:convert';
Welcome welcomeFromJson(String str) => Welcome.fromJson(json.decode(str));
String welcomeToJson(Welcome data) => json.encode(data.toJson());
class Welcome {
List<Value> value;
Welcome({
required this.value,
});
fact... |
import tkinter as tk
from ast import main
from tkinter import *
from tkinter import messagebox as mess
from tkcalendar import DateEntry
from datetime import date
from mysql.connector import Error
import mysql.connector
import pyzbar
import numpy as np
import cv2
from pymysql import*
import xlwt
import pandas.io.sql as ... |
package com.example.newappdi.api_calling.DI
import com.example.newappdi.api_calling.DI.Network.APICallServices
import com.example.newappdi.api_calling.DI.Network.ErrorResponse
import com.example.newappdi.api_calling.DI.Network.Response
import com.example.newappdi.api_calling.DI.Network.SuccessResponse
import com.examp... |
import GithubService from "@/services/GithubService";
import { useCallback, useEffect, useState } from "react";
interface userGithubIssueByIdProps {
id: number;
body: string;
updated_at: string;
title: string;
html_url: string;
comments: number;
user: {
login: string;
}
}
export function useGetUse... |
6/8
<!DOCTYPE html>
<html>
<head>
<title> Practice makes perfect! </title>
<link type='text/css' rel='stylesheet' href='style.css'/>
</head>
<body>
<p>
<!-- Your code here -->
<?php
//creating a class
class Dog {
//creating publics
public $numLeg... |
package handler
import (
"log"
"net/http"
"time"
"github.com/labstack/echo-contrib/session"
"github.com/labstack/echo/v4"
"github.com/RaivoKinne/Friends/internal/database"
"github.com/RaivoKinne/Friends/internal/database/model"
"github.com/RaivoKinne/Friends/utils"
"github.com/RaivoKinne/Friends/web/templat... |
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import {MatButtonModule} from '@angular/material/button';
import {MatFormFieldModule} from... |
import React, { useState } from "react";
import classNames from "classnames";
import { Outlet, useLocation, useNavigate } from "react-router";
import { useSelector } from "react-redux";
import { FormattedMessage } from "react-intl";
import { NavLink } from "react-router-dom";
import { AnimatedLogo } from "../Anim... |
const { response } = require("@hapi/hapi/lib/validation");
const { nanoid } = require('nanoid');
const books = require('./books');
// Menambahkan Buku
const addBook = (request, h) => {
const {
name, year, author, summary, publisher, pageCount, readPage, reading, } = request.payload;
if (!name) {
const res... |
<template>
<div id="app">
<list-images :photos="photos" @select="selectIndex"/>
<slider :photos="photos" :index="index"/>
</div>
</template>
<script>
import ListImages from './components/ListImages.vue'
import Slider from './components/Slider.vue'
export default {
data () {
return {
photos: ['... |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
# class Solution:
# def widthOfBinaryTree(self, root: Optional[TreeNode]) -> int:
# if not root:
# retur... |
import { useAddress, useSDK } from "@thirdweb-dev/react";
import { useWeb3Context } from "context/web3Context";
import { BigNumber } from "ethers";
import { useQuery, UseQueryOptions } from "react-query";
export type Balance = {
symbol: string;
value: BigNumber;
name: string;
decimals: number;
displayValue: ... |
import CGPIOD
public enum MonitorType {
case continuus
case event
}
public enum GPIOError: Error {
case openChipFailure
case getLineFailure
case lineRequestInputFailure
case streamFailure
case getValueFailed
case triedReadingFromOutputPin
}
public enum GPIODirection {
case input(M... |
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#if WITH_VERSE_VM || defined(__INTELLISENSE__)
#include "Containers/StringFwd.h"
#include "HAL/Platform.h"
#include "Misc/EnumClassFlags.h"
class FString;
namespace Verse
{
struct FAllocationContext;
struct VCell;
struct VEmergentType;
struct VInt;
st... |
// SPDX-License-Identifier: MIT
// Compatible with OpenZeppelin Contracts ^5.0.0
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract OnePieceNFT i... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OrderService = void 0;
const tslib_1 = require("tslib");
const node_binance_api_1 = tslib_1.__importDefault(require("node-binance-api"));
const Order_1 = tslib_1.__importDefault(require("../schemas/Order"));
class OrderService {
co... |
# JavaPlayground
Description:
Welcome to JavaPrograms, your comprehensive repository of Java programs for learning and practicing Java programming! This repository is dedicated to providing a diverse collection of Java programs covering essential concepts, algorithms, and data structures. Whether you're a beginner seek... |
package com.gitee.usl.kernel.queue;
import cn.hutool.core.util.IdUtil;
import com.gitee.usl.kernel.configure.Configuration;
import com.googlecode.aviator.Expression;
import java.util.StringJoiner;
/**
* 编译事件
*
* @author hongda.li
*/
public class CompileEvent {
private final String eventId;
private String... |
// 藏书编目 catalog 路由模组
const express = require('express')
const router = express.Router()
// 导入控制器模块
const book_controller = require('../controllers/bookController')
const author_controller = require('../controllers/authorController')
const genre_controller = require('../controllers/genreController')
const book_instanc... |
<template>
<div>
<p style="font-style: normal;
font-weight: 400;
font-size: 14px;
line-height: 14px;
color: #686868;
margin-bottom: 12px;"
>
Có thể nhập tối đa 03 loại đính kèm khai báo điện tử
</p>
<el-form label-position="top" label-width="100px" :model="formModel" size="mi... |
package usecase
import (
"github.com/Kimoto-Norihiro/scholar-manager/model"
"github.com/Kimoto-Norihiro/scholar-manager/repository"
"github.com/go-playground/validator/v10"
)
type InternationalConferenceEvaluationUsecase struct {
repository repository.IInternationalConferenceEvaluationRepository
validate *vali... |
class StudentManagementSystem:
def __init__(self):
self.students = {}
def add_student(self, student_id, name, grade):
if student_id not in self.students:
self.students[student_id] = {'Name': name, 'Grade': grade}
print(f"Student {name} added successfully.")
else:... |
#[repr(u8)]
#[derive(Clone, Copy)]
enum Dir {
Left = 1,
Right = 2,
Up = 4,
Down = 8,
}
impl Dir {
fn x_increment(&self) -> i32 {
match self {
Dir::Up => -1,
Dir::Down => 1,
_ => 0,
}
}
fn y_increment(&self) -> i32 {
match self {
... |
package XindusAssignment.WishlistManagement.DTOs.ResponseDTOs;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* WishlistItemResponseDto represents the response DTO for a wishlist item.
*/
@NoArgsConstructor
@AllArgsConstructor
@Data
public class WishlistItemResponseDto {
... |
import { Ages } from '../enums';
import {
selectAgeAchievements,
selectPlayer,
selectPlayerBoard,
selectPlayerHand,
selectPlayerScore,
} from '../state/selectors';
import { checkIfPlayerCanAchieve } from '../utils/achievements';
import { calculateTotalTopCardsOnBoard } from '../utils/board';
import noop from ... |
/**
* Copyright 2017–2019, LaborX PTY
* Licensed under the AGPL Version 3 license.
*/
import React, { PureComponent } from 'react'
import { connect } from 'react-redux'
import { Translate } from 'react-redux-i18n'
import { navigateTo2Fa } from 'redux/ui/navigation'
import PropTypes from 'prop-types'
import Button f... |
function prompt {
$location = $executionContext.SessionState.Path.CurrentLocation.path
#detect .git folder
if (Test-Path .git) {
#change the pointer to bright green
$pointer = "$($PSStyle.Foreground.BrightGreen)$([char]::ConvertFromUtf32(0x25B6))$($PSStyle.Reset)"
}
else {
$... |
class UsersController < ApplicationController
before_action :set_user, only: [:show, :edit, :update, :destroy]
before_action :require_user, only: [:edit, :update, :destroy]
before_action :same_user, only: [:edit, :update, :destroy]
def index
@users = User.paginate(page: params[:page], per_page: 3)
end
... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
<link rel="stylesheet" href="assets/css/login.css">
<link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>
<link href="http... |
import React from 'react';
import { Link } from 'react-router-dom';
import { useSelector, useDispatch } from 'react-redux';
import { signOutUserStart } from './../../redux/User/user.actions';
import './stylesHead.scss';
import Logo from './../../assets/logo-payoneer.jpg';
const mapState = ({ user }) => ({
current... |
<!DOCTYPE html>
<html lang="en">
<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">
<!-- Latest compiled and minified Bootstrap 3.3.7 CSS -->
<link rel="stylesheet" href="https://maxcd... |
#ifndef QUICKSWITCHBUTTON_H
#define QUICKSWITCHBUTTON_H
#include <QLabel>
namespace dcc {
class QuickSwitchButton : public QLabel
{
Q_OBJECT
public:
explicit QuickSwitchButton(const int index, const QString &iconName, QWidget *parent = 0);
Q_PROPERTY(QString themeName READ themeName WRITE setThemeName)
... |
import HTTP from "@/common/http";
const resource = "events";
function createParams(query, sort) {
const params = new URLSearchParams();
if (query) {
for (let i = 0; i < query.length; i++) {
params.append(query[i].name, query[i].value);
}
}
if (sort) params.append("sort", sort);
return params.t... |
<!DOCTYPE html>
<html lang="pt-br">
<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/customer.css">
<title>Desafio Modulo 02</title>
</head>
<body>
<header>
... |
//! 与「浮点处理」有关的实用工具
use crate::macro_once;
/// 「0-1」实数
/// 📌通过特征为浮点数添加「0-1 限制」方法
/// * 📝而非直接`impl FloatPrecision`:孤儿规则
pub trait ZeroOneFloat {
/// 判断是否在范围内
fn is_in_01(&self) -> bool;
/// 尝试验证「0-1」合法性
/// * 🎯不会引发panic,而是返回一个[`Result`]
/// * 🚩在范围内⇒`Some(&自身)`
/// * 🚩在范围外⇒`Err(错误信息)`... |
import React, { useEffect, useState } from 'react'
import { db } from "./firebase";
import "./Orders.css"
import Order from "./Order";
import { useStateValue } from './StateProvider';
function Orders() {
const[{ basket, user },dispatch] = useStateValue();
const [orders,setOrders] = useState([]);
// 7:50:1... |
<template>
<div class="min-h-full flex flex-col justify-center py-12 sm:px-6 lg:px-8">
<div class="sm:mx-auto sm:w-full sm:max-w-md">
<h2 class="mt-6 text-center text-4xl font-medium text-gray-900">
Inicia sesión
</h2>
</div>
<div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
<... |
(* Lecture 11b *)
(*
1. If expressions are just matches.
The compiler can actually replace if expressions with match expressions.
if e0 then e1 else e2
becomes
match e0 with true -> e1 | false -> e2
because
type bool = true | false
Equivalent to the ' condition ? (state... |
import React from "react";
import styles from "./Hotel.module.scss";
import { AiOutlineClose } from "react-icons/ai";
import { HiMinusCircle, HiPlusCircle } from "react-icons/hi";
import Button from "../common/Button";
import { useGlobalContext } from "../../context/useGlobal";
type PeopleProps = {
setShow: React.Di... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.