text stringlengths 184 4.48M |
|---|
<!DOCTYPE html>
<html lang="en">
<head>
<title>three.js ar - cones</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link type="text/css" rel="stylesheet" href="main.css">
</head>
<body>
<div id="info">
<a href="https://threejs.org"... |
package com.inventory;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import java.time.LocalDate;
imp... |
package com.notes;
import org.json.simple.JSONObject;
import org.testng.Assert;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import io.restassured.RestAssured;
import io.restassured.http.Method;
import io.restassured.path.json.JsonPath;
import io.restassured.response.Response;
import ... |
import React, { useState, useEffect } from 'react';
import { View, Text, TextInput, TouchableOpacity, StyleSheet, Image } from 'react-native';
import { useRouter } from 'expo-router';
import { useNavigation } from '@react-navigation/native';
export default function FindIdScreen() {
const [name, setName] = useState... |
import { DollarSign } from "lucide-react";
import {
AccordionItem,
AccordionTrigger,
AccordionContent,
} from "@/components/ui/accordion";
import {
ToggleGroup,
ToggleGroupItem,
} from "@/components/ui/toggle-group";
interface CostAnalysisProps {
costs: {
costPerShot: string;
shotsPerBag: number;
... |
import React, { useState } from 'react';
import { View, Text, TextInput, TouchableOpacity, ScrollView, Image, StyleSheet, Alert } from 'react-native';
import { MaterialCommunityIcons, FontAwesome } from '@expo/vector-icons';
import AsyncStorage from '@react-native-async-storage/async-storage';
const SearchFlower1 = ({... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/wait.h>
#include <string.h>
void sort(int arr[], int n) {
int temp;
for (int i = 0; i < n - 1; i++) {
for (int j = i + 1; j < n; j++) {
if (arr[i] > arr[j]) {
temp = arr[i];
arr[i] = arr... |
package com.shuaigef.lantuapibackend.model.enums;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.commons.lang3.ObjectUtils;
/**
* 用户角色枚举
*
* @author <a href="https://github.com/shuaigef">shuaigef</a>
*/
public enum RequestMethodEnum {
GET("GET", "GET"),
... |
# SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# 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
#
# ht... |
import React from "react";
import { Avatar, Link, Stack, Tooltip, Typography, Box, Paper } from "@mui/material";
import avatar from "../../images/avatar.jpg";
import HeaderLink from "components/app-header/header-link/header-link";
import exit from '../../images/exit.svg';
function Sidebar() {
return (
<Box sx=... |
import React, { useCallback, useMemo } from 'react';
import { Box, Typography, Link, Hidden } from '@material-ui/core';
import { Facebook, YouTube, ExpandLess, Phone, Instagram } from '@material-ui/icons';
import { graphql, useStaticQuery } from 'gatsby';
import Img from 'gatsby-image';
import { Container } from 'comp... |
Sample: 0 Boolean
----------------------------------------------------------------
@@ Instruction
I want to use java.lang.Boolean package from Java
recommend a list of useful with at most 5 apis for this package, exlclude method inherent from its parent class
For each api method specify its return type and parameters ... |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTagsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tags', function (B... |
package day9
import (
"os"
"testing"
"github.com/stretchr/testify/assert"
)
func TestParts(t *testing.T) {
tests := []struct {
expected int64
input string
jokers bool
fn func(string) int64
}{
{
expected: 114,
input: `test.txt`,
fn: part1,
},
{
expected: 2,
input:... |
package homecode.opteamer.controller;
import com.fasterxml.jackson.databind.ObjectMapper;
import homecode.opteamer.model.dtos.OperationRoomDTO;
import homecode.opteamer.model.enums.OperationRoomState;
import homecode.opteamer.model.enums.OperationRoomType;
import homecode.opteamer.service.OperationRoomService;
import ... |
<?php
spl_autoload_register(function ($class_name) {
include __DIR__ . '/src/' . $class_name . '.php';
});
$db = new Database();
$user = new User();
$race = new Race();
session_start();
// $_SESSION = [];
$today = date('Y-m-d' . ' 23:59:59');
$list_races = $race->getRaces();
$successMessage = $_SESSION['success'] ?... |
#include <iostream>
#include <string>
#include <fstream>
#include <map>
#include <vector>
// PREPROCESS:
// rimuovere i commenti
// rimuovere le righe vuote
enum STATES{
WAITING_STATE,
SERVER_DIRECTIVE_STATE,
LOCATION_DIRECTIVE_STATE,
STATE4,
STATE5
};
// Server{
// serverDirectiv... |
package com.example.uploadimagetest.viewmodel
import android.content.Context
import android.net.Uri
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.example.uploadimagetest.data.BSWebLandData
import com.... |
//
// DrugDetailVM.swift
// Infoapteka
//
//
//
import UIKit
enum DrugDetailType {
case my
case other
}
final class DrugDetailVM: NSObject {
// MARK: Propeties
private var type: DrugDetailType
private var drugDetail: Drug?
private var drugDetailCellType: [DrugDetailCellType] = [.slid... |
import React from "react";
import { constructPosterUrl } from "../services/Constants";
import { Link } from "react-router-dom";
import {motion} from "framer-motion";
import { FaStar } from "react-icons/fa";
const MovieCard = ({ movie }) => {
const truncateName = (name) => {
if (name.length > 20) {
return n... |
import React from 'react'
import HomePage from './pages/HomePage';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import AboutPage from './pages/AboutPage';
import BlogPage from './pages/BlogPage'
import SingleBlogPage from './pages/SingleBlogPage'
import ContactPage from './pages/ContactPage'
import ... |
import { createPromiseClient, PromiseClient } from '@connectrpc/connect';
import { fastifyConnectPlugin } from '@connectrpc/connect-fastify';
import { createConnectTransport } from '@connectrpc/connect-node';
import { EnumStatusCode } from '@wundergraph/cosmo-connect/dist/common/common_pb';
import { NodeService } from ... |
package com.andvl.repetly.core.util
import android.Manifest
import android.annotation.SuppressLint
import android.content.Context
import android.content.pm.PackageManager
import android.net.Uri
import android.os.Environment
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.res... |
<?php
session_start();
if (!isset($_SESSION['connected']) || $_SESSION['connected'] !== true) {
header("Location: log.php");
exit();
}
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "g_bibio";
try {
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
... |
---
title: Professional Scrum with User Experience (PSU) with Certification
date: 2019-05-25
creator: Martin Hinshelwood
id: "38640"
type: course
slug: professional-scrum-with-user-experience-psu-with-certification
url: /capabilities/training-courses/scrum-training-courses/:slug/
aliases:
- /training-courses/professi... |
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.jsx'
import {
createBrowserRouter,
RouterProvider,
} from "react-router-dom";
import MainLayout from './MainLayout.jsx';
import AddU from './AddU.jsx';
import User from './User.jsx';
import U... |
import api from "../../util/api";
import { useEffect, useState, useRef } from "react";
import RaffleContext from "./index";
export default ({ children }) => {
const [raffleData, setRaffleData] = useState({});
const [checked, setChecked] = useState([]);
const [clientNumbers, setClientNumbers] = useState({});
... |
***Answers to the coding section of COMP1110-6710 Final Exam 2020 S1***
***@author:SakurakojiSaika,chatgpt 3.5***
***@Version:java 17.0.4.1 junit5***
***If it's helpful for you, please give me a star.***
# Description
The questions provided here comprise the final exam for COMP1110/6710 in Semester
1 of 2020. ... |
import React, { useContext, useRef } from "react";
import styles from "./ListItemPage.module.css";
import { Input } from "@mui/material";
import UserContext from "../context/user";
import { fetchData } from "../helpers/common";
const ListItemPage = (props) => {
const userCtx = useContext(UserContext);
const nameRe... |
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AuthGuard } from './core/guards/auth.guard';
const routes: Routes = [
{
path: 'login',
loadChildren: () => import('./core/modules/login/login.module').then(m => m.LoginModule)
},
{
path: 'signup... |
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "GameFramework/SpringArmComponent.h"
#include "Bomb.h"
#include "NetGameCPPCharacter.generated.h"
UCLASS(config=Game)
class ANetGameCPPCharacter : public ACharacter
{
GENERATED_UCLASS_BODY()
/** Camera boom positioning the camera be... |
#!/usr/bin/python3
"""Write a class Square that defines a square by size"""
class Square():
"""class rep a square"""
def __init__(self, size=0):
"""Initialize class square
Args:
size (int): size of square
"""
self.__size = size
@property
def size(self):
... |
from aiogram.filters import Command
from aiogram import Router, types, F
from aiogram.utils.keyboard import InlineKeyboardBuilder
from aiogram.fsm.context import FSMContext
from aiogram.types import Message, ContentType
from aiogram.filters import Command
from datetime import datetime
from ...keyboards import keyboard... |
<?php
/**
* This is the controller for the Embedded Payment Page example.
* It is called when the pay button on the index page is clicked.
*
* Copyright (C) 2020 - today Unzer E-Com GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the... |
fetch("./productos.json") // retorna objeto Response
.then(respuesta => respuesta.json()) // pasar de Response a JS
.then(productos => principal(productos))
.catch(error => lanzarAlerta(error, 'error', true))
function principal(productos) {
let carritoRecuperado = localStorage.getItem("carrito")
let carrito... |
/**
* APITable <https://github.com/apitable/apitable>
* Copyright (C) 2022 APITable Ltd. <https://apitable.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of... |
/*
Vitesse Switch API software.
Copyright (c) 2002-2013 Vitesse Semiconductor Corporation "Vitesse". All
Rights Reserved.
Unpublished rights reserved under the copyright laws of the United States of
America, other countries and international treaties. Permission to use, copy,
store and modify, the software and... |
import React, { FC } from "react";
import { Card, Col, Row, Statistic } from "antd";
import { UtilsMoneyJson } from "@generated";
import { formatMoney, formatNumber } from "@lib/utils";
import { useTranslation } from "@providers";
type StatisticsCardProps = {
loading: boolean;
usersCount?: number;
staffCount?: n... |
/*
* Copyright (c) 2017 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is availabl... |
---
sidebar_position: 6
---
# Arbeitsteilung
<!-- Betriebliche und gesamtwirtschaftliche Arbeitsteilung
- Internationale Spezialisierung, Globalisierung
- Betriebliche und gesamtwirtschaftliche Arbeitsteilung
- Möglichkeiten und Grenzen der sozialen Marktwirtschaft -->
## Betriebliche und gesamtwirtschaftli... |
import uuid
from django.db import models
from account.models import User
from projects.models import Project
class Note(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
project = models.ForeignKey(Project, related_name="notes", on_delete=models.CASCADE)
title = mo... |
def euclid_extended(a, b):
"""Расширенный алгоритм Евклида."""
if a == 0:
return b, 0, 1
else:
gcd, x1, y1 = euclid_extended(b % a, a)
x = y1 - (b // a) * x1
y = x1
return gcd, x, y
def euler_phi(m):
"""Вычисляет значение функции Эйлера."""
result = 1
for... |
import { useState, useEffect } from "react";
const Progress = () => {
const targetAmount = 100000000; // $2,000,000
const intervalDuration = 7000; // 7000 milliseconds = 7 seconds
const restartDelay = 5000; // 5000 milliseconds = 5 seconds
const [raisedAmount, setRaisedAmount] = useState(() => {
// Retrie... |
//
// OnboardingViewController.swift
// CardinalKit_Example
//
// Created by Santiago Gutierrez on 10/12/20.
// Copyright © 2020 CocoaPods. All rights reserved.
//
import SwiftUI
import UIKit
import ResearchKit
import CardinalKit
import Firebase
struct OnboardingViewController: UIViewControllerRepresentable {
... |
/*
* 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 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be us... |
import numpy as np
from copy import deepcopy
import pickle
class Pattern:
def __init__(self, picture_matrix) -> None:
self.picture_matrix = picture_matrix
self.column_vector = np.where(picture_matrix == 0, -1, picture_matrix).flatten()
self.transposed_column_vector = self.column_vector.resh... |
<?php
namespace App\Jobs;
use App\Events\ExpensePaid;
use App\Models\Enums\PaymentStatus;
use App\Models\Expense;
use App\Models\Payment;
use App\Services\Payment\Interfaces\PaymentGatewayInterface;
use App\Services\Payment\PaymentProcessorService;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQu... |
<template>
<main>
<div class="case">
<h1 class="title text-uppercase">Sustainable Rural Development Practice</h1>
<h5>A Case Study of Gonglaoping, Taichung, Taiwan</h5>
<h6 class="date">December 2020</h6>
<img src="@/assets/Case_Studies_2.png" alt="">
<div class="content">
<h5 cla... |
/*
* Copyright 2015 Hotwire. All Rights Reserved.
*
* This software is the proprietary information of Hotwire.
* Use is subject to license terms.
*/
package com.hotwire.selenium.bex.hotel.review;
import com.hotwire.selenium.bex.BexAbstractPage;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
... |
import torch.nn as nn
class BiLSTM(nn.Module):
def __init__(self, input_size, hidden_size, output_size, dropout_rate, num_layers):
super(BiLSTM, self).__init__()
# Bidirectional LSTM with Dropout
self.lstm = nn.LSTM(
input_size,
hidden_size,
num_layers,... |
//
// 622.design-circular-queue.swift
// Leetcode-Swift
//
// Created by 95cc on 2021/7/5.
//
import Foundation
/*
622. 设计循环队列 (中等)
https://leetcode-cn.com/problems/design-circular-queue/
*/
class Solution_622 {
class MyCircularQueue {
class Node {
var val: Int
var next: No... |
/* --- STATE --- */
import { ShowtimeResponse } from "./movie.type";
export interface ICredential {
readonly _id?: string;
email: string;
username: string;
avatar?: string;
role?: string;
phone?: string;
password?: string;
googleId?: string;
showtimes?: ShowtimeResponse[];
}
expor... |
//
// PostDetailsPresenter.swift
// PostDetails
//
// Created by Dimo Abdelaziz on 30/09/2022.
//
import Foundation
protocol PostDetailsPresenterInput: BasePresenterInput {
}
protocol PostDetailsPresenterOutput: BasePresenterOutput {
func showPost(post: Post, user: User)
func emptyState(emptyPlaceHolderTy... |
import { FormEvent, useCallback, useEffect, useState } from 'react';
import {
InteractivesType,
Mystery,
Quiz,
} from '../../../model/types/interactive';
interface InterfaceResult {
isOpen: boolean;
answer: string;
isCorrect?: boolean;
onSubmit: (e: FormEvent<HTMLFormElement>) => void;
... |
'use client'
import Pagina from "@/app/components/Pagina";
import AutorValidator from "@/app/validators/AutorValidator";
import { Formik } from "formik";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { Button, Form } from "react-bootstrap";
import { FaCheck } from "react-icons/fa";
... |
import { useQuery } from '@tanstack/react-query'
import { api } from 'configs/api'
import { PaginationResult } from 'types/getList'
import { Service } from 'types/service'
export interface ServiceListResponse {
data: {
items: Service[]
meta: PaginationResult
}
}
export interface ServiceListParams {
limi... |
from typing import Any
import datetime as dt
import bcrypt
import jwt
from core.config import settings
class Security:
"""Class for handling security operations."""
@classmethod
def verify_password(cls, password: str, hashed_password: bytes) -> bool:
"""Compares a hashed password with the passwor... |
import 'package:cash_planner_flutter/core/model/timely_cashflow_model.dart';
import 'package:path/path.dart';
import 'package:sqflite/sqflite.dart';
Future<void> insertTimelyCashflow(TimelyCashflowModel timelyCashflowModel) async {
// Get a reference to the database.
final dbPath = await getDatabasesPath();
fina... |
package com.udacity.gradle.builditbigger;
import android.content.Context;
import android.os.AsyncTask;
import android.util.Pair;
import android.widget.Toast;
import com.abdelshafy.maha.myapplication.backend.myApi.MyApi;
import com.google.api.client.extensions.android.http.AndroidHttp;
import com.google.api.client.ext... |
import { Button, Input, Text } from "@chakra-ui/react";
import { useForm } from "react-hook-form";
type Input = {
url: string;
};
interface AddProductUrlFormProps {
setLoading: (loading: boolean) => void;
setWishListItemData: (data: any) => void;
}
export const AddProductUrlForm = ({
setLoading,
setWishLis... |
# Scalar Evolution
1. Change in the value of scalar variables over iterations of the loop
2. Powerful symbolic technique
# Example for scalar evolution usage
```
void foo(int *a, int n, int k) {
int t = 0;
for (int i = 0; i < n; i++){
t = t + k;
*a = t;
}
}
```
before
```
1. for.body:
2. %i = phi i32 ... |
#if (ARDUINO >= 100)
#include <Arduino.h>
#else
#include <WProgram.h>
#endif
#include <ros.h>
#include <geometry_msgs/Twist.h>
// Pin variables for motors.
#define speedPinR 9 // RIGHT PWM pin connect MODEL-X ENA
#define RightMotorDirPin1 12 //Right Motor direction pin 1 to MODEL-X IN1
#define RightMotorDirPi... |
package com.johnhunsley.user.service;
import com.johnhunsley.user.domain.Account;
import com.johnhunsley.user.domain.Page;
import com.johnhunsley.user.domain.User;
import com.johnhunsley.user.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.c... |
- open spyder via Spyder(Anaconda3)
- also open anaconda prompt (not the anaconda powershell prompt)
open anaconda prompt(anaconda3)
- goto home.openweathermap.org
fishingforbass@mail.com - login
- goto your profile - click myApiKeys & copy it
-
- then within anaconda prompt(anaconda3):
pip install tkinter
... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Timer</title>
<style>
body{
padding: 20px;
}
</style>
</head>
<body>
<center>
<h2>Rajashree Sonanis : 42364</h2>
<h1>Expt 5 : Timer</h1>
<label ... |
#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from Debian Security Advisory DSA-345. The text
# itself is copyright (C) Software in the Public Interest, Inc.
#
include("compat.inc");
if (description)
{
script_id(15182);
script_version("$Revis... |
import streamlit as st
from unstructured_client import UnstructuredClient
from unstructured_client.models import shared
from unstructured_client.models.errors import SDKError
from streamlit_examples.utils.theme import initPage
from streamlit_examples.utils.streamlit import (
cache_file,
upload_files,
)
initPa... |
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
import QtTest
import QtQuick.Controls
TestCase {
id: testCase
width: 400
height: 400
visible: true
when: windowShown
name: "Pane"
Component {
id: pane
... |
'use client'
import TextareaAutoSize from 'react-textarea-autosize'
import { useForm } from 'react-hook-form'
import { PostCreationRequest, PostValidator } from '@/lib/validators/post'
import { zodResolver } from '@hookform/resolvers/zod'
import { useCallback, useEffect, useRef, useState } from 'react'
import type Edit... |
<?php
namespace App\Http\Controllers\Auth;
use App\Models\User;
use Illuminate\Support\Str;
use App\Mail\ForgotPassword;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Mail;
use App\Mail\MidtransPaymentNotification;
use App\Models\... |
import 'package:luthor/luthor.dart';
import 'package:test/test.dart';
void main() {
test(
'should return true if the string length is greater than or equal to minLength',
() {
final result = l.string().min(3).validateValue('abc');
switch (result) {
case SingleValidationSuccess(data: _):
... |
# GPT Memory API
A simple REST API for GPT responses using embeddings backed by a Redis database.
1. [Overview](#overview)
2. [Features](#features)
3. [Getting Started](#getting-started)
1. [Prerequisites](#prerequisites)
2. [Installation](#installation)
4. [Usage](#usage)
1. [API Endpoints](#api-endpoints)
... |
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
<title>Listado Clientes</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<section ... |
# https://python-intermedio.readthedocs.io/es/latest/virtual_environment.html
# https://pipenv-es.readthedocs.io/es/latest/
# https://stackoverflow.com/a/41573588/1727383
# virtualenv is a very popular tool that creates isolated Python environments for Python libraries.
# pipenv aims to combine Pipfile, pip and virtual... |
return {
{
"junegunn/fzf.vim",
dependencies = {
'junegunn/fzf',
},
},
{
"LunarVim/lunar.nvim",
config = function()
vim.cmd('colorscheme lunar')
end
},
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
},
{ "nvim-treesitter/playground" },
{ "tpope/vi... |
import 'package:flutter/material.dart';
import 'package:fluui_chakra/disclosure/accordion/accordion_icon_button.dart';
// import 'package:fluui_chakra/fluui_chakra.dart';
class AccordionButton extends StatelessWidget {
const AccordionButton({
super.key,
required this.label,
required this.isOpen,
requ... |
# looping over array
array2 = 1...14
for value in array2
print value, " "
end
# new way of looping
10.times do
print "this will appear 10 time \n"
end
#looping from an array
[1,2,3,4,5,5].each do |item|
print item, " "
end
#jumping inside the loop
for i in 1..10
next if i % 2 == 0
print i, "is an odd ... |
import React from "react";
import "./deletevacationmodal.css"
interface DeleteModalProps {
isOpen: boolean;
onClose: () => void;
onConfirm: () => void;
vacationName?: string; // Optional, for dynamic messaging
}
const DeleteModal: React.FC<DeleteModalProps> = ({
isOpen,
onClose,
onConfirm,
vacationNam... |
"use client";
import { Trash } from "iconsax-react";
import React, { useState } from "react";
import MyButton from "./Button";
import { deleteDocument } from "@/app/utils/actions/room.actions";
const DeleteModal = ({ roomId }: { roomId: string }) => {
const [open, setOpen] = useState(false);
const [loading, setLoa... |
package com.ach.admin.materialize;
import com.ach.admin.entity.SysUserEntity;
import com.ach.admin.mapper.SysUserMapper;
import com.ach.domain.DomainEvent;
import com.ach.domain.DomainEventListener;
import com.ach.domain.system.user.event.manager.*;
import com.ach.infrastructure.user.AuthenticationUtils;
import lombo... |
# Ruby
Ruby support is available through the [Ruby extension](https://github.com/zed-industries/zed/tree/main/extensions/ruby).
The Ruby extension also provides support for ERB files.
## Choosing a language server
The Ruby extension offers both `solargraph` and `ruby-lsp` language server support.
`solargraph` is e... |
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
* 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 ... |
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
package frc.robot.commands;
import org.usfirst.frc3620.misc.PoseOnField;
import edu.wpi.first.wpilibj.DriverStation;
i... |
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
import {Initializable} from "@openzeppelin/contracts-upgradeable-0.8.13/proxy/utils/Initializable.sol";
import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";
abstract contract UpdatableOperatorFiltererUpgradeable is Initializable {
error Op... |
#include "Snake.hpp"
#include <iterator>
Snake::Snake(int snakeWidth, int cellCount) {
this -> snakeWidth = snakeWidth;
this -> cellCount = cellCount;
this -> direction = {1, 0};
this -> parts = {{cellCount / 2, cellCount / 2}};
}
void Snake::Update(bool ateApple) {
// Calculate where the head of... |
import React from 'react';
import { motion } from 'framer-motion';
import { Code2, Globe, Smartphone, Rocket, CheckCircle2 } from 'lucide-react';
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
import { Button } from '@/components/ui/button';
import { useNavigateToConta... |
class Airport {
flights = [];
addFlight(flightNumber, destination, status) {
this.flights.push({
flightNumber,
destination,
status,
});
}
findFlight(flightNumber) {
console.log(
this.flights.filter(flight => flight.flightNumber === flightNumber)
);
}
filterDelayedF... |
import React from 'react';
import { Input } from '../ui/Input';
import { PLATFORM_CONFIGS } from '../../lib/constants';
import type { SocialMediaPlatform } from '../../types';
interface ProfileUrlInputProps {
value: string;
onChange: (value: string) => void;
platform: SocialMediaPlatform | '';
error?: string;
... |
package com.example.DWShopProject.service;
import com.example.DWShopProject.dao.CartItemDto;
import com.example.DWShopProject.dao.CartDto;
import com.example.DWShopProject.entity.Cart;
import com.example.DWShopProject.entity.CartItem;
import com.example.DWShopProject.entity.Member;
import com.example.DWShopProject.ent... |
const mongoose = require("mongoose");
const bcrypt = require("bcrypt");
const employeeSchema = new mongoose.Schema(
{
firstName: {
type: String,
// required: true,
trim: true,
},
middleName: {
type: String,
trim: true,
},
lastName: {
type: String,
// requ... |
<!-- ========== App Menu ========== -->
<div class="app-menu navbar-menu">
<!-- LOGO -->
<div class="navbar-brand-box">
<!-- Dark Logo-->
<a routerLink="/" class="logo logo-dark">
<span class="logo-sm">
<img src="assets/images/black-logo.png" alt="" height="25">
</span>
<span class... |
import numpy as np
xa = [1, 2, 3, 4, 6, 12, 14, 28, 42, 420]
a = [(i, j) for i in xa for j in xa if i % j == 0]
xb = [10, 11, 13, 14, 15, 20, 25, 40, 50]
b = [(i, j) for i in xb for j in xb if i > j]
xc = [10, 11, 13, 14, 15, 20, 25, 40, 50]
c = [(i, j) for i in xc for j in xc if i < j]
def b_to_m(b, x):
res =... |
#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from Red Hat Security Advisory RHSA-2013:0898 and
# CentOS Errata and Security Advisory 2013:0898 respectively.
#
include("compat.inc");
if (description)
{
script_id(66776);
script_version("$Revis... |
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
public interface Ex42_ISaveable {
List<String> write();
void read(List<String> savedValues);
}
class Player implements Ex42_ISaveable {
// write code here
private String name;
private int hitPoints;
private... |
import {
CommandInteraction,
Message,
SlashCommandBuilder,
TextChannel,
} from "discord.js";
function randomIntFromInterval(min: number, max: number) {
return Math.floor(Math.random() * (max - min + 1) + min);
}
const data = new SlashCommandBuilder()
.setName("picksuperwinner")
.setDescription("Permet d... |
public class SortedArrayToBST {
public static void main(String[] args) {
int[] sortedArray = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};
SortedArrayToBST converter = new SortedArrayToBST();
TreeNode root = converter.convertToBST(sortedArray, 0, sortedArray.length - 1);
converter.inord... |
import { createSelector } from "reselect";
import { UIState, State, ModalParams } from "../store/types";
import { ActionTypeEnum } from "../actions";
import { createReducer } from "./reducer-utils";
const initialState: UIState = Object.freeze({
awake: true,
});
export default createReducer<UIState>(initialState, {
... |
import {
CookieValueTypes,
deleteCookie,
getCookie,
setCookie,
} from "cookies-next";
import { useEffect, useState } from "react";
import { type ZodSchema } from "zod";
import dayjs, { ManipulateType } from "dayjs";
type UseCookieSyncOptions<T> = {
key: string;
defaultValue: T;
schema: ZodSchema<T>;
ex... |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distr... |
package socialnetwork.domain;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
public class Message extends Entity<Long>{
private Long from;
private List<Long> to;
private String message;
private LocalDateTime date;
private Long reply;
/**
* Constructor ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.