text stringlengths 184 4.48M |
|---|
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Identity;
namespace AppCurso.ViewModels
{
public class UsuarioViewModel
{
[DisplayName("Código")]
public int Id { get; set; }
[DisplayName("E-mail")]
[Required(ErrorMessage = "C... |
/**
*Submitted for verification at Etherscan.io on 2022-11-28
*/
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract SetUp {
mapping(address => mapping(address => bool)) onlyMasters;
mapping(address => bytes[]) pubKeys;
mapping(address => bytes[]) metadatas;
uint fee;
... |
package Part1;
//
// Title: Student Class
// Author: Ceyda Kuşçuoğlu
// Description: This class holds the student information and compare them according to their id,semesterNo and name
//
public class Student implements Comparable<Student> {
private String name; // Holds the name value for student object
pr... |
import { createUserWithEmailAndPassword } from "firebase/auth";
import { useState } from "react";
import { notification } from "antd";
import { useNavigate } from "react-router";
import { auth } from "../firebase";
const inpClass = "bg-[#85789A] rounded-[20px] w-full px-3 py-1";
const labelClass = "text-[#85789A] tex... |
<div id="users" class="page-layout carded fullwidth" fusePerfectScrollbar>
<!-- TOP BACKGROUND -->
<div class="top-bg mat-accent-bg"></div>
<!-- / TOP BACKGROUND -->
<!-- CENTER -->
<div class="center">
<!-- HEADER -->
<div class="header white-fg"
fxLayout="column" fx... |
function [J, grad] = linearRegCostFunction(X, y, theta, lambda)
%LINEARREGCOSTFUNCTION Compute cost and gradient for regularized linear
%regression with multiple variables
% [J, grad] = LINEARREGCOSTFUNCTION(X, y, theta, lambda) computes the
% cost of using theta as the parameter for linear regression to fit the ... |
import { useState } from "react"
import ErrorDialog from "./dialog/ErrorDialog"
import HotkeysDialog from "./dialog/HotkeysDialog"
import MessageDialog from "./dialog/MessageDialog"
import WarningDialog from "./dialog/WarningDialog"
interface CollapsableMessageProps {
isCollapsedByDefault: boolean
type?: "warn... |
import { addMinutes, format, formatDistanceStrict, getTime } from 'date-fns';
import { Tournament } from '../../../../types/tournament';
import {
formatTimeUntilTournament,
getTournamentRange,
} from '../../TournamentList/helpers';
const offsetTimezone = (date: Date, utcOffsetMinutes: number) => {
const currentO... |
import React from 'react';
import Card from '@mui/material/Card';
import CardActions from '@mui/material/CardActions';
import CardContent from '@mui/material/CardContent';
import Button from '@mui/material/Button';
import Typography from '@mui/material/Typography';
import './CardArticles.css';
import EditArticle from '... |
// Copyright (C) 2015 basysKom GmbH, opensource@basyskom.com
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef QOPCUANODE_H
#define QOPCUANODE_H
#include <QtOpcUa/qopcuabrowserequest.h>
#include <QtOpcUa/qopcuaglobal.h>
#include <QtOpcUa/qopcuamonitoringpara... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Adelaide 36ers not Official Website</title>
<!-- css link -->
<!--
<link rel="stylesheet" href="css/style.css" />-->
<!-- fontawesome CDN -->
<link
rel="stylesheet"
href="h... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;
// https://www.acmicpc.net/problem/1976
public class Main {
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static StringTokeni... |
<template>
<div>
<h1>Odczytaj wiadomość</h1>
<form @submit.prevent="getMessage">
<label for="uuid">UUID:</label>
<input v-model="uuid" type="text" id="uuid" name="uuid" required>
<button type="submit">Pobierz</button>
</form>
<div v-if="messageData">
<h2>Wiadomość:</h2>
... |
import 'package:go_router/go_router.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:real_world_flutter/domain/repository/user_repository.dart';
import 'package:real_world_flutter/domain/util/logger.dart';
import 'package:real_world_flutter/presentation/navigation/app_navigation.dart';
import... |
# FHIR Client Service
This is a demo Python Flask application that serves as a client service for interacting with a FHIR (Fast Healthcare Interoperability Resources) server. It provides a set of RESTful API endpoints for creating and retrieving FHIR resources such as patients, observations, medications, and condition... |
import { useState, useEffect } from "react";
import {
Box,
TextField,
Autocomplete,
CircularProgress,
Avatar,
} from "@mui/material";
import { usePeople } from "../../hooks/usePeople";
const server = process.env.REACT_APP_BASE_SERVER;
export default function PeoplePicker({ itemListId, setItemData }) {
con... |
import { useState } from 'react';
import { Link } from 'react-router-dom';
import { useMutation } from '@apollo/client';
import { ADD_USER } from '../../utils/mutations.js';
import Auth from '../../utils/auth.js';
const Signup = () => {
const [formState, setFormState] = useState({
username: '',
email: '',
... |
import { useState } from "react";
import TodoItem from "./TodoItem";
import TodoSearch from "./TodoSearch";
const TodoList = ({todo, onUpdate, onDelete, onEdit, onModify}) => {
const [search, setSearch] = useState("");
const onChangeSearch = (e) => {
setSearch(e.target.value);
}
const getSearchResult = (... |
import { z, defineCollection } from "astro:content"
const blog = defineCollection({
schema: z.object({
title: z.string(),
subtitle: z.string().optional(),
description: z.string().max(250),
pubDate: z.string().transform((str) => new Date(str)),
update: z
.string()
.transform((str) => n... |
package com.shopfam.admin.category;
import com.shopfam.common.entity.*;
import com.shopfam.common.exception.CategoryNotFoundException;
import org.springframework.data.domain.*;
import jakarta.transaction.Transactional;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Set;
import java.... |
const locator = require('../locator/LoginPageLocator')
class LoginPage {
async visit(path) {
cy.visit(path)
return cy.url().should('eq', path)
}
async verify_login_page() {
cy.xpath(locator.datatestid.logo, { timeout: 10000 }).should('be.visible')
cy.xpath(locator.datatest... |
/* eslint-disable prettier/prettier */
import { Body, Controller, Delete, Get, HttpCode, Param, Post, Put, UseGuards, UseInterceptors } from '@nestjs/common';
import { plainToInstance } from 'class-transformer';
import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';
import { RestauranteEspecializadoDto } from '.... |
import { Workbook, Worksheet, Fill } from 'exceljs';
import { TripRequest } from '../../database';
import Utils from '../../utils/index';
import generateReportData from './ReportData';
class GenerateExcelBook {
getCellStyle(isColHeader: boolean) {
if (isColHeader) {
return {
name: 'Times New Roman'... |
import {
View,
StyleSheet,
Text,
ImageBackground,
Animated,
} from "react-native";
import React, { useRef, useEffect } from "react";
const FadeInView = (props) => {
const fadeAnim = useRef(new Animated.Value(0)).current; // Initial value for opacity: 0
useEffect(() => {
Animated.timing(fadeAnim, {
... |
-- List of all facilities
select * from cd.facilities;
-- List of all facilities and their cost to members
select name, membercost from cd.facilities;
-- Facilities that charge a fee to members
select * from cd.facilities where membercost > 0;
-- Facilities that charge a fee to members and that fee is less than 1/50... |
# Integrated Registry (Workspace)
Integrated Registry (Workspace) is a convenient way to access registries for workspaces.
Workspace admin can flexibly integrate registry for their workspace members as needed.
Once integrated, members can use all public and private images under the workspace by
clicking the `Choose Im... |
package com.in28minutes.rest.webservices.restfulwebservices.filtering;
import com.fasterxml.jackson.databind.ser.FilterProvider;
import com.fasterxml.jackson.databind.ser.PropertyFilter;
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
import com.fasterxml.jackson.databind.ser.impl.SimpleFilter... |
import { useState } from 'react';
import { useInterval } from '@mantine/hooks';
import { Button, Progress, useMantineTheme, rgba } from '@mantine/core';
import classes from './ButtonProgress.module.css';
export function ButtonProgress() {
const theme = useMantineTheme();
const [progress, setProgress] = useState(0)... |
# 最小二乘回归器和分类器的推导
> 原文:<https://towardsdatascience.com/derivation-of-least-squares-regressor-and-classifier-708be1358fe9?source=collection_archive---------12----------------------->
## 基本机器学习推导
## 一个基本但功能强大的分类器和回归器,它们的派生以及它们工作的原因

作者图片
在本文中,我推导了最小二乘回归和分类算法的伪逆解。
虽然不是很复杂... |
package main
import ("fmt")
func main() {
// When using slices, Go will load all the underlying elements into memory. If the array is large and we only need a few elements, it is better to copy those elements using the copy() function. This function creates a new underlying array with only the required elements for ... |
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ReactiveFormsModule } from '@angular/forms';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { AppMaterialModule } from '../app-material.module';
import { HelpComponent } from '../component/help/help.componen... |
import React, { useEffect, useState } from 'react'
import { useNavigate } from 'react-router-dom';
import { base_url } from '../config';
import axios from 'axios';
import Book from './Book';
import { MDBCol, MDBContainer, MDBModal, MDBModalBody, MDBModalContent, MDBModalDialog, MDBModalFooter, MDBModalHeader, MDBModalT... |
import React from "react";
import { useDispatch, useStore } from "react-redux";
import { SubmitHandler, useForm } from "react-hook-form";
import { Button } from '@mui/material';
import {
chooseMake,
chooseModel,
chooseYear,
chooseColor,
chooseDescription,
choosePrice,
chooseMilesPerGallon,
... |
import { login, logout, getInfo } from '@/api/user'
import { getToken, setToken, removeToken } from '@/utils/auth'
import { resetRouter } from '@/router'
const getDefaultState = () => {
return {
token: getToken(),
name: '',
avatar: ''
}
}
const state = getDefaultState()
const mutations = {
RESET_ST... |
import { useEffect, useState } from "react";
import { RecipeSummary } from "../types";
import * as RecipeAPI from '../api';
interface Props {
recipeId: string;
onClose: () => void;
}
const RecipeModal = ({recipeId, onClose}: Props) => {
const [recipeSummary, setRecipeSummary] = useState<RecipeSummary>();... |
"use client"
import React, { useEffect, useState } from 'react';
import axios from 'axios';
import { BASE_URL } from '@/helper/route';
import { ErrorModel, SuccessModel } from '@/helper/models';
export default function Profile() {
const [refresh, setRefresh] = useState(false)
const [data, setData] = useState({... |
package com.example.firstproject.controller;
import com.example.firstproject.dto.MemberForm;
import com.example.firstproject.entity.Member;
import com.example.firstproject.repository.MemberRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springfram... |
import React, { useEffect, useState } from "react";
import { Avatar, Typography, Button } from "@mui/material";
import { useDispatch, useSelector } from "react-redux";
import { Link, useNavigate } from "react-router-dom";
import { registerUser } from "../../Actions/User";
import "./Register.css";
const Register = () =... |
package com.ddd.sikdorok.home
import android.util.Log
import androidx.lifecycle.viewModelScope
import com.ddd.sikdorok.core_ui.base.BaseViewModel
import com.ddd.sikdorok.core_ui.util.DateUtil
import com.ddd.sikdorok.domain.home.GetHomeDailyFeedsUseCase
import com.ddd.sikdorok.domain.home.GetHomeMonthlyFeedsUseCase
imp... |
<?php
/**
* Padoosoft Co.
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0).
* It is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you are unable to obtain it through the world-wide-web, please send
* an email to s... |
class User < ApplicationRecord
before_create :default_avatar
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :validatable, :omniauthable
#valid... |
"""
说明:
搭建VGG网络
"""
from tensorflow.keras import Input
from tensorflow.keras import Model
from tensorflow.keras import layers
from tensorflow.keras import regularizers
class VGG:
def __init__(self, number_of_classes, image_shape):
"""
对网络进行初始化
:param number_of_classes: 数据集识别对象种类
... |
import { BASE_URL } from "../../services/helper";
import React, { useState, useEffect } from "react";
import axios from "axios";
import Button from "react-bootstrap/Button";
import Form from "react-bootstrap/Form";
import Table from "react-bootstrap/Table";
import { ToastContainer, toast } from "react-toastify";
import... |
import React, {ReactNode} from 'react';
import {makeStyles} from '@material-ui/core/styles';
import CardDefault from './CardDefault';
interface Props {
titulo?: string;
subtitulo?: string;
acoesHeader?: React.ReactNode;
displayDivider?: boolean;
children: ReactNode;
}
const useStyles = makeStyles(() => ({
... |
<div style="padding:1em;padding-bottom: 0;;" class="mat-title">
<span translate>create.survey.title</span>
<button *ngIf="surveyObject.id > 0" mat-raised-button color="primary" style="margin-left:1em; float:right;"
matTooltip="{{ 'dashboard.duplicatesurvey' | translate }}" (click)="duplicateSurvey()">... |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Model\Configs;
class ConfigsController extends Controller
{
var $skin_array = [
'White Skin' => 'skin-white',
'Blue Skin' => 'skin-blue',
'Black Skin' => 'skin-black',
'Purple Skin' => 'skin-purple',
... |
from django.db import models
from django.urls import reverse
# Create your models here.
class Category(models.Model):
name = models.CharField(max_length=250)
slug = models.SlugField(max_length=250)
description = models.TextField(blank=True)
class Meta:
verbose_name_plural = 'categories'
... |
/*******************************************************************************
NAME MILLER CYLINDRICAL
PURPOSE: Transforms input longitude and latitude to Easting and
Northing for the Miller Cylindrical projection. The
longitude and latitude must be in radians. The Easting
and Northing va... |
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Http\Requests\ChannelRequest;
use App\Repository\Interfaces\ChannelRepositoryInterfaces;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\H... |
-- Demonstrates prepared statements
-- Create a prepared statement
-- ? - cleans any data before it comes in so we don't run code we don't want it to run.
PREPARE `balance_check`
FROM 'SELECT * FROM `accounts`
WHERE `id` = ?';
-- Execute the prepared statement with non-malicious input
-- Set a user variable
SET @id =... |
import Modal from 'react-modal'
import { Container, TransactionTypeContainer, RadioBox } from './styles';
import incomeImg from '../../assets/income.svg'
import outcome from '../../assets/outcome.svg'
import closeImg from '../../assets/close.svg';
import { FormEvent, useState} from 'react';
import { useTransactions } f... |
import React, { useEffect } from "react";
import { useState } from "react";
import Editor from "../Componnent/Editor";
import { useParams } from "react-router-dom";
import axios from "axios";
import { useNavigate } from "react-router-dom";
function EditPost() {
const { id } = useParams();
const [title, setTitle] = ... |
package ru.job4j.stream;
import java.util.Collection;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class Analyze {
public static double averageScore(Stream<Pupil> stream) {
... |
import React, { Component, useState, useEffect } from 'react';
import PropTypes from 'prop-types'
import './User_List.css'; // 导入样式文件
import { Link } from 'react-router-dom';
import axios from 'axios'
import { Button, ConfigProvider } from 'antd'
const FanList = ({UserListStyle, currentUser, currentEnter}) => {
c... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Upload Templates</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<style>
body {
font-family: 'Arial', sans-se... |
export class UnionFind {
private readonly parents: Array<number> = [];
private readonly rank: Array<number> = [];
constructor(size: number) {
if (size <= 0) {
throw new Error(`Invalid size ${size}, must be greater than 0`);
}
if (Math.round(size) !== size) {
throw new Error(`Invalid size... |
from django.shortcuts import render, redirect
from django.contrib.auth import login, authenticate
from django.contrib import messages
from .forms import UserRegistrationForm
from django.contrib.auth.decorators import login_required
def home(request):
return render(request, 'users/home.html')
def members(request)... |
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module ash.auth.mojom;
// This module defines interfaces to query properties of and configure
// authentication factors. The interfaces are implemented by services running
// ... |
import { Box, CircularProgress } from '@material-ui/core'
import React, { useContext, useEffect } from 'react'
import loadable from 'react-loadable'
import { useDispatch, useSelector } from 'react-redux'
import { Redirect, Route, Switch } from 'react-router-dom'
import Page from './components/Page'
import HelpCSVDialog... |
import React from "react";
import { Box, Heading, Text, useColorModeValue } from "@chakra-ui/react";
import { Link } from "react-router-dom";
const PostCard = (props) => {
const { content } = props;
const cardBg = useColorModeValue("whatsapp.100", "whatsapp.300");
return (
<Box
p="5"
shadow="lg"
... |
package com.example.springbootdemo1.util;
import com.auth0.jwt.JWT;
import com.auth0.jwt.JWTVerifier;
import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.interfaces.Claim;
import com.auth0.jwt.interfaces.DecodedJWT;
import com.example.springbootdemo1.dataObject.User;
import org.slf4j.Logger;
import org.slf... |
package main
import (
"path/filepath"
"adventofcode23/internal/day"
"adventofcode23/internal/projectpath"
)
type Day14 struct {
day.DayInput
}
type platform [][]byte
func NewDay14(inputFile string) Day14 {
return Day14{day.DayInput(inputFile)}
}
func (p *platform) tilt() {
north := make([]int, len((*p)[0]))... |
import { FC } from "react"
import {
Title,
SubTitle,
Text,
TextWrapper,
ContentWrapper,
CodeBlock,
CodeBlue,
CodeRed,
Root,
} from "../../../../const/CommonStyledComponent"
export const Chapter1_7: FC = () => (
<Root>
<Title>再帰関数と高階関数</Title>
<ContentWrapper>
<TextWrapper>
<Su... |
library(ggplot2)
library(fda)
library(gridExtra)
library(scales)
setwd("/Users/chenzhou/Documents/Everything/python/COVID19/data/")
options(digits = 4)
options(scipen = 0)
data_sh <- read.csv("data_0516_SH.csv")
# data_sh_whole <- data_sh[which(data_sh$map_name=='上海'), ]
# data_sh_whole$date <- as.Date(data_sh_whole$d... |
# brain-teaser

Race against the clock and put your coding knowledge to the test with our thrilling quiz game. Designed with newcomers in mind, Brain Teaser offers an exciting way to learn about coding. Take the quiz, track your scores, and aim for the top ... |
IP协议头部结构
版本号
头部长度
服务类型
总长
标识标志
片偏移量
生存时间
协议
头部校验和
源IP地址和目标IP地址
TCP协议头部结构
源端口号
目标端口号
序列号
确认号
头部长度
保留位
标志位
窗口大小
校验和
紧急指针
UDP协议头部结构
源端口号
目标端口号
总长度
校验和
HTTP请求分为4个部分:请求行,请求头、空行、请求正文
请求行分为:请求方法、URL、版本号
请求头包含很多信息,都是键值对形式,包括cooki... |
import { createContext, ReactNode, useEffect, useState } from 'react';
import { Product } from './products.types';
import productsJSON from '../products.json';
type Props = {
children: ReactNode;
}
export const ProductsInterfaceContext = createContext({
products: [] as Product[],
categories: [] as string[... |
import wollok.game.*
const ancho = 20
const alto = 15
const alturaAgua = 8
const fondoIniciar = new Visual(
image = "assets/fondoInicio.jpg",
position = game.at(0,0)
)
const fondoCerrar1 = new Visual (
image = "assets/fondoCierre.jpg",
position = game.at(0,0)
)
const fondoCerrar2 = new Visual (
image = "as... |
/*
* bst.h
*
* Created on: 9/10/2023
* Author: Jesús Alejandro Cedillo Zertuche
*/
#ifndef BST_H_
#define BST_H_
#include <string>
#include <sstream>
using namespace std;
// Header para el friend
template <class T> class BST;
/*
El nodo es el circulito.
Tiene el valor, y los apuntadores de sus hijos en ... |
//
// ProductCardView.swift
// funiture-store-swiftui
//
// Created by Gideon Okoroafor on 4/18/24.
//
import SwiftUI
struct ProductCardView: View {
@EnvironmentObject var cartManager: CartManager
var product: Product
var body: some View {
ZStack{
Color("kSecondary")
ZSt... |
# Technical challenge
## Objective
The goal of the challenge is to run Backstage locally, understand the basic parts, extend it with plugins and enhance both the backend and frontend part.
You are kindly requested to read the following document, follow the directions to complete the challenge and prepare answer any ... |
import React from "react";
import { Accordion } from "react-bootstrap";
const Blogs = () => {
return (
<div className="container">
<Accordion defaultActiveKey="0">
<Accordion.Item eventKey="0">
<Accordion.Header>
What are the different ways to manage a state in a React
... |
/** @module String */
import { isStr } from './isStr'
/**
* Converts a string to train case, I.E. marginTop => margin-top.
* @function
* @param {String} string to be converted
* @return {String} - string in train case format
*/
export const trainCase = <T extends string = string>(str: string): T =>
((isStr(str... |
import "package:dio/dio.dart";
import 'package:ente_auth/core/configuration.dart';
import "package:ente_auth/core/errors.dart";
import "package:ente_auth/l10n/l10n.dart";
import "package:ente_auth/models/api/user/srp.dart";
import "package:ente_auth/services/user_service.dart";
import "package:ente_auth/theme/ente_them... |
<?php
namespace App\Entity;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\GraphQl\DeleteMutation;
use ApiPlatform\Metadata\GraphQl\Mutation;
use ApiPlatform\Metadata\GraphQl\Query;
use ApiPlatform\Metadata\GraphQl\QueryCollection;
use App\Entity\Traits\BlameableT... |
import {User} from "../../../userModule/user.model";
import {Action, Selector, State, StateContext} from "@ngxs/store";
import {Injectable} from "@angular/core";
import { UsersService } from "src/Services/users.service";
import { AddUser, DeleteUser, UpdateUser, getUser } from "../Action/employee.action";
import { O... |
import random
class Carta:
def __init__(self, valor, naipe):
self.valor = valor
self.naipe = naipe
def __str__(self):
return f"{self.valor} de {self.naipe}"
def calcular_valor(self):
if self.valor == 'A':
return 0
elif self.valor == 'J':
... |
using System;
using Develop05;
class Program
{
/*EXCEEDS REQUIREMENTS
1. I added a new type of goal called Expire goal. In this new goal type, the user needs to specify an expiration date and the goal must be completed before that day. If not, the goal is closed
2. I used the factory pattern to recreate t... |
import 'dart:async';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_sharing_intent/flutter_sharing_intent.dart';
import 'package:flutter_sharing_intent/model/sharing_file.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) ... |
# Взаимодействие с кодом Python
## Подключение Python
Язык программирования Python обладает большими возможностями, имеет богатый функционал и библиотеки, написание которых на языке Си
может занять продолжительное время, особенно это касается сферы машинного обучения. И было бы неплохо просто взять готовую функцион... |
import { useEffect, useState } from "react";
import { Editar } from "./Editar";
export const Listado = ({ listadoState, setListadoState }) => {
// const [listadoState, setListadoState] = useState([]);
const [editar, setEditar] = useState(0);
useEffect(() => {
console.log("componentes de listado de peliculas... |
import { decodeTyson } from './decode'
import { encodeTyson } from './encode'
import {
AnnaClientConstruct,
AnnaDbUri,
Decode,
InsertType,
Query,
Result,
ScalarVectorMap,
} from './types'
import zmq from 'zeromq'
class AnnaClient {
private uri: AnnaDbUri = 'annadb://playground.annadb.dev'
private por... |
# 角度性能:与维修工人一起预加工
> 原文:<https://dev.to/angular/angular-performance-precaching-with-the-service-worker-4lg5>
*本帖最初发布于[https://justir . com/blog/2019/08/ng perf-pre caching-service worker](https://juristr.com/blog/2019/08/ngperf-precaching-serviceworker)。前往[juristr.com/blog](https://juristr.com/blog)了解更多内容*
* * *
这篇文... |
"use client";
import { FooterCatch, GradOutline } from "../components";
import { PageWrapper } from "../components";
import { motion } from "framer-motion";
interface MessageBoxProps {
message: string;
blind: string;
index: number;
}
function MessageBox({ message, blind, index }: MessageBoxProps) {
c... |
import numpy as np
import json
import Fatiga
import Secciones
import Concentracion_Tensiones
import time
# st = time.time()
############################################################################################
#Aclaraciones:
#Shaft = Arbol
#Axle = eje
#En general los ejes se realizan de aceros... |
<?php declare(strict_types=1);
/**
*
* This file is part of the FinalWorkSystem project.
* (c) Vladimir Danilov
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
*/
namespace Application\EventDispatcher;
use App\Application\EventD... |
"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 { AppRouterContextProviderMock } from '@/__mocks__/useRouter';
import '@testing-library/jest-dom';
import { render } from '@testing-library/react';
import PokeCards from '../app/(pokemon-list)/_components/PokeCards';
Object.defineProperty(window, 'matchMedia', {
writable: true,
value: jest.fn().mockImpl... |
//package com.example.demo.api.user;
//
//
//import com.example.demo.CommonOperations;
//import com.example.demo.api.user.request.ChangePasswordRequest;
//import com.example.demo.api.user.request.ForgotPasswordDto;
//import com.ninja_squad.dbsetup.DbSetup;
//import com.ninja_squad.dbsetup.DbSetupTracker;
//import com.n... |
// SPDX-License-Identifier: GPL-2.0-only
/*
* PS3 flash memory os area.
*
* Copyright (C) 2006 Sony Computer Entertainment Inc.
* Copyright 2006 Sony Corp.
*/
#include <linux/kernel.h>
#include <linux/io.h>
#include <linux/workqueue.h>
#include <linux/fs.h>
#include <linux/syscalls.h>
#include <linux/export.h>... |
import { useEffect, useState } from 'react';
let timeInterval = null;
const App = () => {
const [count, setCount] = useState(0);
const [lock, setLock] = useState(false);
const [timeCount, setTimeCount] = useState(5);
useEffect(() => {
if (count == 5) {
setLock(true);
}
return () => {};
}, [count]);
/... |
using System;
using R5T.T0178;
using R5T.T0180;
namespace R5T.T0190
{
/// <summary>
/// Strongly-types a string as a network directory path.
/// <para>
/// Network directory paths point to locations on network drives.
/// </para>
/// Network drives may or may not be available since they are n... |
import * as fs from 'fs';
import * as path from 'path';
// noinspection JSUnusedGlobalSymbols
export class Utils {
/**
* @param {object} config
* @return {{enabled: boolean, protectedTags: string[], selectorHomeBtn: string, selectorPacmanBtn: string}}
*/
static validateConfig(config) {
config = typeof ... |
/* Copyright 2012 Perttu Luukko
* This file is part of itp2d.
* itp2d 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.
* itp2d ... |
As the use of AI-based systems becomes more widespread in smart water management, it is important to consider the ethical implications of this technology. In this chapter, we will explore the ethical issues associated with the use of AI in smart water management, as well as best practices for ensuring ethical and respo... |
<?php
require_once('../../config.php');
use block_design_ideas\ai_call;
// CHECK And PREPARE DATA
global $CFG, $DB, $COURSE, $USER, $OUTPUT;
require_once($CFG->libdir . '/questionlib.php');
require_once($CFG->dirroot . '/question/format.php');
require_once($CFG->dirroot . '/question/format/gift/format.php');
$userid... |
"use client";
import {
fetchUserTokensById,
generateChatResponse,
subtractTokens,
} from "@/utils/action";
import { useAuth } from "@clerk/nextjs";
import { useMutation } from "@tanstack/react-query";
import React, { useState } from "react";
import toast from "react-hot-toast";
import { fadeIn } from "@/variants... |
// login.component.ts
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { AuthService } from '../../services/auth.service';
import { Router } from '@angular/router';
@Component({
selector: 'app-login',
templateUrl: './login.component.htm... |
// App.js
import React, { useEffect, useState } from 'react';
import './reg.css'
import { Stepper, Step } from 'react-form-stepper';
import Step1 from './Step1';
import Step2 from './Step2';
import Step3 from './Step3';
import Step4 from './Step4';
import Step5 from './Step5';
import { Form, Button, Container, Row, Col... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Change the below title and description according to your brand or website name. -->
<title>Startup - Blog</title>
<meta name="description" content="Add descriptio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.