text stringlengths 184 4.48M |
|---|
#include "places_brand_carousel.hpp"
#include <fmt/format.h>
#include <gtest/gtest.h>
#include <userver/formats/json/serialize.hpp>
#include <models/constructor/db_model.hpp>
#include <sources/catalog/catalog_data_source.hpp>
#include <widgets/places_brand_carousel/factory.hpp>
namespace {
using Response = eats_lay... |
package com.java.vms;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.java.vms.domain.Address;
import com.java.vms.domain.Flat;
import com.java.vms.domain.User;
import com.java.vms.model.*;
import com.java.vms.repos.*;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
impo... |
import { useState } from 'react';
import { useReducer } from 'react';
import './App.scss';
import count from './Reducers/count';
import square from './Reducers/square';
function App() {
const [number, dispatchNumber] = useReducer(count, 0);
const [numberVal, setNumberVal] = useState('');
const [squareNum,... |
import puppeteer from 'puppeteer-core';
type Params = {
html: string;
width: number;
height: number;
};
export async function captureScreenshot({ html, width, height }: Params): Promise<Buffer | null> {
const browser = await puppeteer.launch({
args: ['--headless', '--no-sandbox', '--hide-scrollbars'],
... |
import React, {FC, useEffect} from 'react';
import {formatMoment} from 'common';
import {Bold, P} from 'common/styles/StyledText';
import {Row} from 'common/styles/layout';
import moment from 'moment';
import {View, Image, StyleSheet, useWindowDimensions} from 'react-native';
import {NotificationType} from '../reducers... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="preload" as="image" href="{{ asset('other_image/bg-perpis.jpg') }}">
<link rel="stylesheet" href="{{... |
<template>
<div style="overflow: hidden; height: 100vh">
<div class="login-container">
<el-form
ref="loginForm"
:model="loginForm"
:rules="loginRules"
class="login-form"
auto-complete="on"
label-position="left"
:style="{
width: windowWidth <=... |
#ifndef LEXER_H
#define LEXER_H
#include <QList>
#include <QString>
#include <QMap>
#include <QRegExp>
#include <QDebug>
#include <QObject>
#include <stdexcept>
#include "lib/token.h"
class Lexer : public QObject
{
Q_OBJECT
public:
/**
* @brief constructor
*
* @param sou... |
package ru.netology.nmedia.activity
import androidx.lifecycle.ViewModelProvider
import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.activityViewModels
import androidx.fragment.app.viewModel... |
# include <Siv3D.hpp>
/*
よりC++ライクな書き方
・クラスベース
・継承を行う
*/
// 前方宣言
class Ball;
class Bricks;
class Paddle;
bool isStart = false;
bool isEnd = false;
int32 Score = 0;
// 定数
namespace constants {
namespace brick {
/// @brief ブロックのサイズ
constexpr Size SIZE{ 40, 20 };
/// @brief ブロックの数 縦
constexpr int ... |
const express = require('express')
const router = express.Router()
const User = require('../../models/user')
const passport = require('passport')
const bcrypt = require('bcryptjs')
router.get('/login', (req, res) => {
res.render('login')
})
router.post(
'/login',
passport.authenticate('local', {
successRedi... |
// LoginForm.js
import React from 'react';
import { View, TextInput, Button, StyleSheet } from 'react-native';
const LoginForm = (props) => {
const { handleLogin, handleChange, credentials } = props;
return (
<View style={styles.container}>
<TextInput
style={styles.input}
placeholder="Co... |
import {useContext} from 'react';
import {
Box,
Table,
TableContainer,
TablePagination,
Paper,
Typography
} from '@mui/material';
import EnhancedTableHead from './EnhancedTableHead';
import EnhancedTableToolbar from './EnhancedTableToolbar';
import EnhancedTableRows from './EnhancedTableRows';
import {Cust... |
library(tidyverse)
library(magrittr)
library(data.table)
library(glue)
library(ungeviz) # geom_hpline
library(patchwork)
theme_set(theme_bw())
rm(list=ls())
filter <- dplyr::filter
select <- dplyr::select
desc <- dplyr::desc
reduce <- purrr::reduce
rename <- dplyr::rename
options(stringsAsFactors = FALSE)
set.seed(629)... |
package com.junq.practice.springboot.web;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.test... |
require 'spec_helper'
describe UsersController do
render_views
before :each do
User.all.each { |d| d.remove }
@user = FactoryGirl.create :user
Tag.all.each { |d| d.remove }
@tag = FactoryGirl.create :user_tag
Report.clear
@r1 = FactoryGirl.create :r1
@r2 = FactoryGirl.create :r2
@r... |
import 'package:flutter/material.dart';
class DrawerScreen extends StatelessWidget {
const DrawerScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Drawer'),
),
drawer: const Drawer(
child: Column(
... |
using Simple_Task_List_Application;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Simple_Task_List_Application
{ public class Task
{
public String task_title;
public String task_description;... |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('translation_values', function (Blueprint $ta... |
// components
import ArtistsGridItem from "@components/ArtistsGridItem";
import Select from "@ui/Select";
import Pagination from "@ui/Pagination";
import CategoryHeader from "@ui/CategoryHeader";
// hooks
import { useState, useEffect } from "react";
import usePagination from "@hooks/usePagination";
// constants
impor... |
import { CommandHandler, ICommandHandler } from "@nestjs/cqrs"
import { Contract } from "../../../../../infrastructure/utils/contract"
import { UsersRepository } from "../../../../sa/repository/mongoose/users.repository"
import { ErrorEnums } from "../../../../../infrastructure/utils/error-enums"
export class Confirma... |
<!-- templates/home.html -->
{% extends 'base.html' %}
{% load static %}
{% load thumbnail %}
{% block title %}Главная страница{% endblock %}
{% block content %}
{% include 'components/header.html' %}
<main class="main-background">
<div class="home-container">
<div class="home-welcome">
<h2 cl... |
import React from "react";
import Button from "@mui/material/Button";
import TextField from "@mui/material/TextField";
export default function seatType({seatTypes, setSeatTypes, numberOfSeatTypes, setNumberOfSeatTypes}) {
return (
<div className={"seat-type-container"}>
<div className={"seat-t... |
<?php
namespace My;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\FirePHPHandler;
class Helpers {
const MAX_FILE_SIZE = 2097152;
private static $_logger;
public static function log() : Logger
{
if (is_null(self::$_logger)) {
self::$_logger = new Logger... |
package ru.practicum.shareit.booking;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import ru.practicum.shareit.booking.service.BookingService;
import static org.springframework.http.HttpStatus.CREATED;
import static org.springframework.http.HttpStatus.OK;
/**
* T... |
import {reactive, unref} from "vue";
import type {Todo} from "@/interfaces/todo";
import {addToLocalStorage, getTodoListFromLocalStorage} from "@/utils/todoUtils";
import {ToastMessage} from "@/state-management/ToastMessage";
export const TodoList = reactive({
todos: [] as Todo[],
loadTodos(){
this.tod... |
package com.example.app2_bussinesscard
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.fou... |
import React, { useState } from 'react';
import Image from 'next/image';
import { Modal, Button } from 'react-bootstrap';
const ImgProfesor =
'https://firebasestorage.googleapis.com/v0/b/coiner-2022.appspot.com/o/profesores%2FWEB_COINER_PROFESORES_Jennifer%20Mc%20Donald.png?alt=media&token=b51a7de6-199e-4399-9b9d-f... |
:py:mod:`ifcpatch.recipes.FixArchiCADToRevitSpaces`
.. py:module:: ifcpatch.recipes.FixArchiCADToRevitSpaces
Module Contents
---------------
.. py:class:: Patcher(src, file, logger)
Allow ArchiCAD IFC spaces to open as Revit rooms
The underlying problem is that Revit does not bring in IFC spaces as
... |
# 🚀 Radarr to Plex Collections 🍿
Welcome to Radarr to Plex Collections! Say goodbye to scattered movies and hello to organized collections, all with the click of a button (or command)!
## 🎥 About
Plex attempts automatically create collections (if you have that setting enabled), but is inconsistent at best and doe... |
import { getTopMovies } from 'api';
import { Loader } from 'components/Loader/Loader';
import { TopList } from 'components/TopList/TopList';
import { useEffect, useState } from 'react';
import toast from 'react-hot-toast';
const HomePage = () => {
const [topMovies, setTopMovies] = useState([]);
const [isLoading, s... |
from tkinter import *
from tkinter import messagebox
import pyperclip
import random
import json
# ---------------------------- PASSWORD GENERATOR ------------------------------- #
def generate_password():
password_entry.delete(0, END)
letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',... |
<body style="background-color:rgba(125, 125, 155);">
<h1>Ejercicios "Variables y tipos de datos"</h1>
<p>1. variables</p>
</body>
<?php
/*
El comando echo y print permiten mostrar el valor de una variable e información
en general. La diferencia principal es que echo no devuelve ningún valor y print
devuelve 1, por l... |
#pragma once
#include "WeakPtr.h"
#include <utility>
#include <algorithm>
#include <exception>
#include <iostream>
class RefCounter{
public:
RefCounter(unsigned int users = 0,
unsigned int weak_users = 0) :
users(users),
weak_users(weak_users) {
std::... |
import { BsFillInfoSquareFill, BsCameraFill } from "react-icons/bs";
import { HiPlus } from "react-icons/hi";
import { useState } from "react";
import Button from "react-bootstrap/Button";
import Form from "react-bootstrap/Form";
import Modal from "react-bootstrap/Modal";
import "./firstCard.scss";
import { useDispatch... |
<?php
namespace App\Http\Middleware;
use App\Providers\RouteServiceProvider;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class RedirectIfAuthenticated
{
// /**
// * Handle an incoming request.
// *
// * @param \Illuminate\Http\Request $request
// * @param ... |
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>balancedSampling</title>
<link href="../css/bootstrap.min.css" rel="stylesheet" media="screen">
<link rel="stylesheet" type="text/css" href="../css/template_index.css">
</head>
<body>
<div>
<div><img src="../img/bitl.png"></div>
<div cl... |
import { useState, useEffect } from 'react';
import { userService } from '@/services';
import { NavLink } from './NavLink';
export { Nav };
function Nav() {
const [token, setToken] = useState(null);
useEffect(() => {
const subscription = userService.token.subscribe(x => setToken(x));
return... |
"""
Dedicated flow to generate M8 report process
"""
from datetime import datetime
from datetime import date
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.providers.amazon.aws.transfers.sql_to_s3 import SqlToS3Operator
from airflow.providers.postgres.operators.postgres... |
package study_spring.domain;
import java.time.LocalDateTime;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence... |
# replaceitem
## replaceitem - Nr: 0
Replaces items in inventories.
```mcfunction
replaceitem block <position x: coordinate> <position y: coordinate> <position z: coordinate> slot.container <slot id: slotID> <item name: item> amount data components
```
|Parameter|Type|Required|Other|
|:---|:---|:---|:---|
|`replace... |
import express, { Request, Response } from "express";
import { isPasswordSame, generateHash, generateToken } from "../utils/user";
import User from "../db/models/user";
import { Errors } from "../constants/errors";
import { auth } from "../middleware/auth";
import RequestModel from "../db/models/request";
const router... |
<template>
<div>
<div class="min-h-screen flex flex-col bg-gray-100">
<div class="container max-w-sm mx-auto flex-1 flex flex-col items-center justify-center px-2 -mt-16">
<div class="bg-white px-6 py-8 rounded shadow-md text-black w-full">
<h1 class="mb-8 text-3xl ... |
/*
* BaseDirectories+Utils.swift
* swift-xdg
*
* Created by François Lamboley on 2023/01/13.
*/
import Foundation
#if canImport(System)
import System
#else
import SystemPackage
#endif
public extension BaseDirectories {
func configFilePath(for path: FilePath) throws -> FilePath {
return try configHomePrefi... |
from django.db import models
# Create your models here.
class Products(models.Model):
name = models.CharField(max_length=100)
image = models.ImageField(upload_to='productsImg/')
category = models.CharField(max_length=50)
description = models.TextField(max_length=500)
rate = models.IntegerField(rang... |
//
// Copyright (C) 2016 Broentech Solutions AS
// Contact: https://broentech.no/#!/contact
//
//
// GNU Lesser General Public License Usage
// This file may be used under the terms of the GNU Lesser
// General Public License version 3 as published by the Free Software
// Foundation and appearing in the file LICENSE.LG... |
import {it, expect} from "vitest";
import {add} from "./math";
it("should summarize all number values in an array", () => {
//Arrange
const numbers = [1,2,3];
//Act
const result = add(numbers);
//Assert
const expectedResult = numbers.reduce((sum, currentValue)=>{
return sum+=currentVa... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/boots... |
<?php
namespace App\Entity;
use App\Repository\CategoriesRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass=CategoriesRepository::class)
*/
class Categorie... |
import { motion } from "framer-motion";
import { useNavigate, useParams } from "react-router-dom";
import styled from "styled-components";
import {
getSingleSubject,
getSubjectQuestionsLen,
} from "../../services/dataApi";
import Button from "../../ui/Button";
import Heading from "../../ui/Heading";
import Modal f... |
import React from "react";
import { Text } from "react-native";
import { Table, Col, Row } from ".";
import {
useBirthHistory,
useMedicalHistory,
useNutritionalHistory,
useVaccinationHistory,
} from "../store";
import { styles } from "../style";
import { FitTextToCell } from "./FixTextToCell";
import { Input } from... |
const bcrypt = require('bcryptjs')
const usersRouter = require('express').Router()
const User = require('../models/user')
usersRouter.get('/', async (request, response) =>{
const users = await User.find({})
.populate('blogs', {title:1, author:1, url:1, likes:1})
response.status(200).json(users.map(user => ... |
import express, { Express, Request, Response } from "express";
import { ErrorHandler } from "./http/middlewares/ErrorHandler";
import bodyParser from "body-parser";
import cors from "cors";
import blogRoute from "./routes/blogPost"
import sectionRoute from "./routes/section"
import tagRoute from "./routes/tag";
import ... |
---
description: Caixa de entrada do agente - Documentação do Marketo - Documentação do produto
title: Caixa de entrada do agente
feature: Dynamic Chat
exl-id: 656f8716-d982-4c02-8311-17add0fcd924
source-git-commit: 38274b4859ae38c018ee73d4f1715fdf6a78e815
workflow-type: tm+mt
source-wordcount: '367'
ht-degree: 2%
---... |
import style from "../styles/login.module.css";
import completedIcon from "../images/icon-complete.svg";
import { useState } from "react";
const Login = () => {
const [nameError, setNError] = useState(false);
const [cNumBlankError, setNumBlankError] = useState(false);
const [cNumFormatError, setNumFormatError] = ... |
const Jison = require('../setup').Jison
const Lexer = require('../setup').Lexer
const assert = require('assert')
const lexData = {
rules: [
['x', "return 'x';"],
['y', "return 'y';"]
]
}
exports['test left-recursive nullable grammar'] = function () {
const grammar = {
tokens: ['x'],
startSymbol:... |
package ru.yandex.autotests.metrika.appmetrica.tests.ft.management.segment;
import com.google.common.collect.ImmutableList;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import ru.yandex.autotests.metrika.appmetrica.dat... |
import { eventBusService } from "../../../services/event-bus.service.js"
import { MailCompose } from "../cmps/mail-compose.jsx"
import { MailFolderList } from "../cmps/mail-folder-list.jsx"
import { MailList } from "../cmps/mail-list.jsx"
import { mailService } from "../services/mail.service.js"
import { MailDetail } f... |
<?php
// Function to update data in the database
function updateInDatabase($ID, $Name, $Age, $City)
{
// Create connection
$conn = mysqli_connect('localhost', 'root', '', 'test') or die('Cannot connect to MySQL server'); // Connecting to the database
// Prepare SQL statement
$stmt = $conn->prepare("UP... |
import { useEffect, useContext, useState } from 'react';
import { Context } from '../../../utils/Store'
import { CircularProgress } from '@material-ui/core';
import { Table } from 'react-bootstrap'
import { useHistory } from "react-router-dom";
const dateOptions = {year: 'numeric', month: 'numeric', day: 'numeric'};
co... |
import React from 'react';
import { render, fireEvent, waitFor, screen } from '@testing-library/react';
import Home from '../Home';
import axios from 'axios';
import { Provider } from 'react-redux';
import configureStore from 'redux-mock-store';
import Modal from 'react-modal';
jest.mock('axios');
const mockStore = c... |
from random import randint
from OpenGL.GL import *
class Stern:
def __init__(self):
self.helligkeit = randint(0, 1)
self.nachbarn = [None] * 8
self.lebende_nachbarn = 0
def __str__(self):
return '*' if self.helligkeit == 1 else ' '
def change_nachbarn(self, list):
... |
////
|metadata|
{
"name": "webupload-overview",
"controlName": ["WebUpload"],
"tags": ["Getting Started","Selection"],
"guid": "6e05f08c-f39d-4b88-af97-20d20eb35447",
"buildFlags": [],
"createdOn": "2011-04-01T19:43:46.2598843Z"
}
|metadata|
////
= WebUpload Overview
== About WebUpload
The I... |
class Spacecraft { // Representa nossa "nave" basica, modelo basico.
constructor (public propulsor: string){}
jumpIntoHyperspace(){
console.log(`Entering hyperspace with ${this.propulsor}`)
}
}
// criando interface
interface Containership{
cargoContainers: number //Podemos atribuir um "?" no f... |
import { Box, Container, Divider, Typography, styled } from '@mui/material'
import Checkbox from '@mui/material/Checkbox'
import FormControlLabel from '@mui/material/FormControlLabel'
import FormGroup from '@mui/material/FormGroup'
import { pink } from '@mui/material/colors'
import * as React from 'react'
import Comp... |
<h2 mat-dialog-title>{{relation.courseName}}</h2>
<mat-dialog-content>
<ng-container *ngIf="!editMode; else editView">
<mat-card-header>
<mat-card-title>
<span>{{relation.teacher}}</span>
<span> -> </span>
<span>{{relation.student}}</span>
</mat-card-title>
</mat-card-heade... |
---
title: "ドメイン取得サービスで取得したサブドメインだけをAmplifyアプリケーションに割り当てる"
emoji: "🅰️"
type: "tech"
topics: ["Amplify", "AWS", "DNS"]
published: true
---
## はじめに
ドメイン取得サービスで取得したドメインのサブドメインだけをAmplifyアプリケーションに割り当てたいという場合、サブドメインにCNAMEレコードを設定することで実現できます。
今回はムームードメインをドメイン取得サービスとして利用します。
## 手順
ムームードメインでサブドメインを取得している前提で話を進めます。
### Ampli... |
import React, { useState, useEffect } from "react";
import axios from "axios";
import { useNavigate } from "react-router-dom";
import { useDispatch } from "react-redux";
import { navbarActions } from "../Redux/navbarReducer";
import TextField from "@mui/material/TextField";
function ResetPassword() {
const dispatch ... |
package com.example.empresa25;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.Toast;
import com.android.volley.Request;
import com.android.volley.... |
package switchtwentytwenty.project.dto.outdto;
import lombok.Getter;
import org.springframework.hateoas.RepresentationModel;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
public class CategoryTreeOutDTO extends RepresentationModel<CategoryTreeOutDTO>{
@Getter
private String designatio... |
---
sidebar_position: 3
---
# 📏 Distances & Movement
## Distances
Various effects and abilities list the following distances to describe their range.
| Distance | Description | In Meters | In Areas |
| --- | --- | --- | --- |
| Melee | touching or fighting distance | <2 meters | 0 areas |
| Close | within a few st... |
import { applyMiddleware, createStore } from "redux";
import thunk from "redux-thunk";
import { composeWithDevTools } from 'redux-devtools-extension/developmentOnly';
import rootReducer from "../reducers";
function configureStore(preloadedState: any) {
const middlewares = [thunk];
const middlewareEnhancer = a... |
// ignore_for_file: avoid_print
import 'dart:developer';
import 'package:app/models/admin/create_groupevent.dart';
import 'package:app/screens/admin/createGroup/create_group.dart';
import 'package:app/screens/admin/group_details.dart';
import 'package:app/screens/admin/admin_side_nav.dart';
import 'package:app/screen... |
## From https://arxiv.org/html/2405.12399v1
## DIAMOND: Diffusion Models for World Modeling
DIAMOND (DIffusion As a Model Of eNvironment Dreams) introduces a novel approach using diffusion models for training reinforcement learning (RL) agents.
Traditional world models compress environment dynamics into discrete... |
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" />
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.3.min.js" integrity="sha... |
@extends('mado.admin.shop.template')
@section('title', 'スタッフ管理|LIXIL簡易見積りシステム')
@section('main')
<main class="common staff">
<h1 class="mainTtl">スタッフ管理</h1>
{{-- 通知メッセージ --}}
@include ('mado.admin.parts.notice_message')
<p class="mb30">スタッフの削除は、クリアボタンを押して登録情報を空にした状態で登録ボタンを押してください</p>
<div id="c... |
//! Validators for status words: [IHW][Ihw], [TDH][Tdh], [TDT][Tdt] & [DDW0][Ddw0].
//!
//! Each validator is aggregated by the [StatusWordSanityChecker] struct.
use crate::words::its::status_words::{ddw::Ddw0, ihw::Ihw, tdh::Tdh, tdt::Tdt, StatusWord};
use ddw::Ddw0Validator;
use ihw::IhwValidator;
use tdh::TdhValid... |
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Taiyaki Oriental</title>
<link rel="stylesheet" href="./style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href=... |
--Evan Plumley
--25SEP2022
--Udacity SQL Deforestation Project Appendix
/*
Steps to Complete
Create a View called “forestation” by joining all three tables - forest_area, land_area and regions in the workspace.
The forest_area and land_area tables join on both country_code AND year.
The regions table joins these based... |
use std::{collections::HashMap, fs};
fn main() {
let input = fs::read_to_string("input.txt").expect("Not a valid file");
let result = parse_input(&input);
println!("{result}");
}
pub fn lcm(nums: &[usize]) -> usize {
if nums.len() == 1 {
return nums[0];
}
let a = nums[0];
let b = l... |
Intuition: . This question is almost similar to the 3-Sum original question
.These are following differences
//Time complexity: O(N^2)
//Auxiliary Space: O(1)
class Solution {
public int threeSumSmaller(int[] nums, int target) {
Arrays.sort(nums);
int countSmaller = 0;
int len = n... |
package com.company.controller;
import com.company.model.EntityType;
import com.company.model.Feed;
import com.company.model.HostHolder;
import com.company.service.FeedService;
import com.company.service.FollowService;
import com.company.util.JedisAdapter;
import com.company.util.RedisKeyUtil;
import org.springframewo... |
package chap_07;
public class BlackBox {
// 인스턴스 변수 (서로 다른 객체에서 서로 다른 값을 갖는 것)
// 블랙박스라는 클레스는 4개의 인스턴스 변수를 갖는다.
// 서로다른 인스턴스가 생성되었을 때 이 변수들은 각각 블랙박스 클래스로 부터
// 만들어진 객체들 마다, 서로 다른 값을 갖을 수 있다.
String modelname;
String resolution;
int price;
String color;
int serialNumber;
// st... |
import { html, LitElement } from "lit";
import { classMap } from "lit/directives/class-map.js";
import styles from "./list.styles";
/**
* Unordered list
* @element adc-unordered-list
* @slot - Default slot, expecting adc-list-item
*/
export class UnorderedList extends LitElement {
/**
* If there is a parent l... |
const restaurant = {
name: 'Classico Italiano',
location: 'Via Angelo Tavanti 23, Firenze, Italy',
categories: ['Italian', 'Pizzeria', 'Vegetarian', 'Organic'],
starterMenu: ['Focaccia', 'Bruschetta', 'Garlic Bread', 'Caprese Salad'],
mainMenu: ['Pizza', 'Pasta', 'Risotto'],
order: function (starterIndex, ... |
# -*- coding: utf-8 -*-
import random
import gym
import numpy as np
from collections import deque
from keras.models import Sequential
from keras.layers import Dense
from keras.optimizers import Adam
EPISODES = 100000
class DQNAgent:
def __init__(self, state_size, action_size):
self.state_size = state_siz... |
declare interface AccessToken {
access_token: string,
refresh_token: string,
token_type: string,
expires_in: number,
scope: string,
refresh_token_expires_in: number
}
declare interface UserPrincipals {
authToken: string,
userId: string,
userCdDomainId: string,
primaryAccountId: ... |
import dataclasses
import pathlib
from typing import List
# mypy: no_warn_unused_ignores
try:
from importlib import metadata as import_metadata # type: ignore
except ImportError:
# metadata is added to importlib in CPython 3.8
# See https://pypi.org/project/importlib-metadata/
import importlib_metadat... |
import React from "react";
export type RatingValueType = 0|1|2|3|4|5
type RatingPropsType = {
value: RatingValueType
onClick: (value: RatingValueType)=>void
}
export function Rating(props: RatingPropsType) {
return (
<div>
<Star selected={props.value >= 1} onClick={props.onClick} value... |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('empresas', function (Blueprint $table) {
... |
import pandas as pd
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.gridspec as gridspec
import seaborn as sns
# Load data
lag_data = pd.read_csv('sen_avg_lag_prio.csv')
throughput_data = pd.read_csv('sen_avg_throughput_topic_priority.csv')
overhead_throughput_data = pd.read_c... |
Redis Cache
1) What is Cache ?
2) Why we need to go for Cache ?
3) What is Redis ?
4) Spring Boot with Redis Integration
=> Cache is a temporary storage
=> Cache will represent data in key-value format
=> By using Cache data, we can reduce no.of db calls from our application.
Note: DB call is always costly ... |
#ifndef WEBLOADOBSERVER_H
#define WEBLOADOBSERVER_H
#include <QObject>
class HistoryManager;
class WebWidget;
/**
* @class WebLoadObserver
* @brief Observes a \ref WebWidget , waiting for a loadFinished() signal so it may
* notify the \ref HistoryManager of such an event.
*/
class WebLoadObserver : public... |
import useUserStore from "@/store/store";
import axios from "axios";
import { useRouter } from "next/navigation";
import React, { useState } from "react";
import { IoClose } from "react-icons/io5";
import { MdLabelImportant } from "react-icons/md";
import Cookies from "js-cookie";
interface Task {
_id: any;
taskNa... |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.js" integrity="sha512-n/4gHW3atM3QqRcbCn6ewmpxcLAHGaDjpEBu4xZd47N0W2oQ+6q7oc3PXstrJYXcbNU1OHdQ1T7pAP+gi5Yu8g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
@extends('layouts.app')
@section('content')
<meta name="csrf-token" c... |
"""Models for Blogly."""
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
def connect_db(app):
"""Connect to database"""
db.app = app
db.init_app(app)
class User(db.Model):
"""User Model"""
__tablename__ = "users"
id = db.Column(db.Integer, primary_key=True, autoincrement=True)... |
import { useSelector } from "react-redux";
import Typography from "@mui/material/Typography";
import { Image } from "mui-image";
import { RootState } from "../../store";
import {
AppBar,
Box,
Paper,
Stack,
Table,
TableBody,
TableCell,
TableContainer,
TableRow,
} from "@mui/material";
export const Dev... |
import React, { useState } from 'react';
import './LoginScreen.css';
import LoginLogo from '../images/logo1.png'
import SignInScreen from './SignInScreen';
const LoginScreen = () => {
const [signIn, setSignIn] = useState(false);
return (
<div className="loginScreen">
<div className="loginScreen_ba... |
import './Tabela.css';
import React from 'react';
import listaProdutos from '../data/mercadorias'
export default props => {
function fillTable(){
var bodyRef = document.getElementById('table').getElementsByTagName('tbody')[0]; bodyRef.innerHTML = '';
let tbody = document.getElementByI... |
import React from "react";
import { useDispatch, useSelector } from "react-redux";
import { useNavigate } from "react-router-dom";
import CustomButton from "../custom-button/custom-button.component";
import CartItem from "../cart-item/cart-item.component";
import { toggleCartHidden } from "../../redux/cart/cart.actio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.