text stringlengths 184 4.48M |
|---|
use actix_web::{
get, post,
web::{self, Path},
Error as ActixWebError, HttpRequest, HttpResponse,
};
use bson::doc;
use mime::APPLICATION_JSON;
use serde::Deserialize;
use tokio::task::spawn_local;
use wither::mongodb::options::FindOptions;
use crate::{
errors::Error,
handler::room_subscribe_handle... |
/*
* Copyright (C) 2017 OTA keys S.A.
* Copyright (C) 2024 HAW Hamburg.
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*
*/
/**
* @ingroup drivers_lsm6dsxx
* @{
*
* @file
* @brief... |
package com.project.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelA... |
"use client";
import React, { useState, useEffect, useCallback } from "react";
import { useSelector } from "react-redux";
import { RootState } from "@/redux/store";
import {
getUnassignedCheckout,
getAllDeliveryUsersHubDropdown,
assignDeliveryPartner,
assignDeliveryOrders,
} from "@/lib/api/ordersAPI";
import {... |
import ManagementService from "./service.js";
import { isValidEmail, isValidPhoneNumber } from "../utils/validation.js";
export default class ManagementController {
constructor() {
this.managementService = new ManagementService();
// bind methods to the instance
this.deleteCafeAndRelatedAs... |
using Application.Contract.Presistence;
using DataConnections.Data;
using DataConnections.Repositories;
using Microsoft.EntityFrameworkCore;
using Microsoft.AspNetCore.Identity;
using Application.Contract.Services;
using Microsoft.AspNetCore.Identity.UI.Services;
using Application.Contract.Services.InterFace;
using Sho... |
import React, { useEffect, useState } from 'react';
import img1 from '../../assets/menwear/img1.jpg';
import img2 from '../../assets/menwear/img2.webp';
import img3 from '../../assets/menwear/img3.jpg';
import img4 from '../../assets/menwear/img4.jpg';
import img5 from '../../assets/menwear/img5.jpg';
import img6 from ... |
<template lang="pug">
.profile-button.cursor-pointer.flex.items-center
q-avatar.bg-primary(
round
@mouseenter="showMenu = true"
@mouseleave="handleAvatarLeave"
)
img(:src="avatarUrl || defaultAvatar")
q-menu
q-list
q-item(clickable @click="goToAccount")
q-item-section Аккаунт
q-item(clickabl... |
package com.yotsuki.serverapi.service;
import com.yotsuki.boot.configJwt.UserDetailsImp;
import com.yotsuki.excommon.common.Response;
import com.yotsuki.excommon.common.ResponseCode;
import com.yotsuki.serverapi.entity.Address;
import com.yotsuki.serverapi.entity.Delivery;
import com.yotsuki.serverapi.entity.User;
imp... |
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FormControl } from '@angular/forms';
import { RouterTestingModule } from '@angular/router/testing';
import { SharedModule } from '@modules/shared/shared.module';
imp... |
/**
* PIQConnect: Connected-component analysis for Big Graph
*
* __________.___________ _________ __
* \______ \ \_____ \ \_ ___ \ ____ ____ ____ ____ _____/ |_
* | ___/ |/ / \ \/ \ \/ / _ \ / \ / \_/ __ \_/ ___\ __\
* | | | / \... |
---
description: Textning för hörselskadade visar ljudet i en video som text på skärmen när ljudet inte kan höras eller när tittaren inte hörs.
title: Välj ett aktuellt bildtextspår bland tillgängliga spår
source-git-commit: 02ebc3548a254b2a6554f1ab34afbb3ea5f09bb8
workflow-type: tm+mt
source-wordcount: '230'
ht-degree... |
# PS3 Complete Guide!
This repository contains a complete guide on how to mod your PlayStation 3 by either using HEN (Homebrew ENabler, a temporary mod), or CFW (Custom Firmware, a permanent mod), they will be explained further later. And everything to do with it. You don't need any external components or anything jus... |
import React from 'react';
import Layout from '../core/Layout';
import {isAuthenticated} from '../auth';
import {Link} from 'react-router-dom';
const AdminDashboard = () => {
const {
user: {_id, name, email, role}
} = isAuthenticated();
const adminLinks = () => {
return (
... |
package ru.just.courses.model.course;
import jakarta.persistence.*;
import lombok.*;
import ru.just.courses.model.Module;
import ru.just.courses.model.audit.CourseChangeEvent;
import ru.just.courses.model.user.User;
import java.time.ZonedDateTime;
import java.util.List;
import java.util.Set;
@Getter
@Setter
@AllArgs... |
// FadeOutAlert.js
import React, { useEffect } from 'react';
/**
* FadeOutAlert Component
* Displays an alert message that fades out after a specified duration.
*
* Props:
* - message: The alert message to display.
* - onClose: Function to close the alert.
* - fadeOut: Boolean to control the fade-out effect.
... |
<section class="container-max d-flex flex-column gap-4 align-items-center text-white">
<h1 class="m-0 fs-2">Trabalhe conosco</h1>
<form [formGroup]="formWork" (ngSubmit)="send()" class="d-flex flex-column align-items-end gap-3 w-100">
<section class="block-inputs w-100">
<fieldset class... |
//package ukim.finki.wpprojectinternships.config;
//
//import org.apereo.cas.client.validation.Cas20ServiceTicketValidator;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.sprin... |
function compare(a: number, b: number): number {
if (isNaN(a) || isNaN(b)) {
return NaN; //Explicitly return NaN if either input is NaN
} else if (a === b) {
return 0;
} else if (a > b) {
return 1;
} else {
return -1;
}
}
console.log(compare(1, NaN)); //Output: NaN
console.log(compare(NaN,... |
---
title: New 2024 Approved The Users Guide to Personalizing Siris Speech Patterns in iOS Ecosystem
date: 2024-05-05T02:41:12.033Z
updated: 2024-05-06T02:41:12.033Z
tags:
- audio editing software
- audio editing
categories:
- ai
- audio
description: This Article Describes New 2024 Approved The Users Guide to... |
/*
* Copyright (2021) The Delta Lake Project 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 applicable... |
import React from 'react';
//Graveyard ecosystem logos
import tombLogo from '../../assets/img/crypto_tomb_cash.png';
import tShareLogo from '../../assets/img/mShare.png';
import tombLogoPNG from '../../assets/img/crypto_tomb_cash.png';
import tShareLogoPNG from '../../assets/img/mShare.png';
import tBondLogo from '../... |
import React, { useState, useEffect, useRef } from "react";
import { IoLocation } from "react-icons/io5";
import { CiCalendarDate } from "react-icons/ci";
import { IoPersonSharp } from "react-icons/io5";
import EventPublicSkeleton from "../Loading/EventPublicSkeleton";
import { APP_URL } from "../util";
import { useNav... |
import { Service, Inject } from 'typedi';
import moment from 'moment';
import TenancyService from '@/services/Tenancy/TenancyService';
import {
ITrialBalanceSheetMeta,
ITrialBalanceSheetQuery,
ITrialBalanceStatement,
} from '@/interfaces';
import TrialBalanceSheet from './TrialBalanceSheet';
import FinancialSheet... |
#include<iostream>
#include<cmath>
using namespace std;
struct Diem
{
double x,y;
};
void Nhap(Diem &a);
void Xuat(Diem a);
void NhapArr(Diem arr[], int size);
void XuatArr(Diem arr[], int size);
double tinhKhoangCach(Diem diem);
Diem timDiemGanGocToaDoNhat(Diem arr[], int size);
int main()
{
int size, dem = 0,... |
import React, { useState } from "react";
import { Link, useNavigate } from "react-router-dom";
import axios from "axios";
const SignIn = () => {
const [username, setUsername] = useState("");
const [password, setPassword] = useState("");
const navigate = useNavigate();
return (
<div className="m-5 p-5 mx-... |
package com.wemakeplay.wemakeplay.domain.comment.entity;
import com.wemakeplay.wemakeplay.domain.board.entity.Board;
import com.wemakeplay.wemakeplay.domain.comment.dto.request.CommentRequestDto;
import com.wemakeplay.wemakeplay.domain.user.entity.User;
import com.wemakeplay.wemakeplay.global.entity.BaseEntity;
import... |
package com.project_binar.kbg.ui.multiplayer
import android.annotation.SuppressLint
import android.content.Intent
import android.media.AudioAttributes
import android.media.AudioManager
import android.media.MediaPlayer
import android.media.SoundPool
import android.os.Build
import android.os.Bundle
import android.view.V... |
from flask import (
Blueprint,
render_template,
redirect,
flash,
request,
url_for,
abort,
)
from flask_login import login_user, current_user, login_required, logout_user
from is_safe_url import is_safe_url
from shotstuff.database import db
from shotstuff.users.models import User
from shotst... |
classdef CartPole < handle
%UNTITLED Summary of this class goes here
% Detailed explanation goes here
properties
% --- Pendulum Variables ---
theta = 0 % (rad) pole angluar discplacement
theta_dot = 0 % (rad/s) pole angular velocity
reward = 0;
theta_hist;
... |
import { createSlice } from '@reduxjs/toolkit';
import { extraReducers } from './thunk/userExtraReducer';
import { IUsersState } from '../interfaces';
const initialState = {
users: [],
loading: 'idle',
editMode: false,
idToBeEdited: null,
} as IUsersState;
export const UserSlice = createSlice({
name: 'User... |
//
// SearchVC.swift
// QCut
//
// Created by Aira on 3/11/20.
// Copyright © 2020 Aira. All rights reserved.
//
import UIKit
import FirebaseDatabase
import CoreLocation
class SearchVC: UIViewController {
@IBOutlet weak var changeUV: UIView!
@IBOutlet weak var nearestUB: UIButton!
@IBOutlet weak var ... |
package state;
import lombok.Getter;
import lombok.Setter;
import java.util.*;
//class that represents the state of the railway station problem
@Getter
@Setter
public class RailwayStation extends AbstractState{
int [][] map;
int [][] stations;
double averageCost;
int totalCost;
//costs for movi... |
{
summary: 'ハッシュタグを検索します。',
description: 'ハッシュタグを検索します。',
tags: [
'hashtags',
],
requireCredential: false,
req: {
type: 'object',
properties: {
limit: {
type: 'integer',
minimum: 1,
maximum: 100,
default: 10,
description: '取得するハッシュタグの最大数。',
},
query: {
type: 'string',
de... |
import logging
from aiogram import types
from aiogram.dispatcher import FSMContext
from aiogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton, ContentType
from utils.requests import make_get_request, make_post_request
from config import SERVER_URL, PAYMENT_TOKEN
from loader import bot, dp
async de... |
import React, { FC , MouseEvent} from 'react'
import styles from './Product.module.scss'
import { IProduct } from '../../models'
import { useInView } from 'react-intersection-observer';
import { Link } from 'react-router-dom';
import useProductStore from '../../store/store';
interface Props {
product : IProduct
}
... |
"use client";
import { useState } from "react";
import Editor from "@monaco-editor/react";
import { LiveProvider, LivePreview } from "react-live";
import { getComponentName } from "@/utils";
interface Props {
code: string;
render?: string;
}
const Playground = ({ code: defaultCode, render }: Props) => {
const [... |
### LeetCode 第 560 题:和为 K 的子数组 (Subarray Sum Equals K)
#### 代码实现
```python
def subarray_sum(nums, k):
# 用于存储前缀和及其出现次数的字典
prefix_sum_count = {0: 1}
# 初始化当前的前缀和为 0
current_sum = 0
# 记录满足条件的子数组数量
count = 0
# 遍历数组中的每个元素
for num in nums:
# 更新当前的前缀和
current_sum += num
... |
require("dotenv").config();
const express = require("express");
const axios = require("axios");
const cors = require("cors");
const path = require("path");
const polyline = require("@mapbox/polyline");
const app = express();
const PORT = process.env.PORT;
const ORS_API_KEY = process.env.ORS_API_KEY;
app.use(cors());
... |
package com.example.githubreposappdepiround2.ui.screens.repo_details_screen.viewmodel
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.example.githubreposappdepiround2.ui.screens.repo_details_screen.model.RepoDetailsUiState
import dagger.hilt.android.lifecycle.HiltViewModel
impor... |
import logging
import time
from typing import List
from PyQt6.QtCore import QThread, pyqtSignal, pyqtSlot
from pymodbus.client import ModbusSerialClient
from src.modbus.exceptions import ReadRegistersError
from src.modbus.register_map import RegisterMap, Register
from src.modbus.utils.dataframes import DeviceValues, ... |
from django.urls import reverse
from distutils.command.upload import upload
from re import T
from tkinter import CASCADE
from unicodedata import category
from django.db import models
from category.models import Category
# Create your models here.
class Product(models.Model):
product_name = models.CharField(max_le... |
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Cviebrock\EloquentSluggable\Sluggable;
class berita extends Model
{
use HasFactory;
use Sluggable;
protected $guarded = ['id'];
protected $with = ['user'];
public funct... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstclear.c :+: :+: :+: ... |
# High level overview
This document describes some of the details of the Kata Agent Policy documents auto-generated by the `genpolicy` tool. See [`genpolicy`](README.md) for general information about the Kata Agent Policy generation tool.
See [Policy contents](../../../docs/how-to/how-to-use-the-kata-agent-policy.md#... |
{{Template:Countermeasure}}
==Description==
A web application firewall (WAF) is an appliance, server plugin, or filter that applies a set of rules to an HTTP conversation. Generally, these rules cover common attacks such as [[Cross-site Scripting (XSS)]] and [[SQL Injection]]. By customizing the rules to your applica... |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My first three.js app</title>
<style>
body {
margin: 0;
}
canvas {
display: block;
}
</style>
</head>
<body>
<script src="js/three.js"></script>
<!-- can also be NPM installed -... |
<!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>Password Generator</title>
<style>
* {
margin: 0;
padding: 0;
... |
import AddCircleTwoToneIcon from '@mui/icons-material/AddCircleTwoTone';
import AddTwoToneIcon from '@mui/icons-material/AddTwoTone';
import CheckTwoToneIcon from '@mui/icons-material/CheckTwoTone';
import ExpandMoreTwoToneIcon from '@mui/icons-material/ExpandMoreTwoTone';
import RefreshTwoToneIcon from '@mui/icons-mat... |
import os
os.environ["KERAS_BACKEND"] = "tensorflow"
import keras
IMG_SIZE = (224, 224)
BATCH_SIZE = 64
EPOCHS = 100
ds_train, ds_test = keras.utils.image_dataset_from_directory(
"coffee_bean",
validation_split=0.2,
subset="both",
seed=727,
image_size=IMG_SIZE,
batch_size=BATCH_SIZE,
label_... |
# Bike Sharing Data Analysis
This project provides an analysis of bike-sharing systems, specifically focusing on the Capital Bikeshare system in Washington D.C. It was completed as part of my study on the Dicoding platform. The dataset includes data from 2011 and 2012, covering both hourly and daily usage.
Explore th... |
import {
BrowserRouter as Router,
Route,
Routes,
useLocation,
} from "react-router-dom";
import Register from "./components/Register/Register";
import Login from "./components/Login/Login";
import { ChakraProvider } from "@chakra-ui/react";
import Welcome from "./components/Welcome/Welcome.Jsx";
import Navbar f... |
dataname="WSI_single_A1"
extention = '_annotations'
ignore_index = -100
gpuid= 0
# --- unet params
n_classes= 2
backbone = 'resnet50'
# --- training params
patch_size=224
batch_size=16
num_epochs = 50
phases = ["train","val"]
validation_phases= ["val"]
import torch
from torch import nn
from torch.utils.data import D... |
---
title: attach-consumer-label
keywords:
- Apache APISIX
- API Gateway
- API Consumer
description: This article describes the Apache APISIX attach-consumer-label plugin, which you can use to pass custom consumer labels to upstream services.
---
<!--
#
# Licensed to the Apache Software Foundation (ASF) under on... |
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
var romeToArab = map[string]int{
"I": 1, "II": 2, "III": 3, "IV": 4, "V": 5, "VI": 6, "VII": 7, "VIII": 8, "IX": 9, "X": 10, "L": 50, "C": 100,
}
func main() {
reader := bufio.NewReader(os.Stdin)
fmt.Println("Введите выражение: ")
line, _ := re... |
require('dotenv').config();
// Import necessary modules
const express = require('express');
const path = require('path');
const cors = require('cors');
const { ApolloServer } = require('apollo-server-express');
const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY);
const db = require('./config/connection');
... |
import fs from 'fs';
import { URL } from 'url';
import { promisify } from 'util';
import parseDbUrl from 'parse-database-url';
import {
avoidSSL,
defaultClientPortMapping,
defaultConnectionConfig,
defaultConnectionOptions,
driverClientMapping,
knownQueryParams,
} from './constants';
import { DriverClient } ... |
package com.example.qna_project.user.controller;
import com.example.qna_project.user.dto.ErrorResponse;
import com.example.qna_project.user.exception.UserException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.v... |
//
// Copyright (c) 2019-2024 Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
//
// 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)
//
#ifndef BOOST_MYSQL_IMPL_INTERNAL_PROTOCOL_IMPL_SERIALIZATION_CONTEXT_HPP
#de... |
// Tee ohjelma, joka kysyy kymmentä numeroa. Ohjelma laskee ja tulostaa summan ja keskiarvon sekä
// tulostaa pienimmän ja suurimman numeron.
// Silmukoiden sisällä on monta "ylimääräistä" tulostusta, eli console.logia
let summa = 0;
let lukujenMaara = 0;
let maxLuku = -Infinity // ensimmäinen käyttäjän antama luku ... |
import { Router } from 'express';
import type { Request, Response } from 'express';
import { Team, Character, User } from '../../models/index.js';
import type { Character as CharacterInstance } from '../../models/characterModel.js'; // import the type "Character"
const router = Router();
// get characters on a team
c... |
@charset "UTF-8";
/*
#c5ebd6
#83eiad
#3ddc84
#2fa866
#1a5c37
#063dle
*/
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Odibee+Sans&display=swap');
@font-face {
font-family: 'Android';
src: url('../fontes/idroid.otf') format('opentype');
font-weight: normal;
}
:root {
--cor0:#c... |
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google tag (gtag.js) -->
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-ZL7NS49NJ5"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
g... |
@model AppFluxoDeCaixa.Models.Fornecedor
@{
ViewData["Title"] = "Editar Fornecedor";
}
<h1 class="display-5 text-light text-center">@ViewData["Title"]</h1>
<hr />
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="row">
<div class="col-12 co... |
using Microsoft.EntityFrameworkCore;
using SpaWebApp.Models;
namespace SpaWebApp.Data
{
public class SpaContext : DbContext
{
public SpaContext(DbContextOptions<SpaContext> options)
: base(options)
{
}
public DbSet<Usuario> Usuarios { get; set; }
public DbS... |
Feature: Products cart testing.
Background:
Given the user is on Ictapps staging page
Scenario: 001 Create test Category
Given the user is on Ictapps staging page
Given Click on LogInLink
And Enter Email address
And Enter Password
And Click on LogInButton
When Click on C... |
import React, { useEffect, useState } from 'react'
import { FaHeart, FaRegHeart } from "react-icons/fa"
import './moviecard.css'
export default function MovieCard({ movie }) {
const { id, poster_path, title, release_date, vote_count, vote_average } = movie;
const [isFavorite, setIsFavorite] = useState(
JSON.pa... |
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class DetailPage extends StatelessWidget {
DetailPage(this.data);
final data;
// DetailPage(this.data);
// final data;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: T... |
<script>
$(document).ready(function () {
path = window.location.pathname;
elem_id = 'menu_stats';
if (path.includes('/host')) {
elem_id = 'menu_hosts';
} else if (path.includes('/services/')) {
elem_id = 'menu_services';
} else if (path.includes('/netw... |
using Application.Interfaces;
using Application.ViewModels;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Api.Controllers
{
[ApiController]
[Route("api/tasks")]
public class TaskController(ITaskService taskService) : ControllerBase
{
private readonly ITask... |
<script setup lang="ts">
import { ref } from 'vue'
import { router } from '~/main'
const name = ref('')
function go() {
if (name.value)
router.push(`/hi/${encodeURIComponent(name.value)}`)
}
</script>
<template>
<div>
<carbon-icon name="campsite" text-4xl size="14" />
<header w-120 my-3 mx-auto flex i... |
import axios from "axios";
import { useRouter } from "next/router";
import React, { useCallback, useEffect, useState } from "react";
import { toast } from "react-toastify";
import useSWR, { mutate } from "swr";
import Loading from "../../errorAndLoading/Loading";
import useSocket from "../../Utils/socket";
const Parti... |
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart';
import 'package:http/http.dart' as http;
import '../helper/router.dart';
class RequestService extends GetxService {
Timer? timer1;
Fut... |
@extends('frontend.master')
@section('content')
{{-- Anniversaries-Section-Start --}}
<section id="anniversaries">
<div class="container">
@if (session('success'))
<div id="floating-alert" class="alert alert-success text-dark alert-dismissible fade show" role="alert">
... |
const { PrismaClient } = require("@prisma/client");
const faker = require("faker");
const prisma = new PrismaClient();
async function main() {
// Define departments
const departments = ["ADMINISTRATION", "FINANCE"];
// Create workers
const workers = await Promise.all(
departments.map((department) =>
... |
/*
* cryrand - cryptographically strong pseudo-random number generator library
*/
/*
* Copyright (c) 1994 by Landon Curt Noll. All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the abo... |
import java.util.*;
/**
* Represents a text segment of a document that needs to be parsed.
*/
abstract class TextSegment {
private String content;
TextSegment(String content) {
this.content = content;
}
public String getContent() {
return content;
}
public abstract String a... |
const {SlashCommandBuilder, PermissionFlagsBits, EmbedBuilder} = require('discord.js');
const {EMBEDS} = require('../../constants.json');
module.exports =
{
data: new SlashCommandBuilder()
.setName('message')
.setDescription('Sends a message to a specified user')
.setDefaultMemberPermissions(PermissionFlagsBi... |
Some wrappers for comfortable prototyping of simple сompute shader use cases.
***
## CompBuffer
This is a generic wrapper for ComputeBuffer that encapsulates a persistently allocated NativeArray of buffer data, that can be easily updated without the need to retrieve the data from the buffer. Also eliminating the need... |
package Setup_Page;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.testng.ITestResult;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import j... |
import { BoxGeometry, Mesh, MeshStandardMaterial, MathUtils, TextureLoader } from 'three';
function createMaterial() {
// create a texture loader
const textureLoader = new TextureLoader();
// load a texture
const texture = textureLoader.load("/assets/textures/uv-test-bw.png");
// create a "standa... |
import 'package:foap/helper/imports/common_import.dart';
class LineDotsIndicator extends StatelessWidget {
final int itemCount;
final int currentIndex;
final Color color;
final double dotSize;
final double spacing;
const LineDotsIndicator({Key? key,
required this.itemCount,
required this.currentIn... |
package ca.cmpt213.as5courseplanner.controllers;
import ca.cmpt213.as5courseplanner.controllers.datatransferobjects.*;
import ca.cmpt213.as5courseplanner.model.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;... |
class MinStack:
def __init__(self):
self.stack = []
self.minStack = []
def push(self, val: int) -> None:
self.stack.append(val)
if not self.minStack:
self.minStack.append(val)
elif self.minStack[-1] >= val:
self.minStack.append(val)
elif s... |
import { useReducer } from 'react';
import { shallowArrayComparison, defaultDirtyComparator } from '../../utilities.mjs';
function updateAction(value) {
return {
type: 'update',
payload: value
};
}
function resetAction() {
return {
type: 'reset'
};
}
function newDefaultAction(value) {
return {
... |
import { useEffect, useState } from "react";
import Header from "./Header.js";
import Main from "./Main.js";
import Footer from "./Footer.js";
import ImagePopup from "./ImagePopup.js";
import EditProfilePopup from "./EditProfilePopup.js";
import EditAvatarPopup from "./EditAvatarPopup.js";
import AddPlacePopup from ".... |
/* THIS IS THE FIRST METHOD I USED*/
/* CHANGE IT TO USEREDUCER */
import { createContext, useState } from "react";
export const CartContext = createContext();
export function CartProvider({ children }) {
const [cart, setCart] = useState([]);
const addToCart = (product) => {
const productInCartIndex = cart.... |
## 可行性报告
### 项目题目
《跑酷类独立游戏On_His_Way》
### 项目背景
在疫情的影响下,居家时间大幅延长,各个年龄段群体对电子游戏的需求日益增加。什么类型的游戏适合所有人游玩并收获乐趣?参照游戏市场,国产独立游戏和短流程闯关游戏越来越受到玩家的欢迎,玩家的选择也说明它能够迎合大多数人的口味,所以我们决定完成一个操作简单但是趣味十足的跑酷类独立游戏,为疫情中的玩家带来消遣和快乐。
### 目标概述
本项目计划完成一个流程完整的跑酷类独立游戏,要实现的游戏模块包括用户UI,新手指引,存档功能,评分机制等。在完成完整的游戏之余,还要尽可能提高游戏质量。希望能够通过这个项目,初步体验游戏工坊制作游戏的工作流... |
import { Button, Form, Input, Select, Space, Table } from 'antd'
import { useEffect, useRef, useState } from 'react'
import { ColumnsType } from 'antd/es/table'
import { Menu } from '@/types/api'
import { IAction } from '@/types/modal'
import CreateMenu from './CreateMenu'
import { message, modal } from '@/utils/Antd... |
% max(e1, e2) =
% e1, if e1 >= e2
% e2, if e1 < e2
% max(E1 - number, E2 - number) -> (i, i)
max(E1, E2, E1):-
E1 >= E2.
max(E1, E2, E2):-
E1 < E2.
% listMaxElem(l1l2..ln, c) =
% c, if n = 0
% listMaxElem(l2l3..ln, min(l1, c)), otherwise
% listMaxElem(L - list, C - collector, R - number) -> (i, i, o)
list... |
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class AuthService {
constructor() { }
private readonly authDataKey = 'authData';
// Sauvegarder les données dans le localStorage
saveAuthData(data: any) {
localStorage.setItem(this.authDataKey, JSON.stringify(data))... |
'use client';
import {useRouter} from '@/i18n/routing';
import {TeamExerciseData} from '@/lib/types';
import {cn} from '@/lib/utils';
import {useExerciseStore} from '@/store/exerciseStore';
import {Check} from 'lucide-react';
import {useTranslations} from 'next-intl';
import {useSearchParams} from 'next/navigation';
im... |
package chapter10.Exercise04;
public class MyPoint {
private double x;
private double y;
public MyPoint() {
this(0,0);
}
public MyPoint(double x, double y) {
this.x=x;
this.y=y;
}
public double distance(MyPoint myPoint) {
return Math.sqrt(Math.pow(myPoint.getX()-x, 2) + Math.pow(myPoint.getY()-y... |
#include <iostream>
#include <algorithm>
using namespace std;
void fill_array(int *array, int lenght);
void print_array(int *array, int lenght);
bool search_sequence(int *array, int n, int *sequence, int n_s);
int main()
{
int sequence[3] = {0, 0, 0};
int arr_1[10] = {1, 0, 0, 3, 4, 6, 8, 5, 4, 99};
int ... |
import { Stack } from "@mui/material";
import { useRecoilValue } from "recoil";
import { Game } from "../model/Game";
import { playerState } from "../state/PlayerState";
import DeckState from "./DeckState";
import DiscardState from "./DiscardState";
import HandState from "./HandState";
type Props = { game: Game };
co... |
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:music/models/playlist_provider.dart';
import 'package:provider/provider.dart';
class SongPage extends StatelessWidget {
const SongPage({super.key});
String formatTime(Duration duration) {
... |
import React, { useContext } from "react";
import logo from "./logo.svg";
import "./App.css";
import { ThemeContext } from "./Context/ThemeContext";
function App() {
const { theme, toggle, dark } = useContext(ThemeContext);
return (
<div className="App">
<header
className="App-header"
st... |
import { Injectable } from '@angular/core';
import { TaskListModel } from 'src/app/core/model/TaskList';
import { StateLists } from '../../state/Lists';
import { ValidationTaskListService } from '../../validation/TaskList/valid-task-list.service';
@Injectable({
providedIn: 'root'
})
export class ListService {
co... |
<template>
<div class="user-form">
<el-form
:model="formData"
:rules="rules"
ref="formDataRef"
label-width="80px"
@submit.prevent
v-if="formType==0"
>
<!--input输入-->
<el-form-item label="昵称" prop="name" >
<el-input clearable placeholder="请输入昵称" v-model.tri... |
<app-contain>
<header>
<section class="cabecalho-link">
<img src="assets/img/logo.png" alt="">
<div>
<button>
<img class="seta" src="assets/img/arrow-left.png" alt="">
<a routerLink="/listar-cliente">Voltar</a>
</button>
</div>
</section>
<section clas... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.