text stringlengths 184 4.48M |
|---|
package estudos.maratonajava.javacore.streams.test;
//1. Order LightNovel by title
//2. Retrive the first 3 titles light novels with price less than 4
import estudos.maratonajava.javacore.streams.dominio.LightNovel;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
public class StreamT... |
package com.orderfleet.webapp.domain;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persiste... |
const { MessageEmbed, CommandInteraction } = require("discord.js")
module.exports = {
name: 'nick-reset',
description: 'Removes The Nickname Of A User ',
type: 'Moderation',
perms: 'MANAGE_NICKNAMES',
usage: '/nick-reset',
options: [
{
name: 'user',
description: ... |
import Card from "@mui/material/Card";
import Grid from "@material-ui/core/Grid";
import CardActions from "@mui/material/CardActions";
import CardContent from "@mui/material/CardContent";
import IconButton from "@material-ui/core/IconButton";
import { Delete, Edit } from "@mui/icons-material";
import Button from "@mui/... |
#version 330 core
out vec4 FragColor;
struct Material {
float ambient;
float diffuse;
float specular;
float shininess;
};
struct DirLight {
vec3 direction;
vec3 ambient;
vec3 diffuse;
vec3 specular;
};
struct PointLight {
vec3 position;
float constant;
float linear;... |
import { useEffect, useState } from 'react'
import './App.css'
import PhotoComponent from './component/PhotoComponent'
function App() {
const apiKey = `Iv2GvHOGSHue1ZUpCH5e_9aDhyMLHMs5m5XiceF3Fwo`
const [photo,setPhotos] = useState([])
const [page,setPage] =useState(1)
const [isLoading,setIsLoading] = useState... |
package com.crossmin.megaverse.application.usecase;
import com.crossmin.megaverse.application.model.ActualMap;
import com.crossmin.megaverse.application.model.ContentObject;
import com.crossmin.megaverse.application.model.GoalMap;
import com.crossmin.megaverse.application.model.MapObject;
import com.crossmin.megaverse... |
package study.spring.springmyshop.model;
import java.util.List;
import com.google.gson.reflect.TypeToken;
import com.google.gson.Gson;
import study.spring.springmyshop.helper.UploadItem;
/** `상품` 테이블의 POJO 클래스 (20/05/08 22:58:51) */
public class Products {
/** 일련번호, IS NOT NULL, PRI */
private int id;
/*... |
package main
import (
"bytes"
"context"
"encoding/json"
"io/ioutil"
"testing"
"github.com/stretchr/testify/require"
)
func TestInfoCommand(t *testing.T) {
for _, test := range []struct {
name string
args []string
expectedOutput []byte
}{
{"info command with store",
[]string{"-s... |
import PropTypes from 'prop-types';
import {
Card,
CardActionArea,
CardContent,
CardMedia,
Rating,
Stack,
Typography,
} from '@mui/material';
import { Link } from 'react-router-dom';
interface MovieCardProps {
id: number;
title: string;
rating: number;
director: string;
genre: string[];
image... |
---
title: Easy Tutorial for Activating iCloud from Apple iPhone 15 Plus Safe and Legal
date: 2024-04-08T06:25:27.004Z
updated: 2024-04-09T06:25:27.004Z
tags:
- unlock
- bypass activation lock
categories:
- ios
- iphone
description: This article describes Easy Tutorial for Activating iCloud from Apple iPhone 1... |
import { Component, OnInit, ViewChild, HostListener } from '@angular/core';
import { MatDialogRef } from '@angular/material/dialog';
import { AlarmDefinitionDataUIModel } from '@core/models/webModels/AlarmDefinitionDataUI.model';
import { AlarmService } from '@core/services/alarm.service';
import { InforceDeviceDataMod... |
import Grid from "@mui/material/Grid";
import Typography from "@mui/material/Typography";
import { useFormContext } from "react-hook-form";
import AppTextInput from "../../app/components/AppTextInput";
import AppCheckBox from "../../app/components/AppCheckBox";
export default function AddressForm() {
const { contro... |
const express = require('express')
const { createProduct, getProducts} = require('../dao/controllers/productController')
const { userRequired } = require('../dao/controllers/tokenController')
const Product = require('../dao/models/productModel')
const productRouter = express.Router()
productRouter.get('/', userRequir... |
#####
### covidImpactVisualization Utility functions
#####
percent_proficient <- function(variable, achievement_levels, proficient_achievement_levels) {
tmp.table <- table(variable)
round(100*sum(tmp.table[achievement_levels[proficient_achievement_levels=="Proficient"]], na.rm=TRUE)/sum(tmp.table[achievement_... |
\documentclass{article}
\usepackage{geometry}
\geometry{
a4paper,
total={170mm,257mm},
left=20mm,
top=20mm,
}
\usepackage{array}
\usepackage{graphicx}
\usepackage[spanish,es-noshorthands, es-lcroman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amss... |
//
// TreasureListViewModel.swift
// Exercise6_Nguyen_Minh
//
// Created by Minh Nguyen on 10/16/23.
//
import Foundation
import SwiftUI
class TreasureListViewModel: ObservableObject {
@Published var treasures = [Treasure]()
@Published var searchText: String = ""
func loadData() async {
let ap... |
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
'use strict';
// Mock items.
var fileOperationManager = null;
var progressCenter = null;
// Test target.
var handler = null;
// Set up the test componen... |
import React from 'react';
const hiddenStyles = {
display: 'inline-block',
position: 'absolute',
overflow: 'hidden',
clip: 'rect(0 0 0 0)',
height: 1,
width: 1,
margin: -1,
padding: 0,
border: 0,
} as React.CSSProperties;
export const VisuallyHidden = ({
children,
...delegated
}: {
children: R... |
namespace Interpreter_Pattern {
// 解释器模式
interface Node {
interpret: () => number;
}
// 终结符表达式
class ValueNode implements Node {
private value;
constructor(value: number) {
this.value = value;
}
interpret() {
return this.value;
}
}
// 非终结符表达式/符号表达式
abstract class Symb... |
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/**
@title ERC-20 token
@author Said Avkhadeyev
*/
contract Token is ERC20, Ownable {
uint256 public governedValue;
/**
Constructor
... |
++++++++++++++++++++++++++++++++++++++
<!-- WSDG Chapter Dissection -->
++++++++++++++++++++++++++++++++++++++
[[ChapterDissection]]
== Packet dissection
[[ChDissectWorks]]
=== How it works
Each dissector decodes its part of the protocol, and then hands off
decoding to subsequent dissectors for an encapsulated pro... |
body {
/* background-image: url("https://cdn.wallpapersafari.com/12/69/xg05B6.jpg"); */
background-repeat: no-repeat;
background-size: cover;
background-position: center;
font-family: Arial, sans-serif;
color: #333;
background-color: rgb(235, 238, 235);
}
/* Navbar styles */
.nav... |
import operator
from functools import reduce
from typing import List
import numpy as np
def split_rucksacks_for_each_group(rucksacks, number_of_rucksacks):
for rucksack in range(0, len(rucksacks), number_of_rucksacks):
yield rucksacks[rucksack:rucksack + number_of_rucksacks]
def get_priority_for_item(i... |
package jpabook.jpashop.controller;
import jpabook.jpashop.domain.Address;
import jpabook.jpashop.domain.Member;
import jpabook.jpashop.service.MemberService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validat... |
import { useEmit } from 'eventrix';
import { FormEvent, useState } from 'react';
import { BurgerForm, Form } from 'types';
import { API_URL } from '../../../../config';
import { toast } from 'react-toastify';
import { BurgersForm } from './BurgersForm';
import { burgerData } from '../../../../utils/burger-data';
import... |
import React, { useState, useEffect } from 'react';
import axios from 'axios';
import styled from 'styled-components';
// Global Components
import { Navbar } from '../../components/ui/Navbar';
import { LoadingScreen } from '../../components/ui/LoadingScreen';
// Sections
import WelcomeScreen from './WelcomeScreen';
... |
part of 'todo_item_cubit.dart';
abstract class TodoItemState extends Equatable {
const TodoItemState();
@override
List<Object> get props => [];
}
class TodoItemInitial extends TodoItemState {}
class TodoItemLoading extends TodoItemState {}
class TodoItemLoaded extends TodoItemState {
final List<Todo> item;... |
import 'package:flutter/material.dart';
import 'package:book_tracker/widgets/left_drawer.dart';
// TODO: Impor drawer yang sudah dibuat sebelumnya
class TrackerFormPage extends StatefulWidget {
const TrackerFormPage({super.key});
@override
State<TrackerFormPage> createState() => _TrackerFormPageState();
}
clas... |
import { useMemo } from 'react';
import Button from '../components/Button';
import classnames from 'classnames';
import { useLoaderData, useSearchParams } from 'react-router-dom';
import { Van } from '../types';
import VanCell from '../components/VanCell';
/*
-------------------------------------- 🔖 ----------------... |
import unittest
from problems.problem_12 import Solution
class TestCase(unittest.TestCase):
def __init__(self, *args, **kwargs):
super(TestCase, self).__init__(*args, **kwargs)
self.solution = Solution()
def test_intToRoman(self):
self.assertEqual(self.solution.intToRoman(3), "III")
... |
// Copyright 2016 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... |
; Reverb + Shimmer (Version 6) by DrAlx (Alex Lawrow)
;
; This routine is based on Mick Taylor's (Ice-9s) reverb loop
; and shimmer code with some changes such as:
;
; 1) Prime numbers for delay line lengths.
; 2) More linear mapping of pot sweep to reverb time.
; 3) Anti-aliasing filter before the pitch-shifter.
; ... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
import { MenuItem } from "@prisma/client";
const { PrismaClient } = require("@prisma/client");
const prisma = new PrismaClient();
const create = async (body: MenuItem) => {
try {
const newMenuItem: MenuItem = await prisma.menuItem.create({
data: body,
});
return newMenuItem;
} catch (error: any)... |
package _0501_0550._529_Minesweeper;
public class DfsSolution implements Solution {
private static final char MINE = 'M', UNREVEALED_EMPTY = 'E', REVEALED_EMPTY = 'B', REVEALED_MINE = 'X';
private static final int[][] DIRS = {
{0, 1}, {0, -1}, {1, 0}, {-1, 0},
{-1, 1}, {-1, -1}, {1, 1}, {1, -1}
};
... |
#include "lists.h"
/**
* free_list - frees a list_t list
* @head: first node in the list
*/
void free_list(list_t *head)
{
list_t *current = head;
list_t *next_node;
while (current != NULL)
{
next_node = current->next;
free(current->str);
free(current);
current = next_node;
}
} |
<template>
<q-page padding>
<q-form
@submit="onSubmit"
class="row q-col-gutter-sm"
>
<q-input
outlined
v-model="form.name"
label="Name *"
lazy-rules
class="col-lg-8 col-xs-12"
:rules="[ val => val && val.length > 0 || 'Campo obligatorio']"
/>
... |
import axios from 'axios'
import { useEffect, useState } from 'react'
// Custom hook to axios get a URL or API endpoint on mount
export default function useAxiosGet(fetchUrl: string): { response: any; error: string; validating: boolean } {
const [response, setResponse] = useState('')
const [validating, setValidati... |
import unittest
from TestUtils import TestAST
from AST import *
from main.bkit.utils.AST import Id, IntLiteral, VarDecl
class ASTGenSuite(unittest.TestCase):
def test_0(self):
input = """Var: x;"""
expect=Program([VarDecl(Id('x'),[],None)])
self.assertTrue(TestAST.checkASTGen(input,expect... |
#include <stdio.h>
#include <stdarg.h>
#include "variadic_functions.h"
/**
* print_strings - print_strings
* @separator: the string to be printed between the strings
* @n: number of arguements
* Return: void.
*/
void print_strings(const char *separator, const unsigned int n, ...)
{
unsigned int i;
char *str;
va_... |
<html>
<head>
<meta charset=UTF-8>
<meta name="author" content="Laura Gheorghiu">
<meta name ="description" content="Ejemplo de lista html">
<title>Menú html</title>
</head>
<body>
<ol>
<li><b>Bases para el desarrollo de paginas web</b>
<ul>
<li>Herramientas para el desarrollo web</li>
<li> Consideraciones</li> ... |
#' @title Retrieve ENSEMBL info file
#' @description Retrieve species and genome information from
#' http://rest.ensembl.org/info/species?content-type=application/json/.
#' @param update logical, default TRUE. Update cached list, if FALSE use existing
#' (if it exists)
#' @author Hajk-Georg Drost
#' @return a tibble ta... |
<?php
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\CMS\Document;
defined('JPATH_PLATFORM') or die;
//require_once JPATH_SITE . '/co... |
#include <iostream>
#include <memory>
#include "logger.h"
#include "observed.h"
#include "observer.h"
int main() {
//Task_01
LogCommand* log1 = new LogInConsole();
print(*log1, "Write in console\n");
delete log1;
log1 = nullptr;
log1 = new LogInFile("file.txt");
print(*log1, "Write in file\n");
delete log1;
... |
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import {HttpClientModule} from '@angular/common/http';
import { AppComponent } from './app.component';
import { UserListComponent } from './user-list/user-list.component';
import { UserListItemComponent } from './user-... |
#ifndef _COM_DIAG_GRANDOTE_NUMBER_H_
#define _COM_DIAG_GRANDOTE_NUMBER_H_
/* vim: set ts=4 expandtab shiftwidth=4: */
/******************************************************************************
Copyright 2006-2011 Digital Aggregates Corporation, Colorado, USA.
This file is part of the Digital Aggregates ... |
<script lang="ts">
import '../styles/reset.css';
import '../styles/app.css';
import { onNavigate } from '$app/navigation';
import { Background, Header, Menu, Tabs } from '$lib/components';
import { darkTheme } from '$lib/store';
import { page } from '$app/stores';
import { browser } from '$app/environment';
imp... |
R version 3.0.0 (2013-04-03) -- "Masked Marvel"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-unknown-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distributi... |
package br.com.cidha.service;
import br.com.cidha.domain.*; // for static metamodels
import br.com.cidha.domain.EmbargoRecursoEspecial;
import br.com.cidha.repository.EmbargoRecursoEspecialRepository;
import br.com.cidha.service.criteria.EmbargoRecursoEspecialCriteria;
import java.util.List;
import javax.persistence.c... |
<!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>123</div>
<script>
// 执行事件步骤
// 点击div 控制台输出 我被选中... |
import React, { useState } from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Card from '@material-ui/core/Card';
import CardContent from '@material-ui/core/CardContent';
import Button from '@material-ui/core/Button';
import { FormControl, RadioGroup, FormControlLabel, Radio, Typography } from ... |
"use client";
import React from "react";
import { motion } from "framer-motion";
const navItems = [
{ name: "home", href: "/" },
{ name: "about", href: "/about" },
{ name: "projects", href: "#projects" },
{ name: "contact", href: "mailto:kaidenjr01@outlook.com" },
] as const;
export default function Nav() {
... |
import { Activity } from "./entities/activity";
import { Course } from "./entities/course";
import { GradeBookSetup} from "./entities/gradeBookSeutp";
import { Student } from "./entities/student";
import { SummaryGrades} from "./entities/SummaryGrades";
import { Teacher } from "./entities/teacher";
let students: Stude... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<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://fonts.gstatic.com" crossorigin>
<link hre... |
(userguide)=
# User Guide
Welcome to the Earth2Studio user guide.
This guide provides a verbose documentation of the package and the underlying
design.
If you want to skip to running code, have a look at the examples instead
and come back here when you have questions.
In this user guide, we'll delve into the intrica... |
#include <bits/stdc++.h>
using namespace std;
/*
* Complete the runningMedian function below.
*/
vector<double> runningMedian(vector<int> a) {
vector<double> ans;
int diff=0;
priority_queue<int> high;
priority_queue<int,vector<int>,greater<int>> low;
for(int i=0;i<a.size(... |
## stackit project update
Updates a STACKIT project
### Synopsis
Updates a STACKIT project.
```
stackit project update [flags]
```
### Examples
```
Update the name of the configured STACKIT project
$ stackit project update --name my-updated-project
Add labels to the configured STACKIT project
$ stackit p... |
import React, { /* useState, useEffect */ } from 'react';
import { useFetchGifs } from '../hooks/useFetchGifs';
import GifGridItem from './GifGridItem';
const GifGrid = ({ category }) => {
const { data: images, loading } = useFetchGifs( category );
return (
<>
<h3 className="animate__an... |
package com.apress.proandroidmedia.ch4.graphicsexamples;
import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Typeface;
import android.os.Bundle;
import android.wi... |
const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
return sequelize.define('vendor', {
id: {
type: DataTypes.STRING(36),
allowNull: false,
primaryKey: true
},
vendor: {
type: DataTypes.STRING(30),
allowNull: true,
unique: "uidx_ven... |
import React from 'react';
import { createContextContainer, render, screen, tests } from '@mantine-tests/core';
import { Tabs } from '../Tabs';
import { TabsPanel, TabsPanelProps, TabsPanelStylesNames } from './TabsPanel';
const TestContainer = createContextContainer(TabsPanel, Tabs);
const defaultProps: TabsPanelPro... |
<!DOCTYPE html>
<html>
<head>
<title>Kos App</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<header class="bg-dark text-white p-3">
<div class="container">
<h1 class="text-center">Kos App</h1>
<p style="color: green"><%= ... |
#ifndef RSIM
#define RSIM
// 代码实现中需要用到的库,如 vector, set, map
#include <vector>
#include <set>
#include <map>
#include <random>
#include <chrono>
#include <thread>
#include <algorithm>
namespace rsim {
using namespace std;
mt19937 Rand(chrono::steady_clock::now().time_since_epoch().count()); // 定义一个随机数生成器
const time_... |
import { useContext, useEffect } from "react";
import { MovieContext } from "../../Context/MovieContext";
import MovieRating from "../../components/movieRating/MovieRating";
import "./infoBox.css";
import ButtonComp from "../buttonComp/ButtonComp";
import parallaxWallpaper from "../../assets/images/parallaxWp.jpg";
im... |
package com.mindhub.Homebanking.dtos;
import com.mindhub.Homebanking.models.Account;
import com.mindhub.Homebanking.models.Client;
import com.mindhub.Homebanking.models.Transaction;
import com.mindhub.Homebanking.models.TypeAccount;
import java.time.LocalDate;
import java.util.HashSet;
import java.util.Set;
import s... |
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<!-- Bootstrap CSS -->
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootst... |
let map = L.map('map').setView([50.6354, 3.0623], 13);
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map);
const url = "https://opendata.lillemetropole.fr/api/records/1.0/search/?dat... |
import { Color } from 'global/styles/constants'
import React from 'react'
import { StyleProp, StyleSheet, Text, TextInput, View, ViewStyle } from 'react-native'
import AnimatedFieldError from '../AnimatedFieldError/AnimatedFieldError'
type inputFieldProps = {
value: string,
onChange: (value: string) => void,
... |
## DBsubject(Calculus - single variable)
## DBchapter(Applications of differentiation)
## DBsection(Related rates)
## Institution(UCSB)
## MLT(RelatedRate-CircularTrack)
## Level(5)
## Static(1)
## TitleText1('Calculus: Early Transcendentals')
## AuthorText1('Stewart')
## EditionText1('5')
## Section1('3.10')
## Proble... |
package tailLog
import (
"context"
"fmt"
"github.com/hpcloud/tail"
"log_project/log_Agent/kafka"
)
//var TailClient *tail.Tail
/*
每一个日志文件初始化一个tailObj去读取日志,所以不能使用全局初始化
*/
// TailTask 管理不同的taillog
type TailTask struct {
path string
topic string
tailObj *tail.Tail //创建一个读取日志的实例
// 使用context控制 TailTask 的go... |
import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import Header from './Components/Header/Header';
import Shop from './Components/Shop/Shop';
import { Route, Routes } from 'react-router-dom';
import Orders from './Components/Orders/Orders';
import Inventory from './Components/Inventory/Inventory';
impo... |
/***************************************************************************
*
* PROJECT: The Dark Mod - Updater
* $Revision: 4344 $
* $Date: 2010-11-28 00:02:54 -0500 (Sun, 28 Nov 2010) $
* $Author: greebo $
*
***************************************************************************/
#pragma once
#include "... |
import 'package:flutter/material.dart';
import 'package:jardin_botanico/models/category_model.dart';
Future<List<Category>> showModalSelectCategory(
BuildContext context, List<Category> categories) async {
List<Category> selectedCategories = [];
await showDialog(
context: context,
builder: (BuildConte... |
"""Create, estimate, and sample from a Joint mixture distribution.
Defines the JointMixtureDistribution, JointMixtureSampler, JointMixtureAccumulatorFactory, JointMixtureAccumulator,
JointMixtureEstimator, and the JointMixtureDataEncoder classes for use with pysparkplug.
Data type: Tuple[T0, T1].
Consider a random v... |
import PropTypes from 'prop-types';
import {
ConctactListItem,
ContactName,
ContactNumber,
DeleteButton,
} from './ContactListItems.styled';
import { useDispatch } from 'react-redux';
import { deleteContact } from 'redux/api';
export const ContactListItems = ({ id, name, number }) => {
const dispatch = useDi... |
\graphicspath{{chapters/chapter3/imgs/}}
\chapter{Systemy dialogowe w grach komputerowych}\label{chapter:ch3}
Praca dotyczy wykorzystania sztucznej inteligencji do tworzenia angażującej narracji, a jest
to realizowane poprzez stworzenie nowatorskiego systemu dialogowego opierającego się
na dużych modelach językowych.... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
很多情况下,需要用一组不同的输入和输出来测试同一份代码。Spock 对数据驱动测试提供了大量支持。
# 简介
假设要测试`Math.max()`方法:
```groovy
class MathSpec extends Specification{
def "maximum of two numbers"() {
expect:
Math.max(1, 3) == 3
Math.max(7, 4) == 7
Math.max(0, 0) == 0
}
}
```
这种写法会有一些潜在的问题。
* 代码和数据混合在一起,不易独立更改
* 不能轻易自... |
-- Employment Type - describe full-time, temporary, contractor, other or so
-- Occupation Code - define what kind of job or service is provided
CREATE TABLE [Entity].[Employment]
(
[Employment_ID] VARCHAR(40) NOT NULL,
[Employer_ID] VARCHAR(40) NULL,
[Employee_ID] VARCHAR(40) NULL... |
<a name="readme-top"></a>
# 📗 Table of Contents
- [📖 About the Project](#about-project)
- [🛠 Built With](#built-with)
- [Tech Stack](#tech-stack)
- [Key Features](#key-features)
- [<img src="https://cdn-icons-png.flaticon.com/512/5360/5360804.png" width="23" height="20"/> Kanban Board](#kanban-board)
... |
import { useQuery } from "@tanstack/react-query";
import React, { useEffect, useState } from "react";
import { useSearchParams } from "react-router-dom";
import { getCourses } from "../../services/apiCourses";
const CourseLevel = ({ setPosts, items }) => {
// const { data: items, isLoading } = useQuery({
// quer... |
export type RequestData = {
method: "GET" | "POST" | "DELETE" | "PUT" | "PATCH";
url: string;
headers?: any;
data?: any;
useToken?: boolean;
};
export class HttpError extends Error {
constructor(
public readonly url: string,
public readonly status: number,
public readonly statusText: string,
... |
// Copyright 2019-2021:
// GobySoft, LLC (2013-)
// Community contributors (see AUTHORS file)
// File authors:
// Toby Schneider <toby@gobysoft.org>
//
//
// This file is part of the Goby Underwater Autonomy Project Libraries
// ("The Goby Libraries").
//
// The Goby Libraries are free software: you can redistrib... |
/*
* Copyright (c) 2020, Alibaba Group Holding Limited
* 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 o... |
<script lang="ts">
import { toast } from 'svelte-sonner';
import { createEventDispatcher, onMount, getContext } from 'svelte';
const i18n = getContext('i18n');
const dispatch = createEventDispatcher();
export let messageId = null;
export let show = false;
export let message;
let LIKE_REASONS = [];
let DIS... |
---
title: Hinzufügen von Sparklines und Datenbalken (Berichts-Generator und SSRS) | Microsoft-Dokumentation
ms.custom: ''
ms.date: 06/13/2017
ms.prod: sql-server-2014
ms.reviewer: ''
ms.technology: reporting-services-native
ms.topic: conceptual
ms.assetid: 0b297c2e-d48b-41b0-aabd-29680cdcdb05
author: maggiesMSFT
ms.au... |
import os
import sys
import random
import shutil
import importlib
# set fixed seed for generating test cases
random.seed(123456789)
# locate evaldir
evaldir = os.path.join('..', 'evaluation')
if not os.path.exists(evaldir):
os.makedirs(evaldir)
# locate solutiondir
solutiondir = os.path.join('..', 'solution')
if... |
package com.happydev.accountmovementmanagementservice.service;
import com.happydev.accountmovementmanagementservice.dto.ClienteDTO;
import com.happydev.accountmovementmanagementservice.entity.Cuenta;
import com.happydev.accountmovementmanagementservice.exception.ClienteNotFoundException;
import com.happydev.accountmo... |
import { z } from 'zod';
export const listOrdersRequestSchema = z.object({
query: z.object({
supplierId: z.string().uuid().optional(),
}).strict(),
});
export const createOrderItemRequestSchema = z
.object({
productId: z.string({ required_error: 'O campo id do produto é obrigatório!' }).uuid('O id do produto i... |
/*
This file is part of Max.
Max 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
any later version.
Max is distributed in the hope that it will be useful,
but WI... |
package internal
import (
"bufio"
"bytes"
"encoding/json"
"github.com/Dencyuman/logvista-observer/config"
"github.com/fsnotify/fsnotify"
"log"
"net/http"
"os"
"path/filepath"
"time"
)
func tailFile(filename string, pos *int64) ([]string, error) {
file, err := os.Open(filename)
if err != nil {
return nil... |
using System;
using System.Collections.Generic;
using System.Linq;
namespace Linq.EqualityComparers
{
/// <summary>
/// Compares two strings to see if they are anagrams.
/// Anagrams are pairs of words formed from the same letters.
/// </summary>
public class AnagramEqualityComparer : IEqualityCom... |
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import {DashboardComponent} from "./components/layout/dashboard.component";
import {HeaderComponent} from "./components/layout/header.component";
import {YoutubeLayoutCom... |
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class GUISMUJourney extends JFrame {
//Declares variables necessary to setup GUI
private int roundNumber;
JLabel play1JLabel, play2JLabel, howMuchLabel;
JTextField play1Field, play2F... |
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import VueMeta from 'vue-meta'
Vue.use(VueMeta)
Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'Home',
component: Home
},
{
path: '/about',
name: 'About',
component: () => import(/* webp... |
"use client";
import Image from "next/image";
import { Inter } from "@next/font/google";
import styles from "../page.module.css";
import { useEffect, useState } from "react";
import { useQuery, useMutation, useQueryClient, QueryClient } from "@tanstack/react-query";
import { Button, Card, CardActions, CardContent, Typo... |
import React, { useEffect, useState } from 'react'
import "./css/Emaillist.css"
import EmailListSettings from './EmailListSettings'
import EmailType from './EmailType'
import Emailbody from './Emailbody'
import { db } from './firebase'
function Emaillist() {
const[emails,setEmails] = useState([]);
const[loading,set... |
package cli
import (
"context"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/spf13/cobra"
"github.com/zeta-chain/zetacore/x/crosschain/types"
)
func CmdListLastBlockHeight() *cobra.Command {
cmd := &cobra.Command{
Use: "list-last-block-height",
Short: "list... |
import React, { useEffect, useState, useRef } from 'react';
import {
Container,
Paper,
Table,
TableBody,
TableCell,
TableContainer,
TableHead,
TableRow,
Typography,
Pagination,
} from '@mui/material';
import axios from 'axios';
import { Link, useParams } from 'react-router-dom';
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.