text
stringlengths
184
4.48M
import React from 'react'; import { HeadFC, PageProps } from 'gatsby'; import { Badge, Box, Button, Divider, Heading, Spinner, Stack, Text, Tooltip, useDisclosure } from '@chakra-ui/react'; import { EditIcon } from '@chakra-ui/icons'; import dayjs from 'dayjs'; import { Avatar, BackButton, HoveredLink, Layout...
### A PHP application for tracking expenses using Custom PHP web framework(MVC) Framework feature: 1. Routeing Handle 2. Middleware handle 2. Template Engine 3. Dependency Injection Using Container 4. Form Validation 5. Database Connection Using PDO 6. Err...
import {t} from 'i18next'; import {z, ZodIssueCode, type ZodErrorMap} from 'zod'; import { ACCEPTED_IMAGE_EXTENSIONS, ACCEPTED_IMAGE_MIME_TYPES, ACCEPTED_IMPORT_FILE_EXTENSIONS, ACCEPTED_IMPORT_MIME_TYPES, MAX_FILE_SIZE, MAX_FILE_SIZE_MB, } from '~/config/system'; export const zodImage = z .custom<File>(...
let currentQuestion = 0; let score = 0; const questions = [ { question: "Qual é o nome do vírus que causa a COVID-19?", choices: [ "SARS-CoV-2", "H1N1", "Ebola", "HIV" ], correctAnswer: "SARS-CoV-2" }, { question: "Quai...
package com.services.impl; import com.dtos.CoursDto; import com.entities.Cours; import com.repositories.CoursRepository; import com.services.CoursService; import org.springframework.stereotype.Service; import javax.persistence.EntityNotFoundException; import java.util.ArrayList; import java.util.List; @Service("cour...
package Ejercicio33; import java.util.Scanner; public class Empleado extends Persona { private int codigoEmpleado; private int horasExtras; private String compañiaSeguro; public Empleado(String nombre, String direccion, String ciudad, int codigoEmpleado, int horasExtras, String compañiaSe...
import React from "react"; import { valueMultiDropdownType } from "@components/MultiDropdown/MultiDropdown"; import rootStore from "@store/RootStore"; import { useSearchParams } from "react-router-dom"; import CategoryDropdown from "./components/CategoryDropdown"; import CoinsContainer from "./components/CoinsContain...
import { Controller, Get, Post, Body, Patch, Param, Delete, Query, } from '@nestjs/common'; import { ResumesService } from './resumes.service'; import { CreateResumeDto, CreateUserCvDto } from './dto/create-resume.dto'; import { UpdateResumeDto } from './dto/update-resume.dto'; import { ResponseMessage ...
<?php namespace App\Entity; use App\Entity\Trait as HelperTrait; use App\Repository\ProductRepository; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\ArrayCollection; #[ORM\HasLifecycleCallbacks] #[ORM\Entity(repositoryClas...
#pragma once #include <stdint.h> #include <stdio.h> #include <vector> #include <set> #include <map> using namespace std; // piece types const uint8_t PAWN = 0; const uint8_t KNIGHT = 1; const uint8_t BISHOP = 2; const uint8_t ROOK = 3; const uint8_t QUEEN = 4; const uint8_t KING = 5; // color types const uint8_t W...
1. Intro --> Model in MVC contains a set of classes that represent data and the logic to manage that data. --> For data, we will use Employee class --> For retrieving and saving data, we will use MockEmployeeRepository class --> In addition to the Employee class that represent the data, model also contains the class...
# EasyAdminUltimate **EasyAdminUltimate** is a comprehensive and enhanced template for EasyAdmin that offers a wide range of additional features and ready-to-use functionalities. This robust platform is designed to facilitate the creation of powerful dashboards with minimal effort, making it suitable for various proje...
// // PreviewView.swift // netflix // // Created by Zach Bazov on 30/09/2022. // import UIKit final class PreviewView: UIView { private var viewModel: PreviewViewViewModel! private(set) var mediaPlayerView: MediaPlayerView! private(set) lazy var imageView = createImageView() init(on parent: UI...
package com.ross.jettrivia.screens import androidx.compose.runtime.MutableState import androidx.compose.runtime.mutableStateOf import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.ross.jettrivia.data.DataWrapper import com.ross.jettrivia.model.QuestionItem import com.ross.jettrivia.r...
import os os.chdir('../') from dataclasses import dataclass from pathlib import Path @dataclass(frozen=True) class DataTransformationConfig: root_dir: Path data_path: Path tokenizer_name: Path from textSummarizer.constants import * from textSummarizer.utils.common import read_yaml, create_directorie...
import { Module } from '@nestjs/common' import { ConfigModule, ConfigService } from '@nestjs/config' import { TypeOrmModule } from '@nestjs/typeorm' import { AuthModule } from './auth/auth.module' import { CategoryModule } from './category/category.module' import { CityModule } from './city/city.module' import { EmailM...
import './App.css'; import Navbar from './Components/Navbar/Navbar'; import { BrowserRouter,Routes,Route } from 'react-router-dom'; import { Shop } from './Pages/Shop'; import { ShopCategory } from './Pages/ShopCategory'; import { Product } from './Pages/Product'; import { Cart } from './Pages/Cart'; import { LoginSign...
### 🔥 Hé toi, jeune Padawan, commence par publier ta première instance AWS avec Terraform Mini Cours ^^ # 🌐 Introduction à Terraform ## ❓ Qu'est-ce que Terraform ? - 🛠 Un outil d'**Infrastructure as Code (IaC)** développé par HashiCorp. - ✨ Permet de définir et de provisionner l'infrastructure cloud à l'aide de ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.genDefaultLookupConfig = exports.LookupSelectVaultModeOnCreateEnum = exports.LookupSelectionModeEnum = void 0; /** * Enum definition of possible lookup selection behavior values */ var LookupSelectionModeEnum; (function (LookupSelect...
import {DspAPIRequest} from 'api/dsp.api'; import {useCancelRequest} from 'hooks'; import {useMutation, useQueryClient} from 'react-query'; import {GET_DSPS} from './constants'; /** * Update a Dsp */ export function useEditDsp() { const {cancelToken} = useCancelRequest(); const client = useQueryClient(); ret...
/* * GUIClasses.h, part of VCMI engine * * Authors: listed in file AUTHORS in main folder * * License: GNU General Public License v2.0 or later * Full text of license available in license.txt file, in main folder * */ #pragma once #include "../lib/GameConstants.h" #include "../lib/ResourceSet.h" #include "../l...
""" First three functions adapted from https://github.com/zongyi-li/fourier_neural_operator/blob/master/utilities3.py and https://github.com/nickhnelsen/FourierNeuralMappings """ import torch import operator from functools import reduce import numpy as np import scipy.io # import hdf5storage import pdb import yaml i...
'use client' import { useState } from 'react' import { Product } from '@/types/Product' import { Table, TableCell, TableHead, TableHeader, TableRow, } from '@/components/ui/table' import { ProductsInMemory } from '../productsDb' import { Button } from '@/components/ui/button' import { DollarSign, Minus, Plus...
package Exersicis; import java.util.Scanner; public class tresraya { private final static Scanner sc = new Scanner(System.in); public static void main(String[] args) { String[][] tablero = new String[3][3]; startingGame(tablero); } private static String[] askName() { System.out.println("Starting game...\n...
from django.http import JsonResponse from django.core.cache import cache import requests from django.contrib.auth.models import User from game.models.player.player import Player # from django.contrib.auth import login from random import randint def receive_code(request): # 申请授权令牌 access_token 和用户的 openid ...
import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:go_router/go_router.dart'; import 'package:tiktok_clone/constants/sizes.dart'; import 'package:tiktok_clone/features/inbox/chat_detail_screen.dart'; class ChatScreen extends StatefulWidget { stati...
package com.alex.sitiy; import com.amazonaws.services.lambda.runtime.Context; import com.amazonaws.services.lambda.runtime.RequestHandler; import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPEvent; import com.amazonaws.services.lambda.runtime.events.APIGatewayV2HTTPResponse; import com.fasterxml.jackso...
/** * @details Calculates the number of permutations and combinations. * @external_link (Permutation And Combinations)[https://www.geeksforgeeks.org/permutation-and-combination/] */ /** * @brief Calculates the factorial of the given number. * @param num: integer * @details Factorial of n = n * (n - 1) * (n - 2) ...
/********************************************************************* * \file TextureSamplerBuilder.h * \brief * * \author Lancelot 'Robin' Chen * \date July 2022 *********************************************************************/ #ifndef TEXTURE_SAMPLER_BUILDER_H #define TEXTURE_SAMPLER_BUILDER_H #in...
import * as assert from 'assert'; import { DecoratedClass } from 'test/fixtures/validators'; describe('ParameterValidators', function() { describe('@cardIndex', function() { describe('for single parameter', function() { it('should throw error if value is negative', function() { const decoratedClass...
# Activation Function Approximation Using Piecewise Linear and RL ## Description A system for using RL to determine segment points for piecewise linear approximation of activation functions like sigmoid, SiLU(swish), GELU, et cetera. This project is part of the ISOCC2023 paper "Automated Generation of Piecewise Linear...
function oldPriority=Priority(newPriority) % oldPriority=Priority([newPriority]) % % Query and optionally set the execution priority of your script to % 'newPriority' and switch from non-realtime to realtime scheduling (for % 'newPriority' values greater than zero). % % Higher priority levels will reduce the chance of ...
<!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>Profile</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel...
const amqp = require('amqplib'); require('dotenv').config(); const processBloodRequest = require('./bloodSearchServiceLogic'); const cron = require('node-cron'); const sgMail = require('@sendgrid/mail'); sgMail.setApiKey(process.env.SG_MAIL_API_KEY); const bloodQueue = 'blood_request_queue'; const express = require('ex...
--- permalink: LINKS/ --- # LINKS --- ## WEEK 01 * [Operating System Tutorial](https://www.tutorialspoint.com/operating_system/index.htm) --- This website provides extensive OS-related learning resources and helpful exam questions with answers! * [Computer Basics: Understanding Operating Systems](https://youtu.be/fk...
import { Dispatch } from '@reduxjs/toolkit'; import { StateScheme } from '@/app/providers/StoreProvider'; import { userActions } from '@/entities/User'; import { TestAsyncThunk } from '@/shared/lib/tests/TestAsyncThunk/TestAsyncThunk'; import { loginByUsername } from './loginByUsername'; describe('loginByUsername', ()...
// SPDX-License-Identifier: AGPL-3.0-or-later // Copyright (C) 2020 Mitchell Wasson // This file is part of Weaklayer Sensor. // Weaklayer Sensor 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, eit...
<!DOCTYPE html> <html> <head> <title>Infinite Tracker</title> <style> #map { position: fixed; top: 0; left: 0; width: 100%; height: 100%; } .plane-icon { width: 24px; height: 24px; background-...
.TH jfs_fscklog 8 "October 28, 2002" " " "Extract/Display JFS fsck Log" .SH NAME .B jfs_fscklog \- extract a JFS fsck service log into a file and/or format and display the extracted file .SH SYNOPSIS .B jfs_fscklog [ .B -d ] [ .BI -e " device" ] [ .BI -f " output.file" ] [ .B -p ] [ .B -V ] .SH DESCRIPTION .PP .B jf...
import React, { useState, useEffect } from 'react'; import { Button, Card, Col, Container, Form, Row } from 'react-bootstrap'; import FlashCards from '../components/FlashCards'; import { getPracticeCards, getPracticeModeNames } from '../utils/cards'; import { getLanguageNames, getWordTypeNames } from '../utils/languag...
SET SERVEROUTPUT ON; SET VER OFF; CREATE OR REPLACE PROCEDURE greeting ( pl_saluation VARCHAR2 := 'Hello', pl_name VARCHAR2 ) AS BEGIN DBMS_OUTPUT.PUT_LINE(pl_saluation || CHR(32) || pl_name); END; / CREATE OR REPLACE PROCEDURE PRINT_TWO_NUMBERS(pl_greater_number NUMBER, pl_lesser_number ...
import { ViewIcon } from "@chakra-ui/icons"; import { IconButton, useDisclosure, Modal, ModalOverlay, ModalContent, ModalHeader, ModalFooter, ModalBody, ModalCloseButton, Input, Button, FormLabel, FormControl, Image, Text, } from "@chakra-ui/react"; import React from "react"; const Profil...
import React from 'react' import styles from './Create.module.scss' import { Exercise } from './Exercise' export const Create_html = ({ setOpenCreate, setOpenIcon, setOpenExercises, titleWorkout, setTitleWorkout, iconWorkout, setIconWorkout, colorWorkout, setColorWorkout, createWorkout, listExercises, set...
package report; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import java.util.Scanner; import infoexchange.EnqReplies; import infoexchange.Enquiries; import infoexchange.EnquiriesArray; import users.Staff; import users.Student; import users.Users; import util...
import { ActivityIndicator, Image, ScrollView, Text, View } from "react-native" import { useEffect, useState } from "react"; import MyStyle from "../../styles/MyStyle"; import Apis, { endpoints } from "../../Apis"; import moment from "moment"; import { TouchableOpacity } from "react-native"; const Home = ({route, navi...
#include <stdio.h> #include <stdlib.h> typedef struct Process { char name[20]; int arrival_time; int execution_time; int priority; } Process; void sjf_with_preemption(Process processes[], int n, int time_slice, FILE *output_file) { int current_time = 0; Process* ready_queue[n]; int front =...
package handlers import ( "net/http" authError "github.com/MiracleX77/CN334_Animix_Store/auth/errors" "github.com/MiracleX77/CN334_Animix_Store/auth/models" "github.com/MiracleX77/CN334_Animix_Store/auth/usecases" "github.com/labstack/echo/v4" "github.com/labstack/gommon/log" ) type authHttpHandler struct { ...
import { InformationCircleIcon } from '@heroicons/react/20/solid'; export default function Tifoid() { return ( <div className="relative bg-white px-6 py-32 lg:px-8"> <div className="absolute inset-x-0 -top-40 -z-9 transform-gpu overflow-hidden blur-3xl sm:-top-80" aria-hidden="true" >...
package com.dpiqb.client; import com.dpiqb.Helper; import com.dpiqb.db.DatabaseMigrateServiceForTest; import com.dpiqb.db.HibernateUtil; import org.hibernate.Session; import org.hibernate.query.Query; import org.junit.jupiter.api.*; import java.util.List; import java.util.Random; public class ClientCrudServiceTest {...
<!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>Document</title> </head> <body> <div id="app"> <!-- 默认传递event参数 --> <button @click="btn1...
<!DOCTYPE html> <html lang="en" class="scroll-smooth"> <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"> <script src="https://cdn.tailwindcss.com"></script> <script src="https://unpkg.com/@lottie...
<?php /** * @file * Contains \Drupal\page_manager_ui\Form\VariantPluginAddBlockForm. */ namespace Drupal\page_manager_ui\Form; use Drupal\Component\Plugin\PluginManagerInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\page_manager\PageVariantInterface; use Drupal\user\SharedTempStoreFactory; use Symf...
package com.badr.security.config; import jakarta.servlet.Filter; import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpMethod; import org.springframework.security.authentication.Authent...
import axios from "axios"; import React, { useEffect, useState } from "react"; import Popup from "../../Popup"; import EditArticlePanel from "./EditArticlePanel"; function EditArticle(props) { const [userData, setUserData] = useState([]); const [article] = useState(props.article); const [reviewerData] = useStat...
import { Pagination } from "antd"; import { ContentTableLoader } from "components"; import jsConvert from "js-convert-case"; import React, { useEffect, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { fetchTransaction, updateTransaction, } from "store/Feature/FeatureTransact...
package com.zyx.zyxojsandbox; import cn.hutool.core.date.StopWatch; import cn.hutool.core.io.FileUtil; import cn.hutool.core.io.resource.ResourceUtil; import com.github.dockerjava.api.DockerClient; import com.github.dockerjava.api.async.ResultCallback; import com.github.dockerjava.api.command.*; import com.github.dock...
import React, { useEffect, useState } from "react"; import './Loading.scss'; /** * Loading animation * @returns React Module to display the loading animation * @author Noah Sternberg * @since V1.0.0 */ const LoadingAnimation = () => { const [dots, setDots] = useState(0); // Effect to show loading -> load...
<template> <div class="profile"> <Modal v-if="modalActive" :modalMessage="modalMessage" @close-modal="closeModal" /> <div class="container"> <h2>Account Settings</h2> <div class="profile-info"> <div class="initials">{{ profileInitials }}</div> <!-- <div class=...
from blogr import db from datetime import datetime class User(db.Model): __tablename__ = 'users' id = db.Column(db.Integer, primary_key = True) username = db.Column(db.String(50), unique = True, nullable = False) email = db.Column(db.String(120), unique = True, nullable = False) password = db.Colum...
using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using PaymentApplicationAPI.Domain.Models; using PaymentApplicationAPI.Infrastructure.DataAccessLayer; using PaymentApplicationAPI.Infrastructure.Entities; using System; using System.Collections.Generic; using System.Linq; using System.Net; using...
import axios, { AxiosRequestConfig, AxiosResponse, ResponseType } from 'axios'; import config from '@/config'; import { createPercentProgressNotification, fail, success, updateNotification } from '@/store/notificiationStore'; import { ContactInterface, SharedFileInterface } from '@/types'; import { calcExternalResource...
// https://www.youtube.com/watch?v=SmKM-8Q0Egw // console.count() - counts how many times this particular line has been called console.count(); console.count(); console.count(); console.count("label"); console.count("label"); console.countReset("label"); console.count("label"); // console.time() - starts a timer ...
<x-admin-layout> <section> <div class="container"> @if (Session::has('success') || Session::has('error')) <div class="alert alert-{{ Session::has('success') ? 'success' : 'danger' }} alert-dismissible fade show" role="alert"> {{ Session::ha...
package http import ( "fmt" "net" "net/http" "strings" "time" "github.com/finddiff/RuleBaseProxy/adapter/inbound" "github.com/finddiff/RuleBaseProxy/common/cache" N "github.com/finddiff/RuleBaseProxy/common/net" C "github.com/finddiff/RuleBaseProxy/constant" authStore "github.com/finddiff/RuleBaseProxy/list...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* philo.h :+: :+: :+: ...
# GNU Taler Wallet & Anastasis Web UI This repository contains the implementation of a wallet for GNU Taler written in TypeScript and Anastasis Web UI ## Dependencies The following dependencies are required to build the wallet: - python>=3.8 - nodejs>=12 - jq - npm - pnpm - zip ## Installation The CLI version of ...
/* Copyright (C) 2004, 2006 Pablo Bleyer Kocik. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following discla...
<!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>Document</title> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://font...
SET ECHO OFF REM *************************************************************************** REM ******************* Troubleshooting Oracle Performance ******************** REM ************************* http://top.antognini.ch ************************* REM ***************************************************************...
"""Classes & functions supporting compile_training_data.py.""" from bs4 import BeautifulSoup as Soup from bs4.element import Comment from csv import reader from io import BytesIO from os import mkdir from os.path import abspath, exists, join from PyPDF2.pdf import PdfFileReader from requests import get from string imp...
import 'dart:developer'; import 'package:github_treasures/core/config/api_config.dart'; import 'package:github_treasures/core/data/api_client/api_response_model.dart'; import 'package:github_treasures/core/data/api_client/get_api.dart'; import 'package:github_treasures/core/data/remote/authorized_remote.dart'; import ...
// // LeftCornerRightCorner.swift // Essential-Animations // // Created by Ajay Gupta on 10/29/21. // import SwiftUI struct LeftCornerRightCorner: View { @State private var change = false var body: some View { VStack(spacing: 20){ Circle() .foregroundCo...
const chai = require('chai'); const assert = chai.assert; const expect = chai.expect; import Milestone from '../Milestone.js'; export default function suite() { beforeEach(function() { Milestone._id = 0; this.m = new Milestone(0, 0, "custom id", "custom descr"); }); it('has correct initial...
import torch import torch.nn as nn class AttrProxy(object): """ Translates index lookups into attribute lookups. To implement some trick which able to use list of nn.Module in a nn.Module see https://discuss.pytorch.org/t/list-of-nn-module-in-a-nn-module/219/2 """ def __init__(self, module, pre...
<template> <div class="setting__container"> <h2 class="page__title1">アカウント設定</h2> <div class="main__part"> <div class="menu_part"> <h3>{{ $store.getters['auth/user'].com_name }}<br/>{{ $store.getters['auth/user'].name }}様</h3> <a :class="{ current: tab == 1 }" @click="() => { tab = ...
/** * This file is part of the NocoBase (R) project. * Copyright (c) 2020-2024 NocoBase Co., Ltd. * Authors: NocoBase Team. * * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. * For more information, please refer to: https://www.nocobase.com/agreement. */ import React, { forwardRef...
/// <reference path="../interfaces.d.ts" /> import React from "react"; declare var d3: any; class Chart extends React.Component <IAppState> { constructor(props:IAppState) { super(props); this.state = { checkedGrid : this.props.checkedGrid, checkedLabelAxis: this.props.checkedLabelAxis } }...
@using BackEndProject.Areas.Admin.ViewModels; @model CoursesVM @{ ViewData["Title"] = "Update"; Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml"; } <div class="content-wrapper col-11"> <div class="row"> <div class="col-md-12 grid-margin stretch-card"> <div class="card"> ...
pragma solidity ^0.8.0; // SPDX-License-Identifier: apache 2.0 /* Copyright 2022 Debond Protocol <info@debond.org> 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.apac...
package org.usvm.samples.arrays import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test import org.usvm.CoverageZone import org.usvm.samples.JavaMethodTestRunner import org.usvm.test.util.checkers.eq import org.usvm.test.util.checkers.ge import org.usvm.test.util.checkers.ignoreNumberOfAnalysisResults ...
/** * @file llfloaterdaycycle.h * @brief LLFloaterDayCycle class definition * * $LicenseInfo:firstyear=2007&license=viewergpl$ * * Copyright (c) 2007-2010, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab * to you under the te...
# frozen_string_literal: true require 'rails_helper' RSpec.describe 'Tasks', type: :request do let!(:project) { create(:project) } let!(:task) { create(:task, project_id: project.id) } let!(:user) { create(:user) } before do allow_any_instance_of(TasksController).to receive(:current_user).and_return(user...
import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_web_ptb/constants/dimens.dart'; import 'package:flutter_web_ptb/master_layout_config.dart'; import 'package:flutter_web_ptb/providers/userdata.provider.dart'; import 'package:flutter_web_ptb/theme/th...
import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.TreeMap; public class Adventure implements Commodity { private final int id; private final String name; private int level = 1; private int hp = 500; private int maxBots = 1; private long price; priv...
<!DOCTYPE html> <html lang="ru"> <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>Document</title> <!--project fonts--> <link rel="preconnect" href="https://fonts.googleapis.c...
import { BadRequestException, Body, Controller, Get, HttpCode, HttpStatus, Post, Request, UnauthorizedException, } from '@nestjs/common'; import { AuthService } from './auth.service'; import { promisify } from 'util'; import { UserDto } from 'src/chatdb/dto/user'; import { Public } from './roles.decor...
/* * "Commons Clause" License Condition v1.0 * * The Software is provided to you by the Licensor under the * License, as defined below, subject to the following condition. * * Without limiting other conditions in the License, the grant * of rights under the License will not include, and the * License does not g...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import '../styles/ProductCard.css'; export default class ProductCard extends Component { render() { const { searchData, addToCart } = this.props; const { title, price, thumbnail,...
let score = JSON.parse(localStorage.getItem('score')) || { Wins: 0, Losses: 0, Ties: 0 } updateScoreElement(); // if (!score){ // score = { // Win: 0, // Losses: 0, // Tie : 0 // } // } //using regular function // let isautoPlaying = false; // let intervalId; // function autoPlay(){ ...
/* * Copyright (C) 2008 Kristian Høgsberg <krh@redhat.com> * Copyright (C) 2008 Red Hat, Inc * * 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, or * (at ...
# 🚀 Java 클래스 로더 > #### 📃 Java 컴파일 챕터 작은 목차 > - [자바 컴파일 과정](./java_compile_sequence.md) > - [자바 클래스 로더](./java_class_loader.md) - 현재 포스트 > - [자바 실행 엔진](./java_execution_engine.md) ## 📍 0. 들어가기 전에 Java는 **컴파일 시점이 아닌 런타임 시점에 클래스를 로드하고 링크 하는 동적 로딩 방식**을 사용한다. 이 때 각 클래스를 동적으로 로드하는 역할을 `클래스 로더`가 담당한다. **동적 로딩**은 `로...
import { useState } from "react"; function TodoRow1({ onNewItem }) { let [toDoName, setToDoName] = useState(); let [toDoDate, setToDoDate] = useState(); function handleNameChange(event) { let name = event.target.value; setToDoName(name); } function handleDateChange(event) { let date = event.targe...
/* The Apache Software License, Version 1.1 Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of ...
require('dotenv').config(); const express = require('express'); const { Server } = require('ws'); const { Deepgram } = require('@deepgram/sdk'); const app = express(); const PORT = process.env.PORT || 3001; const deepgramApiKey = '11dd3c7b32a0b1fa5e360742b8c3c73346c55ebc'; const deepgram = new Deepgram(deepgramApiKey)...
import { gravite, marioImage, terrainSkyBoundary } from "../conf"; import { State } from "./state"; export class Character { x: number; y: number; vx: number; vy: number; dx: number; dy: number; size: { height: number; width: number; }; img: HTMLImageElement; constructor(x: number,...
import React, { useEffect } from 'react' import { connect } from 'react-redux' import { fetchUsers } from '../redux' function UserContainer({ userData, fetchUsers }) { useEffect(() => { fetchUsers(); }, []) return userData.loading ? ( <p>Loading...</p>) : userData.error ? ( ...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Bootstrap Pricing Table</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvK...
import java.util.Hashtable; class Solution { public ListNode deleteDuplicatesUnsorted(ListNode head) { Map<Integer, Integer> map = new HashMap<>(); ListNode curr = head; while (curr != null) { map.put(curr.val, map.getOrDefault(curr.val, 0) + 1); curr = curr.next; ...
// This file manages everything related to the local storage data on the phone import Foundation let userInfoFileName: String = "userInfo" var timeFormat: Int = 0 // Default: 24 Hour format var currency: Int = 0 // Default: BHD // [[ MANAGING APP'S SETTINGS ]] // Get the time format func getTimeFormatStr() -> St...
#define ENABLE #define MINBUFFERS using System; #if !FEATURE_CORECLR using System.Diagnostics.Tracing; #endif using System.Runtime.InteropServices; using System.Runtime.ConstrainedExecution; using System.Collections.Generic; using System.Collections.Concurrent; using System.Threading; using System.Runtime.CompilerServi...