text stringlengths 184 4.48M |
|---|
// Includes
//=========
#include "cFinalGame.h"
#include <Engine/Asserts/Asserts.h>
#include <Engine/UserInput/UserInput.h>
#include "Engine/Graphics/Graphics.h"
// Inherited Implementation
// Run
//----
void eae6320::cFinalGame::SubmitDataToBeRendered(const float i_elapsedSecondCount_systemTime, const float i_... |
/* eslint-disable react/jsx-no-bind */
/* eslint-disable react/prop-types */
/* eslint-disable react/destructuring-assignment */
/* eslint-disable eqeqeq */
/* eslint-disable no-shadow */
/* eslint-disable no-underscore-dangle */
/* eslint-disable camelcase */
import React, { useEffect, useState } from 'react';
import ... |
<button class="go-back-button" routerLink="/cart">Go back</button>
<div class="main-container">
<div class="cart-at-checkout">
<h2 class="your-cart-text">Your cart</h2>
<ul>
<li *ngFor="let product of cartProductsAtcheckout">
{{ product.title }} - {{ product.productQuantity }} - {{ product.id }}... |
package jobber
import (
"context"
"fmt"
"github.com/qdm12/reprint"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
)
type gvkKey string
type resourceName string
func gvkKeyFromGroupVersionKind(gvk schema.GroupVersionKind) gvkKey {
return gvkKey(fmt.Sprintf("%s\t%s\t%s", ... |
# node.js와 socket.io를 활용한 채팅 server/client 구현
개발 기간 : `2022/06/16`
<br>
## 1. 프로젝트 목표
node.js 웹 소켓 라이브러리인 socket.io를 활용하여 간단한 채팅 서버를 구현해본다.
- socket.io 라이브러리를 활용하여 채팅 서버를 구현한다.
- 사용에 불편함이 없도록 클라이언트 화면을 구현한다.
<br>
## 2. 프로젝트 소개
### 1) 프로젝트 프리뷰
<br>
<img src="https://raw.githubusercontent.com/JaeKP/image_rep... |
<template>
<div>
<!-- END: Top Bar -->
<div class="intro-y flex flex-col sm:flex-row items-center mt-8">
<h2 class="text-lg font-medium mr-auto">Chat</h2>
</div>
<div class="intro-y chat grid grid-cols-12 gap-5 mt-5">
<!-- BEGIN: Chat Side Menu -->
<div class="col-span-12 lg:col-span... |
class WeatherModel {
String lat;
String lon;
Current current;
List<Daily> daily;
WeatherModel({
required this.lat,
required this.lon,
required this.current,
required this.daily,
});
factory WeatherModel.fromJson(Map<String, dynamic> json) {
final lat = json['lat'].toString();
fina... |
import { tailwind, dark } from '@theme-ui/presets'
const theme = {
...tailwind,
containers: {
card: {
boxShadow: '0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24)',
border: '1px solid',
borderColor: 'muted',
borderRadius: '4px',
p: 2
... |
import React from 'react';
import { act, fireEvent, render, renderHook, screen } from '@testing-library/react';
import history from 'history/browser';
import { DataModel } from '../context/DataModel';
import { EDIT_REPORT_PERMISSION, Permissions } from '../context/Permissions';
import * as fetch_server_api from '../api... |
import numpy as np
from VLMP.components.modelExtensions import modelExtensionBase
class plates(modelExtensionBase):
"""
Component name: plates
Component type: modelExtension
Author: Pablo Ibáñez-Freire
Date: 17/06/2023
Common epsilon, sigma plates for particles in the system.
:param pl... |
<!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>
<script>
// array destructuring
let user = ["murat", "... |
<template>
<div class="header">
<div class="container">
<div class="header-wrapper">
<div class="header-left">
<div class="top-menu">
<ul>
<li><nuxt-link to="/">Главная</nuxt-link></li>
<li><nuxt-link to="/clothes">Магазин</nuxt-link></li>
... |
<?php
function generateJWT($user)
{
// Definir el header del token
$header = [
'alg' => 'HS256', // Algoritmo de encriptación
'typ' => 'JWT' // Tipo de token
];
// Convertir el header a JSON y codificarlo en Base64
$encoded_header = base64_encode(json_encode($header));
// Defi... |
import { type FC, useState, useMemo, useCallback, useRef } from "react";
import { DndProvider } from "react-dnd";
import { HTML5Backend } from "react-dnd-html5-backend";
import { EditorFieldComponentsTemplateSection } from "./component-template";
import { EditorDatasetSection } from "./dataset";
import { EditorInspect... |
/*
3243 - FlattenDepth
-------
by jiangshan (@jiangshanmeta) #medium #array
### Question
Recursively flatten array up to depth times.
For example:
```typescript
type a = FlattenDepth<[1, 2, [3, 4], [[[5]]]], 2> // [1, 2, 3, 4, [5]]. flattern 2 times
type b = FlattenDepth<[1, 2, [3, 4], [[[5]]]]> /... |
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.safeContentPadding
import androidx.compose.material.MaterialTheme
import androidx.compose.material.SnackbarHost
import androidx.... |
package com.hads.digicom.ui.screens.home
import android.util.Log
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.grid.GridCells
import androidx.compose.foundation.lazy.grid.LazyHorizontalGrid
import androidx.compose.foundation.lazy.grid.itemsIndexed
import androidx.compose.material... |
class ReschedulableTimeout {
private timeout: NodeJS.Timeout | undefined = undefined;
constructor(public readonly intervalMs: number) {}
public schedule(cb: () => void) {
this.stop();
this.timeout = setTimeout(() => {
this.stop();
cb();
}, this.intervalMs);
}
public stop() {
if ... |
import React, { useContext } from "react";
import { FaGithub } from "react-icons/fa";
import { Link, NavLink } from "react-router-dom";
import { AuthContext } from "../../Providers/AuthProvider";
const Header = () => {
const { user, logout } = useContext(AuthContext);
// console.log(user?.email);
// console.log(... |
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ByCapitalComponent } from './country/pages/by-capital/by-capital.component';
import { ByCountryComponent } from './country/pages/by-country/by-country.component';
import { ByRegionComponent } from './country/pages... |
// Problem Statement: Create a JavaScript library for managing authentication tokens in a web application.
// Ensure that these tokens are stored securely and cannot be accessed directly or tampered with.
const TokenManager = (function () {
// Symbol to store token securely
const tokenSymbol = Symbol('authToke... |
<template>
<td :class="cellData['class'] ? cellData['class'] : null">
<!-- Sorting key -->
<span v-if="cellData['sort']" class="hidden">
{{ cellData["sort"] }}
</span>
<!-- Icons or Emoji -->
<span v-if="cellData['icon']" class="glyphicon" :class="cellData['icon']">
</span>
<span v... |
/*
Name: Orhun Ege Çelik
Section: 3
Student Number: 22202321
*/
#ifndef EMPLOYEE_H
#define EMPLOYEE_H
#include <iostream>
#include <string>
#include "Issue.h"
using namespace std;
class Employee{
public:
Employee();
Employee(const string name, const string title);
Employee(const Employee& prevEmployee);
Employee& o... |
using App.Test._4_Infrastructure.Context;
using Data.Repository;
using Domain.Entities;
using Microsoft.EntityFrameworkCore;
using Xunit;
namespace Data.Tests.Repository
{
public class ClienteRepositoryTests
{
private readonly MySQLContextTests _context;
private readonly ClienteRepository _repo... |
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { EducacionComponent } from './components/educacion/educacion.component';
import { ExperienciaComponent } from './components/experiencia/experiencia.component';
import { HabilidadesComponent } from './components/hab... |
<div class="container-fluid">
<div class="row">
<div class="col-xl-12 p-2 bg-primary text-white">
<h4 class="float-left">{{"supervisor.management" | translate}}</h4>
<div class="float-right">
<button style="background-color: #fff;color: #3A7CEC;" pButton pRipple type=... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (C) Seth Edwards, 2014
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
's... |
import { useContext, useEffect, useState } from "react";
import useTitle from "../../Hooks/useTitle";
import { AuthContext } from "../../Provider/AuthProvider";
import MyToyTable from "./MyToyTable";
import Swal from "sweetalert2";
const MyToys = () => {
useTitle("MyToy");
const { user } = useContext(AuthContext);... |
import React, { FC, useEffect, useState } from 'react';
import { TAnalyzeProps } from './types';
import { alpha, Fade, Stack, ToggleButton, ToggleButtonGroup, Typography } from '@mui/material';
import Header from '../header';
import Button from '../button';
import Results from '../results';
import { IColumn, IResult } ... |
package ex01.B;
/*
Prompt do ChatGPT:
Crie uma função em java computando a função fatorial de forma decrescente e recursiva, com abundância de comentários e imprimindo valores a cada iteração
*/
public class FatorialDecrescenteGPT {
// Função principal que inicia o programa
public static void main(String[] ... |
package com.example.forcadevendastrab3bi.view;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RadioGroup;
import android.widget.Spinner;
import androidx.appco... |
import React from 'react';
import { useState } from 'react';
import RangeSlider from './RangeSlider';
import Popup from './Popup';
function FilterPopup({ isOpen, onClose, priceRange, setPriceRange }) {
const [maxPrice, setMaxPrice] = useState(10000000);
if (!isOpen) return null;
const handleRangeChange = (value... |
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
const routes = [{
path: '/',
name: 'home',
component: HomeView
},
{
path: '/login',
name: 'login',
// route level code-splitting
// this generates a s... |
import React from 'react';
import { useParams, useNavigate, Link } from 'react-router-dom';
import { useTriviaProvider } from '../../context/Trivia';
import { Problem } from '../../types/index';
function Paper() {
const { id } = useParams();
const navigate = useNavigate();
const [current, setCurrent] = React.us... |
using Microsoft.AspNetCore.Mvc;
using ProductApi.Application.Interfaces;
using ProductApi.Domain.DTO;
using System;
using System.Threading.Tasks;
namespace ProductApi.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class ProductController : ControllerBase
{
private readonly IP... |
import { Component, h, Prop } from '@stencil/core'
@Component({
tag: 'mnv-hero',
styleUrl: 'mnv-hero.scss',
shadow: true
})
export class Mnvhero {
@Prop() background: string
@Prop() herotitle: string
@Prop() button: string
@Prop() bgimg: string =
'https://images.pexels.com/photos/373912/pexels-photo-373912.jp... |
package main
import (
"bytes"
"crypto/rand"
"crypto/sha256"
"encoding/base64"
"encoding/json"
"fmt"
"html/template"
"io"
"log"
"net/http"
"os"
"path/filepath"
"regexp"
"sort"
"strings"
"time"
errors "git.sequentialread.com/forest/pkg-errors"
"github.com/shengdoushi/base58"
)
type Session struct {
... |
package net.minecraft.server.packs.repository;
import com.mojang.logging.LogUtils;
import java.io.IOException;
import java.nio.file.DirectoryStream;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Lis... |
using Market.Application.Interfaces;
using Market.Application.Services;
using Market.Domain;
using Market.Infrastructure.Persistence;
using Market.Infrastructure.Repositories;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.... |
<template>
<Head title="Your journey"/>
<BreezeAuthenticatedLayout>
<div class="py-12">
<div class="text-x bg-gray-900 opacity-90 max-w-prose rounded text-xl max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="overflow-hidden shadow-sm sm:rounded-lg">
<div cl... |
/* eslint-disable @typescript-eslint/no-empty-function */
export abstract class Component {
protected parent: Component;
public name: string;
public setParent(parent: Component) {
this.parent = parent;
}
public getParent(): Component {
return this.parent;
}
/**
... |
install.packages("readxl")
library("readxl")
airquality <- read_excel("AirQualityUCI.xlsx")
airquality
colnames(air_data)
str(air_data)
summary(air_data)
library(dplyr)
#airquality <- air_data %>% select(-c(NMHC.GT., X, X.1))
#Removing NMHC.GT and empty columns
airquality2 <- airquality[,-c(1,2,5)]
colnames(airquali... |
//package com.TruckBooking.routeData.Exception;
//
//import com.TruckBooking.TruckBooking.Exception.BusinessException;
//import lombok.extern.slf4j.Slf4j;
//import org.hibernate.exception.ConstraintViolationException;
//import org.springframework.core.Ordered;
//import org.springframework.core.annotation.Order;
//impor... |
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* 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 ... |
/**
* Gmixr Native App
* https://github.com/jcnh74/Gmixr
* @flow
*/
import React, { Component } from 'react'
import {
AsyncStorage,
NativeModules,
ListView,
View,
Dimensions
} from 'react-native'
// Components
import AlbumRow from './AlbumRow'
// Native Modules
const SpotifyAuth = NativeModules.Spoti... |
#' bouts_length_filter
#'
#' @description 'bouts_length_filter' generates the short and long sequence maps
#'
#' @details This function applies the cut-point classes for each epoch in a data file. Then the lengths of the consecutive epochs in the same cut-point class and their corresponding values are determined. After... |
/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import { expect } from 'chai'
import { wait } from '@peertube/peertube-core-utils'
import { VideoPrivacy } from '@peertube/peertube-models'
import {
cleanupTests,
createMultipleServers,
PeerTubeServer,
SearchCommand,... |
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\User;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
use Illuminate\Database\Eloquent\ModelNotFoundException;
class userController ex... |
import numpy as np
from typing import Tuple, Dict, Callable
from qdax.types import Descriptor
def get_body_descriptor_extractor(config: Dict) -> Tuple[Callable[[np.ndarray], Descriptor], int]:
body_descriptors = config["body_descriptors"]
if not isinstance(body_descriptors, list):
body_descriptors = ... |
package com.example.playquest;
import com.example.playquest.controllers.Home;
import com.example.playquest.entities.Ads;
import com.example.playquest.entities.PostContent;
import com.example.playquest.entities.User;
import com.example.playquest.repositories.AdsRepository;
import com.example.playquest.repositories.PostC... |
// Funciones de flecha
(function(){
let miFuncion = function(data: string){
return data.toUpperCase();
}
let miFuncionFlecha = (data: string) => data.toUpperCase();
let sumarNormal = function(num1: number, num2: number){
return num1 + num2;
}
let sumarFlecha = (num1: number, ... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.github.halab4dev;
import com.mongodb.MongoCredential;
import com.mongodb.ServerAddress;
import com.mongodb.client.MongoCli... |
import {
getServerSession,
type DefaultSession,
type NextAuthOptions,
} from "next-auth";
/**
* Module augmentation for `next-auth` types. Allows us to add custom properties to the `session`
* object and keep type safety.
*
* @see https://next-auth.js.org/getting-started/typescript#module-augmentation
*/
de... |
pragma solidity >=0.5.0 <0.7.0;
contract SimpleCoin {
address public minter;
mapping (address => uint) public balances;
event Sent(address from, address to, uint amount);
constructor() public {
minter = msg.sender;
}
function mint(address receiver, uint amount) public {
requ... |
# Argo CD Self-Healing Capabilities
⏱️ _Estimated Time: 5 Minutes_
👩💻 _Role: Cluster Administrator and/or Developers_
Argo CD is capable healing resources when it detects configuration drift. For example, when a resource that should be present is missing it will be recreated by Argo CD. Another example is when a ... |
import {
FormControl,
FormLabel,
Input,
Button,
Text,
Box,
Spinner,
FormErrorMessage,
Switch,
Flex,
} from '@chakra-ui/react';
import Breadcrumbs from 'components/breadcrumb';
import DatePicker from 'components/date-picker';
import { Error } from 'components/error';
import { FormWrapper } from 'comp... |
import { OutputPlugin } from "rollup";
import { basename, dirname, isAbsolute } from "path";
import { pathToName } from "../core/ref";
const empty: [string, string] = ["hidden", ""];
function nameOf(id: string): [string, string] {
const name = pathToName(id);
if (name[0] === "\0") {
return empty;
... |
<template>
<div class="newCourse">
<form @submit.prevent="submit">
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">Название курса</label>
<input :title="props.title" v-model="title" type="title" class="form-control"
... |
<template>
<FontAwesomeIcon
icon="plus"
class="add-button"
@click="router.push(route.fullPath + '&type=register')"
/>
<div class="filter-area">
<button
v-for="(item, index) in tab"
:key="index"
:class="currentStatus == item ? 'active' : ''"
@click="getModelList(currentPage,... |
/*
* Copyright (C) 2023 Rajesh Hadiya
*
* 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 ... |
import React from 'react';
import { Route } from 'react-router-dom';
import Menu from './components/Menu';
import loadable from '@loadable/component';
const BluePage = loadable(() => import('./pages/BluePage'));
const RedPage = loadable(() => import('./pages/RedPage'));
const UsersPage = loadable(() => import('./pages/... |
import React from 'react'
import { useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { Link, Outlet } from 'react-router-dom';
import {BiMenu, BiHome} from "react-icons/bi"
import {IoMdAdd} from "react-icons/io"
import {FiUsers} from "react-icons/fi"
import {AiOutlineBarChart} from... |
<template>
<div class="map h100">
<div class="plantMap h100"
id="allmap"></div>
<add-dialog :showFlag="showFlag"
:point="point"
@close="closeAddDialog"
@add="submitAdd"></add-dialog>
</div>
</template>
<script>
import Map from '@/class/map'
import Ad... |
/**
* Copyright (c) 2012 Alvin S.J. Ng
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, ... |
import AppError from '../../errors/AppError';
import { FakeVehicleRepository } from '../../repositories/fakes/FakeVehicleRepository';
import { ShowVehicleService } from '../ShowVehicleService';
let fakeVehicleRepository: FakeVehicleRepository;
let showVehicleService: ShowVehicleService;
describe('ShowVehicleService',... |
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle 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.
//
// Moodle... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Weather App</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<style>
body {
font-family:... |
/*
* Copyright © 2009 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, pub... |
import { useState } from "react";
import { BookmarkCheckFill } from "react-bootstrap-icons";
import { useDispatch } from "react-redux";
import { selectLabel } from "../../../features/label/labelSlice";
import { deleteLabel, getLabels } from "../../../features/label/label.thunk";
import EventInput from "../eventInput/Ev... |
/* Copyright (c) 2017 FIRST. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted (subject to the limitations in the disclaimer below) provided that
* the following conditions are met:
*
* Redistributions of source code must retain the above cop... |
package com.aulanosa.api.services.impl;
import com.aulanosa.api.dtos.EstadisticaDTO;
import com.aulanosa.api.dtos.JugadorDTO;
import com.aulanosa.api.mappers.EstadisticaMapper;
import com.aulanosa.api.repositories.EstadisticaRepository;
import com.aulanosa.api.services.EstadisticaService;
import com.aulanosa.api.serv... |
@using Microsoft.AspNetCore.Identity
@inject SignInManager<IdentityUser> SignInManager
@inject UserManager<IdentityUser> UserManager
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="shortcut icon" href="/logo3.png" type="image/png">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-wi... |
#include "binary_trees.h"
/**
* binary_tree_rotate_left - a function that performs a left-rotation
* on a binary tree
* @tree: a pointer to the root node of the tree to rotate
*
* Return: a pointer to the new root node of the tree once rotated
*/
binary_tree_t *binary_tree_rotate_left(binary_tree_t *tree)
{
bin... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = __importDefault(require("express"));
const body_parser_1 = __importDefault(require("bo... |
import * as React from "react";
import MobileStepper from "@mui/material/MobileStepper";
import Button from "@mui/material/Button";
import styles from "../../style";
import Introduction from "./Introduction";
import {
validateContactInfo,
validateCredentials,
validateDescription,
} from "./Validate";
import { use... |
classdef Fitness < handle
methods(Static=true)
function [trainErr, testErr, genErr] = evalMackey(rc, show)
% evalMackey evaluates reservoir fitness on the Mackey-glass
% time-series. Errors are squashed to meliorate blow up.
% Parameters:
% rc : reservoir computer object
... |
# Задача 1. Повторение кода
#
# В одной из практик вы уже писали декоратор do_twice, который повторяет вызов декорируемой функции два раза.
# В этот раз реализуйте декоратор repeat, который повторяет задекорированную функцию уже n раз.
import functools
from collections.abc import Callable
def repeat(num: int):
de... |
#include "main.h"
/**
* _strlen - returns the length of a string.
*
* @s: pointer to the string to be checked.
*
* Return: returns length of a string passed to it.
*/
int _strlen(char *s)
{
int counter;
counter = 0;
while (*s != '\0')
{
counter++;
s++;
}
return (counter);
} |
import React, { useContext } from "react";
import PropTypes from "prop-types";
import UserForm from "../components/ui/userForm";
import { useHistory } from "react-router-dom";
import { UserContext } from "../UserContext";
import Logout from "../components/ui/logout";
import MainBlock from "../components/common/mainBloc... |
/*
* Copyright 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... |
### 文章目录
- [一:经典网络结构](#_16)
- - [(1) LeNet-5(CNN开山始祖)](#1_LeNet5CNN_18)
- [(2)AlexNet](#2AlexNet_55)
- - [A:简介](#A_57)
- [B:网络结构](#B_83)
- [(3)VGGNet](#3VGGNet_146)
- - [A:简介](#A_148)
- [B:网路结构](#B_182)
- [二:复杂网络结构](#_279)
- - [(1)ResNet(残差网络)](#1ResNet_281)
- - [A:简介](#A_283)
- [B:网络结构](#B_294)
... |
<script setup lang="ts">
const props = defineProps({
songUrl: { type: String, required: true },
songText: { type: String, required: false, default: 'Play' },
})
const audio = ref<HTMLAudioElement | null>(null)
const isPlaying = ref(false)
const play = () => {
if (audio.value) {
audio.value.play()
isPlayi... |
// import 'package:student_sphere/consts/consts.dart';
// import 'package:student_sphere/widgets_common/container_heading.dart';
// import 'package:student_sphere/widgets_common/container_text.dart';
// import 'package:http/http.dart' as http;
//
// var link = localhostip + "/api/students/read2.php";
//
// Future<List<... |
import type {
CountryCode,
Image,
LanguageCode,
Nullable,
Translation,
TMDBResponse,
TMDBResponseList,
Country,
Language,
Video,
WithId,
ExternalId,
GenericResponse,
} from '../../types'
import type { Collection } from '../collections/types'
import type { Genre, GenreCode } from '../genres/typ... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
import { formatTime } from "../../utils/formatTime";
import styles from "./songcard.module.css";
function SongCard({ artist, duration, photo, title, isActive }) {
return (
<div
className={`song-card ${styles["song-card"]} ${
isActive && styles.active
}`}
data-title={title}
>
<... |
/*
* Copyright 2011, 2012, DFKI GmbH Robotics Innovation Center
*
* This file is part of the MARS simulation framework.
*
* MARS is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation, either versio... |
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Student Form</title>
</head>
<input>
<h1>Student Registration</h1>
<br><br>
<input th:action="@{/processStudentForm}" th:object="${student}" method="post">
First name: <input type="text" th:field="*{firstName}">
<br><br>
Last n... |
/*
* Copyright (C) 2015 - 2016, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.com>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain t... |
<div class="page-container">
<nav class="navbar flex-column flex-md-row py-3 px-3">
<h1 class="py-3 px-3"> C'est la vie </h1>
<ul class="justify-content-right">
<li ><a (click) ='book()'>Book Now</a></li>
<li ><a (click)= "signUp()">SignUp</a></li>
<li *ngIf = ... |
// react
import { useState, useEffect } from "react";
// statics
import { weatherAPICallBaseURL } from "../statics/URLS";
import DEFAULTS from "../statics/DEFAULTS";
// custom hooks
import { useDebounce } from '@react-hook/debounce';
import useStateWithAutoSave from "./useStateWithAutoSave";
const useCitySearch = (... |
import openai
from sklearn.cluster import KMeans
import re
import logging
import time
from concurrent.futures import ThreadPoolExecutor, as_completed
import random
from sentence_transformers import SentenceTransformer
import os, sys
import random
app_dir = os.path.dirname(os.path.dirname(__file__))
helpers_dir = os.pat... |
package org.example.controller;
import com.fasterxml.jackson.databind.ObjectMapper;
import jakarta.servlet.http.HttpServlet;
import org.example.dto.Product;
import org.example.framework.CustomControllerAnnotation;
import org.example.service.ProductService;
import jakarta.servlet.ServletException;
import jakarta.servle... |
#!/usr/bin/python3
""" This module is a definition of a FileStorage class."""
import os
import datetime
import json
class FileStorage:
""" This class represents the class for storing and retrieving data"""
__file_path = "file.json"
__objects = {}
def all(self):
""" This method returns the dic... |
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2010-2011 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution Licens... |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAdminsPermissionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create(
... |
package net.mrmidi.pmp.bank.ui.screens
import android.os.Build
import androidx.annotation.RequiresApi
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.com... |
import type { GetServerSideProps, NextPage } from "next";
import { CommonLandingCustomSettings } from "service/landing-page";
import useTranslation from "next-translate/useTranslation";
import Navbar from "components/common/Navbar";
import { parseCookies } from "nookies";
import { useEffect } from "react";
import Foote... |
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:gamingnews/firebase_options.dart';
import 'screen/screen.dart';
late FirebaseApp app;
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
app = await Firebase.initializeApp(
options: De... |
import * as admin from "firebase-admin";
import * as vscode from 'vscode';
export abstract class Item extends vscode.TreeItem {
abstract reference: admin.firestore.DocumentReference | admin.firestore.CollectionReference;
}
/**
* A Tree View item representing a Firestore document.
*/
export class DocumentItem ex... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.