text stringlengths 184 4.48M |
|---|
import Buyable from './Buyable';
export default class Cart {
private _items: Buyable[] = [];
add(item: Buyable): void {
if(this._items.some(el => el.id === item.id)) {
if(item.canAddMore) {
item.count += 1;
return;
} else {
return... |
package com.examen.forge.app.infraestructure.webApi.controllers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.... |
This repository contains the files needed to complete the LIFO FIFO project in ALX.
The files and their functions are recorded within this readme.
# Monty Scripting Language
Monty 0.98 is a scripting language that undergoes an initial compilation into Monty bytecode, similar to Python. It operates based on a distinc... |
import { conn } from "../../../db/mysql.connection";
import { APIError, HTTPStatusCode } from "../../error/api-error.model";
import { FlatTenancy } from "../models/flat-tenancy.model";
export class FlatTenancyDatabase {
constructor() {}
fetchFlatTenancyByTenantId = async (tenantId: string, ownerId: string): Promis... |
# CONTRIBUTING
Thank you for your interest in contributing to Clash Verge Rev! This document provides guidelines and instructions to help you set up your development environment and start contributing.
## Development Setup
Before you start contributing to the project, you need to set up your development environment.... |
<?php
namespace App\Controller;
use App\Document\Manager\SongManager;
use App\Elastic\RomajiAnalyzer;
use App\Service\Music163LyricsFetcher;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class LyricsController extends AbstractController
{
/**
... |
import React, { useEffect, useState } from "react";
import { Card } from "react-bootstrap";
import "./UseEffect.css";
import { useNavigate } from "react-router";
import { Link } from "react-router-dom";
const UseEffect = () => {
const [users, setUsers] = useState([]);
const navigate = useNavigate();
const ... |
<?php
/**
* The template for displaying comments
*
* This is the template that displays the area of the page that contains both the current comments
* and the comment form.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package singlecoaching
*/
/*
* If the current post is p... |
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>My TODO</title>
<link rel="stylesheet" href="css/style.css">
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="http... |
type Admin = {
name: string;
privileges: string[];
};
type Employee = {
name: string;
startDate: Date;
};
type ElevatedEmployee = Admin & Employee;
const e1: ElevatedEmployee = {
name: "Chandler",
privileges: ["create-server"],
startDate: new Date(),
};
type Combine = string | number;
type Numeric = n... |
import React, { Component } from "react";
import PropTypes from "prop-types";
import { ProductConsumer } from "../Context";
import { Link } from "react-router-dom";
import { ButtonContainer } from "./Button";
/**
* @author
* @class Details
**/
class Details extends Component {
state = {};
render() {
return ... |
/*
* Copyright (c) 2023 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 ... |
//
// ViewController.swift
// aulaMVVM_parte2
//
// Created by Jessica Santana on 27/05/22.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var primeiroNumeroTextField: UITextField!
@IBOutlet weak var segundoNumeroTextField: UITextField!
@IBOutlet weak var resulta... |
package com.example.task;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import a... |
import wandb
import torch
import copy
from datetime import datetime
from ultralytics.utils.torch_utils import de_parallel
import ultralytics
try:
import dill as pickle
except ImportError:
import pickle
def on_train_start(trainer):
wandb.config.train = vars(trainer.args)
# Log metrics for learning rate, a... |
https://python.langchain.com/docs/integrations/tools/twilio
ComponentsToolsTwilio
On this page
Twilio
This notebook goes over how to use the Twilio API wrapper to send a message through SMS or Twilio Messaging Channels.
Twilio Messaging Channels facilitates integrations with 3rd party messaging apps and lets you sen... |
import React from 'react';
import { Container, Row, Col } from 'react-bootstrap';
import Carousel from 'react-multi-carousel';
import 'react-multi-carousel/lib/styles.css';
import { CircularProgressbar } from 'react-circular-progressbar';
import 'react-circular-progressbar/dist/styl.css';
import colorSharp from '../ass... |
# 第五章:自回归模型
到目前为止,我们已经探讨了两种涉及潜变量的生成模型家族——变分自动编码器(VAEs)和生成对抗网络(GANs)。在这两种情况下,引入了一个新变量,其分布易于抽样,模型学习如何将此变量*解码*回原始领域。
现在我们将把注意力转向*自回归模型*——一类通过将生成建模问题简化为一个顺序过程的模型家族。自回归模型将预测条件放在序列中的先前值上,而不是在潜在随机变量上。因此,它们试图明确地对数据生成分布建模,而不是对其进行近似(如 VAEs 的情况)。
在本章中,我们将探讨两种不同的自回归模型:长短期记忆网络和 PixelCNN。我们将把 LSTM 应用于文本数据,将 PixelCNN 应用于图像数据。我们将在第... |
package microfb.server;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import java.util.UUID;
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import microfb.client.s... |
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# 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/LICE... |
import React from 'react';
import { Routes, Route } from 'react-router-dom';
import Layout from '../components/Layout';
import MainSection from '../sections/MainSection';
import ScudSection from '../sections/ScudSection';
import CabinetSection from '../sections/CabinetSection';
import SettingsSection from '../sections... |
//
// ViewController.swift
// QuizApp_Completed
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var questionLabel: UILabel!
@IBOutlet weak var background: UIImageView!
@IBOutlet weak var buttonOne: UIButton!
@IBOutlet weak var buttonTwo: UIButton!
... |
//
// ViewController.swift
// RecordApp
//
// Created by Terry Jason on 2024/1/3.
//
import UIKit
import AVFoundation
class RecordViewController: UIViewController {
private var audioRecorder: AVAudioRecorder!
private var audioPlayer: AVAudioPlayer?
private var timer: Timer?
private var el... |
import { Body, Controller, Post, Get, Req, UseFilters, HttpStatus, Param, Patch, Query } from '@nestjs/common';
import { HttpService } from '@nestjs/axios';
import { ApplicationServiceURL } from '../app.config';
import { Request } from 'express';
import { AxiosExceptionFilter } from '../filters/axios-exception.filter';... |
package net.minecraft.command;
import java.util.List;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.world.EnumDifficulty;
/**+
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
*... |
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/attribution_reporting/attribution_interop_parser.h"
#include <cmath>
#include <functional>
#include <optional>
#include <string>
#include <utility>
#... |
/**
* 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... |
# References and Borrowing
- We use `&` to borrow a reference to a value.
- We can have multiple references to the same value.
- References must always be valid.
- References are immutable by default.
```
fn main() {
let s = String::from("Hello");
let len = calculate_length(&s);
println!("The size... |
import { insertIntoObject, getFromObject } from '../src/index';
describe('object-json-path-ts insertIntoObject', () => {
describe('invalid call', () => {
it('should throw an error when an empty path is provided', () => {
expect(
() => {
insertIntoObject({}, { path: '', value: 'joe' });
... |
import Contract from '@/services/contract'
import { CONTRACTS } from '@/const/contracts'
import web3 from '@/services/web3'
import { isAddressCorrect } from '@/utils/web3'
class Souli {
constructor() {
this.contract = new Contract(CONTRACTS.token.address, CONTRACTS.token.abi)
}
async getBalance(address) {
... |
#Trayectoria con resistencia al aire
#Muchos problemas de mecánica elemental se refieren a la física de los objetos.
#moviéndose o volando por el aire, pero casi siempre ignoran la fricción
#y resistencia al aire para hacer que las ecuaciones sean solucionables. Si estamos usando un
#computadora, sin embargo, no nece... |
import 'package:advanced_flutter_clean_architecture/data/network/failure.dart';
import 'package:advanced_flutter_clean_architecture/data/network/requests.dart';
import 'package:advanced_flutter_clean_architecture/domain/model/models.dart';
import 'package:advanced_flutter_clean_architecture/domain/repository/repository... |
// Atribuição via desestruturação (Objetos)
const pessoa = { // aqui criamos um objeto com informações de uma pessoa
nome: 'Luiz',
sobrenome: 'Miranda',
idade: 30,
endereco: { // é bem normal criar um objeto dentro de outro objeto no JS
rua: 'Av Brasil',
numero: 320
}
}
//const n... |
<template>
<div>
<!-- 面包屑导航区域 -->
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>订单管理</el-breadcrumb-item>
<el-breadcrumb-item>订单列表</el-breadcrumb-item>
</el-breadcrumb>
<!-- 卡片视图 -->
<... |
/**
* Copyright (c) 2017-2019. The WRENCH Team.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#ifndef WRE... |
/****************************************************************************
This file is part of the Webstella protocols exchange (Weprex) software.
Copyright (C) 2018 Oleg Malyavkin.
Contact: weprexsoft@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of ... |
import { z } from "zod";
import { AuthContext } from "~/context/context";
import { useContext, useState } from "react";
import { useRegisterSchema } from "./schema/schemeRegister";
import {
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from "./ui/card";
import { Button } from ".... |
package com.goodforallcode.playlistgenerator.model.domain.spotify;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
@JsonIgnoreProperties(ignoreUnknown = true)
public class SpotifyAlbumItem {
@JsonProperty("album_type")
... |
---
title: background-attachment
slug: Web/CSS/background-attachment
tags:
- CSS
- CSS Background
- CSS Property
- Reference
translation_of: Web/CSS/background-attachment
---
<div><section class="Quick_links" id="Quick_Links"><ol><li><strong><a href="/ru/docs/Web/CSS">CSS</a></strong></li><li><strong><a href="/... |
#! /usr/bin/env python
import rclpy
from rclpy.node import Node
from hrwros_msgs.msg import BoxHeightInformation
from hrwros_msgs.srv import ConvertMetresToFeet
class BoxHeightFeetConverter(Node):
def __init__(self):
super().__init__('box_height_in_feet')
# First wait for the service to become ava... |
// Read-up : In selection sort, we iterate through the array from idx-> 0 to n and each time we get the shortest element from the array particularly from idx+1 till the end.
// Now instead of getting that smallest elt by iterating through array yet again , we're doing the same using quick sort and partition wherein the... |
import { Button } from "@/components/ui/button";
import { Clock, Mail, MapPin, Share, User } from "lucide-react";
import Image from "next/image";
import React from "react";
import BookingSection from "./BookingSection";
interface SingleBusinessList {
id: string;
name: string;
contactPerson: string;
images: { ur... |
import React, { useRef, useState, useContext, Fragment } from 'react'
import ProColor from './ProColor';
import { AuthContext } from '../../store/auth';
import styles from './ProductInfo.module.css';
import ProSize from './ProSize';
import { useHttpClient } from '../../hooks/http-hook';
import { useRouter } from 'nex... |
---
search: false
---
# Converting from Clover to OpenCore
So you see the new fancy OpenCore bootloader and just dying to try it out, well you've come to the right place! Many things in Clover have feature parity with OpenCore but many do not, here we'll be going over what you can bring over and what you cannot.
To ... |
import React, { Component } from 'react'
// 从react路由组件库按需引入组件标签
import {Route,Switch,NavLink,Redirect} from 'react-router-dom'
// 引入二级子路由
import Message from './Message/Message'
import News from './News/News'
export default class Home extends Component {
render() {
return (
<div className="col-xs-6">
... |
package app.trian.rust.persentation.home
import android.util.Log
import androidx.compose.runtime.snapshots.SnapshotStateList
import androidx.lifecycle.viewModelScope
import app.trian.rust.common.BaseViewModel
import app.trian.rust.common.executeAsFlow
import app.trian.rust.data.Response
import app.trian.rust.data.data... |
/*
* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-... |
# INSERTIONS
INSERT INTO company(company_name, location) VALUES
('Hexaware', 'Chennai'), ('Google', 'Pune'), ('Microsoft', 'Mumbai'),
('Amazon', 'Banglore'), ('Adobe', 'Mumbai'), ('Uber', 'Mumbai'),
('TCS', 'Banglore'), ('Wipro', 'Banglore'), ('JP Morgan', 'Hyderabad'),
('IBM', 'Banglore');
INSERT INTO applica... |
---
title: "In 2024, Strategic Use of Hashtags in Gaming Vlog Production"
date: 2024-05-31T12:39:39.073Z
updated: 2024-06-01T12:39:39.073Z
tags:
- ai video
- ai youtube
categories:
- ai
- youtube
description: "This Article Describes In 2024, Strategic Use of Hashtags in Gaming Vlog Production"
excerpt: "This Ar... |
import React from "react";
import { ButtonBase } from "@mui/material";
import Stack from '@mui/material/Stack';
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
export default function Pagination({currentPage, totalPages, paginate}) {
ret... |
import {
EyeOutlined,
PlusCircleOutlined,
SearchOutlined,
} from "@ant-design/icons";
import { Button, Card, Input, Menu, message, Table } from "antd";
import EllipsisDropdown from "components/shared-components/EllipsisDropdown";
import Flex from "components/shared-components/Flex";
import React, { useEffect, u... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# RHN/Spacewalk API Module abstracting the 'packages' namespace
# and its children / sub-namespaces
#
# Copyright (c) 2009-2014 Stuart Sears
#
# This file is part of python-rhnapi
#
# python-rhnapi is free software: you can redistribute it and/or modify it under
# the terms... |
from fastapi import FastAPI
from pydantic import BaseModel
from fastapi.middleware.cors import CORSMiddleware
app = FastAPI()
# CORSミドルウェアを有効化して、異なるポートからのリクエストを許可
app.add_middleware(
CORSMiddleware,
allow_origins=["http://localhost:3000"], # ReactアプリケーションのURLに合わせて変更
allow_credentials=True,
allow_meth... |
<template>
<div class="bottom-bar">
<div class="check-content">
<check-bottom
class="check-button"
:is-checked="isSelectAll"
@click="selectAll"
></check-bottom>
<span>全选</span>
</div>
<div class="price">合计:{{ totalPrice }}</div>
<div class="calc">去支付({{ totalC... |
import {useEffect, useRef} from "react";
import {editBlockPositionHandler, editBlockSizeHandler} from "../stateManager/stateManagerFunctions";
export function useDragAndDrop(slideIndex: number, blockIndex: number, id: string, coordX: number, coordY: number, type: string) {
const isClicked = useRef<boolean>(false);... |
// Exercise: channel
// Use print wherever necessary
/*
1. In continuation of the search files example from goroutines.
You need to search files on a disk. The function fileSearch()
is already given to search for the files. It sleeps for 1 sec if
the search is successful.
You should remove all th... |
import * as styled from "styled-components";
export const colors = {
darkBlue: "hsl(233, 26%, 24%)",
transparentDarkBlue: "hsl(233, 26%, 24%, 0.7)",
limeGreen: "hsl(136, 65%, 51%)",
brightCyan: "hsl(192, 70%, 51%)",
grayishBlue: "hsl(233, 8%, 62%)",
lightGrayishBlue: "hsl(220, 16%, 96%)",
veryLightGray:... |
// Copyright (c) GREE, Inc.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:patapata_core/pata... |
import React, { useEffect, useState } from "react";
import { Col, Container, Row } from "react-bootstrap";
import { api } from "../../services/api";
import { ToastContainer, toast } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
const CadProduto = () => {
const urlParams = new URLSearchParams... |
#!/usr/bin/env dart
import 'dart:io';
import 'package:melos/melos.dart';
import 'package:path/path.dart' as path;
class Package {
final String name;
final String version;
final String location;
Package({
required this.name,
required this.version,
required this.location,
});
factory Package.f... |
import React, { useState } from 'react';
import TextField from '@mui/material/TextField';
import Button from '@mui/material/Button';
import styles from '../styles/CompanyBox.module.css';
const TransferFrom = ({ web3, account, contract }) => {
let [sender, setSender] = useState("");
let [receiver, setReceiver]... |
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Contracts\Validation\Validator;
use Illuminate\Http\Exceptions\HttpResponseException;
class UpdateServiceOrderRequest extends FormRequest
{
public function authorize()
{
return true;
}
public functi... |
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>HTML Academy: Седона. Фото и видео</title>
<link rel="preload" href="fonts/ptsans.woff2" as="font" type="font/woff2" crossorigin>
<link rel="stylesheet" href="css/style.m... |
use std::cell::RefCell;
use std::sync::RwLock;
use std::time::Duration;
use leaky_bucket::RateLimiter;
use rand::prelude::*;
use tokio::time;
use crate::clock::Clock;
pub struct TestClient<'a> {
clock: &'a Clock,
limiter: RateLimiter,
rng: RwLock<ThreadRng>,
}
impl<'a> TestClient<'a> {
pub fn new(clo... |
//! # Nest CFGs
//!
//! Identify Single-Entry-Single-Exit (SESE) regions in the CFG.
//! These are pairs of edges (a,b) where
//! * a dominates b
//! * b postdominates a
//! * there are no other edges in/out of the nodes inbetween
//! (this last condition is necessary because loop backedges do not affect (post)dominan... |
package service
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestRealDatabase_GetEmployeeById(t *testing.T) {
db := NewRealDatabase("data.txt")
err := db.Init()
assert.NoError(t, err)
t.Run("test given id should return correct employee info", func(t *testing.T) {
got, err := db.GetEmploye... |
<template>
<table>
<thead>
<tr>
<th>#</th>
<th>Сумма</th>
<th>Дата</th>
<th>Категория</th>
<th>Тип</th>
<th>Открыть</th>
</tr>
</thead>
<tbody>
<tr v-for="(record) of records" :key="record.id">
<td>{{record.recordNumber}}</td>
<td>{{record.amoun... |
class MariadbAT106 < Formula
desc "Drop-in replacement for MySQL"
homepage "https:mariadb.org"
url "https:archive.mariadb.orgmariadb-10.6.18sourcemariadb-10.6.18.tar.gz"
sha256 "6898a1111f47130709e28ba2c7bd1a57e4bb57101f6e109e597d51e6d385cf18"
license "GPL-2.0-only"
livecheck do
url "https:downloads.ma... |
from abc import ABC
from typing import Dict
from typing import List
import torch
from hydra.utils import instantiate
from omegaconf import DictConfig
from torch import nn
from torch.nn import functional as F
from torchmetrics.classification import MulticlassAccuracy, MultilabelAccuracy
from avr.task.avr_module import... |
package com.pro.delicacy.ui;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.google.firebase.database... |
import { Injectable } from "@angular/core";
import { environment } from "src/environments/environment.development";
import { HttpClient } from '@angular/common/http'
import { Fleet, FleetWithNoId } from "../interfaces/Fleet";
@Injectable({
providedIn: 'root'
})
export class FleetService {
private url = `${e... |
import type { Locator, Page } from '@playwright/test';
import BaseModal from './BaseModal';
export default class NewBoardModal extends BaseModal {
readonly boardName: Locator;
readonly columnRows: Locator;
readonly addColumnBtn: Locator;
readonly submitBtn: Locator;
constructor(page: Page) {
... |
# 分词器实用程序
> 译者:[片刻小哥哥](https://github.com/jiangzhonglian)
>
> 项目地址:<https://huggingface.apachecn.org/docs/transformers/internal/tokenization_utils>
>
> 原始地址:<https://huggingface.co/docs/transformers/internal/tokenization_utils>
本页列出了分词器使用的所有实用函数,主要是类
[PreTrainedTokenizerBase](/docs/transformers/v4.35.2/en/internal/... |
import styled from "styled-components";
import { Link } from "react-router-dom";
const CardEdit = ({ user, information, className }) => {
const image = require("../../../image Hackathon/image/background.jpeg");
const location = require("../../../image Hackathon/icon/pin.png");
const call = require("../../../imag... |
import React from 'react'
import { Box, Container, StatHelpText } from '@chakra-ui/react'
import { useState } from 'react';
import Loader from './Loader';
import { useEffect } from 'react';
import axios from 'axios';
import { server } from '../index';
import {useParams} from "react-router-dom"
import {HStack,VStack} f... |
/* eslint-disable jsx-a11y/anchor-is-valid */
import React from "react";
import { PostModel } from "@/types/post";
import ListComments from "../comment/list-comments";
import { formateDMYHH } from "@/utils";
import { BiComment } from "react-icons/bi";
import { MdDeleteOutline, MdOutlineModeEdit } from "react-icons/md";... |
<?php
namespace App\Http\Controllers;
use App\Cover;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth'... |
package it.unitn.disi.zanshin.simulation.cases.acad;
import it.unitn.disi.zanshin.simulation.Logger;
import it.unitn.disi.zanshin.simulation.cases.SimulationPart;
/**
* Simulation of the failure of AR15 during an execution of the A-CAD.
*
* @author Vitor E. Silva Souza (vitorsouza@gmail.com)
* @version 1.0
*/
p... |
# Brain Agriculture Case
This project is a React application and is part of the Brain Agriculture evaluation case.
Solutions were applied to the problems proposed in the repository challenge - [brain-agriculture](https://github.com/brain-ag/trabalhe-conosco). For this, I used:
- Programming logic, observing business ... |
void fileRelatedAssertionChains() {
int size = 1;
String name = "name";
assertThat(getFile()).hasSize(0); // Noncompliant {{Use isEmpty() instead.}}
assertThat(getFile().length()).isZero(); // Noncompliant {{Use assertThat(actual).isEmpty() instead.}}
assertThat(getFile().length()).isEqualTo(0); //... |
package com.astha.singh.service;
import com.astha.singh.model.Category;
import com.astha.singh.model.Items;
import com.astha.singh.repository.CategoryRepository;
import com.astha.singh.repository.ItemRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Servic... |
import { Observable } from 'rxjs';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class CityService {
constructor(private httpClient: HttpClient, private ... |
from .mobilevit import MobileVITModel
from .base_config import get_base_config
import yaml, os
import tensorflow as tf
def load_mobilevit_v1_small(is_feature_extractor=False) -> tf.keras.Model:
config_file_path = f"configs/mobilevit_v1_small.yaml"
with open(config_file_path, "r") as f:
data = yaml.s... |
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequ... |
import { tokenSupported } from "@config/constants/token-supported";
import {
Button,
CircularProgress,
Dialog,
DialogContent,
FormControl,
MenuItem,
Select,
TextField,
} from "@mui/material";
import { formatNumber } from "@utils/format";
import { Form, Formik } from "formik";
import { useState } from "r... |
<div align="center">
<h1 align="center">
<img src="https://miro.medium.com/v2/resize:fit:800/1*3gOnS8dkzrKSbpnJSdDuQg.png" width= "200px">
<br>Libft (is being updated)</br>
</h1>
<h3>Your very first own library</h3>
<p align="center">
<img src="https://img.shields.io/badge/Barcelona-100000?style=flat-square... |
#ifndef BLOOM_FILTER_HPP
#define BLOOM_FILTER_HPP
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <vector>
namespace BF
{
typedef std::vector<std::uint64_t> hashes;
class murmur3
{
public:
// taken from: https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp
void operator()(co... |
import React, { useState } from 'react';
import { Link, useNavigate } from 'react-router-dom';
import Login from './login';
import supabase from '../config/supabaseClient';
import logo from "../assets/logo.png"
const SignUp = () => {
const navigate = useNavigate();
const [formData, setFormData] = useState({
fu... |
/* SymTable Data Structure */
typedef struct SymTable *SymTable_T;
/* Create and return a new allocated SymTable_T */
SymTable_T SymTable_new(void);
/* Free allocated memory for oSymTable. If oSymTable == NULL do nothing */
void SymTable_free(SymTable_T oSymTable);
/* Count and return the number of saved elements */... |
package music;
import java.io.File;
import java.io.IOException;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.LineEvent;
import javax.sound.... |
// import React from 'react'
import { skills } from '../data/Skills';
const container = `bg-gradient-to-t from-slate-950 to-slate-900 text-gray-100 pt-6`;
const wrapper = `flex flex-col justify-center items-center py-20 md:py-16 px-10 md:py-10 gap-4`;
const title = "text-4xl font-bold text-sky-500";
const desc = "text... |
<h2> Makes the characters glow when the mouse is over </h2>
To make the text glow when the mouse is over, specify "opacity: opacity;" as the style of a: hover.
It's easy to take advantage of the fact that it looks shiny as the transparency increases. It's a good idea to fine-tune the opacity from around 0.8.
<style>... |
import { describe, it, expect, vi } from "vitest";
import { DEFAULT_VALUE } from "../constants";
import type { Dependency } from "../packageUtils";
import {
getUniqueProblems,
determineResolutionType,
semverReverseSort,
findPossibleResolution,
formatResolution,
} from "./solution";
const mocks = vi.hoisted((... |
package com.example.dentistryapp.ui.appointments
import android.annotation.SuppressLint
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.... |
import { addMonths, getMonth, getQuarter, getYear, subDays } from "date-fns";
import type { CalendarEvent } from "./calendar-parser";
export const filterByYearPredicate =
(year: number) =>
(event: CalendarEvent): boolean =>
getYear(event.start) === year;
export const filterByMonthPredicate =
(month: number)... |
<div data-events-form-target="kindActivity" hidden class="h-full w-full">
<%= form_with(model: @event, url: account_contact_events_path(current_user.account, contact_id: @deal.contact.id, deal_id: @deal.id), namespace: 'activity') do |form| %>
<% if @event.errors.any? %>
<div id="error_explanation">
... |
# Copyright 2023 DeepMind Technologies 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 or agree... |
package com.example.model.hotMatches
import android.os.Parcel
import android.os.Parcelable
import com.google.gson.annotations.SerializedName
data class HotMatche(
@SerializedName("agg_score")
val aggScore: List<Int?>?,
@SerializedName("away_Info")
val awayInfo: AwayInfo?,
@SerializedName("away_po... |
const app = document.querySelector('.weather-app');
const temp = document.querySelector('#temp');
const dateOutput = document.querySelector('.date');
const timeOutput = document.querySelector('.time');
const conditionOutput = document.querySelector('.condition');
const humadityOutput = document.querySelector('.humadity... |
import React, { ReactElement } from 'react';
import { useRouter } from 'next/router';
import { IMarkdownArticleProps } from 'src/interfaces/IMarkdownArticleProps';
import { MarkdownContainer } from 'src/components/global/markdownContainer';
import { Container } from 'src/components/global/container';
import { IStaticPr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.