text
stringlengths
184
4.48M
<template> <transition v-on:before-enter="beforeEnter" v-on:enter="enter" v-on:after-enter="afterEnter" v-bind:css="false"> <div class="top-progress" :style="barStyle" v-if="show"> <div class="peg" :style="pegStyle"> </div> </div> </transition> </template> <script> function clam...
import React from "react" import ImmutablePureComponent from "react-immutable-pure-component" import ImPropTypes from "react-immutable-proptypes" import PropTypes from "prop-types" import { getModelName } from './utils' export default class ModelFlatWrapper extends ImmutablePureComponent { static propTypes = { n...
--- layout: default title: Managing Roles in OpenIAP Flow parent: What Is OpenIAP Flow nav_order: 2 --- # Managing Roles in OpenIAP Flow ## What are Roles? Roles in **OpenIAP Flow** are sets of privileges and permissions that can be assigned to users or other roles. These roles are crucial for controlling access to va...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>视频列表</title> <link type="text/css" rel="stylesheet" href="/static/bootstrap/3.3.7/bootstrap.min.css"> <script src="/static/jquery/3.5.1/jquery.min.js"></script> <script type="text/javascript" src="/static/bootstrap/3.3.7/bootstrap...
<div class="modal-content-wrapper"> <header class="modal-header"> <h1 class="modal-title">Create a new ERG</h1> </header> <section class="modal-body"> <mat-stepper [linear]="isLinear" #stepper> <mat-step [stepControl]="firstFormGroup"> <form [formGroup]="firstFormGroup"> <ng-templa...
import { AbstractControl, ValidatorFn } from '@angular/forms'; export interface StringLengthError { maxlength?: { requiredLength: number; }; minlength?: { requiredLength: number; }; } export interface StringLengthOptions { maximumLength?: number; minimumLength?: number; } export function validate...
// src/components/Cart.js import React, { useContext } from "react"; import { CartContext } from "./CartContext"; const Cart = () => { const { cart, removeItemFromCart, clearCart } = useContext(CartContext); const removeFromCartHandler = (productid) => { removeItemFromCart(productid); }; const clearCartH...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.Queue; import java.util.StringTokenizer; public class Main { static int[][] adjMat; static int result = 0; static boolean[] visited; public static void bfs(int id...
OP_KEYS = %w{addr addi mulr muli banr bani borr bori setr seti gtir gtri gtrr eqir eqri eqrr} class Op attr_reader :opkey def initialize(op) @opkey, @ina, @inb, @out = op end def run!(register) send("#{@opkey}!",register) end def addr(register); register[@ina] + register[@inb]; end def addi(r...
import numpy as np import math import random import os import json #from tqdm import tqdm import time import sys import threading from multiprocessing import Pool, cpu_count ROW_COUNT = 6 COLUMN_COUNT = 7 WINDOW_LENGTH = 4 PLAYER_PIECE = 1 BOT_PIECE = 2 EMPTY = 0 def create_board(): board = np.zeros((ROW_COUN...
package nl.solar.app.rest; import nl.solar.app.WebConfig; import nl.solar.app.models.Warehouse; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframewor...
import os import argparse from pathlib import Path import cv2 import numpy as np from deep_image_matching.utils.database import ( COLMAPDatabase, blob_to_array, pair_id_to_image_ids, ) def generate_pairs(imgs_dir): pairs = [] n_images = len(os.listdir(imgs_dir)) for i in range(n_images-1): ...
""" Managing Attack Logs. """ import numpy as np from textattack.attack_results import FailedAttackResult, SkippedAttackResult from . import CSVLogger, FileLogger, VisdomLogger, WeightsAndBiasesLogger class AttackLogManager: """Logs the results of an attacks to all attached loggers.""" # 总体管理各种 logger ...
/* * Copyright (C) 2019 The Android Open Source Project * * 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 app...
import { useQuery } from "@tanstack/react-query"; import { supabase } from "../supabase"; const listRecords = async (inventoryId: number) => { const { data, error } = await supabase .from("record_view") .select() .eq("inventory_id", inventoryId) .order("display_order", { ascending: true, nullsFirst:...
Intro ----- - this section is about learning how to build component-driven UI, the component concept is embraced by React - we learn what componenets are and why exactly React embraces them This mean we learn: - React Core Syntax & JSX - What Components are and how to work with them - Working with Data - All the key ...
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { StudentAddComponent } from './student-add/student-add.component'; import { StudentDetailsComponent } from './student-details/student-details.component'; import { StudentListComponent } from './student-list/student...
package keeper import ( "fmt" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" params "github.com/cosmos/cosmos-sdk/x/params/types" channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" gogoprototypes "github....
package arraylist_product; import java.sql.*; import java.util.ArrayList; public class ProductDAO { Connection con = null; PreparedStatement pstmt = null; ResultSet rs = null; public ProductDAO(){ try { //JDBC Driver 클래스의 객체 생성 런타임시 로드 //Class.forName("com.mysql.cj.jdb...
import { useEffect } from 'react' import Cookies from 'cookies' import { useStoreActions } from 'easy-peasy' import { House as HouseModel } from '../model.js' import House from '../components/House' import Layout from '../components/Layout' export default function Home({ bnb_session, houses }) { const setLoggedIn =...
using System.ComponentModel; using Exiled.API.Interfaces; namespace TTAddons { public class Config : IConfig { public bool IsEnabled { get; set; } = true; public bool Debug { get; set; } = false; [Description ("Allow SCP players to use the .unstuck command. Default is true.")]...
package com.test; import java.util.Collections; import java.util.HashMap; import java.util.Map; /** * 执行静态块 initEnums==={0=北京市, 1=北京市, 2=云南省} initEnums==={0=北京市, 1=北京市, 2=云南省} * 执行getInstance 执行getCache {0=北京市, 1=北京市, 2=云南省} * * @author lzl * */ public class CachingEnumResolver1 { private static final Caching...
package com.trad.trad.application.controller.implementation; import com.trad.trad.application.controller.api.IUserApi; import com.trad.trad.application.security.AuthCredentials; import com.trad.trad.application.security.AuthenticationResponse; import com.trad.trad.domain.dto.UserDto; import com.trad.trad.domain.dto.Val...
const fs = require('fs'); // to read input file contents const readline = require('readline'); // to read user input (i.e. file_name) const isCompounded = (word, unique_words) => { // base condition if (unique_words.has(word)) { return true; } for (let i = 1; i < word.length; i++) { const prefix = wor...
import React from "react"; import course from "../constants/Course"; const CourseMain = () => { return ( <div className="bg-gray-50 dark:bg-gray-900 min-h-screen py-12"> <div className="text-center mx-auto text-black dark:text-white container py-10 font-poppins border-b-4 border-blue-500 dark:border-indigo...
import {useState} from "react"; import Image from "../assets/ayushmann.png"; const About = () => { const[data, setData] = useState({ image:Image, title:"Software and Java Developer", desc1: `A Java and Software Developer with extensive experience in object-oriented programming(OOPs) and software developm...
import PropTypes from 'prop-types'; import css from "./FriendList.module.css"; import FriendListItem from './FriendListItem'; const FriendList = ({ friends }) => { return ( <ul className={css.friendList}> {friends.map(friend => ( <FriendListItem key={friend.id} {...friend} /> ))} </u...
# 关于 JavaScript 运行时应该知道的一切 > 原文:<https://levelup.gitconnected.com/dev-explainer-javascript-runtimes-8e4d1e3af405> ![](img/0929e2e53f048f64d563367d62d26390.png) 作者图片 JavaScript 可能是有史以来最有影响力的编程语言之一(不管是好是坏)——它可以在几乎所有现代网络浏览器中运行,不管是什么操作系统。无论你是在 MacOS、Windows 还是 Linux 上使用 Safari、Chrome 还是 Firefox,JavaScript 都会在后台运行(除非你禁用...
import dotenv from "dotenv"; dotenv.config(); import express from "express"; import cors from "cors"; import connectDB from "./config/db.js"; import connectCloudinary from "./config/cloudinary.js"; import adminRouter from "./routes/adminRoute.js"; import doctorRouter from "./routes/doctorRoute.js"; import userRouter fr...
import General.Hitbox; import processing.core.PApplet; /** * Represents an abstract obstacle in the game. * This class extends {@link GameObject} with added behaviors specific to game obstacles, * such as automatic movement and position checking. * <p> * Specific types of obstacles should extend this class and im...
import { FC } from 'react' import { Toaster } from 'react-hot-toast' import { Provider } from 'react-redux' import { BrowserRouter as Router, Route, Switch } from 'react-router-dom' import { PersistGate } from 'redux-persist/integration/react' import { ThemeProvider } from 'styled-components' import { AppLayout } from ...
"use client"; import React from "react"; import Image from "next/image"; import Promote from "../../../public/insurance/promote.png"; import { motion } from "framer-motion"; import { useInView } from "react-intersection-observer"; const Unique = () => { // Separate useInView hooks for each section const { ref: tit...
#include "dryfruit.hpp" #include "alcohol.hpp" #include "cargo.hpp" #include "fruit.hpp" #include "item.hpp" #include "ship.hpp" #include "weapon.hpp" #include <algorithm> #include <iostream> #include <memory> #include <string> #include <vector> int main() { //setting up the ship no.1 Ship ship1(196, "Flying Dutc...
from django.shortcuts import render, redirect from .models import Livro from django.http import HttpResponse from django.contrib.auth.models import User from django.contrib.auth import authenticate from django.contrib.auth import login as login_django from django.contrib.auth.decorators import login_required # Create y...
import torch from mmdet.core.bbox.match_costs.builder import MATCH_COST @MATCH_COST.register_module() class BBox3DL1Cost(object): """BBox3DL1Cost. Args: weight (int | float, optional): loss_weight """ def __init__(self, weight=1.0): self.weight = weight def __call__(self, bbox_pr...
"use client"; import * as React from "react"; import { motion } from "framer-motion"; import { Swiper as SwiperObject } from "swiper"; import { Swiper, SwiperSlide } from "swiper/react"; import "swiper/css"; import { BsArrowUpRight, BsGithub } from "react-icons/bs"; import { Tooltip, TooltipProvider, TooltipCon...
import { View, StyleSheet, Text, Image, ScrollView, ImageBackground, } from "react-native"; import Button from "../components/Button"; import SignOutButton from "../components/SignOutButton"; import { auth } from "../firebase"; import { signOut } from "firebase/auth"; import { useContext, useEffect } from "...
package lyson import ( "bytes" ) // JsonObject Is the Implementation of JSONObject type JsonObject struct { // entries Are the Entries Wrapped in the JSON Object entries map[string]any } func NewObject() *JsonObject { result := new(JsonObject) result.entries = make(map[string]any) return result } // PutEntry ...
# # This script is a mix between the work done by # Sarju Bhagat <sarju@westpoint.ltd.uk> and # Martin O'Neal of Corsaire (http://www.corsaire.com) # # DISCLAIMER # The information contained within this script is supplied "as-is" with # no warranties or guarantees of fitness of use or otherwise. Corsaire # accepts n...
<?php declare(strict_types=1); namespace Doctrine\ORM\Tools\Console\Command\ClearCache; use Doctrine\ORM\Cache; use Doctrine\ORM\Tools\Console\Command\AbstractEntityManagerCommand; use InvalidArgumentException; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use...
// // CurrentWeather.swift // rainyshinycloudy // // Created by Aaryn Biro on 2017-05-17. // Copyright © 2017 Aaryn Biro. All rights reserved. // import UIKit import Alamofire //data cconstant current weather class class CurrentWeather { //data encpsulation- best practice var _cityName: String! ...
package com.kingyon.elevator.uis.fragments.homepage; import android.app.Dialog; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.DialogFragment; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.text.Te...
/* This file contains the basic framework code for a JUCE plugin processor. */ #include "PluginProcessor.h" #include "PluginEditor.h" #include "Utils.h" MDAJX10SynthAudioProcessor::MDAJX10SynthAudioProcessor() #ifndef JucePlugin_PreferredChannelConfigurations : AudioProcessor(BusesProperties() #if ! Ju...
# Laravel Khalti This package can help you integrate Khalti new ePayment Gateway (NEW) to your php application. [Khalti ePay Docs](https://docs.khalti.com/khalti-epayment/) Here is an example of how you can initiate Khalti transaction: ```php ... use Neputer\Facades\Khalti; use Illuminate\Support\Facades\Redirect;...
import React, { useEffect, useState, useContext } from 'react'; import PageLayout, { PageHeading, PageSubHeading, PageContent, PageDivider } from '../AddOns/PageLayout'; import NameJoiner from 'utils/NameJoiner'; import { Button } from 'utils/Buttons' import { Link } from 'react-router-dom'; import ErrorBoundary from '...
<?php namespace App\Exports; use Maatwebsite\Excel\Concerns\ShouldAutoSize; use Maatwebsite\Excel\Concerns\WithEvents; use Maatwebsite\Excel\Events\AfterSheet; use Maatwebsite\Excel\Concerns\FromQuery; use Maatwebsite\Excel\Concerns\WithHeadings; use Maatwebsite\Excel\Concerns\WithMapping; use App\Models\Common\Produ...
/// <reference types="urijs" /> import { Asset } from "@stellar/stellar-base"; import { CallBuilder } from "./call_builder"; import { ServerApi } from "./server_api"; /** * The Stellar Network allows payments to be made across assets through path * payments. A strict send path payment specifies a series of assets to ...
// // ViewController.swift // UIPickerView // // Created by Владимир Дмитриев on 28.07.23. // import UIKit //class ViewController: UIViewController { // // let picker = UIPickerView() // // override func viewDidLoad() { // super.viewDidLoad() // // picker.center = view.center // // picke...
package br.com.jcomputacao.sped.efd.pisCofins; import br.com.jcomputacao.aristoteles.field.FieldDecimalMaximumLengthArchetype; import br.com.jcomputacao.aristoteles.field.FieldDefaultArchetype; import br.com.jcomputacao.aristoteles.field.FieldStringMaximumLengthArchetype; import br.com.jcomputacao.aristoteles.format.F...
import { IUserRepo, UserFindOptions } from 'database/repository.interfaces/user.repo.intrerface'; import { UserDomainModel } from 'domain.types/user/user.domain.model'; import { UserDetailsDto } from 'domain.types/user/user.dto'; import { Op } from 'sequelize'; import { UserMapper } from '../mapper/user.mapper'; import...
# This is a helper file to help and support the ELECTRE III file(electre3.py) # by inputing data and defining variables import numpy as np import copy from . import load_data as ld class El3_init: def __init__(self, class_: ld.Store_data, tolerance=None, dist=None) -> None: self.crit = class_.crit # num...
class Solution: # T.C: O(N) for loop + O(N + E) for one DFS => O(N + E) # S.C: O(N) for visited + O(N) for pathVisited + O(N) for safeNodes + max O(N) for recursion => O(N) def eventualSafeNodes(self, graph: List[List[int]]) -> List[int]: n = len(graph) visited = [ False ] * n pathV...
import React, { useEffect, useState } from 'react' import AxiosClient from '../../config/AxiosClient' import Swal from 'sweetalert2' import Navbar from '../shared/Navbar' import Footer from '../shared/Footer' import { Link, useNavigate } from "react-router-dom"; import { Button, Row, Col, Modal } from 'react-bootstrap'...
<div class="c-mod wh-box1 clearfix"> <form id="saveForm" action="$appServer.get('/person/fill.htm')" method="post"> #if(${item.id}) <input type="hidden" name="id" value="$!{item.id}"/> #end <input id="cardImg" type="hidd...
from typing import Any, Dict, List, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field T = TypeVar("T", bound="SearchFacetCountResponseDto") @_attrs_define class SearchFacetCountResponseDto: """ Attributes: count (int): value (str): """ c...
import { BaseChart, PartialChart } from './base' import { Dimension, Metric, Report, ChartType, } from './util' import { getColorschemeColors } from '../../../shared' export default class FunnelChart extends BaseChart { constructor (def: PartialChart = {}) { super(def) // Assure required fields; thi...
package dbconn import ( "context" "database/sql" "fmt" "github.com/siddontang/loggers" "github.com/cashapp/spirit/pkg/table" ) type TableLock struct { table *table.TableInfo lockTxn *sql.Tx logger loggers.Advanced } // NewTableLock creates a new server wide lock on a table. // i.e. LOCK TABLES .. READ. ...
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license import argparse import os import sys from pathlib import Path import cv2 import torch import torch.backends.cudnn as cudnn FILE = Path(__file__).resolve() ROOT = FILE.parents[0] # YOLOv5 root directory if str(ROOT) not in sys.path: sys.path.append(str(ROOT)) # add ROO...
--- title: Gerando cobranças keywords: cobranças, pagamentos, split de pagamentos, crédito, pix, boleto last_updated: July 3, 2016 tags: [cobranças, pagamentos, split, crédito, pix, boleto] summary: "Veja como gerar cobranças e escolher os métodos de pagamento que irá aceitar" sidebar: mydoc_sidebar permalink: gerando-...
<?php /* * This file is part of Composer. * * (c) Nils Adermann <naderman@naderman.de> * Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Composer\Package\Archiver; use Symfony\C...
<template> <div class="container p-4 mx-auto min-h-screen"> <div v-if="manga != null" class=""> <div> <img :src="imageProxy(manga.image)" alt="" class="rounded-2xl w-full"> </div> <div class="text-white mt-3"> <h1 class="font-bold text-xl">...
<!DOCTYPE html> <html lang="fr"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Booki</title> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href=...
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain o...
use crate::prelude::*; #[system] #[read_component(Point)] #[read_component(Player)] #[read_component(Enemy)] #[write_component(Health)] #[read_component(Item)] #[read_component(Carried)] pub fn player_input( ecs: &mut SubWorld, commands: &mut CommandBuffer, #[resource] key: &Option<VirtualKeyCode>, #[r...
package ru.job4j.collection; import java.util.ConcurrentModificationException; import java.util.Iterator; import java.util.NoSuchElementException; import java.util.Objects; public class SimpleLinkedList<E> implements LinkedList<E> { private int size = 0; private Node<E> first; private Node<E> last; p...
<?php /** * @author Sujith Haridasan <sharidasan@owncloud.com> * @author Ilja Neumann <ineumann@owncloud.com> * * @copyright Copyright (c) 2019, ownCloud GmbH * @license AGPL-3.0 * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, ...
import 'package:json_annotation/json_annotation.dart'; import 'package:shikimoriapp/feature/profile/data/dto/creditional_image_dto.dart'; part 'creditional_dto.g.dart'; ///Credential data transfer object @JsonSerializable(fieldRename: FieldRename.snake) class CreditionalDTO { ///Constructor const CreditionalDTO({...
'use client'; import NProgress from 'nprogress'; import { useEffect } from 'react'; import { usePathname } from '@/i18n'; import { useGlobalStore } from '@/stores/global'; import { useSearchParams } from 'next/navigation'; import 'nprogress/nprogress.css'; const RouteHandlerProvider = ({ children }: { children: Rea...
import { createStyles, makeStyles, Theme } from "@material-ui/core/styles"; import { useEffect, useState } from "react"; import TextField from "@material-ui/core/TextField"; import { FormControlLabel, FormGroup, FormControl, FormLabel, Switch, Button, Box, CircularProgress, } from "@mate...
import torch import torch.nn as nn from torch.nn import TransformerEncoderLayer, TransformerEncoder from torch.nn.functional import * from torch.nn.modules.activation import MultiheadAttention, xavier_uniform_, xavier_normal_, \ constant_, Parameter, _LinearWithBias from torch.nn.modules.transformer import _get_clo...
const EQUAL = Symbol('EQUAL'); function deepAreSortedArraysEqual<T extends Array<any>>(array1: T, array2: T) { if (array1.length !== array2.length) { return false; } return array1.every((item, i) => deepDiff(item, array2[i]) === EQUAL); } export function deepDiff<T extends any>(value1: T, value2: T): Parti...
@extends('panel.master') @section('content') <main id="main" class="main"> @include('panel.alert') @error('currentpassword') <p class="invalid-feedback">{{ $message }}</p> @enderror @error('newpassword') <p class="invalid-feedback">{{ $message }}</p> @enderror <div class="p...
// import 'package:flutter/material.dart'; // import 'package:flutter_svg/flutter_svg.dart'; // import 'package:provider/provider.dart'; // import 'package:pos_portal/view_model/cart_view_model.dart'; // import '../utils/colors.dart'; // import '../model/cart.dart'; // // class CartShop extends StatefulWidget { // co...
import { HttpExceptionEnum } from "../../../../exceptions"; import ValidationException from "../../../../exceptions/ValidationException"; import { IUserRepository } from "../../../../modules/User/repositories/interfaces/IUserRepository"; import { DiskStorage } from "../../../../providers/DiskStorage"; export default c...
package com.loginregistration.controller; import java.io.IOException; import jakarta.servlet.ServletException; import jakarta.servlet.annotation.WebServlet; import jakarta.servlet.http.Cookie; import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServ...
"""Server stores knowledge about which client has which file.""" from __future__ import annotations import logging from typing import Sequence import curio, curio.io from directories import File, Directory, decode import json from collections import defaultdict RECV_SIZE = 1024 declared_dirs: Sequence[Directory] = []...
<template> <div class="container"> <el-select v-model="filterType" style="width: 120px;"> <el-option v-for="item in filterTypeOptions" :key="item.value" :label="item.label" :value="<string>item.value" /> </el-select> <el-select v-model="matchProp" style="width: 120px;"> <el-option v-for="ite...
package org.klojang.jdbc; import java.sql.ResultSet; import java.util.List; import java.util.Map; import java.util.Optional; /** * <p>Converts the rows in a JDBC {@link ResultSet} into {@code Map<String, Object} * pseudo-objects. Instances are obtained via * {@link MappifierFactory#getMappifier(ResultSet) Mappifie...
/* * Copyright (C) 2024 Mark R. Turner. All Rights Reserved. * * The Ember ("EMBedded c webservER") server code is based on the FreeRTOS Labs * TCP protocols example at * https://github.com/FreeRTOS/FreeRTOS/blob/main/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/Common/FreeRTOS_TCP_server.c * (and associated dire...
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Contracts\Validation\Validator; use Illuminate\Http\Exceptions\HttpResponseException; class ExpenceBookRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @re...
interface Person3 { name: string; age: number; } const person3: Person3[] = [ { name: 'min', age: 31 }, { name: 'woo', age: 31 }, ]; //타입 체크를 하지 않는 함수. function filterBy<T>(property: any, value: any, array: T[]) { //프로퍼티와 값을 기반으로 데이터를 필터링 한다. return array.filter(item => item[property] === value); } console...
package Services; import dataAccess.DAO.AuthtokenDAO; import dataAccess.DAO.GameDAO; import Requests.JoinGameRequest; import Results.JoinGameResult; import dataAccess.DataAccessException; //import dataAccess.Database; import dataAccess.DatabaseManager; import java.sql.Connection; import java.sql.SQLException; /** *...
import random from dataclasses import dataclass from pathlib import Path from abc import ABC, abstractmethod from typing import Tuple, Any, List, Union from joblib import Memory from termcolor import colored from openai.openai_object import OpenAIObject cur_file = Path(__file__).parent.absolute() import openai @data...
package com.recipe.service; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transact...
package program; import java.util.ArrayList; import java.util.List; public class _1208 { public static void main(String[] args) { Solution solution = new Solution(); int res = solution.equalSubstring("krrgw", "zjxss", 19); System.out.println(res); } public static class Solution { ...
textops Module Andrei Pelinescu-Onciul FhG FOKUS <pelinescu-onciul@fokus.fraunhofer.de> Edited by Andrei Pelinescu-Onciul <pelinescu-onciul@fokus.fraunhofer.de> Edited by Daniel-Constantin Mierla <miconda@gmail.com> Edited by Juha Heinanen <jh@tutpro.com> Copyright © 2003 FhG FOKUS __...
package com.giousa.中介者模式; import java.util.ArrayList; import java.util.List; /** * 中介者模式解决问题的思路很简单,就是通过引入一个中介对象,让其他对象只与中介对象交互, * 而中介对象知道如何和其他所有对象的交互,这样对象之间的交互关系就没有了,从而实现了对象之间的解耦。 * * 中介者模式的主要优点 * 1、中介者模式简化了对象之间的交互,它用中介者和同事的一对多交互代替了原来同事之间的多对多交互,一对多关系更容易理解、维护和扩展,将原本难以理解的网状结构转换成相对简单的星型结构。 * * 2、中介者模式可将各同事对象解耦。中介者...
export interface IBuilder<T> { with<K extends keyof T>(key: K, value: T[K]): IBuilder<T>; build(): T; } export class Builder<T> implements IBuilder<T> { private constructor(private target: Partial<T>) {} /** * Returns a new {@link Builder} with the property {@link key} set to {@link value}. * * @par...
package com.example.controller import com.example.db.dao.* import io.ktor.http.* import io.ktor.server.application.* import io.ktor.server.freemarker.* import io.ktor.server.request.* import io.ktor.server.response.* import io.ktor.server.util.* import kotlinx.serialization.json.Json import kotlinx.serialization.encod...
/** * Copyright 2018 EPFL LCA1 * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import {Component, OnInit, ViewChild} from '@angular/core'; import {GbConstrai...
import 'package:movie_booking_app/data/vos/cast_crew_vo/cast_crew_vo.dart'; import 'package:movie_booking_app/data/vos/check_out_vo/checkout_vo.dart'; import 'package:movie_booking_app/data/vos/day_timeslot_vo/day_timeslot_vo.dart'; import 'package:movie_booking_app/data/vos/genre_vo/genre_vo.dart'; import 'package:mov...
#! /usr/bin/env ruby -S rspec require 'spec_helper_acceptance' describe 'has_key function' do describe 'success' do pp1 = <<-DOC $a = { 'aaa' => 'bbb','bbb' => 'ccc','ddd' => 'eee' } $b = 'bbb' $c = true $o = has_key($a,$b) if $o == $c { notify { 'output correct': } } ...
# Built-in python libraries import unittest # Side-packages import requests import pandas as pd class TestWebAPI(unittest.TestCase): API_ENDPOINT = "http://localhost:8080/predict" sample_input_location = 'Requirements/sample_data_list_dictionary.pickle' @classmethod def setUpClass(cls): cl...
#pragma once #include <string> #include <string.h> #include <algorithm> #include <ostream> #include <vector> #include <math.h> #include <cmath> #include <stdio.h> inline bool ends_with(const std::string &s, const char *t) { if (s.length() < strlen(t)) return false; return s.compare(s.length() - strlen(t), std::str...
/* * Copyright (c) 2024 OceanBase. * * 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 agreed ...
/* * This is the entry point of the application. * It creates a WebGL context and starts the engine, * which clears the canvas with a rainbow color every frame. * Since it is easier to run through the hue wheel than the RGB wheel, * we convert HSL to RGB. */ import WebGLManager from "./Core/WebGLManage...
<!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>W3.CSS Template</title> <link rel="stylesheet" href="./assets/css/style.css"> <link rel="stylesheet" ...
import 'package:flutter/material.dart'; import 'package:todolist/data/api/rick_morty_api.dart' as rick_morty_api; export 'rick_and_morty.dart'; class RickAndMorty extends StatefulWidget { const RickAndMorty({Key? key}) : super(key: key); @override State<RickAndMorty> createState() => _RickAndMortyState(); } cl...
import {inject, injectable} from "tsyringe" import { ICategoriesRepository } from "../../repositories/ICategoriesRepository"; import { AppError } from '../../../../shared/errors/appError'; interface IRequest{ name:string; description:string; } @injectable() class CreateCategoryUseCase{ constructor( // inje...
package alphasql import ( "bytes" "database/sql/driver" "errors" "fmt" "reflect" "strconv" "time" ) // Scanner is an interface used by [Rows.Scan]. type Scanner interface { // Scan assigns a value from a database driver. // // The src value will be of one of the following types: // // int64 // floa...