text stringlengths 184 4.48M |
|---|
package com.nnk.springboot.service;
import com.nnk.springboot.domain.BidList;
import com.nnk.springboot.domain.CurvePoint;
import com.nnk.springboot.repositories.CurvePointRepository;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockit... |
import java.util.*;
class Product {
private String name;
private double price;
private int quantity;
public Product(String name, double price, int quantity) {
this.name = name;
this.price = price;
this.quantity = quantity;
}
public double getTotalPrice() {
retu... |
import React, { useState } from 'react';
import { useNavigate } from "react-router-dom";
import classnames from 'classnames';
interface IProps {
title: string
active: boolean
onClick: () => void
}
export const MenuOption: React.FC<IProps> = ({ title, active, onClick }) => {
const navigate = useNavig... |
/**
* @param {integer} init
* @return { increment: Function, decrement: Function, reset: Function }
*/
var createCounter = function(init) {
let temp = init;
const increment = function() {
temp = temp + 1;
return temp
}
const decrement = function() {
temp = temp - 1;
... |
# Exercism Python Track
## Lessons
### Using object methods and shifting away from procedural programming
Looking up object methods opens new possiblilities for ways of doing things without having to write procedures. My solution to this exercise still appears very procedural compared to other solutions I looked at a... |
require 'test_helper'
class PasswordResetsTest < ActionDispatch::IntegrationTest
# test "the truth" do
# assert true
# end
def setup
ActionMailer::Base.deliveries.clear
@user = users(:michael)
end
test "password resets" do
get new_password_reset_url
assert_template "password_resets/new... |
/* eslint-disable react/jsx-one-expression-per-line */
/* eslint-disable react/prop-types */
/* eslint-disable quotes */
import axios from "axios";
import React, { useEffect, useState } from "react";
const Mastery = ({
setStudyState,
setSession,
setNumCards,
setDeckLength,
clickedDeck,
}) => {
// create ne... |
class ListaTareas{
constructor(){
this._lista_tareas = []
if (localStorage.getItem('lista_tareas')) {
this._lista_tareas = JSON.parse(localStorage.getItem('lista_tareas'));
}else{
localStorage.setItem('lista_tareas', '')
}
this.crearEventos();
... |
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
import argparse
import json
from tqdm import tqdm
import argparse
import os
import torch
from stllm.common.config import Config
from stllm.common.registry import registry
from stllm.conversation.conversation import Chat, CONV_VIDEO_LLama2... |
@extends('layouts.app')
@section('css')
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.2.0/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.datatables.net/1.13.4/css/dataTables.bootstrap5.min.css" rel="stylesheet">
@endsection
@section('content')
<div class="container mw-100">
... |
/*
* copyright (c) 2010-2023 belledonne communications sarl.
*
* This file is part of Liblinphone
* (see https://gitlab.linphone.org/BC/public/liblinphone).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by th... |
package com.busik.busik.Passanger.ApiResponse;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.Date;
public class Passenger implements Comparable<Passenger>{
@SerializedName("id")
@Expose
private Integer id;
@SerializedName("fio")
@E... |
import React, { useState, useEffect } from "react";
import { auth, db } from "../../firebase/config";
import { getDoc, doc } from "firebase/firestore";
import { useAppContext } from "../../context/AppProvider";
import { useParams, useNavigate } from "react-router-dom";
import { HiOutlineArrowSmLeft, HiOutlineArrowSmRig... |
package in.arifalimondal.auth.config;
import in.arifalimondal.auth.entity.User;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import java.util.Collection;
import ja... |
(ns fr33m0nk.virtual-threads-demo
(:require
[clojure.core.async.impl.protocols :as protocols]
[clojure.core.async.impl.dispatch :as dispatch]
[clojure.core.async :as a]
[hato.client :as http])
(:import (java.util.concurrent CyclicBarrier
Executors
... |
import { create } from "zustand";
export type ModelType =
| "createChannel"
| "visitChannel"
| "deleteChannel"
| "upgrade"
| "settings"|"trending"|"uploadVideo";
export interface ModelSchema {
label: ModelType | null;
isOpen: boolean;
onOpen: (label: ModelType) => void;
onClose: () => void;
}
const ... |
import { validate } from '../validate'
import { ValidoDecoratorsTestClass } from './decoratros.artifacts'
describe('zod with decorators', () => {
it('should pass validation for valid data', async () => {
const data = {
name: 'John',
age: 25,
tags: ['tag1', 'tag2', 123, 4... |
require('dotenv').config();
const express = require('express');
const mongoose = require('mongoose');
const bodyParser = require('body-parser');
const cors = require('cors');
const UserRouter = require('./routers/user.router');
const PostRouter = require('./routers/post.router');
const CommentRouter = require('./route... |
package main.java.by.bntu.fitr.poisit.matnik.university.model;
import entity.*;
import main.java.by.bntu.fitr.poisit.matnik.university.util.CustomLogger;
import org.apache.logging.log4j.core.Logger;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
public class FileHandler {
private static f... |
---
title: 在使用wavesurfer-js之前
date: 2022-10-30
description: wavesurfer-js音频处理实战优化,和网络加载有关
---

## 什么是[wavesurfer-js](https://wavesurfer-js.org/)?
> **wavesurfer.js** is a customizable audio waveform visualization, built on top of [Web Audio API](https://... |
#' Get FN121_GPS - GPS data from FN_Portal API
#'
#' This function accesses the api endpoint for FN121_GPS_Tracks
#' records. FN121_GPS_Tracks records contain GPS tracks for projects
#' where GPS data is recorded (e.g. trawls, electrofishing, etc.), including
#' the track ID, coordinates in decimal decrees, the timesta... |
import { useDispatch, useSelector } from "react-redux";
import { Checkbox } from "antd";
// import _ from "lodash";
import {
setVisibleModalCreateOrUpdate, deleteDistrict,
setDetailDistrict, setIsTypeModalCreate, setSelectedRows,
setPagination,
setFilteredDataDistrict,
resetDataDistrict
} from '../../states/m... |
/*
* Copyright (c) 2024-present HiveMQ and the HiveMQ Community
*
* 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... |
{% extends "base.html" %}
{% block content %}
<div class="articles-section">
<div class="article-content">
<!-- Сортировка тут -->
<form action="" method="post">
<div class="article-sort">
<div class="row">
<div class="col-xl-3">
... |
<?php
namespace common\models;
use Yii;
use backend\components\traits\HasTimestamp;
/**
* This is the model class for table "faq".
*
* @property int $id
* @property int $faq_category_id
* @property string $question
* @property string $answer
* @property string $created_at
* @property string $updated_at
*/
c... |
<template>
<v-container>
<h1 class="my-5 text-center text-h5 text-sm-h2">
Editando el curso: {{ name }}
</h1>
<div class="mt-10">
<v-form ref="form" v-model="valid" lazy-validation>
<v-text-field
v-model="name"
:counter="20"
:rules="nameRules"
la... |
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Swipe between maps</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v2.2.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/... |
<mat-form-field>
<input matInput (keyup.enter)="getPatientsPage()" placeholder="ID or Last Name" #searchValue>
</mat-form-field>
<div class="mat-elevation-z8">
<div class="loader" *ngIf="isLoadingResults">
<mat-spinner></mat-spinner>
</div>
<table mat-table [dataSource]="dataSource">
<!-... |
import * as styled from 'styled-components';
const GlobalStyle = styled.createGlobalStyle`
:root {
--NavHeight: 70px;
--bg: rgba(50, 181, 233, 1);
--bg-darker: rgba(47, 140, 195, 0.7);
--outline-1: #94bfff;
--outline-2: #94ffb1;
--outline-3: #ffe694;
--outl... |
require "active_support/inflector"
class CodewordsSolver
class Dictionary
include ActiveSupport::Inflector
DEFAULT_FILEPATH = File.join(__dir__, "..", "..", "word_list.txt")
def initialize
load!
end
def find_by_regexp(regexp)
@words.filter { |w| w.length > 2 and w.match? regexp }
... |
<template>
<div class="flex justify-center">
<form id="form" class="my-4 w-6/12" @submit.prevent="createPost">
<div class="mx-auto flex items-center bg-white p-2 rounded-md shadow-md">
<div class="flex flex-col flex-grow m-3">
<input
v-model="title"
class="m-2 w-90 inp... |
// eslint-disable-next-line no-unused-vars
import React, { useState } from "react";
import { addUser } from "../../UserServices/UserServices.jsx";
// eslint-disable-next-line react/prop-types
const UserForm = ({ onAddUser }) => {
const [username, setUserName] = useState("");
const [name, setName] = useState("");
... |
public class App {
public static void main(String[] args) throws Exception {
AttendenceApprover dean = new DeanOfAcademic();
AttendenceApprover hod = new HeadOfDepeartment();
AttendenceApprover prof = new AssistantProfessor();
Student s = new Student();
prof.setNextApprover(... |
<x-app-layout>
<div class="container lg:w-1/2 md:w-4/5 w-11/12 mx-auto mt-8 px-8 bg-indigo-600 shadow-md rounded-md">
<h2 class="text-center text-lg text-white font-bold pt-6 tracking-widest">ホテル情報登録</h2>
<x-validation-errors :errors="$errors" />
<form action="{{ route('hotels.store') }}" ... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _03_cv.Models
{
public class AVL<T> where T : IComparable<T>
{
Node? root;
class Node
{
public T value;
public Node left, right;
... |
package com.github.j5ik2o.cqrs.es.java.domain.groupchat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.f4b6a3.ulid.UlidCreator;
import com.github.j5ik2o.cqrs.es.java.domain.useraccount.UserAccountId;
import com.github.j5ik2o.event.store.adapter.java.Aggregate;
import io.vavr.Tuple2;
import io... |
package tests;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.testng.annotations.Test;
import pages.HomePage;
import pages.LoginPage;
import pages.ProductPage;
import pages.ShoppingCartPage;
import utilities.CommonMethods;
import utilities.ConfigReader;
import utilities.... |
plot3d1
=======
3D gray or color level plot of a surface
Calling Sequence
~~~~~~~~~~~~~~~~
::
plot3d1(x,y,z,[theta,alpha,leg,flag,ebox])
plot3d1(xf,yf,zf,[theta,alpha,leg,flag,ebox])
plot3d1(x,y,z,<opts_args>)
plot3d1(xf,yf,zf,<opts_args>)
Arguments
~~~~~~~~~
:x,y row vectors of sizes n... |
#include <zest/app.hpp>
#include <zest/raylib_wrapper.hpp>
#include <zest/text.hpp>
#include <zest/tree_sitter.hpp>
#include <zest/types.hpp>
#include <zest/highlight/captures.hpp>
#include <zest/highlight/queries.hpp>
#include <fstream>
#include <iostream>
#include <optional>
#include <stdexcept>
#include <string>
#i... |
//
// This file is part of the 2FAS iOS app (https://github.com/twofas/2fas-ios)
// Copyright © 2023 Two Factor Authentication Service, Inc.
// Contributed by Zbigniew Cisiński. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General ... |
<template>
<el-form ref="userRef" :model="form" :rules="rules" label-width="100px" >
<el-form-item label="手机号码:" prop="phonenumber">
<el-input v-model="form.phonenumber" maxlength="11" />
</el-form-item>
<el-form-item label="用户邮箱:" prop="email">
<el-input v-model="form.email" maxlength="50" />... |
from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.platypus import Paragraph, SimpleDocTemplate, Spacer
def generate_resume(name, email, phone, address, education, experience, skills, template):
pdf_path = 'resume.pdf'
doc = SimpleDocTemplate(pdf_path, pa... |
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title>
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Nunito... |
import json
from http import HTTPStatus
from typing import Any, Dict, Optional
import httpx
from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.remove_mount_remove_mount_201_response import (
RemoveMountRemoveMount201Response,
)
from ...models.remove_mount_remove_mount_request ... |
package com.example.leetCodeRepetition.Controller;
import com.example.leetCodeRepetition.Model.Email;
import com.example.leetCodeRepetition.Model.User;
import com.example.leetCodeRepetition.Repo.UserRepository;
import com.example.leetCodeRepetition.utils.JwtUtil;
import jakarta.servlet.http.Cookie;
import jakarta.serv... |
import React, { useEffect, useState } from "react";
import AddCircleIcon from "@mui/icons-material/AddCircle";
import {
Box,
Button,
IconButton,
InputBase,
Modal,
Stack,
TextField,
} from "@mui/material";
import ArchiveIcon from "@mui/icons-material/Archive";
import PaletteIcon from "@mui/icons-material/P... |
<table mat-table [dataSource]="dataSource" matSort (click)="tableSort()" class="mat-elevation-z8 table-view">
<ng-container matColumnDef="image">
<th mat-header-cell *matHeaderCellDef></th>
<td class="image-cell" mat-cell *matCellDef="let element"> <img style="height: 10vh;" src="{{element.imageUrl... |
#include <unistd.h>
#include <fcntl.h>
#include "main.h"
/**
* append_text_to_file - appends text to a file
* @filename: file to receive appended text
* @text_content: text to be appended
*
* Return: 1 on success, -1 on failure
*/
int append_text_to_file(const char *filename, char *text_content)
{
int fd, nWrit... |
package com.example.JavaTestApplication.mockito.injectmocks;
import com.example.JavaTestApplication.mockito.mock.TestService;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Injec... |
import { Stack, Grid, Box, Typography, useTheme, useMediaQuery } from '@mui/material';
import { News } from '@src/apis/home/news';
const SectionNewsCardDesktop = ({ title, description, image }: News) => {
const { palette } = useTheme();
return (
<Stack display={'flex'} direction={'row'} spacing={3} alignItems=... |
import { type ReactNode, useEffect, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
export const Portal = ({ children }: { children: ReactNode }) => {
const portalRef = useRef<HTMLElement | null>(null);
const [mounted, setMounted] = useState(false);
useEffect(() => {
portalRef.curr... |
public abstract class Student
{
private String firstname;
private String major;
private int units;
public Student( String firstname, String major, int units)
{
this.firstname = firstname;
this.major = major;
this.units = units;
} // multi-constructor
... |
from typing import Tuple
class Node:
def __init__(self, data):
self.data = data
self.next = None
def __repr__(self):
return f"Node({self.data})"
def __str__(self):
return f"{self.data}"
class LinkedList:
"""LinkedList"""
def __init__(self):
self.__head_... |
//
// MenuController.swift
// MakeupApp
//
// Created by IOS DEV PRO 1 on 05/10/2021.
// Copyright © 2021 LTD. All rights reserved.
//
import UIKit
protocol DisplayContentControllerDelegate {
func tabDidSelectAction(_ sender: UIView)
}
final class MenuController: UIViewController, UITableViewDelegate, UITabl... |
<?php
namespace App\Http\Traits;
/**
* Motor para convertir cantidades numericas de moneda a letras.
*
* Class NumToLetrasEngine
* @package App\Http\Modulos\Utils
*/
trait NumToLetrasEngine
{
/**
* @function num2letras_en ()
* @abstract Dado un número lo devuelve escrito en letras en inglés
... |
import 'package:cinemapedia/domain/entities/movie.dart';
abstract class MoviesDatasource {
Future<Movie> getMovieById(String id);
Future<List<Movie>> getNowPlaying({int page = 1});
Future<List<Movie>> getPopular({int page = 1});
Future<List<Movie>> getTopRate({int page = 1});
Future<List<Movie>> getUpcoming(... |
const express = require('express');
const fs = require('fs');
const moment = require('moment-timezone');
const cache = require('./cache'); // cache.js 모듈 불러오기
const cors = require('cors');
const { SERVER_URL } = require('./config'); // config.js에서 SERVER_URL을 가져옵니다
const createServer = (port, targetLang) => {
cons... |
<!doctype html>
<html lang="ja">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
... |
//
// AsyncCoverImage.swift
// BookStoreApp
//
// Created by Alex on 09.12.2023.
//
import SwiftUI
struct AsyncCoverImage: View {
let url: URL
let cornerRadius: CGFloat
init(url: URL, cornerRadius: CGFloat = 0) {
self.url = url
self.cornerRadius = cornerRadius
}
var bo... |
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/material.dart';
import 'package:mailer/mailer.dart';
import 'package:mailer/smtp_server.dart';
import 'package:shared_preferences/shared_preferences.dart';
class IdeaDetailsPage extends StatefulWidget {
final String description;
final S... |
const express = require("express");
const router = express.Router();
const { User, validateUser } = require("../models/userModel");
const _ = require("lodash");
const bcrypt = require("bcrypt");
const validObjectId = require("../middleware/validObjectId");
router.get("/", async (req, res) => {
const users = await U... |
import "package:easy_localization/easy_localization.dart";
import "package:euterpe/blocs/blocs.dart";
import "package:euterpe/main.dart";
import "package:euterpe/res/res.dart";
import "package:euterpe/services/store.dart";
import "package:euterpe/utils/utils.dart";
import "package:euterpe/views/home_page.dart";
import ... |
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_storage/firebase_storage.dart';
import 'package:flutter/material.dart';
import 'package:twitterapp/auth/services/tweetRepository.dart';
import 'package:twitterapp/screens/tweetScreen.dart';... |
package com.zelda.hackernewsandroid
import okhttp3.OkHttpClient
import okhttp3.Request
import org.jsoup.Jsoup
import java.io.IOException
object ContentExtractor {
private val client = OkHttpClient()
fun fetchContent(url: String?): String {
val request = Request.Builder()
.url(url.toStrin... |
<?php
/**
* Camps class for managing camp data.
*/
class Camps
{
/**
* @var array An array to store camp data.
*/
public $campData = [];
/**
* @var array An array to store validation errors.
*/
public $errors = [];
/**
* @var string $_GET to filter the posts by the term... |
import { Connection, PublicKey, clusterApiUrl } from "@solana/web3.js";
import { getKeypairFromEnvironment } from "@solana-developers/helpers";
import { getOrCreateAssociatedTokenAccount } from "@solana/spl-token";
require('dotenv').config();
const keypair = getKeypairFromEnvironment("SECRET_KEY");
// npx esrun .\04... |
<?php
namespace App;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Http;
class ZoomOAuthHelper
{
public static function getAccessToken()
{
$clientId = config('services.zoom.client_id');
$clientSecret = config('services.zoom.client_secret');
$accountId = con... |
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rent_cruise/controller/card_screeen/card_screen_controller.dart';
import 'package:rent_cruise/controller/checkout_controller/checkout_controller.dart';
import 'package:rent_cruise/controller/product_details_provider/details... |
import * as bases from 'bases';
import Long from 'long';
import { gameTypes } from '../types/ClashRoyale';
import { IHiLo } from '../types/common/HiLo';
/**
* Helper functions for handling hashtags from the game.
*/
const characterSet = '0289PYLQGRJCUV';
const characterCount = characterSet.length;
/**
* Converts ... |
<template>
<div>
<div v-if="success" class="alert alert-success text-center" role="alert">
{{ message }}
</div>
<div class="description">
<div class="d-flex gap-5">
<h2 class="card-title-info" v-for="object in post.objects" :key="object.id">{{ object.quantity }}x {{ object.name }}</h2>... |
import React, { useEffect, useState } from "react";
import { useSelector, useDispatch } from "react-redux";
import "../../styles/crud.css";
import { saveProduct, listProducts, deleteProduct } from "./crudActions";
import axios from "axios";
function ProductCrud(props) {
const [modalVisible, setModalVisible] = useSta... |
import XRegExp from 'xregexp';
import { JSONData, TypeNames } from '../declarations';
import { StringType } from './StringType';
class UrlType extends StringType {
name(): TypeNames {
return TypeNames.URL;
}
protected validateType(value: JSONData): boolean {
const regex = XRegExp(
`
^
# ht... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Featured Jobs</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46Mg... |
function qpskApp()
message = 'hello world';
myStruct = myStructInit(message);
[messageBits, berMask] = initMessage(message,myStruct.MessageLength,myStruct.NumberOfMessage);
if coder.target('MATLAB')
useScopes = false;
else
useScopes = false;
end
printData = true;
% Copyright 2012-2017 The MathWorks, Inc.
%#code... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script>
'use strict'
const arr0 = [10,50,40,70,60,30];
arr0.sort();
document.write( arr0 ,'<br>');
const arr1 = [100,150,10,50,40,60,30];
arr1.sort();
document.wri... |
###### Visualising WorldClim data for Tasmanian Euc project
#### Load packages and data ####
library(raster)
library(tidyverse)
###### Extracting PPT, PET and MD for Tasmania! #####
#et is evapotranspiration
#ai is aridity index
#the 12 correspond to months
#yr is annual average
#Evapotranspiration
et1 <- raster("Da... |
from rest_framework import serializers
from django.contrib.auth import authenticate
from .models import User
class RegistrationSerializer(serializers.ModelSerializer):
password = serializers.CharField(max_length=128, min_length=8, write_only=True)
class Meta:
model = User
fields = ['username... |
package org.ting.pattern.builder.service;
import org.ting.pattern.builder.inter.Item;
import java.util.ArrayList;
import java.util.List;
/**
* 餐
*
* @author 张韧炼
* @create 2019-07-02 下午2:47
**/
public class Meal {
private List<Item> items = new ArrayList<>(16);
public void addItem(Item item) {
i... |
<template>
<section class="modules-wrap">
<!-- 搜索栏 -->
<div class="search-bar">
<div class="botton-wrap">
<el-button type="primary" plain @click.native="handleBack()" icon="el-icon-back" style="margin-right: 10px">返回</el-button>
搜索引擎
<el-select v-model="params.engine_name" cleara... |
<?php
use App\Models\User;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('no... |
@model Mcd.HospitalManagement.Web.Models.WardModel
<h3>Modify Ward</h3>
@using (Html.BeginForm("Edit", "Ward", FormMethod.Post, new { @id = "form" }))
{
@Html.AntiForgeryToken()
<div class="form-horizontal">
<hr />
@Html.ValidationSummary(true)
@Html.HiddenFor(model => model.I... |
import {useNavigation} from '@react-navigation/native';
import React, {FC} from 'react';
import styled from 'styled-components/native';
import {Icons} from '../resources';
import {Typography} from '../theme';
import {IconButton} from './Button';
interface IBasicProps {
title?: string;
left?: boolean;
onLeftPress... |
const axios = require("axios");
const config = require("./config/configs");
const FormData = require("form-data");
function getHttpHeader(accessToken) {
return {
Authorization: "Bearer " + accessToken,
"Content-type": "application/json",
};
}
function printResourceData(resource) {
const resourceType ... |
//给你一个字符串 s ,仅反转字符串中的所有元音字母,并返回结果字符串。
//
// 元音字母包括 'a'、'e'、'i'、'o'、'u',且可能以大小写两种形式出现。
//
//
//
// 示例 1:
//
//
//输入:s = "hello"
//输出:"holle"
//
//
// 示例 2:
//
//
//输入:s = "leetcode"
//输出:"leotcede"
//
//
//
// 提示:
//
//
// 1 <= s.length <= 3 * 10⁵
// s 由 可打印的 ASCII 字符组成
//
// Related Topics 双指针 字符串 👍 203 👎 0
package ... |
import { user } from '../models/user.model.js';
import bcrypt from 'bcryptjs';
import { createAccessToken } from '../libs/jwt.js';
import { Op } from 'sequelize';
export const getUsers = async (req, res) => {
try {
const users = await user.findAll({
where: {
TypeUser_ID: 1
... |
#' number of KPIs reported for each programme and last year they reported.
#'
#' @param x summary_main target in pipeline
transform_prog_kpi_count <- function(x, include_last_year = T){
if(include_last_year == T) {
y <- x %>%
select(-contains("disagg")) %>%
filter(achieved_total > 0 | is.na(achie... |
<template>
<div class="w-60 h-32 bg-gray-800 rounded-md overflow-hidden border-l-4 border-purple-700">
<div class="bg-gray-700 w-full h-12 text-sm text-white font-bold pl-3 overflow-hidden flex flex-col justify-evenly">
<p class="whitespace-nowrap text-ellipsis overflow-hidden">Simulator - {{ ac... |
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
/**
* @dev Abstract contract for managing a multi-signature wallet.
*/
abstract contract OwnerManager {
mapping(address => bool) public owners;
uint256 public threshold;
uint256 public ownerCount;
bool private isSetup;
event AddOwner(addre... |
#ifndef POULTRYCHEF_H
#define POULTRYCHEF_H
#include "ChefHandler.h"
/**
* @class PoultryChef
* @brief Represents a Poultry Chef responsible for preparing Poultry.
*/
class PoultryChef: public ChefHandler
{
public:
/**
* @brief Construct a new PoultryChef object.
*
* This constructor initializes... |
import { Sequelize } from 'sequelize'
import { TaskModel } from './TaskModel'
import { Request, Response } from 'express'
import { v4 as uuidv4 } from 'uuid'
class TaskController {
async index(req: Request, res: Response) {
try {
const tasks = await TaskModel.findAll()
return res.json({
data... |
#' Typeset multiple choice questions
#'
#' Formats multiple-choice questions for *MOSAIC Calculus*
#'
#' @param prompt Character string prompt
#' @param \dots fixed-choice possibilities
#' @param item_label Character string how to label each individual question
#' @param out_format Either `"Markdown"` or `"PDF"`
#'
#' ... |
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import pages.*;
import utilities.DriverManager;
public class CheckoutOverviewTests extends BaseTest
{
@Test
public void verifyCheckOutWithCorrectValuesAndSelectedProducts()
{
LoginPage loginPage = new LoginPage(DriverManage... |
<script setup lang="ts">
import type { HillDef } from "@/stores/station";
import { defineProps, ref } from "vue";
import { EventsOn } from "../../wailsjs/runtime/runtime";
import { SetSignal } from "../../wailsjs/go/main/App";
type Props = {
hill: HillDef;
};
const { hill } = defineProps<Props>();
const setState = ... |
<!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>array練習</title>
</head>
<body>
<script>
//練習一
//建立自己的array
let myArr=['a','b','... |
push = require 'push'
Class = require 'class'
require 'Player'
require 'Ball'
WINDOW_WIDTH = 1280
WINDOW_HEIGHT = 720
VIRTUAL_WIDTH = 432
VIRTUAL_HEIGHT = 243
PLAYER_SPEED = 8
gameState = 'start'
function love.load()
love.graphics.setDefaultFilter('nearest', 'nearest')
love.window.setTitle('Pong')
math.ran... |
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import { OnScreenDirectionDataInterface } from '../../component-library/OnScreenDirection';
interface OnScreenDirectionState {
current: OnScreenDirectionDataInterface;
visible: boolean;
tapToReceiveDirectionSeen: boolean;
mainButtonDirectionSeen: b... |
# Chapter 5: Implementing backpropagation for a whole expression graph
We previosuly saw how to automate backpropagation by setting and calling a backward method for each in our graph. Our ability to make this work properly depended on our abilty to call the backward() methods in the right order. That is, backward pro... |
import * as Card from "../card/index.js";
import * as AddCard from "../add-card/index.js";
import todoStore from "../../store/todoStore.js";
import { setEvent } from "../../utils/handler.js";
export function template({ column }) {
return `
<h2 class="column__head">
<span class="column__title text-bold di... |
import { beforeEach, describe, expect, it } from 'vitest'
import { InMemoryOrganizationRepository } from '@/repositories/in-memory/in-memory-organization'
import { InMemoryPetRepository } from '@/repositories/in-memory/in-memory-pet'
import { makeOrganization } from '@/tests/makeOrg'
import { makePet } from '@/tests/m... |
import React, { useEffect, useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { authActions } from "../../store/auth-store.store";
import { RootState } from "../../store";
const ChangePasswordPage: React.FC = () => {
const dispatch = useDispatch();
const { changePasswordSuc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.