text
stringlengths
184
4.48M
/* * Copyright (c) 2014-2019, Draque Thompson, draquemail@gmail.com * All rights reserved. * * Licensed under: Creative Commons Attribution-NonCommercial 4.0 International Public License * See LICENSE.TXT included with this code to read the full license agreement. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HO...
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppComponent } from './app.component'; import { TableComponent } from './core/components/table/table.component'; import { HeaderComponent } from './core/components/header/header.component'; import { FontAwesom...
import React from "react"; import { useContext } from "react"; import { Avatar, Card, CardHeader, CardContent, IconButton, Typography, } from "@mui/material"; import DeleteIcon from "@mui/icons-material/Delete"; import CustomerContext from "../Context/CustomerContext"; import CustomerModal from "./CustomerM...
<!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> <div id="app"></div> <script src="./dist/runtime-dom.glob...
interface ButtonProps { children: React.ReactNode onClick?: () => void disabled?: boolean className?: string } function Button ({ children, onClick, disabled = false, className }: Readonly<ButtonProps>) { return ( <button className={`${ disabled ? 'bg-black/20 text-black/50 cursor...
import express from "express"; import cors from "cors"; import dotenv from "dotenv"; import { connectDB } from "./config/db.js"; import { userRouter } from "./routes/userRouter.js"; import { errorHandler } from "./middlewares/errorMiddleware.js"; import { moviesRoute } from "./routes/movieRouter.js"; import { categorie...
#include <algorithm> #include <array> #include <cassert> #include <cctype> #include <charconv> #include <iostream> #include <numeric> #include <ranges> #include <string> #include <string_view> #include <vector> std::vector<std::string> readAllLines() { std::vector<std::string> lines; std::string line; while(std::...
import { task } from "hardhat/config"; import { types } from "hardhat/config"; import { getContractAt } from "@nomiclabs/hardhat-ethers/internal/helpers"; import { Contract } from "ethers"; import { TransactionResponse, TransactionReceipt } from "@ethersproject/abstract-provider"; task("transfer-ycktoken", "Transfer Y...
/*!***************************************************************************** \file SpriteManager.h \author Kew Yu Jun \par DP email: k.yujun\@digipen.edu \par Group: Memory Leak Studios \date 20-09-2022 \brief This file contains function declarations for the class SpriteManager, which operates on Entities with Spri...
from datetime import datetime, timedelta, timezone from functools import wraps from threading import RLock from typing import List, Callable from scheduler import scheduler from apscheduler.jobstores.base import JobLookupError max_waiting_time = 15 class QueueEntry: def __init__(self, player_id: str): s...
classdef Event < handle % An event has an id, an Interval in which it can be scheduled, a duration, % a real value between 0 and 1 representing its importance, and a time at % which it's scheduled. properties(Access = private) id % Unique id end %private properties properties...
package com.dangerousthings.nfc.interfaces; import androidx.room.Dao; import androidx.room.Delete; import androidx.room.Insert; import androidx.room.Query; import androidx.room.Update; import com.dangerousthings.nfc.models.Implant; import java.util.List; @Dao public interface IImplantDAO { @Query("SELECT * FROM...
import { Utils } from "../utils/utils"; import { OrderService } from "../services/orderService"; import mongoose from "mongoose"; import { OrderStatus } from "../models/order"; const utils = new Utils(); const orderService = new OrderService(); export class OrderController { getAllOrders = async (req, res) => { ...
import { getOrder, submitOrder, finishOrder, cancelOrder } from "@/api/order.js" export default { namespaced: true, state: { newOrder: [], //新订单 oldOrder: [], //历史订单 isNoOrder: false, //是否没有新处理订单 isLoding: false, //是否加载中 }, mutations: { //存储新订单 setNewOrder(state, data) { //检测上一个订单是否处理 let t...
import numpy as np import matplotlib.pyplot as plt from sympy.matrices import Matrix from scipy.integrate import odeint from sympy.core.symbol import symbols from sympy.solvers.solveset import nonlinsolve #Exercice 1 #Q1) M_q1 = np.array([[-2, 2, -1, 1], [1, -1, -1, 1], [0, 0, 1, -1]]...
const apiUrl = "https://waterflowfu.azurewebsites.net/api/Waterflow/"; const app = Vue.createApp({ data() { return { // Get data waterFlowList: [], // Get by ID inputWaterFlowId: "", waterFlow: null, // Add data added...
package edu.hw5; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import static org.assertj.core.api.Assertions.assertThat; public class Task6Test { private static...
#include "leetcode.hpp" /* 2075. 解码斜向换位密码 字符串 originalText 使用 斜向换位密码 ,经由 行数固定 为 rows 的矩阵辅助,加密得到一个字符串 encodedText 。 originalText 先按从左上到右下的方式放置到矩阵中。 https://assets.leetcode.com/uploads/2021/11/07/exa11.png 先填充蓝色单元格,接着是红色单元格,然后是黄色单元格,以此类推,直到到达 originalText 末尾。 箭头指示顺序即为单元格填充顺序。所有空单元格用 ' ' 进行填充。 矩阵的列数需满足:用 originalText...
const GameLobbyStore = require('./GameLobbyStore'); const LiveChat = require('./LiveChat'); class GameLobby { constructor(roomName, gameType, maxPlayers, gameManager, gameLobbyStore, io) { this.roomName = roomName; this.gameType = gameType; this.maxPlayers = maxPlayers; this.gameMan...
.TH _PRINTF 2 "6th July 2022" " ALX engineering Printf" .SH NAME B _printf - function to produce output according to a format entered. .SH SYNOPSIS .BR #include .BR <main.h> .BR int _printf(const char *format, ...); .SH DESCRIPTION Print the FORMAT in string, after interpreting the directives with '%' .IReturn: Print ...
package application.ui.IDEMenu import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.layout.* import androidx.compose.foundation.onClick import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.* import androidx.compose.runtime.Composable im...
--- title: Collecte de données de cycle de vie avec le SDK Platform Mobile description: Découvrez comment collecter des données de cycle de vie dans une application mobile. jira: KT-14630 exl-id: 75b2dbaa-2f84-4b95-83f6-2f38a4f1d438 source-git-commit: 25f0df2ea09bb7383f45a698e75bd31be7541754 workflow-type: tm+mt source...
class MinStack: def __init__(self): self.minStack = [] def push(self, val: int) -> None: if not self.minStack: self.minStack.append((val, val)) else: self.minStack.append((val, min(val, self.minStack[-1][1]))) def pop(self) -> None: return self.minS...
package com.example.arjunmore.mca; import android.content.Context; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View;...
<!-- Esruturando class --> <!-- Sintaxe para criar uma class --> <!-- Class, seguido do nome da classe e um par de chaves ("{}"): --> <?php class MinhaClass1 { // Propriedades e metodos da Classe vem aqui } ?> <!-- Instanciada e guarda variavel usando a palavra chave new --> $obj = new MinhaClass; <!-- Visua...
Feature: Traffic Create new tab Narrative: In order to As a AgencyAdmin I want to check filtering in Traffic Lifecycle: Before: Given I created following catalogue structure items chains in 'common' section of 'common' schema for agency 'DefaultAgency': | Advertiser | Brand | Sub Brand | Product | | TC...
<div class="fondo"> <div class="auth-container"> <div class="auth-tabs"> <button class="auth-tab" [class.active]="activeTab === 'login'" (click)="switchTab('login')" > Iniciar sesión </button> <button class="auth-tab" [class.active]="activeTa...
import { expect, describe, it } from '@jest/globals'; import { createSourceFile, factory, ScriptTarget, } from 'typescript'; import { PrinterInline } from './PrinterInline'; describe('Printer/PrinterInline', () => { const createSourceFileMock = jest.spyOn(PrinterInline, 'createSourceFile').mockReturnV...
# Estos siguientes ejemplos se encuentran en el CAPÍTULO 3 # Conoceremos la utilidad de algunas funciones avanzadas disponibles en PySpark # Nos enfocaremos en las funciones de ventana y otro topicos que son utiles # en la creación y aplicación de programas de SPARK de grandes sets de datos. # Se introducen los temas d...
using System; using System.Collections.Generic; using System.Linq; using System.Security.Claims; using FluentValidation.Results; using Global.Configs.Authentication; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.ModelBinding; using Global.Models; using Global.Models.Auth; using Global.Models.EndPointR...
# 問題2.2(教科書の問題 2.1-4 p.25) # サイズnの配列A[1:n]にデータが格納されている。値aに等しいデータA[i]があれば # そのインデックスいを出力し、なければ0を出力する。順次探索法のプログラムを作れ。 def order_find(arr: list, a) -> int: """ arr: 配列A[1:n] a: 値a len(arr): サイズn """ if len(arr) == 0: return -1 for i in range(len(arr)): if a == arr[i]: ...
/** * @Author: liuxin * @Date: 2022-07-31 12:03:25 * @Last Modified by: liuxin * @Last Modified time: 2022-08-13 16:15:20 */ #include <stdint.h> #include <fstream> #include <mutex> #include "node.h" #ifndef __SKIPLIST_H__ #define __SKIPLIST_H__ #define DUMPFIEL "store/dumpFile" std::mutex mtx; template<typen...
package com.company.youse.services.query.yousepay; import com.company.youse.platform.decorator.query.QueryBaseService; import com.company.youse.platform.result.QueryResult; import com.company.youse.pojo.B2CRequestResult; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import java.mat...
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@include file="/WEB-INF/views/layouts/user/taglib.jsp" %> <head> <title>Sản Phẩm</title> <style> .pagination { display: flex; justify-content: center; } .pagination a { color: black; float: left; padding: 8px 16px; text-dec...
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateHallsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('halls', function ...
package com.example.moviebooking.controller; import java.util.List; import ch.qos.logback.core.CoreConstants; import com.example.moviebooking.util.BMSConstants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.a...
import { Button, Grid, IconButton, SwipeableDrawer } from '@mui/material' import { Box } from '@mui/system' import { useState } from 'react' import { useLocation, useNavigate } from 'react-router' import logo from '../../assets/logo.svg' import menuIcon from '../../assets/menu.svg' import useStyles from './useStyles' ...
<!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>Power of Two</title> </head> <body> <script language="javascript"> /* Power of Two ...
#include <Arduino.h> #include <StateManager.h> StateManager::StateManager() : state_(nullptr), currentStateIndex(0), blinking_period(0), motor(2, 1000), led(5) { // MotorController ; led.init(); motor.init(21); // motor.set(0.0); this->transitionToState(new InitializationState); this->loopAction(); ...
// Last modified: 25/12/2023 16:50 by Draggie306 // Converts Kaspersky Password Manager export to Chromium Password Manager CSV export // Permission is granted to anyone to use this software for any purpose, including commercial applications, providing that the following conditions are met: // 1. Give appropriate cred...
import React, { useState, useEffect } from "react"; import Header from "../components/Header"; import Footer from "../components/Footer"; import firebase from "../../firebase"; import { Link } from "react-router-dom"; import swal from "sweetalert"; function IniciarSesion({ usuarioAutenticado, guardarUsuarioAutenticado ...
<!DOCTYPE html> <html lang="es"> <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"> <meta name="description" content="Tienda Informatica: Las mejores propuestas para hacer realidad tu PC GAMER."> ...
package com.bravedeveloper.sandbase.presentation.base.views import android.content.Context import android.content.res.TypedArray import android.os.Parcelable import android.text.InputType import android.text.method.DigitsKeyListener import android.util.AttributeSet import android.util.SparseArray import android.view.L...
const express = require('express'); const router = express.Router(); const { User } = require("../models/User") const { auth } = require("../middleware/auth"); router.post('/signup', (req, res) => { const user = new User(req.body); user.save((err, userInfo) => { if (err) return res.json({ success: fals...
import { styled } from 'styled-components'; import { CardInnerProps } from './Card'; const Card = styled.article` position: relative; display: flex; flex-basis: 100%; overflow: hidden; ${({ theme }) => ({ borderRadius: theme.global.borderRadius, })}; `; const Inner = styled.div.withConfig({ shouldFo...
#include "lists.h" #include <stdlib.h> /** *insert_nodeint_at_index - inserts node at a given position *@head: input link list *@idx: index of list where the new node added *@n: integer value to be added *Return: address of the new code */ listint_t *insert_nodeint_at_index(listint_t **head, unsigned int idx, int...
/* A string identifier for a probabilistic annotation object. */ typedef string probanno_id; /* A string identifier for a genome. */ typedef string genome_id; /* A string identifier for a workspace. Any string consisting of alphanumeric characters and "-" is acceptable. */ typedef string workspace_id; /* A string id...
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *next, *prev; Node(int val) : data(val), next(NULL), prev(NULL) { } }; // } Driver Code Ends //User function Template for C++ /* Doubly linked list node class clas...
import unittest import numpy as np from Financial_Growth_Trends import financialGrowthTrends class TestFinancialGrowthTrends(unittest.TestCase): # Test 1: Empty input def test_empty_input(self): with self.assertRaises(ValueError) as context: financialGrowthTrends([]) self.asser...
using System; using System.Collections.Generic; using System.Configuration; using System.Data.Entity.Core.Objects; using System.Linq; using System.Net.Http; using System.Text; using System.Text.RegularExpressions; using System.Web.Http; using System.Web.Http.Results; using Jose; using NCMSystem.Filter; using NCMSystem...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>IMDB Clone - Watchlist</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <link rel="stylesheet" h...
import { Component, OnInit } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { MessageService } from 'primeng-lts'; import { EMPTY, of } from 'rxjs'; import { catchError, switchMap } from 'rxjs/operators'; import { A4gMessages, A4gSeverityMessage } from 'src/app/a4g-common/a4g-messa...
import React, { FormEvent, useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { useAuth } from '../../hooks/useAuth'; import api from '../../services/api'; import Logo from '../../assets/LOGO (1).png'; import { Container } from './styles'; function RegisterUser() { const [name, setName]...
using System.Collections; using System.Collections.Generic; using UnityEngine; using Define; using DataContents; public class PlayerStat : BaseStat { protected float _mp; protected float _maxmp; protected float _exp; protected int _gold; protected float _plushp; protected float _plusmp; pro...
package com.rental.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.sp...
import React, { useContext, useEffect, useRef, useState } from 'react' import NoteContext from '../Context/Note/NoteContext' import { toast } from 'react-toastify'; import Home from './Home'; import Spinner from './Spinner'; const Notes = () => { const ref = useRef(null) const closeRef = useRef(null) const...
using System; using System.Collections.Generic; using System.Linq; using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; namespace Fundamentals { public class GameInfoParser { public GameInfoParser() { } /// <summary> /// Returns the to...
import prisma from "../src/prisma" import CryptoJS from "crypto-js" import { LoginDto, UserHandler } from "../src/handler/user.handler" import { AppContext } from "../src/type/common" const passwd = CryptoJS.MD5("passwd").toString() beforeAll(async () => { await prisma.user.deleteMany() await prisma.user.cre...
import Image from "next/image"; import Link from "next/link"; import { auth } from "@/app/auth"; import { redirect } from "next/navigation"; import Counter from "./components/counter"; export default async function Home() { const session = await auth(); // show login button if not logged in (Should be returning a...
import 'package:chart_sparkline/chart_sparkline.dart'; import 'package:coin/model/coin_model.dart'; import 'package:coin/provider/getchart_provider.dart'; import 'package:flutter/material.dart'; import 'package:flutter_staggered_animations/flutter_staggered_animations.dart'; import 'package:http/http.dart' as http; imp...
class MainController < ApplicationController # Initialize an empty array to store chat messages as a class variable. cattr_accessor :chat_history self.chat_history = [] def index # Read chat history from the file and store it in memory. @chat_history = read_chat_history end def save content = ...
import React, {useState} from 'react'; import { LightModeOutlined, DarkModeOutlined, Menu as MenuIcon, Search, SettingsOutlined, ArrowDropDownOutlined } from '@mui/icons-material'; import FlexBetween from 'components/FlexBetween'; import { useDispatch } from "react-redux"; import { setMode } from "state"; import profil...
import { Component, Output, EventEmitter } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { Question } from 'src/app/types'; @Component({ selector: 'app-question-create', templateUrl: './question-create.component.html', styleUrls: ['./question-create.component.s...
import json from boto3 import Session from langchain.memory import DynamoDBChatMessageHistory from langchain.memory import ConversationBufferMemory from langchain.chains import ConversationChain from langchain.prompts import PromptTemplate from langchain.llms.base import LLM from callback import StreamingAPIGatewayWebS...
import 'package:edtech_app/authentication/auth_services.dart'; import 'package:edtech_app/authentication/signin_page_screen.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; class SignupPageScreen extends StatefulWidget { const Si...
const canvas = document.getElementById('gameCanvas'); const ctx = canvas.getContext('2d'); const scoresPerBinColor = { green: { paper: -5, glass: 10, organic: -5, nonRecyclableWaste: -5, plastic: -5 }, blue: { paper: 10, glass: -5, organic: -5...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Portfolio</title> <link rel="stylesheet" href="style.css" /> <link rel="stylesheet" href="media.css" /> <script src="https://kit.fontawesome.com/b0301dbb6a.js" cr...
import { Test, TestingModule } from '@nestjs/testing'; import { HttpException, HttpStatus } from '@nestjs/common'; import { CommitsController } from './commits.controller'; import { CommitsService } from '../service/commits.service'; describe('CommitsController', () => { let controller: CommitsController; let serv...
#DESCRIPTION # question fran&ccedil;aise produite dans le cadre du projet de math&eacute;matiques # section Entiers - Calcul mental - Puissance # type de question - Appliquer une puissance (complexe) ##ENDDESCRIPTION ## DBsubject('Arithm&eacute;tique') ## DBchapter('Entier') ## DBsection('Puissance') ## A...
import 'dart:async'; import 'dart:convert'; import 'package:flutter/material.dart'; import 'main.dart'; import 'tabla.dart'; import 'package:ti_app/second.dart'; import 'package:ti_app/recuperacion.dart'; import 'package:http/http.dart' as http; Future<Usuario> getUsuario(String usuario, String contrasena) async { f...
#!/usr/bin/python3 """ Tests for the BaseModel class These unit tests provide a foundation for verifying the functionality of your BaseModel class. """ from models.base_model import BaseModel import unittest from datetime import datetime import time from time import sleep class TestBaseModel(unittest.TestCas...
import { Kind } from 'nostr-tools' import React, { useContext, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import { ActivityIndicator, StyleSheet, View } from 'react-native' import { Button, Card, Text, useTheme } from 'react-native-paper' import MaterialCommunityIcons from 'react-...
<%@ page language="java"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%> <%@ taglib uri="http://struts.application-servers.com/layout" p...
import * as pulumi from "@pulumi/pulumi"; import * as utilities from "@kengachu-pulumi/azure-native-core/utilities"; import * as types from "./types"; /** * Get a Maps Account. */ export function getAccount(args: GetAccountArgs, opts?: pulumi.InvokeOptions): Promise<GetAccountResult> { opts = pulumi.mergeOptions...
import '../styles/globals.css'; import type { AppProps } from 'next/app'; import Navbar from '../components/Navbar'; import Footer from '../components/Footer'; import Head from 'next/head'; function MyApp({ Component, pageProps }: AppProps) { return ( <div className="antialiased"> <Head> <title>Flo...
import { space } from "@/types/type"; import Link from "next/link"; import React from "react"; import { BsArrowRight } from "react-icons/bs"; import { formatDate, formatTime } from "./utilities/utility"; type Props = { space: space; }; const SpaceCard = ({ space }: Props) => { return ( <div className="rounded...
import React from "react"; import ReactApexChart from "react-apexcharts"; import styled from "styled-components"; const ColumnCharts = () => { const options = { //! 차트 바 색상 // list 형태 colors: ["#007cf7", "#8d928a"], //! 차트 기본 설정 chart: { // offsetY: 100, // offsetX: 100, height: "1...
<!-- Curso de HTML --> <!-- Markup: TAGS -Abertura de tags -Fechamento de tags -Conteúdo -Elementos --> <h1>Título</h1> Preencha aqui: <!-- Elementos Vazios Não têm conteúdos, somente atributos (não tem fechamento) --> <img scr="" alt=""> <input type="text"> <!-- Atributo...
/** * I18n.js * App for SecureSwap ICO website. * * Includes all of the following: Tools.js * * @version: 1.0.0 * @author: Philippe Aubessard, philippe@aubessard.net * @url http://secure-swap.com * @license: Copyright (c) 2018, GreyMattersTechs. All rights reserved. * @namespace: ssw */ 'use stric...
import UIKit protocol MenuViewControllerDelegate: AnyObject { func didSelect(menuItem: MenuViewController.MenuOptions) } class MenuViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { weak var delegate: MenuViewControllerDelegate? enum MenuOptions: String, CaseIterable ...
一、导出数据库 Linux用mysqldump命令(导出目录为使用该命令的目录): mysqldump -u用户名 -p密码 数据库名 > 数据库名.sql Windows环境: 使用navicat for mysql软件 二、导入数据库 1、首先建空数据库 mysql>create database 数据库名; 2.1、本地导入数据库1 (1)选择数据库 mysql>use 数据库名; (2)设置数据库编码 mysql>set names utf8; (3)导入数据(注意sql文件的路径) mysql>source sql文件路径; 2.2、Linux本地导入数据库 mysqldump -u用户名 -p密码 数据库...
--- title: 枚举 category: 编程语言 tag: [Rust] article: false --- `enum`关键字允许创建一个从多个不同取值中选其一的枚举类型 ```rust enum Role { Foo, Bar, Qux, } ``` 可以指定类型,甚至另一个枚举类型 ```rust enum Role { Foo(i32), Bar(f32), Qux(String), Baz{x:i32, y:i32}, } ``` 也可以像结构体那样使用`impl`定义方法 ```rust enum Role { Foo(i32), Bar(f32), Qux(...
from flask import Flask, render_template, url_for, request, redirect, flash, session from datetime import datetime from flask_sqlalchemy import SQLAlchemy from sqlalchemy import func app = Flask(__name__) app.secret_key = 'cochabamba' app.config['SQLALCHEMY_DATABASE_URI'] = \ '{SGBD}://{usuario}:{clave}@{servidor...
<?php /** * {{organization}} */ namespace {{ namespace }}; use Illuminate\Support\Carbon; /** * \{{ namespace }}\PaginationDatesTrait */ trait PaginationDatesTrait { protected array $paginationDates = [ 'created_at' => ['label' => 'Created'], 'updated_at' => ['label' => 'Updated'], //...
// SPDX-License-Identifier: Apache-2.0 // Derived from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.3.2/contracts/mocks/ERC20Mock.sol // // The MIT License (MIT) // // Copyright (c) 2016-2022 zOS Global Limited and contributors // // Permission is hereby granted, free of charge, to any person obtainin...
import 'package:ar_furniture_app/core/widgets/spacer.dart'; import 'package:ar_furniture_app/features/cart/model/cart.dart'; import 'package:ar_furniture_app/features/cart/widgets/add_subtract_cart_item.dart'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; impor...
import "@testing-library/jest-dom"; import { fireEvent, screen } from "@testing-library/react"; import customRender from "@/test-utils"; import CustomSelect from "./customSelect"; // TODO re-try to use userEvent.click later - now it doesn't work on React 18 (works fine on < 18); // switched to fireEvent test("Custom s...
import React, { useState } from "react"; import MessageHeader from "./MessageHeader"; import { Stack } from "@mui/material"; import MessageCard from "./MessageCard"; import Button from "@mui/material/Button"; import { LiaFacebookMessenger } from "react-icons/lia"; import MessageModal from "./MessageModal"; import Messa...
<div class="col-md-8 col-md-offset-2"> <h2>Registered Users</h2> <div ng-controller="RegisteredUsersController as RegisteredUsersCtrl"> <form name="form" role="form"> <div class="form-group" ng-class="{ 'has-error': form.name.$dirty && form.name.$error.required }"> <label for="name">User Na...
import { StyleSheet, Text, View } from 'react-native' import React, { useState } from 'react' import {Picker} from '@react-native-picker/picker'; import { responsiveHeight } from '../../../utils'; const Pilihan = ({label, datas, width, height, fontSize, selectedValue, onValueChange}) => { return ( <View style...
package interview32I; import bean.TreeNode; import java.util.*; /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ class Solution { public int[] levelOrder(TreeNode root) { if (root == nu...
<template> <div> <div class="navBar"> <div> <logo-img /> </div> <div> <nav> <ul class="navigationMenu"> <li><router-link to="/">INICIO</router-link> </li> <li><router-link to="/profiles">P...
import { Component, Input, OnInit, ViewChild } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { SignaturePad } from 'angular2-signaturepad'; import { ToastrService } from 'ngx-toastr'; import { Subscription, throwError } from 'rxjs'; import { catchError, first } from 'rxjs/ope...
import { useMemo } from 'react' import { css } from 'glamor' import { fontStyles, mediaQueries, Center, Button, useColorContext, } from '@project-r/styleguide' import { HEADER_HEIGHT, HEADER_HEIGHT_MOBILE } from '../../constants' import { useTranslation } from '../../../lib/withT' import { useInNativeApp } f...
import { render, screen } from "@testing-library/react"; import EditFeedback from "../EditFeedback"; import { GlobalContext } from "../../../../App/App"; import { MemoryRouter, Route, Routes } from "react-router-dom"; import userEvent from "@testing-library/user-event"; import { act } from "react-dom/test-utils"; cons...
#!/usr/bin/python3 """Creating a student module""" class Student: """A student class""" def __init__(self, first_name, last_name, age): """Initializing an instance""" self.first_name = first_name self.last_name = last_name self.age = age def to_json(self, attrs=None): ...
library(tidyverse) require(maps) library(colorBlindness) wiid <- read_csv("wiid.csv") glimpse(wiid) wiid_select <- wiid %>% select(country, c3, c2, year, gini_reported, region_un, region_un_sub, region_wb, eu, oecd, incomegroup, mean_usd, median_usd, gdp_ppp_pc_usd2011, population) glimpse(wiid_select) ...
//Leetcode Problem Link: https://leetcode.com/problems/product-of-array-except-self use std::collections::VecDeque; impl Solution { pub fn product_except_self(nums: Vec<i32>) -> Vec<i32> { let mut prefix = vec![0; nums.len()]; let mut suffix = vec![0; nums.len()]; let mut result = vec![0; n...
<template> <div> <h1>{{msg}}</h1> <h2>学生姓名:{{name}}</h2> <h2>学生性别:{{sex}}</h2> <h2>学生年龄:{{myAge+1}}</h2> <button @click="updateAge">尝试修改收到的年龄</button> </div> </template> <script> export default { name:'StudentList', data() { console.log(this) return { msg:'我是一个尚硅谷的学生', myAge:this.age ...
package com.example.avicultura_silsan.screen import androidx.compose.foundation.background import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.height import androidx.compose.fou...