text
stringlengths
184
4.48M
import React from 'react'; import html2canvas from "html2canvas"; import { jsPDF } from "jspdf"; const MyResume = ({rootElementId , downloadFileName}) => { const downloadPdfDocument = () => { const input = document.getElementById(rootElementId); // Adjust the scale factor for a larger size (e...
// opgave 1A function ShakeFunctie(woordDatGeschudtMoetWorden){ const characters = woordDatGeschudtMoetWorden.split(''); for (let i = characters.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [characters[i], characters[j]] = [characters[j], characters[i]]; } const geschud...
package java2; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.FutureTask; /** * 创建线程的方式三:实现Callable接口. ---JDK 5.0新增 * * * 如何理解实现Callable接口的方式创建多线程比实现Runnable接口创建多线程方式强大? * 1.call()方法可以有返回值的。 * 2.call()可以抛出异常,被外面的操作捕获,获取异常的信息 * 3.Callable是支持泛型的 ...
import React, { useState } from "react"; import { Button, Dialog, DialogActions, DialogContent, DialogTitle, TextField, } from "@mui/material"; import axios from "axios"; const ProductCreationPopup = ({ open, handleClose, refreshProducts }) => { const [productDetails, setProductDetails] = useState({ ...
import React, { useState, ChangeEvent } from 'react'; import TextField from '@mui/material/TextField'; import Button, { ButtonProps } from '@mui/material/Button'; import Grid from '@mui/material/Grid'; import Box from '@mui/material/Box'; import Select, { SelectChangeEvent } from '@mui/material/Select'; import MenuItem...
import ActionTypes, { Action, IPost } from "../actions/types"; export interface IPostState { posts?: IPost[]; post?: IPost; loading: boolean; error: {}; } const initialState = { posts: [], loading: true, error: {}, }; export const post = (state: IPostState = initialState, action: Action): IPostState =>...
import React from 'react'; import { useDataPlanets } from '../context/TableProvider'; import { useFilterPlanets } from '../context/FilterProvider'; import tableHeader from '../public/tableHeader'; function Table() { const { planetFilter } = useFilterPlanets(); const { data } = useDataPlanets(); let planetsFromD...
#![feature(is_sorted, let_chains, new_uninit, maybe_uninit_write_slice)] use base_case::sort_simple_cases; use constants::{BASE_CASE_MULTIPLIER, BASE_CASE_SIZE, BLOCK_SIZE, MIN_PARALLEL_BLOCKS_PER_THREAD}; use parallel::parallel_ips4o; use rayon::current_num_threads; use sequential::sequential_ips4o; use std::{cmp::Ord...
from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from django.views.decorators.cache import cache_control from mariadmin.models import MessageFlow, WebsiteHeadingImage from django.db.models import Q class ProcessingUtilities: def getUserMessageFlows(self, u...
"use strict"; /** * This file contains all the global local storage variables that need to be accessed on startup or during the app lifecycle. These are the variables that are not sent by the renderer process but are the localstorage variables used by the main process. * Our goal is to send as many variables as possi...
<template> <div> <form @submit.prevent="submitForm"> <div> <label for="name">Nom:</label> <input type="text" id="name" v-model="form.name"> </div> <div> <label for="email">Email:</label> <input type="email" i...
//: [Previous](@previous) /* Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order. ``` Example 1: Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] ``` */ import Foundation func topKFrequent(_ nums: [Int], _ k: Int) -> [Int] { var...
#' Hard clustering using k-means #' #' This function expects output from custom minimap test dataset that contains original locations of mapped reads in the genome. #' #' @param counts.l A \code{list} of directional read counts per long read/contig per library. #' @param num.clusters Desired number of clusters or clust...
package com.cursoandroid.servicesapp import android.content.ComponentName import android.content.Context import android.content.Intent import android.content.ServiceConnection import android.os.Bundle import android.os.IBinder import android.util.Log import android.view.View import androidx.appcompat.app.AppCompatActi...
import 'package:flutter/material.dart'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; class MyAppointment extends StatefulWidget { const MyAppointment({Key? key}) : super(key: key); @override State<MyAppointment> createState() => _MyAppointmentState();...
<%= form_with(model: message, class: "px-8 pt-6 pb-8 mb-4") do |form| %> <% if message.errors.any? %> <div class="text-red-500 bg-red-100 border border-red-500 p-3 rounded mb-2"> <h2><%= pluralize(message.errors.count, "error") %> prohibited this message from being saved:</h2> <ul> <% message.errors.each do |...
/* Copyright 2016 Codependable, LLC and Jonathan David Guerin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ag...
import NaturalLanguage import Foundation public class SwiftTfIdf { public var rawSentences = [String]() // raw sentences public var topN: Int // how many top word want to get public var stopWords: [String] // the stop word :) public init(text: String, stopWords: [String], topN: Int) { self...
// // UIPinchGestureRecognizerDemoController.swift // SwiftHelper (iOS) // // Created by sauron on 2022/6/23. // Copyright © 2022 com.teenloong. All rights reserved. // import SwiftUI import SnapKit class UIPinchGestureRecognizerDemoController: SUIBaseViewController { private var label: UILabel! override...
# Gitのリポジトリをクローンしてmainブランチをチェックアウト $ git clone -b main https://git.kernel.org/pub/scm/git/git.git $ cd git $ git checkout v2.9.0-rc2 Note: switching to 'v2.9.0-rc2'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state...
<template> <div class="project-page-style"> <FoldingCard title="基础配置"> <el-form ref="refForm" label-width="115px" :inline="true" :model="basicConfig" class="pr-5"> <div class="mb-10px"> <el-form-item label="选择回显配置" label-position="left"> <el-select v-model="chooseTmp" filterabl...
import 'dart:developer'; import 'package:allxclusive/core/utills/platform/platform.dart'; import 'package:flutter/material.dart'; import 'package:gradient_borders/input_borders/gradient_outline_input_border.dart'; import '../../../../core/theme/colors.dart'; import '../../../../core/theme/gradients.dart'; class Auth...
package com.NewProject.NewPage.service.Impl; import com.NewProject.NewPage.entity.Post; import com.NewProject.NewPage.exception.ResourceNotFoundException; import com.NewProject.NewPage.payload.PostDto; import com.NewProject.NewPage.repository.PostRepository; import com.NewProject.NewPage.service.PostService; import or...
# Subscribers API Documentation ## Base URL `http://localhost:3000/` `https://subscribe-0cjn.onrender.com/` ## Endpoints ### 1. Get All Subscribers **URL:** `/subscribers` **Method:** `GET` **Description:** Retrieves an array of all subscribers. **Response:** [ { "_id": "60c72b2f9f1b8b0...
<%@ page import = "java.sql.*, java.util.*"%> <%@ page language="java" contentType="text/html" pageEncoding="UTF-8"%> <!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"> ...
// ==UserScript== // @name Add Custom Repositories to GitHub Profile // @namespace http://tampermonkey.net/ // @version 1.0 // @description Add custom GitHub repositories to the profile page // @author imekaku // @icon https://github.githubassets.com/favicons/favicon.png // @match ...
import { useEffect, useState } from "react"; import { Flex, Image, Text } from "@chakra-ui/react"; export const UserPage = ({ userId }) => { const [user, setUser] = useState(null); useEffect(() => { //Fetching user info based on userId const fetchUser = async () => { try { const response = a...
using Auth.Data; using Auth.Extensions; using Auth.Services; using Auth.Services.IServices; using Microsoft.EntityFrameworkCore; using Microsoft.IdentityModel.Tokens; using System; using System.Text; var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddControllers()...
import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core';import { IReceipt } from '../models/Receipt'; import { Observable } from 'rxjs'; import { config } from '../config/config'; const url = `${config.backendUrl}/receipts` @Injectable({ providedIn: 'root' }) export class Recei...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
<?php if( ! function_exists( 'cleverfox_gradiant_dynamic_styles' ) ): function cleverfox_gradiant_dynamic_styles() { $output_css = ''; /** * Logo Width */ $logo_width = get_theme_mod('logo_width','140'); if($logo_width !== '') { $output_css .=".logo img, .mobile-logo img { max-w...
import { Component, OnInit } from "@angular/core"; import { GroupService } from "src/app/services/group.service"; import { LocalStorageService } from "src/app/services/local-storage.service"; import { MatDialog } from '@angular/material/dialog'; import { CreateGroupDialogComponent } from "src/app/components/create-grou...
# Migración Para crear una migración nos movemos dentro de la carpeta del proyecto y ejecutamos el comando: ```php php artisan make:model Task -m ``` Esto automáticamente crea un fichero en la carpeta `database/migrations/<timestap>_create_tasks_table.php`. Dentro de este fichero php se define la estructura que va...
// @testmode wasi import Int32 "mo:base/Int32"; import Order "mo:base/Order"; import Iter "mo:base/Iter"; import Suite "mo:matchers/Suite"; import T "mo:matchers/Testable"; import M "mo:matchers/Matchers"; let { run; test; suite } = Suite; let maximumInt32asInt = +2 ** 31 - 1 : Int; let maximumInt32asNat32 = 2 ** 3...
{\rtf1\ansi\deff0\nouicompat{\fonttbl{\f0\fnil\fcharset0 Courier New;}} {\colortbl ;\red0\green0\blue255;} {\*\generator Riched20 10.0.16299}\viewkind4\uc1 \pard\f0\fs22\lang1033\par WELCOME TO DROIDS 1.20\par \par Our main goal is to try to visualize the impact of one of the longest time scale processes in the univer...
using Microsoft.EntityFrameworkCore; using sultan.Domain.Models; namespace sultan.Service.Impls; public class BookService : IBookService { private static readonly Context Db = new Context(); /// <summary> /// Возвращает список всех книг из бд. /// </summary> /// <returns>Список книг.</returns> ...
# frozen_string_literal: true module Langchain # Langchain::Message are the messages that are sent to LLM chat methods class Message attr_reader :role, :content, :tool_calls, :tool_call_id ROLES = %w[ system assistant user tool ].freeze # @param role [String] The role of t...
= Device handling This document describes how the IEC or IEEE488 device handling is done. == Overview The Commodore computers use a standard protocol on either the serial IEC (C64, VIC20, ...) or the parallel IEEE488 (PET, CBM-II) busses. The protocol can handle devices on the bus using an address between 0 and 30. ...
import _ from "lodash"; import { useEffect, useRef, useState } from "react"; import DrinkList from "./components/DrinkList"; import Header from "./components/Header"; import IngredientsList from "./components/IngredientsList"; import InputIngredient from "./components/InputIngredient"; const fetchDrink = async (name: ...
package com.ganak.activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText; import com.ganak.R; import com.ganak.common.Common; import com.g...
import 'react-native-gesture-handler'; import { StatusBar } from 'expo-status-bar'; import React from 'react'; import { NavigationContainer } from '@react-navigation/native'; import { createStackNavigator } from '@react-navigation/stack'; import Homepage from './Home'; import { Platform } from 'react-native'; import { ...
<p> </p> <div class="warning"> <p>Support for extensions using XUL/XPCOM or the Add-on SDK was removed in Firefox 57, released November 2017. As there is no supported version of Firefox enabling these technologies, this page will be removed by December 2020.</p> <p>Add-ons using the techniques described in this docum...
int numberOfApples = 12; decimal pricePerApple = 0.35M; Console.WriteLine( "{0} apples cost {1:C}", arg0: numberOfApples, arg1: pricePerApple * numberOfApples); string formatted = string.Format( "{0} apples cost {1:C}", arg0: numberOfApples, arg1: pricePerApple * numberOfApples); //WriteToFi...
package Bulls_and_Cows_299; import java.util.*; public class Solution { public static String getHint(String secret, String guess) { HashMap<Character, Integer> h = new HashMap(); for (char s : secret.toCharArray()) { h.put(s, h.getOrDefault(s, 0) + 1); } int bulls = 0, cows = 0; int n = g...
//jshint esversion:6 require("dotenv").config(); const express = require("express"); const bodyParser = require("body-parser"); const ejs = require("ejs"); const mongoose = require("mongoose") const encrypt = require("mongoose-encryption") const app = express(); app.set('view engine', 'ejs'); app.use(bodyParser.url...
import React from 'react'; import { useDispatch } from 'react-redux'; import { Link } from 'react-router-dom'; import Swal from 'sweetalert2'; import { startRegister } from '../../actions/auth'; import { useForm } from '../../hooks/useForm'; export const RegisterScreen = () => { const dispatch = useDispatch(); ...
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> </head> <body> <input type="text" id="giNum" readonly><br> <input type="text" id="giName"><br> <textarea id="giDesc"></textarea><br> <div id="fileDiv" style="border:1px solid blue"> <!--<input type="file" id="file1"><input t...
<?php /** * baseinstall Theme Customizer * * @package baseinstall */ /** * Add postMessage support for site title and description for the Theme Customizer. * * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ function baseinstall_customize_register( $wp_customize ) { $wp_customize->get_se...
import React, { useState, useEffect } from "react"; import { Paper } from "@mui/material"; import Box from "@mui/material/Box"; import Container from "@mui/material/Container"; import { styled } from "@mui/material/styles"; import { over } from "stompjs"; import SockJS from "sockjs-client"; import SideNavBarPatient fro...
"""Pokemon Battle Simulator This module simulates a battle between two pokenon, given their names It uses flask to create a local server and routes localhost:5000/battle and localhost:5000/show_previous_battles It save all battle logs to a mysql database Functions: battle: routes localhost:5000/battle show_pr...
package factory; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; import car.Car; import car.Lodgy; import resources.Color; import resources.Level; import resources.Type; @Com...
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="UTF-8"%> <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%> <%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%> <!DOCTYPE html> <html lang="en"> <head> <title>Index</title> <meta charset="UTF-8"> <m...
from abc import ABC, abstractmethod from functools import wraps, partial from typing import Callable import gymnasium as gym import jax from chex import dataclass, PRNGKey, ArrayTree from reinforced_lib.utils.exceptions import UnimplementedSpaceError from reinforced_lib.utils import is_array, is_dict @dataclass cla...
package com.itinerant.service; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Stack; import javax.persistence.EntityManager; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import jav...
import { Interval } from "../utils/Interval"; import Heap from 'collections/heap'; //http://www.collectionsjs.com const commonFreeTime = (schedules: Array<Array<Interval>>): Array<Interval> => { const commonIntervals: Array<Interval> = []; const combinedSchedules: Array<Interval> = schedules.reduce((previous: ...
import React, {useState} from "react"; type EnderecoTipo = { uf: string, setUf: React.Dispatch<React.SetStateAction<string>>, cidade: string, setCidade: React.Dispatch<React.SetStateAction<string>>, bairro: string, setBairro: React.Dispatch<React.SetStateAction<string>> rua: stri...
import type { Metadata } from "next"; import { Poppins } from "next/font/google"; import "./globals.css"; import { CartProvider } from "@/context/CartContext"; import Footer from "@/components/shared/Footer"; import Navbar from "@/components/shared/Navbar"; const poppins = Poppins({ subsets: ["latin"], display: "s...
package main import ( "drexel.edu/voter-api/api" "fmt" "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/middleware/cors" "github.com/gofiber/fiber/v2/middleware/logger" "github.com/gofiber/fiber/v2/middleware/recover" "github.com/redis/go-redis/v9" "log" "os" ) // Global variables to hold the comma...
'use client'; import { Box, Button, Container, Grid, Stack, Typography, } from '@mui/material'; import Image from 'next/image'; import { useRouter } from 'next/navigation'; import { useState } from 'react'; import { FieldValues } from 'react-hook-form'; import { z } from 'zod'; import logo from '@/assets/l...
package ru.kata.spring.boot_security.demo.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.security.authentication.dao.DaoAuthenticationProvider; import org.springframework.security.config.annotation.web.builders.HttpS...
import { GET_PUZZLE_REQUEST, GET_PUZZLE_SUCCESS, GET_PUZZLE_FAILURE, CREATE_PUZZLE_REQUEST, CREATE_PUZZLE_SUCCESS, CREATE_PUZZLE_FAILURE, RESET_RECENT_PUZZLE, SOLVE_PUZZLE_REQUEST, SOLVE_PUZZLE_SUCCESS, SOLVE_PUZZLE_FAILURE, SELECT_PUZZLE } from "./actionTypes"; expor...
package org.hyunggi.mygardenbe.common.exception.controlleradvice; import net.gpedro.integrations.slack.SlackApi; import org.hyunggi.mygardenbe.IntegrationTestSupport; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.mockito.BDDMockito; imp...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_atoi.c :+: :+: :+: ...
import { ExclamationCircleFilled, ReloadOutlined } from '@ant-design/icons' import { Card, List, message, Modal, Tooltip } from 'antd' import React, { useEffect, useState } from 'react' import { TODO_URL } from '../../../../constant/APIConstant' import { TodoStatus } from '../../../../interface/TodoTypes' import styles...
import { ReactNode, useRef } from 'react'; import { useClickAway } from 'react-use'; import styled, { useTheme } from 'styled-components'; import { Text } from '../common/Text/Text.styles'; export interface ModalBaseProps { title: string; onDismiss?: () => void; } interface LocalModalBaseProps extends ModalBa...
# react/no-set-state-in-component-did-update ## Rule category Suspicious. ## What it does Disallows calling `this.setState` in `componentDidUpdate` outside of functions, such as callbacks. ## Why is this bad? Updating the state after a component mount will trigger a second render() call and can lead to property/l...
import { useForm } from "react-hook-form"; import * as s from "../../styles/bamboo/modal"; interface props { onClick: (e: React.MouseEvent) => void; } export default function Modal({ onClick }: props) { interface FormData { content: string; } const { register, handleSubmit, formState: { error...
/********************************************************************** Audacity: A Digital Audio Editor Dominic Mazzoni *******************************************************************//*! \class Resample \brief Combined interface to libresample and libsamplerate. This class abstracts the interface to tw...
import Head from "next/head"; import { Inter } from "next/font/google"; import Dex from "./components/Dex"; import { DeDustClient } from '@dedust/sdk'; import { Spinner, Flex } from "@chakra-ui/react"; import { useState, useEffect } from "react"; import 'react-toastify/dist/ReactToastify.css'; const inter = Inter({ s...
# Projeto e Modelagem de Bancos de Dados - 2024.1 - turma A ## Projeto AV2 ### Equipe: Arthur Wolmer e Diego Peter O processo de desenvolvimento da aplicação cobriu os pontos de 1. a 4. aproximadamente em sequência, com a exploração das tecnologias correndo em paralelo. # 1. **Análise de requisitos** Minimundo (cria...
import React, { useState } from 'react' import { useDispatch } from 'react-redux' import { useTypedSelector } from '../../hooks/useTypedSelector' import { GoodsActionCreator } from '../../store/action-creators/goodsActionCreator' import MyInput from '../ui/MyInput/MyInput' import style from './SearchInput.module.css' ...
<?php /** * The template for displaying all single posts * * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post * * @package adria */ get_header(); ?> <main id="main" class="site-main transition-opacity ease-in delay-100 duration-300" style="opacity: 0" role="main"> <?php ...
syntax = "proto3"; package categoryapi; service CategoryService { rpc AddCategory(AddCategoryRequest) returns (Category) {} rpc GetCategory(GetCategoryRequest) returns (Category) {} rpc UpdateCategory(UpdateCategoryRequest) returns (UpdateCategoryResponse) {} rpc DeleteCategory(DeleteCategoryRequest) returns ...
import React, { useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { NavBar } from "../NavBar/NavBar"; import { search_pokemons } from "../../actions/index"; import "./search.css"; /* import { CardDetail } from "./CardDetail";*/ import { CardsPokemons } from "../CardsPokemons/CardsP...
import { Ionicons } from "@expo/vector-icons"; import { CommonActions, useNavigation } from "@react-navigation/native"; import React, { useState } from "react"; import { Alert, Button, SafeAreaView, StyleSheet, Text, TextInput, TouchableOpacity, View, } from "react-native"; import { GLOBALS } from "../G...
# As expression statement without ; var a1 = 0; loop { if a1 == 3 { break; } std_println(a1); a1 = a1 + 1; } # expect: 0 # expect: 1 # expect: 2 # As expression statement with ; var a2 = 0; loop { if a2 == 3 { break; } std_println(a2); a2 = a2 + 1; }; # expect: 0 # expect: 1 # expect: 2 # As expression wi...
import productModel from "../models/productModel.js"; const addProduct = async (req, res) => { try { const { name, price, image, descrip, about, catogary } = req.body; if (!name || !price || !image || !descrip || !catogary) { return res.status(400).json({ error: "All Fields Are Mand...
/* eslint-disable react/prop-types */ import React, { useState } from 'react'; import { Text } from '../../atoms'; import { Column, Flex } from '../../pages/layout'; import styles from './input.module.scss'; import { EyeOutlined, EyeInvisibleOutlined } from '@ant-design/icons'; interface IInputProps extends React.Comp...
<template> <a-card hoverable class="visit-count"> <a-skeleton active v-if="loading" /> <apexchart ref="count" type=bar height=300 :options="chartOptions" :series="series"/> </a-card> </template> <script> export default { name: 'TrendTop', data () { return { loading: false, series: [{ ...
package it.polimi.ingsw.client; import it.polimi.ingsw.requests.*; import it.polimi.ingsw.responses.Response; import it.polimi.ingsw.timers.ConnectionClientTimer; import it.polimi.ingsw.view.View; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import java.io.IOException; import ja...
/* * Lilith - a log event viewer. * Copyright (C) 2007-2017 Joern Huxhorn * * 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 late...
/* * * This source code is part of * * G R O M A C S * * GROningen MAchine for Chemical Simulations * * VERSION 3.2.0 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others. * Copyright (c) 1991-2000, University of G...
<!doctype html><html lang="zh-tw"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="物體碰撞前後總動能不變稱為彈性碰撞(Elastic collision),在維基百科〈Elastic collision〉中可以查詢到,二維的彈性碰撞在位置及速度以向量表示時,公式會如下,其中角括號表..."> <meta property="og:locale" ...
package com.metalbear.mirrord import com.intellij.ide.util.PropertiesComponent import com.intellij.notification.NotificationType private const val NOTIFY_AFTER: Int = 100 private const val NOTIFY_EVERY: Int = 30 private const val COUNTER_KEY: String = "mirrordForTeamsCounter" private const val DEPLOYMENT_EXEC_MESSAG...
import PropTypes from 'prop-types'; import { useEffect, useState } from 'react'; import { useLocation } from 'react-router-dom'; // @mui import { styled, alpha } from '@mui/material/styles'; import { Box, Link, Drawer, Typography, Avatar } from '@mui/material'; // mock // hooks import useResponsive from '../../../hook...
<template> <div> <article id="site-modal" class="modal fade"> <div class="modal-dialog modal-dialog-centered modal-xl"> <div class="modal-content"> <img data-bs-dismiss class="img-fluid" :src="modalPhoto" alt="Product Photo large" /...
package com.fangzhouwang.Server; //package com.fangzhouwang; import java.awt.*; import java.rmi.RemoteException; import java.util.*; import java.util.List; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; /** * @Author Fangzhou Wang ...
package com.assignment.media.chat.jbehave; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.util.Date; import org.jbehave.core.annotations.Given; import org.jbehave.core.annotations.Named; import org.jbehave.core.annotatio...
/* * GDevelop JS Platform * Copyright 2013-present Florian Rival (Florian.Rival@gmail.com). All rights reserved. * This project is released under the MIT License. */ namespace gdjs { const logger = new gdjs.Logger('Spine Manager'); const resourceKinds: ResourceKind[] = ['spine']; /** * SpineManager manag...
import React, { useCallback, useEffect, useRef } from "react"; export const useModal = (hide: () => void) => { const modalRef = useRef<HTMLDivElement>(null); const closeButtonRef = useRef<HTMLButtonElement>(null); const hiddenButtonRef = useRef<HTMLButtonElement>(null); const handleOverlayClose = (e: React.Mo...
package com.example.demo.Logic; import com.example.demo.Collection.ApplicationSubmission; import com.example.demo.Repository.ApplicationSubmissionRepository; import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; import java.util.*; @AllArgsConstructor @Service public class ApplicationSubmiss...
package com.example.oops.classes; import java.util.Objects; public class ClassExample { public static void main(String[] args) { var teacher1 = new Teacher("Karim", "Amini", "Elementary School Teacher", 20000.0); System.out.println(teacher1); } } abstract class Person { protected Str...
defmodule MalanWeb.PaginationController do import Plug.Conn import Malan.Utils.Phoenix.Controller import Ecto.Changeset, only: [apply_action: 2] require Logger alias Malan.Pagination @doc """ Validate that the current user is authenticated """ def is_paginated(conn, _opts) do Logger.debug("[is...
/**************************************************************************** ** ** Copyright (C) VCreate Logic Private Limited, Bangalore ** ** Use of this file is limited according to the terms specified by ** VCreate Logic Private Limited, Bangalore. Details of those terms ** are listed in licence.txt included as p...
/** * ResearchSpace * Copyright (C) 2020, © Trustees of the British Museum * Copyright (C) 2015-2019, metaphacts GmbH * * 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...
"use client"; import React, { ElementRef, useRef, useState } from "react"; import ListWrapper from "./listWrapper"; import FormInput from "@/components/form/formInput"; import { useEventListener } from "usehooks-ts"; import { useAction } from "@/hooks/useAction"; import { updateList } from "@/actions/updateList"; impo...
(require "cairo") (use-package :cairo) (use-package :cairo.ext) (defvar *snippet-filename-regexp* '("examples/.+\\.l$")) (defun snippet-p (filename) (some #'(lambda (re) (string-matchp re filename)) *snippet-filename-regexp*)) (defun snippet-filename () (or (and (boundp '*snippet*) ...
import React from 'react'; import { StyleSheet, Text, View, Modal, Image, SafeAreaView, TouchableOpacity, } from 'react-native'; import LottieView from 'lottie-react-native'; const ModalHistory = ({ setModalVisible, modalVisible, entry }) => { const emojiMapping = { 'U+1F622': '😢', 'U+1F614': ...
// Copyright (C) 2023 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause #include "birthdayparty.h" #include "person.h" #include <QCoreApplication> #include <QDebug> #include <QQmlComponent> #include <QQmlEngine> int main(int argc, char **argv) { QCoreApplication app(argc, a...
package com.example.ecomapplication; import androidx.annotation.NonNull; import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AppCompatActivity; import androidx.lifecycle.ViewModelProvider; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; imp...