text stringlengths 184 4.48M |
|---|
'use strict';
// selecting Elements
const player0El = document.querySelector('.player--0');
const player1El = document.querySelector('.player--1');
const score0El = document.querySelector('#score--0');
const score1El = document.getElementById('score--1');
const current0El =document.getElementById('current--0');
co... |
---
title: "\"2024 Approved Avatar Architecture Your Uncomplicated Guide to Virtual Existence\""
date: 2024-06-19T23:49:56.366Z
updated: 2024-06-20T23:49:56.366Z
tags:
- screen-recording
- ai video
- ai audio
- ai auto
categories:
- ai
- screen
description: "\"This Article Describes 2024 Approved: Avata... |
//
// BoxTextFieldView.swift
// HotmartCosmos
//
// Created by Douglas Seabra Pedrosa on 10/12/21.
//
import Foundation
import UIKit
final class BoxTextFieldView: ThemedCodedView, Bindable {
// MARK: - View Metrics
private enum Constants {
static let textFiedlBorderWidth: CGFloat = 1.0
sta... |
library(igraph)
library(reshape2)
library(ggplot2)
# Function to compute modules and their sizes
compute_modules <- function(cor_matrix) {
# Coherent Modules: Keep only positive correlations, set negative to NA
coherent_matrix <- cor_matrix
coherent_matrix[coherent_matrix < 0] <- NA
# Incoherent Modules: Ke... |
using AgendaApp.Data.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AgendaApp.Data.Mappings
{
/// <summary>
/// Classe de mapeame... |
import { Request, Response } from 'express';
import { allUsersService, changePasswordService, createNewUserService, deleteAccountService, getUserDataService, loginService } from '../services';
import * as types from '../utils/types/index';
import httpStatus from 'http-status';
export async function singUp(req: Request... |
package MyPackage;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Disabled;
import org.mockito.MockedStatic;
import static org.mockito.ArgumentMatchers.*;
import com.puppycrawl.tools.checkstyle.api.AbstractCheck;
import com.puppycrawl.tools.checkstyl... |
/*
* File: aVector.h
* Author: Haolan Ye (Benjamin)
* Created on June 5, 2015, 11:59 AM
* Purpose: template class
*/
#ifndef AVECTOR_H
#define AVECTOR_H
#include <iostream>
#include <new> // Needed for bad_alloc exception
#include <cstdlib> // Needed for the exit function
using namespace std;
templat... |
<template>
<!-- 景点详情 -->
<div class="page-sight-detail">
<!-- 页面头部 -->
<van-nav-bar left-text="返回" left-arrow fixed @click-left="goBack" />
<!-- //页面头部 -->
<!-- 大图 -->
<div class="sight-banner">
<van-image width="100%" height="100%" :src="sightDetail.img" />
<div class="tip">
... |
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ExamplesComponent } from './examples.component';
const routes: Routes = [
{
path: '',
component: ExamplesComponent,
children: [
{
path: 'product-list',
loadChildren: () => im... |
import { useState, useEffect } from 'react';
import RNOrientation, { orientation as RNOrientationType } from 'react-native-orientation';
export enum Orientation {
horizontal,
vertical,
}
const mapOrientation = (rnOrientation: RNOrientationType): Orientation => (
rnOrientation === 'PORTRAIT' ? Orientation.vertic... |
@component('shop::emails.layout')
<div style="margin-bottom: 34px;">
<span style="font-size: 22px;font-weight: 600;color: #121A26">
@lang('shop::app.emails.orders.refunded.title')
</span> <br>
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
@lang('shop:... |
import {FC, useEffect, useState} from "react";
import {TaskType} from "@typescript/interfaces";
import TaskRow from "../TasksTable/TaskRow";
import TasksTable from "@ui/Tasks/TasksTable";
import TaskInteractionDialog from "@components/Tasks/TaskInteractionDialog";
import {FormikValues} from "formik";
import {requestsSe... |
import { createContext, useContext, useEffect, useMemo, useState } from "react";
import { Theme, ThemeManager } from "@/app/services/themeManager";
type ThemeContextProps = {
theme: Theme;
setTheme: (theme: Theme) => void;
isRestored: boolean;
};
const ThemeContext = createContext<ThemeContextProps | null... |
import asyncHandler from "express-async-handler";
import generateToken from "../utilis/generateToken.js";
import User from "../models/userModel.js";
import nodemailer from "nodemailer";
import bcrypt from "bcryptjs";
import jwt from "jsonwebtoken";
// @desc Auth user & get token
// @routes POST /api/users/login
//... |
<?php
namespace App\Controller\admin;
use App\Entity\Category;
use App\Form\CategoryType;
use App\Repository\CategoryRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation... |
<!DOCTYPE html>
<meta charset="utf-8" />
<!-- Load d3.js -->
<script src="https://d3js.org/d3.v6.js"></script>
<!-- Load plotly.js into the DOM -->
<script src="https://cdn.plot.ly/plotly-2.16.1.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.3.min.js"
integrity="sha256-pvPw+upLPUjgMXY0G+8O0xUf+/I... |
--UC1 Create AddressBook Database
create database AddressBook_serviceDB;
use AddressBook_serviceDB;
--UC2 Add AddressBook Table
create table AddressBook(
FirstName varchar(100),
LastName varchar(100),
Address varchar(100),
City varchar(100),
State varchar (100),
Zip bigint,
PhoneNumber bigint,
Email varchar(100)
);
s... |
//function overloading(Multiplication)
using System;
public class Program
{
int a=2,b=4;
public void Mul()
{
Console.WriteLine("Multiplication is: " +(a*b));
}
public void Mul(int a,int b)
{
Console.WriteLine("Multiplication is: " +(a*b));
}
public int Mul(int a,int b,int c)
{
return (a*b);
}
... |
const express = require("express");
const cors = require("cors");
const { uuid, isUuid } = require("uuidv4");
const app = express();
app.use(express.json());
app.use(cors());
const repositories = [];
function validateRepositoriesIds(request, response, next) {
const { id } = request.params;
if (!isUuid(id)) {
... |
from socket import *
import threading
HOST = "127.0.0.1"
PORT = 3000
def log(prefix: str, message: str):
print(f"[{prefix}]\t\t{message}")
def run_client(client_id : int, message:str):
clientSocket = socket(AF_INET, SOCK_STREAM)
clientSocket.connect((HOST, PORT))
log("INFO", f"Client {client_id} con... |
;;; Copyright 2021-2023 Google LLC
;;;
;;; This file is part of cl-avro.
;;;
;;; cl-avro 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 v... |
import {isFunction, MODIFIER} from './globals';
export class KeyboardHandler {
/** @type {VimController} */
#controller;
/**
* Current key code
* Used to implement the "fluent DSL", which is currently consumed by
* vim_keymap.js
*
* @type {number|string}
*/
#fluentKeyCode... |
function [ x, y, z, ts ] = particle_track_ode_grid_sigmaVar(X, Y, ZZ, U, V, W, tt, ...
tspan, cc, options, odesolver)
% PARTICLE_TRACK_ODE_GRID Generates particle tracks from a set of currents
% defined on a rectangular grid using PDE solver
%
% Usage: [x,y,ts] = particl... |
package com.shop.common.enums;
import lombok.Getter;
/**
* @author : Ran
* Project: shop
* Package: com.yingran.shop.enums
* @date : 2019/10/25 0:44
*/
@Getter
public enum ResultEnum {
SUCCESS(0, "成功"),
PARAM_ERROR(1, "参数不正确"),
PRODUCT_NOT_EXIST(10, "商品不存在"),
PRODUCT_STOCK_ERROR(11, "商品库存不正确"... |
## `storage() -> Dict[int, CodeSnippet]`
#### Description:
This method returns the storage of code snippets. It belongs to the class SnippetStorage.
#### Parameters:
This method does not take any parameters.
#### Returns:
- `Dict[int, CodeSnippet]`: A dictionary where the keys are integers representing the snippet I... |
<?php
/**
* テーブルのスキーマを同期する関数。
* 指定されたカラムがテーブルに存在しなければ追加し、不要なカラムは削除する。
*
* @param PDOObject $pdoObject データベース接続オブジェクト
* @param string $tableName テーブル名
* @param array $requiredColumns 必要なカラムの配列
* @return void
*/
function syncTableSchema(PDOObject $pdoObject, string $tableName, array $requiredColumns): void
{
... |
package main
import (
"database/sql"
"fmt"
"log"
"os"
"strings"
"github.com/gin-gonic/gin"
_ "github.com/go-sql-driver/mysql"
"github.com/joho/godotenv"
"github.com/marinazv/FinalGo/cmd/server/routes"
_ "github.com/marinazv/FinalGo/docs"
"github.com/marinazv/FinalGo/pkg/middleware"
swaggerFiles "github.co... |
#![cfg_attr(feature = "unstable", feature(test))]
use std::collections::HashMap;
#[cfg(not(test))]
fn main() {
let input = include_str!("../../assets/input.txt").trim();
dbg!(part2(input, "rx"));
}
#[derive(Debug, Clone, Copy, PartialEq)]
enum Pulse {
High,
Low,
}
#[derive(Debug)]
enum Module<'a> {
... |
import { NextFunction, Request, Response } from "express";
import jwt from "jsonwebtoken";
import { SECRET_KEY } from "../../secrets";
import { UnAuthorize } from "../errorHandling/unauthorize";
import { ErrorCode } from "../errorHandling/root";
const JWT_SECRET = SECRET_KEY;
// interface CustomRequest extends Request... |
//
// CategoryControllerViewController.swift
// TaskListReload
//
// Created by Владимир Юшков on 06.10.2021.
//
import UIKit
class CategoryController: UIViewController {
let categoryView = CategoryView()
var tasks: [Task]
var category: String
init(category: String, task: [Task]) {
... |
import React from "react";
import styles from "./notificationbar.module.css";
import { styled } from "@mui/material/styles";
import FormControlLabel from "@mui/material/FormControlLabel";
import Switch from "@mui/material/Switch";
import { BiLinkExternal } from "react-icons/bi";
const NotificationBar = () => {
cons... |
################### Required packages ##################
#install.packages("caret", dependencies=c("Depends", "Suggests"))
#install.packages('Boruta')
#install.packages('RANN')
require("caret")
require("Boruta")
require("RANN")
library(tidyverse)
library(caret)
library(Boruta)
library(tidyr)
library(RANN)
############... |
import Divisao from "./Divisao";
import Paragrafo from "./Paragrafo";
import Titulo from "./Titulo";
import Map from "./Map";
import CardOds from "./CardOds";
function Container() {
return (
<div
className="h-full p-8 flex flex-col gap-y-6 bg-no-repeat bg-cover bg-fixed"
style={{ backgroundImage: "ur... |
from datetime import datetime
from typing import Any, Literal, TypedDict
from traderpilot.constants import PairWithTimeframe
from traderpilot.enums import RPCMessageType
ProfitLossStr = Literal["profit", "loss"]
class RPCSendMsgBase(TypedDict):
pass
# ty1pe: Literal[RPCMessageType]
class RPCStatusMsg(RPC... |
#ifndef REQUEST_H
#define REQUEST_H
#include "../../Config/config.h"
#include <cstdlib>
namespace Routes
{
/**
* @brief Data Transfer Object for creating a new mayor.
*/
struct CreateMayorDTO
{
// Name of the mayor
char name[MAX_MAYOR_NAME];
// Address of the mayor
... |
package com.nisovin.magicspells.spells.buff;
import java.util.Map;
import java.util.UUID;
import java.util.HashMap;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.EventPriority;
import org.bukkit.potion.Po... |
package br.com.emendes.timemanagerapi.unit.mapper;
import br.com.emendes.timemanagerapi.dto.request.ActivityRequest;
import br.com.emendes.timemanagerapi.dto.response.ActivityResponse;
import br.com.emendes.timemanagerapi.mapper.impl.ActivityMapperImpl;
import br.com.emendes.timemanagerapi.model.Status;
import br.com.... |
package med.voll.api.infra.springdoc;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.License;
import io.swagger.v3.oas.models.security.SecurityScheme;
imp... |
import 'package:equatable/equatable.dart';
import 'package:game_repository/game_repository.dart';
import 'package:lobby_repository/lobby_repository.dart';
/// Keys
const _kId = 'id';
const _kPlayers = 'players';
const _kCustomParams = 'customParams';
const _kHostId = 'hostId';
const _kDeck = 'deck';
const _kDiscardPil... |
import matplotlib.pyplot as plt
import numpy as np
def plot_loss_curves(
train_losses, test_losses, title="Training and Test Loss (Log Scale)", save_path=None, show_plot=True
):
"""
Plot training and test loss curves.
Parameters:
- train_losses (list of float): Training losses for each epoch.
... |
/**
* @file gpiodev.h
* @author Sunip K. Mukherjee (sunipkmukherjee@gmail.com)
* @brief Header file containing function prototypes and properties of
* the GPIO sysfs access module.
* @version 1.0
* @date 2020-08-30
*
* @copyright Copyright (c) 2020
*
* @license GPL v3
*/
#ifndef _GPIODEV_H
#define _GPIODE... |
/**
* Модуль с дополнительными функциями
* @member common
* @module common
*/
//модуль для работы с запросами в БД
const query = require('./queryDB');
//модуль для работы с ассинхронными функуиями
const q = require('q');
//бибдиотека для обработки данных
const _ = require('underscore');
//модуль для ассинхронной о... |
import {
Container,
Heading,
SkeletonText,
Table,
TableContainer,
Tbody,
Td,
Th,
Thead,
Tr,
} from "@chakra-ui/react"
import { useQuery, useQueryClient } from "@tanstack/react-query"
import { createFileRoute, useNavigate } from "@tanstack/react-router"
import { useEffect } from "react"
import { z } ... |
import { $query, $update, StableBTreeMap, Vec, int8, match, Result, Opt, nat64, ic, int32, Principal } from 'azle';
import {
Address,
binaryAddressFromAddress,
TransferFee,
Ledger,
Tokens,
TransferResult,
} from 'azle/canisters/ledger';
import {Token, InitPayload, Proposal, ProposalPayload, Joi... |
// components/SearchImage.tsx
import React, { useState, useEffect, useCallback } from 'react';
import { FaDownload, FaImage } from 'react-icons/fa';
import { query } from '../api/api';
import ApiSelector from './ApiSelector';
import { GiFallingStar } from "react-icons/gi";
interface SearchImageProps {
setError: Reac... |
import json
import numpy as np
import sys
import matplotlib.pyplot as plt
sys.path.append("../Delaunay_Triangularization")
from BowyerWatson import BowyerWatson
from find_path import get_best_path_greedy, bfs
def fit_curve(points):
x = points[:, 0].reshape(-1, 1)
y = points[:, 1].reshape(-1, 1)
if x.shape[... |
package assignments.dynamicmemory;
import java.util.ArrayList;
import java.util.List;
public class MemoryAllocator implements IMemoryAllocator
{
private int totalSize;
private IAllocationAlgorithm algorithm;
private List<MemoryBlock> blocks;
public MemoryAllocator(int totalSize, IAllocationAlgorithm... |
import React, { useState } from "react";
import MovieCard from "../components/MovieCard";
import { useGetMoviesQuery } from "../slices/MoviesApiSlice";
import Loader from "../components/Loader";
const Home = () => {
const [page, setPage] = useState(1);
let [disabled, setDisabled] = useState(false);
const { data... |
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http'
import { Observable } from 'rxjs';
import { environment } from '../../../environments/environment'
import { ApiResponseEditTherapistI, ApiResponseGetTherapistDetailI, ApiResponseGetTherapistsI, ApiResponseRegister... |
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import MinMaxScaler, StandardScaler
from sklearn.ensemble import RandomForestClassifier
from sklearn.decomposition import PCA
import pandas as pd
import numpy as np
def split_data(file_path='data/data_raw.csv', test_size=0.3, random_state=... |
/***** BEGIN LICENSE BLOCK *****
* Version: EPL 2.0/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Eclipse Public
* 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.eclipse.org/legal/epl-... |
library(seqinr)
library(dplyr)
library(tidyr)
get_binom_pval <- function(data, sex) {
process_sample <- function (sample_data, sex) {
sample_data <- sample_data %>%
rowwise() %>%
mutate(
binom_pval = case_when(
(
NV > 0 &... |
#!/usr/bin/env python
"""
llm-stack
efficient multi-platform stack for LLM-based UI applications.
© 2023 hexis systems GmbH
Licensed under the MIT License.
"""
import asyncio
from pathlib import Path
from llama_cpp import Llama
from typing import AsyncGenerator, Callable, Iterable, Optional, Union, List, TypeVar, c... |
import React from "react";
export const useClickOutside = () => {
const [closeMenu, setCloseMenu] = React.useState(false);
const menuRef = React.useRef<any>(null);
React.useEffect(() => {
const handleClickOutside = (event: MouseEvent) => {
if (menuRef.current && !menuRef.current.contains(event.target ... |
import React from "react"
import "./main-component.css"
import AdddUser from "./AddUser"
import UserList from "./UserList"
class User extends React.Component{
constructor(){
super()
this.state = {
users: []
}
this.addUser = this.addUser.bind(this)
this.deleteUser... |
import { useState } from "react";
import { Link, useNavigate } from "react-router-dom";
import './LoginPage.Styles.css';
import { loginUser } from "../../../api";
const LoginPage = () => {
const [username, setUsername] = useState('')
const [password, setPassword] = useState('')
const [error, setError] =... |
import React, { useState } from 'react';
import { Link } from 'react-router-dom'; // Assuming you are using React Router for routing
const Navbar = () => {
const [profile, setProfile] = useState(false);
// Dummy function to toggle profile state
const toggleProfile = () => {
setProfile(!profile);
};
ret... |
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
#include <stdio.h>
#include <unistd.h>
using namespace std;
void saveToFile(const string& filename, const string& content, bool append = false) {
ofstream outfile;
if (append) {
outfile.open(filename, ios::app);
}
else {
outfile.open(... |
/**
* @fileOverview
* @author Brandon Alexander - baalexander@gmail.com
*/
var WebSocket = require('ws');
var WorkerSocket = require('../util/workerSocket');
var socketAdapter = require('./SocketAdapter.js');
var Service = require('./Service');
var ServiceRequest = require('./ServiceRequest');
var ServiceResponse ... |
import { AppContext } from "../App";
import { useEffect, useState, useContext } from "react";
import { useNavigate, useParams } from "react-router-dom";
import jwt from "jwt-decode";
import { motion, AnimatePresence } from "framer-motion";
import { useForm } from "react-hook-form";
import { yupResolver } from "@hookfor... |
import { styled } from "@mui/material/styles";
import Table from "@mui/material/Table";
import TableBody from "@mui/material/TableBody";
import TableCell, { tableCellClasses } from "@mui/material/TableCell";
import TableContainer from "@mui/material/TableContainer";
import TableHead from "@mui/material/TableHead";
impo... |
using Kysect.Zeya.LocalRepositoryAccess;
using Kysect.Zeya.LocalRepositoryAccess.Github;
using Kysect.Zeya.RepositoryValidationRules.Fixers.Github;
using Kysect.Zeya.RepositoryValidationRules.Rules.Github;
using Kysect.Zeya.Tests.Tools;
using System.IO.Abstractions.TestingHelpers;
namespace Kysect.Zeya.Tests.Domain.V... |
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class Home extends StatefulWidget {
const Home({super.key});
@override
State<Home> createState() => _homeState();
}
class _homeState extends State<Home> {
//var
bool isFavorite = false;
@override
Widget build(BuildContext... |
<?php
namespace App\Domains\GroupType\Controllers;
use App\Domains\GroupType\Models\GroupType;
use App\Domains\GroupType\Models\EnumPermissionGroupType;
use App\Domains\GroupType\Request\FilterGroupTypeRequest;
use App\Domains\GroupType\Request\StoreGroupTypeRequest;
use App\Domains\GroupType\Request\UpdateGroupType... |
import os
from functools import lru_cache
import pytest
from cffconvert import Citation
from cffconvert.lib.cff_1_3_x.zenodo import ZenodoObject
@lru_cache
def get_cffstr():
fixture = os.path.join(os.path.dirname(__file__), "CITATION.cff")
with open(fixture, "rt", encoding="utf-8") as f:
return f.read... |
import { createContext, useCallback, useEffect, useState } from 'react'
import { v4 as uuid } from 'uuid'
type Task = {
id: string;
text: string;
isDone: boolean;
}
type TasksContextType = {
tasks: Task[];
totalTasks:number;
doneTasks: number;
onFinishTask: (id: string) => void;
onDeleteTask: (name: s... |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This defines helpful methods for dealing with Callbacks. Because Callbacks
// are implemented using templates, with a class per callback signature... |
package com.satellite.satellite.controller;
import com.satellite.satellite.model.APIResponse;
import com.satellite.satellite.model.CustomerSatellite;
import com.satellite.satellite.service.CustomerSatelliteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatu... |
package sg.nus.edu.iss.vttp5a_ssf_day15l_mine.controller;
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.web.bind.annotation.GetMapping;... |
from flask import Flask, render_template, request, redirect, url_for
import sqlite3
app = Flask(__name__)
# SQLite database configuration
DATABASE = 'database.db'
def create_tables():
with sqlite3.connect(DATABASE) as connection:
cursor = connection.cursor()
cursor.execute('''
CREATE ... |
#ifndef __STM32H7A3_GPIO_HPP__
#define __STM32H7A3_GPIO_HPP__
#include "AbstractGPIO.hpp"
#include "stm32h7a3xxq.h"
namespace Drivers {
enum class GPIO_PIN {
Pin0,
Pin1,
Pin2,
Pin3,
Pin4,
Pin5,
Pin6,
Pin7,
Pin8,
Pin9,
Pin10... |
import React from 'react'
import { Stack } from "@mui/material"
import HomeIcon from '@mui/icons-material/Home'; // import the required icons
import CodeIcon from '@mui/icons-material/Code';
import MusicNoteIcon from '@mui/icons-material/MusicNote';
import OndemandVideoIcon from '@mui/icons-material/OndemandVideo';
imp... |
import { useLang } from '@/store/languageStore';
import { useEffect, useState } from 'react';
type Props = {
createdAt: string; // ISO 8601 날짜 문자열
};
const TimeAgo = ({ createdAt }: Props) => {
const [timeAgo, setTimeAgo] = useState('');
const { lang } = useLang();
useEffect(() => {
const calculateTimeAg... |
package bp.sys;
/**
导入模式
*/
public enum ImpModel
{
/**
不执行导入
*/
None(0),
/**
表格模式
*/
Table(1),
/**
按照Excel文件模式
*/
ExcelFile(2),
/**
单据模式
*/
BillModel(3);
public static final int SIZE = java.lang.Integer.SIZE;
private int intValue;
private static java.util.HashMap<Integer, ImpModel> mapp... |
import { createRouter, createWebHistory } from "vue-router";
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: "/",
name: "home",
components: {
default: async () => await import("../views/HomeView.vue"),
header: async () =>
... |
// Motor driver test
// -----------------------------------------------------------
#include <RPC.h> // to support 2nd CPU core
#include <LiquidCrystal.h> // LCD screen
#include <Servo.h> // servo library
#include <FastLED.h>
//wiring:
// (PWM) Encoder
// speed ... |
import * as React from "react";
import { render } from "react-dom";
import { test_backend } from "../../declarations/test_backend";
const MyHello = () => {
const [num1, setNum1] = React.useState(0);
const [num2, setNum2] = React.useState(0);
const [result, setResult] = React.useState(0);
async function doGree... |
<!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">
<link rel="icon" type="image/x-icon" href="./favicon.ico">
<title> SIM - TP4 </title>
<!-- CDN libreria ta... |
<?php
/**
* General html rendering functions.
*
* SAM-4445: Apply TextFormatter
*
* @copyright 2021 Bidpath, Inc.
* @author Igors Kotlevskis
* @package com.swb.sam2
* @version SVN: $Id: $
* @since May 20, 2021
* file encoding UTF-8
*
* Bidpath, Inc., 269 Mt. Hermo... |
package com.preran.BlogPost2.controllers;
import com.preran.BlogPost2.entites.Comment;
import com.preran.BlogPost2.exceptions.CustomResponse;
import com.preran.BlogPost2.models.CommentDto;
import com.preran.BlogPost2.services.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.sp... |
#class to handle series(seasons) information and searching thereof
class Series:
def __init__(self, title: str, seasons: int, genres: list):
self.title = title
self.seasons = seasons
self.genres = genres
self.ratings = []
def __str__(self):
if not self.ratings:
... |
import { AccountComponent } from './components/account/account.component';
import { RoleGuard } from './guards/role.guard';
import { ReservationsComponent } from './components/reservations/reservations.component';
import { PlanningComponent } from './components/planning/planning.component';
import { ReservableComponent... |
import React, { useContext, useState } from "react";
import axios from "axios";
import { Link } from "react-router-dom";
import { toast } from "react-toastify";
import { UserContext } from "../context/userContext";
const Signup = () => {
const { setLoggedInUser } = useContext(UserContext);
const [loading, setLoadi... |
const chai = require('chai');
const chaiHttp = require('chai-http');
chai.use(chaiHttp);
const { expect } = chai;
const request = require('supertest');
const app = require('../app.js');
const { reviewsValidationSchema } = require('../validations/checkReviews.js');
describe('Reviews CRUD Operations', () => {
let revi... |
import numpy as np
import matplotlib.pyplot as plt
class MLP:
def __init__(self, hidden_node=3):
self.input_node = 1
self.hidden_node = hidden_node
self.output_node = 1
self.w1 = np.random.rand(self.hidden_node, self.input_node)
self.b1 = np.random.rand(self.hidden_node, 1)... |
import { Transform, Type } from 'class-transformer';
import { toNumber } from '@credebl/common/cast.helper';
import { ApiProperty } from '@nestjs/swagger';
import { IsOptional, IsString } from 'class-validator';
import { Invitation } from '@credebl/enum/enum';
export class GetAllSentEcosystemInvitationsDto {
@Ap... |
import React from 'react'
import {RenderOptions, render } from '@testing-library/react'
import { Provider } from 'react-redux';
import { BrowserRouter } from 'react-router-dom';
import { RootState, rootReducer } from '../Store/rootReducer';
import { createStore } from 'redux';
import { CATEGORIES_INITIAL_STATE } from '... |
import 'package:intl/intl.dart';
class HumanFormats {
static String number( double number, [ int decimals = 0 ] ) {
final formatterNumber = NumberFormat.compactCurrency(
decimalDigits: decimals,
symbol: '',
locale: 'en'
).format(number);
return formatterNumber;
}
static String sh... |
# frozen_string_literal: true
module Fights
class Execute
attr_reader :fight, :error_message
def initialize(fight:)
@fight = fight
end
def call
raise 'Fight already started' unless fight.status_planned?
ActiveRecord::Base.transaction do
fight.status_in_progress!
ex... |
import { useState } from "react";
import { useParams } from 'react-router-dom';
import { FifteenthClassItem } from "../../components/FifteenthClassItem";
import { useTheme } from "../../hooks/useTheme";
import "./style.scss";
export function FifteenthClass() {
/** REACT HOOKS **/
// (1) useState
const [l... |
import 'swiper/css';
import { Swiper } from 'swiper';
import { Controller, Manipulation, Navigation, Pagination } from 'swiper/modules';
export const swiper = function () {
const listElements = Array.from(document.querySelectorAll('[swiper="component"]'));
if (listElements.length === 0) return;
// Make each i... |
<?php
/*********************************************************************************
* Zurmo is a customer relationship management program developed by
* Zurmo, Inc. Copyright (C) 2015 Zurmo Inc.
*
* Zurmo is free software; you can redistribute it and/or modify it under
* the terms of t... |
# PowerShell one-liner: Get eventlog
Posted on [October 28, 2017October 30, 2017](https://www.powershellbros.com/powershell-one-liner-get-eventlog/) by [Pawel Janowicz](https://www.powershellbros.com/author/pawel-janowicz/)
Use PowerShell one-liner to get eventlog details quickly and easily. In this article you will ... |
/*
* 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 servelet;
import dao.ImagemDao;
import dao.ProdutoDao;
import entidade.Imagem;
import entidade.Produto;
import java.io.IOExcep... |
// Copyright 2019 Google LLC
//
// 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 to in ... |
package oauth
import (
"context"
"encoding/json"
"fmt"
"github.com/mohsenabedy91/polyglot-sentences/internal/core/config"
"github.com/mohsenabedy91/polyglot-sentences/pkg/logger"
"github.com/mohsenabedy91/polyglot-sentences/pkg/serviceerror"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
"io"
"net/http"
... |
Some Notes on the abc2midi Code
-------------------------------
written by Seymour Shlien
Abc2midi.txt - last updated 29 November 1999.
This file provides an algorithmic description of the program
abc2midi which converts an abc file into a midi file.
The sources of abc2midi now comprising of 6700 lines of C cod... |
package com.green.di.diBasic4;
import com.google.common.reflect.ClassPath;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.lang.reflect.Field;
import java.util.Has... |
import React from 'react';
import { Easing } from 'react-native';
import PropTypes from 'prop-types';
import { SymbolLayer } from '../SymbolLayer';
import Animated from '../../utils/animated/Animated';
import { AnimatedPoint } from '../../classes';
class Annotation extends React.Component {
static propTypes = {
i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.