text
stringlengths
184
4.48M
import marlo import time import sys import numpy as np np.set_printoptions(threshold=sys.maxsize) # Debug log = True # Agent starting and current coordinates start_coords = (40, 40) curr_coords = start_coords # Stores nodes that are unexplored and explored, respectively frontier = [start_coords] explored = [] # Store...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="description" content="COS100011 assignment 2"> <meta name="keywords" content="COS100011, assignment 2, creating web applications"> <meta name="author" content="Hy Gia Nguyen"> <meta name="viewport" content="width=device-width, init...
import 'package:em_chat_uikit/chat_uikit.dart'; import 'package:flutter/material.dart'; class ListItem extends StatelessWidget { const ListItem({ required this.title, this.subtitle, this.imageWidget, this.trailingString, this.trailingStyle, this.trailingWidget, this.enableArrow = false, ...
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. * See the NOTICE file distributed with this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not * ...
"use client"; import { zodResolver } from "@hookform/resolvers/zod"; import { useForm } from "react-hook-form"; import { z } from "zod"; import Image from "next/image"; import { Button } from "@/components/ui/button"; import { Form, FormControl, FormField, FormItem, FormMessage, } from "@/components/ui/form...
--- title: "\"2024 Approved Bring the Beat Home Add Songs to Your InShot App\"" date: 2024-06-27T10:04:16.232Z updated: 2024-06-28T10:04:16.232Z tags: - screen-recording - ai video - ai audio - ai auto categories: - ai - screen description: "\"This Article Describes 2024 Approved: Bring the Beat Home: A...
package com.lani.boj.silver; import java.io.*; import java.util.*; public class S1431 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); String[] arr = new String[n...
@extends('admin.layouts.view_content') @section('content-blog') <link rel="stylesheet" href="{{ asset('admin/css/all.css') }}"> <div class="col-12 mx-auto" id="index_article"> <div class="form-group row"> <label for="staticEmail" class="col-sm-1 col-form-label">Search</label> <di...
import { useState } from 'react'; import styles from './App.module.css'; import poweredImage from './assets/powered.png'; import {levels, calculateBMI, Level} from './helpers/imc'; import { GridItem } from './components/GridItem'; import leftArrow from './assets/leftarrow.png'; function App() { const [heightField, s...
############################## # Data visualization in base R ############################## df = data.frame(months = rep(month.abb, length.out = 100), alphabet = rep(LETTERS, length.out = 100), binary = sample(c(0,1), 100, replace = TRUE), sex = rep(as.factor(c("male", ...
// src/Pages/EditSong.js import { useState, useEffect } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { useParams, useNavigate } from 'react-router-dom'; import { UPDATE_SONG_REQUEST } from '../features/songs/songsActionTypes'; import { styles } from '../Components/Emotions'; const EditS...
import { FaSignInAlt, FaSignOutAlt, FaUser } from "react-icons/fa"; import { useDispatch, useSelector } from "react-redux"; import { Link, useNavigate } from "react-router-dom"; import { logout, reset } from "../features/auth/authSlice"; const Header = () => { const dispatch = useDispatch(); const navigate = useNa...
<!DOCTYPE html> <html lang="en" xmlns:th="http://www.thymeleaf.org"> <head> <th:block th:include="base/base :: base_head"/> <title>EDM附件管理</title> <link rel="stylesheet" href="/css/bootstrap/bootstrap.min.css" th:href="${baseUrl + '/css/bootstrap/bootstrap.min.css'}"> <style type="text/css"> .c...
import { ComponentMeta, ComponentStory } from '@storybook/react'; import React from 'react'; import LoginForm from './LoginForm'; import { StoreDecorator } from '@/shared/config/storybook/StoreDecorator/StoreDecorator'; import { ThemeDecorator } from '@/shared/config/storybook/ThemeDecorator/ThemeDecorator'; import {...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="styles.css"> <title>Recreate Web Page 2</title> </head> <body> <div class="container"> <!-- HEADER --> <div class="header"> <...
import { Component, OnInit } from '@angular/core'; import { Employee } from 'src/app/interfaces/employee.interface'; import { ImputationsService } from 'src/app/services/imputations.service'; import * as moment from 'moment' @Component({ selector: 'app-imputation', templateUrl: './imputation.component.html', sty...
"C:\Program Files\MongoDB\Server\4.4\bin\mongod" --dbpath "C:\data\db" "C:\Program Files\MongoDB\Server\4.4\bin\mongo" "C:\Program Files\MongoDB\Tools\100\bin\mongoimport" --db products --collection zipcodes --type json --file zips.json 1. Write a MongoDB query to display all the documents in the collection restaur...
package ru.gb.web.dto.mapper; import org.mapstruct.Context; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import ru.gb.api.product.dto.ProductDto; import ru.gb.dao.CategoryDao; import ru.gb.dao.ManufacturerDao; import ru.gb.entity.Category; import ru.gb.entity.Manufacturer; import ru.gb.entity.Product; im...
import React, { useState } from 'react' import { Typography, Button, Form, Input} from 'antd' import FileUpload from '../../utils/FileUpload'; import Axios from 'axios'; const { Title } = Typography; const { TextArea } = Input; const Continents = [ {key:1, value:'Africa'}, {key:2, value:'Europe'}, {key:3, value:...
from django.db import models from django.utils.safestring import mark_safe from django.contrib.auth import get_user_model class Category(models.Model): name = models.CharField('Название', max_length=100) description = models.TextField('Описание', null=True, blank=True) def __str__(self): return s...
import express from "express"; import "dotenv/config"; import cors from "cors"; import Controller from "application/controllers/Controller"; class App { public app: express.Application; public port: number; constructor(controllers: Controller[], port: number) { this.app = express(); this.port = port; ...
<?php /** * JUPWA plugin * * @version 1.x * @package JUPWA\Helpers * @author Denys D. Nosov (denys@joomla-ua.org) * @copyright (C) 2023 by Denys D. Nosov (https://joomla-ua.org) * @license GNU General Public License version 2 or later; see LICENSE.md * **/ namespace JUPWA\Helpers; us...
/* eslint-disable no-restricted-globals */ /* eslint-disable implicit-arrow-linebreak */ import 'regenerator-runtime/runtime' import { setCacheNameDetails } from 'workbox-core' import { cleanupOutdatedCaches, precacheAndRoute } from 'workbox-precaching' import { registerRoute } from 'workbox-routing' import { StaleWh...
// // MyBookListView.swift // MyBooks // // Created by Suh on 14/09/22. import SwiftUI struct MyBookListView: View { @StateObject var viewModel: MyBookListViewModel @State private var isShowingLibrary = false var body: some View { VStack { NavigationView { VStack(al...
import React, { useEffect, useState } from "react"; import "./EditPet.css" const EditPet = ({ pet, updatePet }) => { const [editedPet, setEditedPet] = useState({ ...pet }); const handleInputChange = (event) => { const { name, value } = event.target; setEditedPet((petlist) => ({ ...petlist, [na...
/* * This file is part of the Haven & Hearth game client. * Copyright (C) 2009 Fredrik Tolf <fredrik@dolda2000.com>, and * Björn Johannessen <johannessen.bjorn@gmail.com> * * Redistribution and/or modification of this file is subject to the * terms of the GNU Lesser General Public License,...
// Type your code here, or load an example. #include <stdio.h> #ifndef __TEST_UTILS_H # define __TEST_UTILS_H # define RED "\x1b[31m" # define GREEN "\x1b[32m" typedef bool (*test_func_t)(void); typedef struct func_ptr_s { test_func_t cb; /* function callback */ } func_ptr_t; # define ADD_FUNC(group...
import ApiService from '../utils/apiService'; import i18n from '../locales/i18n'; // 假设你的i18n实例在这个路径下 import JSEncrypt from 'jsencrypt'; class AuthService { constructor() { this.apiService = new ApiService(); } validateCredentials(credentials) { if (!credentials.username || !credentials.password) { ...
import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; import 'package:provider/provider.dart'; import 'package:qna_list/data/qna_data_provider.dart'; import 'package:qna_list/presentation/qna_screen/qna_first_screen.dart'; class MyApp extends StatelessWidget { @override Widget build(BuildContext...
import React, {useState} from 'react'; import styles from './listTickets.module.css'; import {useNavigate} from "react-router-dom"; import Table from '@mui/material/Table'; import TableBody from '@mui/material/TableBody'; import TableCell from '@mui/material/TableCell'; import TableContainer from '@mui/material/TableCo...
/*global describe, it, expect, beforeEach */ describe('Function', function () { 'use strict'; describe('apply', function () { it('works with arraylike objects', function () { var arrayLike = { length: 4, 0: 1, 2: 4, 3: true }; var expectedArray = [1, undefined, 4, true]; ...
// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "data_types.h" #include "disable_dlib_warnings.h" POSEBASEDSOLVER_DISABLE_DLIB_WARNINGS #include <dlib/matrix.h> POSEBASEDSOLVER_RENABLE_WARNINGS namespace cm { using namespace dlib; template <template<typename...> class R = std::vector...
import { Injectable, Inject } from '@angular/core'; import { AppConfiguration } from '../../configuration'; import { HttpHeaders } from '@angular/common/http'; import { SESSION_STORAGE, StorageService } from 'ngx-webstorage-service'; import { HttpClient } from '@angular/common/http'; import { catchError } from 'rxjs/op...
// // GetBanAsync.cs // // Author: // Jarl Gullberg <jarl.gullberg@gmail.com> // // Copyright (c) Jarl Gullberg // // 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 // the Free Software Foundation, either ve...
package com.maoxian.utils; import io.jsonwebtoken.Claims; import io.jsonwebtoken.JwtBuilder; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; import java.util.Base64; import java.util.Date; import java.util.UUID; /** * JWT...
package com.example.appxemphim.fragments import android.annotation.SuppressLint import android.app.AlertDialog import android.app.Dialog import android.content.Intent import android.content.pm.ActivityInfo import android.content.res.Configuration import android.graphics.Color import android.graphics.drawable.ColorDraw...
import mergeCallbacksAndSerializable from './mergeCallbacksAndSerializable'; describe('mergeCallbacksAndSerializable', () => { test('should create functions from given callback IDs while preserving values', () => { const callbacks = { foo: { fn1: 'some-id-here', fn2: 'another-id-here', }, test: [ ...
import { toast } from "react-hot-toast"; import { apiConnector } from "../apiconnector"; import { categories } from "../apis"; import { courseEndPoints } from "../apis"; const { CATEGORIES_API, CATEGORIES_PAGEDETAILS_API } = categories; const { CREATE_COURSE, UPDATE_COURSE_API, DELETE_COURSE_API, GET_COURSEDETA...
/* Copyright 2021. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed un...
import streamlit as st from audio_recorder_streamlit import audio_recorder import tempfile import requests import api_functional_call st.title('🤖 Voice Assistant 🎙️') audio_bytes = audio_recorder( text="Tap to start recording", recording_color="#ff5733", neutral_color="#3498db", icon_name="microphon...
package session.demo1; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.IOException; import java.io...
/********************************************************************\ * gncInvoice.h -- the Core Business Invoice Interface * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU...
import { Web3Provider } from "@ethersproject/providers"; import { useWeb3React } from "@web3-react/core"; import { getErrorMessage } from "../lib/utils"; import { ethers } from "ethers"; import { useCallback, useEffect, useMemo, useState } from "react"; import { toast } from "react-toastify"; import { useEtherContext }...
"use client"; import { cn } from "@/lib/utils"; import { ChevronDown, ChevronRightIcon, LucideIcon } from "lucide-react"; import React, { useState } from "react"; interface ItemProps { documentIcon?: string; active?: boolean; label: string; onClick?: () => void; icon: LucideIcon; children?: React.ReactNod...
package com.batuhan.interv.presentation.interview.enter import androidx.annotation.DrawableRes import androidx.annotation.StringRes import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layo...
package com.example.unsplashattestationproject.data.dto.collections import com.example.unsplashattestationproject.data.dto.photos.UnsplashUrls import com.squareup.moshi.Json import com.squareup.moshi.JsonClass @JsonClass(generateAdapter = true) data class CoverPhoto( val id:String, @Json(name="created_at")val...
The extract pass ---------------- - Like the :cmd:ref:`techmap` pass, the :cmd:ref:`extract` pass is called with a map file. It compares the circuits inside the modules of the map file with the design and looks for sub-circuits in the design that match any of the modules in the map file. - If a match is found, t...
<template> <div> <Input label="Titre de l'évènement" class="input-time" :disabled="!props.editMode" :vmodel="data.title" name-input="title" @input="handleChange" /> <InputDate label="Date" class="input-time" name="date" :disabled="!props.editMode" :placeholder="formatDate(data.start)" @handle-date-f...
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { SharedModule } from './shared/shared.module'; import { CoreModule } from './core/core.module'; import { ...
//define global value and mixin $device_type_desktop : "Desktop"; $device_type_desktop_and_laptop : "DesktopAndLaptop"; $device_type_tablet_and_ipad : "TabletAndIpad"; $device_type_tablet_and_mobile : "TabletAndMobile"; $device_type_mobile_phone : "MobilePhone"; $device_type_smaller_laptop : "SmallerThenLaptop"; $de...
// Задание 2. Интерфейс io.Reader // Что нужно сделать: // -Напишите программу, которая читает и выводит в консоль строки из файла, созданного в предыдущей практике, без использования ioutil. Если файл отсутствует или пуст, выведите в консоль соответствующее сообщение. package main import ( "fmt" "io" "os" ) func...
package org.example.calculator; import java.util.Arrays; public enum ArithmeticOperator { ADDITION("+") { @Override public int arithmeticCalculate(int operand1, int operand2) { return operand1 + operand2; } }, SUBTRACTION("-") { @Override public int arithme...
<?php namespace Drupal\node_layout_builder\Entity; use Drupal\Core\Entity\ContentEntityBase; use Drupal\Core\Field\BaseFieldDefinition; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\ContentEntityInterface; /** * Defines the LayoutBuilder entity. * * @ingroup layout_builder * * @ContentEntit...
<div class="login-page"> <%= render "devise/shared/error_messages", resource: resource%> <div class="signup-container"> <div class="signup-box"> <h3>New User? Sign up</h3> <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> <div class="field"> ...
import { Component, NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { CanDeactivateGuardService } from './candeactivate-guard.service'; import { AddStudentComponent } from './components/add-student/add-student.component'; import { EditStudentComponent } from './components...
.. Author: Stefan Feuz; http://www.laboratoridenvol.com .. Copyright: General Public License GNU GPL 3.0 Pre-Processor cells distribution In the window cells distribution the parameters out of the last section of the pre-processor input file can be edited. There are four different possibilities to define the c...
import React from 'react'; import { ScopeService } from '@neon/core'; import { useInject } from '../hooks/useInject'; export interface ScopedProps { scopes: string[]; children: React.ReactElement; } export const Scoped: React.FC<ScopedProps> = ({ scopes, children }) => { const [areScopesAttached, setScopesAtt...
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; namespace SSDLDotNetCore.RestApiWithNLayer.Features.MyanmarProverbs { [Route("api/[controller]")] [ApiController] public class MyanmarProverbsController : ControllerBase { public async Task<bl_Mmproverbs> G...
#ifndef BABELTRACE_REF_INTERNAL_H #define BABELTRACE_REF_INTERNAL_H /* * Babeltrace - Reference Counting * * Copyright 2013, 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com> * * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com> * * Permission is hereby granted, free of charge, to any person obta...
// App.tsx import React, { useState } from "react"; import "./App.css"; // Import your CSS file for styling import TaskList from "./tasklist"; import TaskForm from "./TaskForm"; const App: React.FC = () => { const [tasks, setTasks] = useState([ { id: 1, title: "Sample Task 1", description: "Description of ...
package com.petkoivanov.carCatalog.controllers; import com.petkoivanov.carCatalog.models.dtos.ModelDto; import com.petkoivanov.carCatalog.models.entities.Model; import com.petkoivanov.carCatalog.models.requests.ModelRequest; import com.petkoivanov.carCatalog.services.ModelService; import org.slf4j.Logger; import org.s...
package com.occulue.aggregate; import com.occulue.api.*; import com.occulue.entity.*; import com.occulue.exception.*; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; import org.axonframework.commandhandling.CommandHandler; import org.axonframework.modelling.command.AggregateMembe...
import glob import PyPDF2 import pdfplumber import xlwings as xw import requests import os import re import traceback # pip install PyMuPDF import fitz # PyMuPDF import re import pdf2image from PIL import Image import pytesseract import os import threading from queue import Queue import hashlib excel_file = 'Trust DF...
class Heap: def __init__(self, arr=None): if arr is None: self.heap = [] else: self.heapify(arr) def parentIndex(self, crrIdx): return (crrIdx - 1) // 2 if crrIdx > 0 else 0 def leftChildIndex(self, crrIdx): left_idx = (crrIdx * 2) + 1 return...
import pygame, sys from pygame.locals import QUIT import playsound import threading import os import ui import countdown import play_sound pygame.init() WIDTH, HEIGHT = 500, 300 WIN = pygame.display.set_mode((WIDTH, HEIGHT)) pygame.display.set_caption('Eye-saver') def set_font(font_type:str="Segoe-UI", font_size:i...
--- title: 知识图谱 date: 2024-06-07 15:59:42 categories: - NLP tags: --- ## 知识图谱的定义 - 是结构化的语义知识库,用于以符号形式描述物理世界中的概念及其相互关系.其基本组成单位是 “实体-关系-实体” 三元组, 以及实体及其相关属性-值对,实体间通过关系相互联结,构成网状的知识结构。 ## 知识图谱的理解 1. 知识图谱本身是一个具有属性的实体通过关系链接而成的网状知识库。从图的角度来看,知识图谱在本质上是一种概念网络,其中的节点表示物理世界的实体(或概念),而实体间的各种语义关系则构成网络中的边。由此,知识图谱是对物理世界的一种符号表达。 ...
import { Routes } from '@angular/router'; import { DashboardIndexComponent } from './app-index/app-index.component'; import { EditProfileComponent } from 'app/shared/modules/dashboard/edit-profile/edit-profile.component'; import { DataImportingComponent } from 'app/shared/modules/dashboard/data-importing/data-importi...
# Loop De Loop ## Introduction In this activity, you will practice using nested loops and nested conditionals while storing information about an amusement park's rides and prices. ## Instructions * Open the starter code and notice that two empty lists have been created: `rides` and `prices`. * Create a continuous ...
// Copyright (C) 2017 - IIT Bombay - FOSSEE // // This file must be used under the terms of the CeCILL. // This source file is licensed as described in the file COPYING, which // you should have received as part of this distribution. The terms // are also available at // http://www.cecill.info/licences/Licence_CeCILL_...
#include <iostream> using namespace std; //Creating a class node as done in the earlier code class Node{ public: int data; Node* next; Node () { data = 0; next = NULL; } Node (int data) { this->data = data; next = NULL; } }; //get Length function int getLength(Node* head) ...
class RemoveBtn { constructor(removeCallback) { this.removeBtn = document.createElement("button"); this.removeBtn.className = "removeBtn"; this.removeBtn.innerHTML = removeBtnText; this.removeBtn.onclick = () => { this.removeBtn.parentElement.remove(); // remove the note from the DOM remov...
#include <stdio.h> #include <stdlib.h> struct employee{ int employeeID; char firstName[100]; char lastName[100]; int age; float salary; struct employee *next; }*head=NULL,*tail=NULL,*temp=NULL, *prevtemp=NULL; int countNode(){ temp=head; int count=0; while(temp!=NULL){ tem...
--- import SectionContainer from "../components/landing/SectionContainer.astro"; import EndpointCard from "../components/landing/EndpoitInfo/EnpointCard.astro"; import EndpointItem from "../components/landing/EndpoitInfo/EndpointItem.astro"; import Layout from "../layouts/Layout.astro"; import InfoCard from "../compone...
# Audit Log Service This is a mock API intended to capture and query audit events. Built with Golang and MongoDB, it leverages JWT for authentication. ## Overview The API allows users to: - Obtain a **JWT** token for protected routes. - **Create** an audit log event. - **Query** audit log events based on specific pa...
INPUT FILES: conf.h: Header containing data structures and other headers used for distributed computing dcs.c: Program file containing code to implement distributed computing algorithm Makefile: makefile to build the code and link to executable COMPILATION: Have both dcs.c and conf.h in the same directory. Run bel...
// Copyright 2024 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import {assert} from 'chrome://resources/js/assert.js'; import {EventTracker} from 'chrome://resources/js/event_tracker.js'; import {createCustomEvent} from '../utils/event_ut...
import { Exclude } from "class-transformer"; import { Entity, Column, CreateDateColumn, UpdateDateColumn, PrimaryGeneratedColumn, JoinTable, OneToMany, } from "typeorm"; import { v4 as uuid } from "uuid"; //generate random id import { UserJWTToken } from "./UserJWTToken"; @Entity("users") export class Us...
/* @HEADER@ */ // ************************************************************************ // // Sundance // Copyright 2011 Sandia Corporation // // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, // the U.S. Government retains certain rights in this ...
package com.example.lab3 import android.app.DatePickerDialog import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.util.Log import android.view.View import android.view.inputmethod.EditorInfo import android.widget.ArrayAdapter import android.widget.Button import android.widget.EditTex...
import LogoIcon from "../../branding/logo/icon/index"; import { HeaderStyle, UnitBalanceBox } from "./style"; import IconButton from "@mui/material/IconButton"; import DarkModeIcon from "@mui/icons-material/DarkMode"; import LightModeIcon from "@mui/icons-material/LightMode"; import { useContext, useEffect, useState } ...
from imports import * from datamodule import * from init import labels_to_int ,int_to_labels # For converting XML annotations to YOLO format for a single image def convert_xml_to_YOLOformat(source, destination,labels_to_int): """ Converts XML annotations to YOLO format for a single image. Parameters: ...
import 'package:final_project_firebase/Themes/app_colors.dart'; import 'package:final_project_firebase/router/app_router.dart'; import 'package:final_project_firebase/views/home/home2_screen.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; enum MenuState { home, favourite, ...
package main import ( "fmt" "math/rand" "os" "text/template" "time" "github.com/mmcdole/gofeed" ) type Post struct { Title string URL string Date string } type TemplateData struct { Posts []Post Greeting string GeneratedAt string } var greetings = []string{"Hello", "Howdy", "Hi", "G'day", "...
计算机 应用 研究 APPLICATION RESEARCH OF COMPUTERS 2000   Vol.17   No.5   P.67 - 69 基于 三层 C / S 计算 模式 的 OPAC 的 设计 和 实现 王晔   张福炎   黄伟红   闵峰 摘 要 该文 详细 讨论 了 客户机 / 服务器 的 多层 计算 模式 , 阐述 了 基于 三层 客户机 / 服务器 模式 的 Oracle Application Server 的 结构 和 实现 机理 , 并 给出 了 设计 和 实现 联机 公共 查询 ( OPAC ) 的 方法 和 实例 。 ...
<template> <div class="container"> <div class="row g-0" style="background-color: #665494; min-height: 350px" > <div class="col-xl-4 col-lg-4 col-md-4 col-sm-3 col-3"> <MessageLeftSide @changeConversation="setCurrentConversation($event.conversation)"/> </div> <div clas...
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class BookingRequest extends FormRequest { /** * Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; } /** * Get the validation rules th...
<?php /** * The plugin bootstrap file * * This file is read by WordPress to generate the plugin information in the plugin * admin area. This file also includes all of the dependencies used by the plugin, * registers the activation and deactivation functions, and defines a function * that starts the plugin. * *...
import SourceryRuntime enum AutoRegistering { static func generate(types: Types, annotations: Annotations) -> String { var lines: [String] = [] lines.append(contentsOf: annotations.imports.map { "import \($0)" }) lines.append("") let containerName = annotations.containerName ?? "Co...
const express = require('express'); const router = express.Router(); // Sample book data const books = [ { id: 1, title: 'Book 1', author: 'Author 1', publishedYear: 2001 }, { id: 2, title: 'Book 2', author: 'Author 2', publishedYear: 2002 }, { id: 2, title: 'Book 3', author: 'Author 3', publishedYear: 200...
package Note.model; import javax.imageio.IIOException; import java.io.*; import java.util.ArrayList; import java.util.List; public class FileOperationImpl implements FileOperation { private String id; public FileOperationImpl (String id){ this.id = id; try (FileWriter writer = new FileWriter...
#pragma once #include <io_device.hpp> #include <istream> #include <vector> #include <memory> #include <mutex> class Disk { public: std::shared_ptr<std::istream> disk_stream; int last_sector; int current_sector; enum Status { STATUS_IDLE, STATUS_BUSY } status = STATUS_IDLE; ...
import tkinter as tk from tkinter import filedialog, messagebox import soundfile as sf import numpy as np from pydub import AudioSegment from pydub.playback import play from pydub.effects import normalize import pyloudnorm as pyln from spleeter.separator import Separator import threading import librosa import warnings ...
import { Client } from './Client' import { wrapError, PolybaseError } from './errors' import { Request, SenderResponse } from './types' export type SubscriptionFn<T> = ((data: T) => void) export type SubscriptionErrorFn = ((err: PolybaseError) => void) export type UnsubscribeFn = (() => void) export interface Subscri...
/* * COPYRIGHT(c) 2023 MONTA * * This file is part of Monta. * * The Monta software is licensed under the Business Source License 1.1. You are granted the right * to copy, modify, and redistribute the software, but only for non-production use or with a total * of less than three server instances. Starting from t...
package com.example.medz2; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.DiffUtil; import androidx.recyclerview.widget.ListAdapter; import androidx.recyclerview.widget...
# Copyright (C) 2006-2007 Red Hat, Inc. # Copyright (C) 2009 Aleksey Lim # # This program 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 2 of the License, or # (at your option) any later versio...
import { shallow } from "enzyme"; import ReactDOM from "react-dom"; import { EventDetailOfSnippetApply } from "@next-core/editor-bricks-helper"; import { BuilderContainer } from "./BuilderContainer"; import { BuilderClipboard, BuilderClipboardType, BuilderPasteDetailOfCopy, BuilderPasteDetailOfCut, } from "./in...
import java.util.EmptyStackException; public class Stack { private stackNode top; private int length; public class stackNode { private int data; private stackNode next; public stackNode(int data) { this.data = data; } } public Stack() { top = null; length = 0; } public ...
import atexit from sqlalchemy import Column, String, Integer, Text, DateTime, create_engine, func from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base PG_DSN = 'postgresql://app:1234@127.0.0.1:5431/ultimate' engine = create_engine(PG_DSN) Base = declarative_base() Session =...
// Copyright (c) 2016 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...